direct damage (#873)

This commit is contained in:
Dapoulp 2025-08-12 18:37:16 +02:00 committed by GitHub
parent 6e747e67ee
commit 06184773b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 37 additions and 14 deletions

View file

@ -8,9 +8,14 @@
{{/if}}
{{#unless (eq path 'system.attack.')}}<a><i class="fa-solid fa-plus icon-button" data-action="addDamage"></i></a>{{/unless}}
</legend>
{{#if @root.hasBaseDamage}}
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase name="damage.includeBase" classes="checkbox" localize=true }}
{{/if}}
<div class="nest-inputs space-between">
{{#if @root.hasBaseDamage}}
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase name="damage.includeBase" classes="checkbox" localize=true }}
{{/if}}
{{#unless (eq @root.source.type 'healing')}}
{{formField @root.fields.damage.fields.direct value=@root.source.damage.direct name="damage.direct" localize=true classes="checkbox"}}
{{/unless}}
</div>
{{#each source.parts as |dmg index|}}
{{#if (and @root.hasBaseDamage @root.source.damage.includeBase)}}
{{setVar 'realIndex' (add index -1)}}

View file

@ -3,7 +3,7 @@
<div class="roll-part-extra on-reduced">
<div class="wrapper">
{{#each damage as | roll index | }}
<div class="roll-formula">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}}: {{total}}</div>
<div class="roll-formula">{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll')}}: {{total}}</div>
{{/each}}
</div>
</div>
@ -12,8 +12,8 @@
<div class="wrapper">
{{#each damage as | roll index | }}
<fieldset>
<legend>
{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.name')}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>
<legend>{{log @root}}
{{localize (concat 'DAGGERHEART.CONFIG.HealingType.' index '.inChatRoll')}} <div class="roll-formula">{{localize "DAGGERHEART.GENERAL.total"}}: {{roll.total}}</div>{{#if (and (eq index "hitPoints")../isDirect)}} <div class="roll-formula">{{localize "DAGGERHEART.CONFIG.DamageType.direct.short"}}</div>{{/if}}
</legend>
{{#each roll.parts}}
{{#if damageTypes.length}}