vagabond-rpg-foundryvtt/templates/actor/npc-actions.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

81 lines
3.1 KiB
Handlebars

{{!-- NPC Sheet Actions Section --}}
<section class="npc-actions">
<div class="section-header-row">
<h2 class="section-header">{{localize "VAGABOND.Actions"}}</h2>
<button type="button" class="action-add" data-action="addAction"
data-tooltip="{{localize 'VAGABOND.AddAction'}}">
<i class="fa-solid fa-plus"></i>
</button>
</div>
<ul class="action-list">
{{#each actions}}
<li class="action-item" data-action-index="{{this.index}}">
<div class="action-header">
<input type="text" class="action-name" name="system.actions.{{this.index}}.name"
value="{{this.name}}" placeholder="{{localize 'VAGABOND.ActionName'}}" />
<div class="action-controls">
<button type="button" class="action-roll" data-action="rollAction"
data-action-index="{{this.index}}" data-tooltip="{{localize 'VAGABOND.RollAction'}}">
<i class="fa-solid fa-dice-d20"></i>
</button>
<button type="button" class="action-delete" data-action="deleteAction"
data-action-index="{{this.index}}" data-tooltip="{{localize 'VAGABOND.DeleteAction'}}">
<i class="fa-solid fa-trash"></i>
</button>
</div>
</div>
<div class="action-details">
<div class="action-field attack-type">
<label>{{localize "VAGABOND.AttackType"}}</label>
<select name="system.actions.{{this.index}}.attackType">
{{#each ../attackTypeOptions}}
<option value="{{@key}}" {{#if (eq @key ../this.attackType)}}selected{{/if}}>
{{localize this}}
</option>
{{/each}}
</select>
</div>
<div class="action-field damage">
<label>{{localize "VAGABOND.Damage"}}</label>
<input type="text" name="system.actions.{{this.index}}.damage"
value="{{this.damage}}" placeholder="1d6" />
</div>
<div class="action-field damage-type">
<label>{{localize "VAGABOND.DamageType"}}</label>
<select name="system.actions.{{this.index}}.damageType">
{{#each ../damageTypeOptions}}
<option value="{{@key}}" {{#if (eq @key ../this.damageType)}}selected{{/if}}>
{{localize this}}
</option>
{{/each}}
</select>
</div>
<div class="action-field range">
<label>{{localize "VAGABOND.Range"}}</label>
<input type="text" name="system.actions.{{this.index}}.range"
value="{{this.range}}" placeholder="60 ft" />
</div>
</div>
<div class="action-description">
<textarea name="system.actions.{{this.index}}.description"
placeholder="{{localize 'VAGABOND.ActionDescription'}}">{{this.description}}</textarea>
</div>
</li>
{{else}}
<li class="action-item empty">
<p>{{localize "VAGABOND.NoActions"}}</p>
<button type="button" data-action="addAction">
<i class="fa-solid fa-plus"></i>
{{localize "VAGABOND.AddAction"}}
</button>
</li>
{{/each}}
</ul>
</section>