vagabond-rpg-foundryvtt/templates/actor/npc-abilities.hbs
Cal Corum 8e097c9b2d Implement character sheet foundation with ApplicationV2
Add actor sheet implementation using Foundry VTT v13 ApplicationV2 API:
- Base actor sheet class with tab navigation, drag-drop, scroll preservation
- Character sheet with header, main tab (stats, saves, skills, attacks)
- NPC sheet structure (templates only, styling pending)
- Resource bars with fill effect and backdrop pills for legibility
- Responsive layout using CSS Container Queries
- Fix for ApplicationV2 tab switching (cleanup stale parts)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 16:43:28 -06:00

46 lines
1.8 KiB
Handlebars

{{!-- NPC Sheet Abilities Section --}}
<section class="npc-abilities">
<div class="section-header-row">
<h2 class="section-header">{{localize "VAGABOND.Abilities"}}</h2>
<button type="button" class="ability-add" data-action="addAbility"
data-tooltip="{{localize 'VAGABOND.AddAbility'}}">
<i class="fa-solid fa-plus"></i>
</button>
</div>
<ul class="ability-list">
{{#each abilities}}
<li class="ability-item" data-ability-index="{{this.index}}">
<div class="ability-header">
<input type="text" class="ability-name" name="system.abilities.{{this.index}}.name"
value="{{this.name}}" placeholder="{{localize 'VAGABOND.AbilityName'}}" />
<div class="ability-controls">
<label class="ability-passive">
<input type="checkbox" name="system.abilities.{{this.index}}.passive"
{{#if this.passive}}checked{{/if}} />
{{localize "VAGABOND.Passive"}}
</label>
<button type="button" class="ability-delete" data-action="deleteAbility"
data-ability-index="{{this.index}}" data-tooltip="{{localize 'VAGABOND.DeleteAbility'}}">
<i class="fa-solid fa-trash"></i>
</button>
</div>
</div>
<div class="ability-description">
<textarea name="system.abilities.{{this.index}}.description"
placeholder="{{localize 'VAGABOND.AbilityDescription'}}">{{this.description}}</textarea>
</div>
</li>
{{else}}
<li class="ability-item empty">
<p>{{localize "VAGABOND.NoAbilities"}}</p>
<button type="button" data-action="addAbility">
<i class="fa-solid fa-plus"></i>
{{localize "VAGABOND.AddAbility"}}
</button>
</li>
{{/each}}
</ul>
</section>