Files
DeltaGreen2/templates/item/item-weapon-sheet.html
T
tevansandClaude Fable 5 69e10765f2 Add GM automation: templated roll cards, apply buttons, ammo tracking
- Percentile roll cards: outcome banners (crit/success/failure) with icons
  and margin-of-success text instead of color-only inline styles.
- Damage and lethality cards: Apply Damage / Apply Lethality buttons that
  hit targeted or selected tokens, auto-subtracting equipped armor
  protection reduced by the weapon's armor-piercing value.
- Sanity damage cards: apply buttons for success/failure loss with GM
  whispers for temporary insanity (5+), breaking point crossings, and 0 SAN.
- Ammo: weapon ammo is now numeric with a magazine capacity; attack rolls
  expend a round (ammoTracking setting, default on), gear tab shows an
  ammo column with a reload control, compendium weapons carry capacities.
- CSS: drop live Google Fonts imports (offline reliability); DG2 styles
  with dark-theme support.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 17:36:30 +01:00

133 lines
7.7 KiB
HTML

<form class="{{cssClass}} {{getCharacterSheetStyle}}" autocomplete="off">
<header class="">
<div class="weapon-sheet-grid-2col">
<img class="item-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="weapon-sheet-horizontal-grid-2col">
<span class="resource-label">{{localize 'DG.Bonds.Name'}}:</span>
<input name="name" type="text" value="{{item.name}}" placeholder="{{localize 'DG.ItemWindow.Weapons.NamePlaceholder'}}"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Expense'}}:</span>
<select name="system.expense" >
<option {{#if_eq item.system.expense 'NA'}}selected{{/if_eq}} value="NA">{{localize 'DG.Gear.Expense.NA'}}</option>
<option {{#if_eq item.system.expense 'Incidental'}}selected{{/if_eq}} value="Incidental">{{localize 'DG.Gear.Expense.Incidental'}}</option>
<option {{#if_eq item.system.expense 'Standard'}}selected{{/if_eq}} value="Standard">{{localize 'DG.Gear.Expense.Standard'}}</option>
<option {{#if_eq item.system.expense 'Unusual'}}selected{{/if_eq}} value="Unusual">{{localize 'DG.Gear.Expense.Unusual'}}</option>
<option {{#if_eq item.system.expense 'Major'}}selected{{/if_eq}} value="Major">{{localize 'DG.Gear.Expense.Major'}}</option>
<option {{#if_eq item.system.expense 'Extreme'}}selected{{/if_eq}} value="Extreme">{{localize 'DG.Gear.Expense.Extreme'}}</option>
</select>
<span class="resource-label">{{localize 'DG.ItemWindow.Gear.Equipped'}}:</span>
<input class="labeled-resource-checkbox" type="checkbox" name="system.equipped" {{checked item.system.equipped}} data-dtype="Boolean" />
</div>
</div>
<div class="weapon-sheet-outer-grid-2col">
<div class="weapon-sheet-horizontal-grid-left-2col">
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Skill'}}:</span>
<select name="system.skill" >
<option {{#if_eq item.system.skill 'firearms'}}selected{{/if_eq}} value="firearms">{{localize 'DG.Skills.firearms'}}</option>
<option {{#if_eq item.system.skill 'melee_weapons'}}selected{{/if_eq}} value="melee_weapons">{{localize 'DG.Skills.melee_weapons'}}</option>
<option {{#if_eq item.system.skill 'unarmed_combat'}}selected{{/if_eq}} value="unarmed_combat">{{localize 'DG.Skills.unarmed_combat'}}</option>
<option {{#if_eq item.system.skill 'heavy_weapons'}}selected{{/if_eq}} value="heavy_weapons">{{localize 'DG.Skills.heavy_weapons'}}</option>
<option {{#if_eq item.system.skill 'athletics'}}selected{{/if_eq}} value="athletics">{{localize 'DG.Skills.athletics'}}</option>
<option {{#if_eq item.system.skill 'demolitions'}}selected{{/if_eq}} value="demolitions">{{localize 'DG.Skills.demolitions'}}</option>
<option {{#if_eq item.system.skill 'artillery'}}selected{{/if_eq}} value="artillery">{{localize 'DG.Skills.artillery'}}</option>
<option {{#if_eq item.system.skill 'str'}}selected{{/if_eq}} value="str">{{localize 'DG.Attributes.str'}}x5</option>
<option {{#if_eq item.system.skill 'con'}}selected{{/if_eq}} value="con">{{localize 'DG.Attributes.con'}}x5</option>
<option {{#if_eq item.system.skill 'dex'}}selected{{/if_eq}} value="dex">{{localize 'DG.Attributes.dex'}}x5</option>
<option {{#if_eq item.system.skill 'int'}}selected{{/if_eq}} value="int">{{localize 'DG.Attributes.int'}}x5</option>
<option {{#if_eq item.system.skill 'pow'}}selected{{/if_eq}} value="pow">{{localize 'DG.Attributes.pow'}}x5</option>
<option {{#if_eq item.system.skill 'cha'}}selected{{/if_eq}} value="cha">{{localize 'DG.Attributes.cha'}}x5</option>
<option {{#if_eq item.system.skill 'custom'}}selected{{/if_eq}} value="custom">{{localize 'DG.ItemWindow.Custom'}}</option>
</select>
</div>
<div class="weapon-sheet-horizontal-grid-right-2col">
{{#if_eq item.system.skill 'custom'}}
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.CustomSkillTarget'}}:</span>
<input type="text" name="system.customSkillTarget" value="{{../item.system.customSkillTarget}}" data-dtype="Number"/>
{{/if_eq}}
</div>
<!-- left 'column' (label and value)-->
<div class="weapon-sheet-horizontal-grid-left-2col">
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.ArmorPiercing'}}:</span>
<input type="text" name="system.armorPiercing" value="{{item.system.armorPiercing}}" data-dtype="Number"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.SkillModifier'}}:</span>
<input type="text" name="system.skillModifier" value="{{item.system.skillModifier}}" data-dtype="Number"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.IsLethality'}}:</span>
<input class="labeled-resource-checkbox" type="checkbox" name="system.isLethal" {{checked item.system.isLethal}} data-dtype="Boolean"
title="{{localize 'DG.ItemWindow.Weapons.IsLethalityTooltip'}}"
/>
</div>
<!-- right 'column' (label and value)-->
<div class="weapon-sheet-horizontal-grid-right-2col">
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Range'}}:</span>
<input type="text" name="system.range" value="{{item.system.range}}" data-dtype="String"/>
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.KillRadius'}}:</span>
<input type="text" name="system.killRadius" value="{{item.system.killRadius}}" data-dtype="String"/>
{{!-- If a weapon is 'Lethal', need to show the d100% Lethality input, otherwise only show the regular Damage formula (e.g. 1D6, 1D4+2, etc...) --}}
{{#unless item.system.isLethal}}
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Damage'}}:</span>
<input type="text" name="system.damage" value="{{item.system.damage}}" data-dtype="String"/>
{{/unless}}
{{#if item.system.isLethal}}
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Lethality'}} %:</span>
<input class="" type="text" name="system.lethality" value="{{item.system.lethality}}" data-dtype="Number"
title="{{localize 'DG.ItemWindow.Weapons.LethalityTooltip'}}"
/>
{{/if}}
</div>
</div>
<div class="weapon-sheet-secondary-grid-2col">
<span class="resource-label">{{localize 'DG.ItemWindow.Weapons.Ammo'}}:</span>
<span class="dg2-ammo-inputs">
<input type="number" name="system.ammo" value="{{item.system.ammo}}" data-dtype="Number" min="0" step="1"/>
/
<input type="number" name="system.ammoMax" value="{{item.system.ammoMax}}" data-dtype="Number" min="0" step="1"
title="{{localize 'DG2.Ammo.CapacityTooltip'}}"/>
</span>
</div>
<br>
</header>
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="description">{{localize 'DG.ItemWindow.Weapons.Description'}}</a>
</nav>
{{!-- Sheet Body --}}
<section class="sheet-body" style="max-height: 25%;">
{{!-- Description Tab --}}
<div class="tab" data-group="primary" data-tab="description">
<div class="editor-host">
{{editor enrichedDescription target="system.description" engine="prosemirror" button=true owner=owner editable=editable}}
</div>
</div>
</section>
</form>