mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Fixed IncludeBaseDamage to be an override
This commit is contained in:
parent
03110377e1
commit
c683bc4352
4 changed files with 44 additions and 38 deletions
|
|
@ -113,7 +113,9 @@
|
|||
"deleteTriggerTitle": "Delete Trigger",
|
||||
"deleteTriggerContent": "Are you sure you want to delete the {trigger} trigger?",
|
||||
"advantageState": "Advantage State",
|
||||
"damageOnSave": "Damage on Save"
|
||||
"damageOnSave": "Damage on Save",
|
||||
"useDefaultItemValues": "Use default Item values",
|
||||
"itemDamageIsUsed": "Item Damage Is Used"
|
||||
},
|
||||
"RollField": {
|
||||
"diceRolling": {
|
||||
|
|
@ -128,7 +130,7 @@
|
|||
"attackModifier": "Attack Modifier",
|
||||
"attackName": "Attack Name",
|
||||
"criticalThreshold": "Critical Threshold",
|
||||
"includeBase": { "label": "Include Item Damage" },
|
||||
"includeBase": { "label": "Use Item Damage" },
|
||||
"groupAttack": { "label": "Group Attack" },
|
||||
"multiplier": "Multiplier",
|
||||
"saveHint": "Set a default Trait to enable Reaction Roll. It can be changed later in Reaction Roll Dialog.",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default class DHAttackAction extends DHDamageAction {
|
|||
if (!!this.item?.system?.attack) {
|
||||
if (this.damage.includeBase) {
|
||||
const baseDamage = this.getParentDamage();
|
||||
this.damage.parts.unshift(new DHDamageData(baseDamage));
|
||||
this.damage.parts.hitPoints = new DHDamageData(baseDamage);
|
||||
}
|
||||
if (this.roll.useDefault) {
|
||||
this.roll.trait = this.item.system.attack.roll.trait;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
|
||||
{{!-- Handlebars uses Symbol.Iterator to produce index|key. This isn't compatible with our parts object, so we instead use applyTo, which is the same value --}}
|
||||
{{#each source.parts as |dmg|}}
|
||||
{{#each source.parts as |dmg key|}}
|
||||
<div class="nest-inputs">
|
||||
<fieldset{{#if dmg.base}} disabled{{/if}} class="one-column{{#if ../path}} no-style{{/if}}">
|
||||
<legend class="with-icon">
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
{{/unless}}
|
||||
</legend>
|
||||
|
||||
{{#unless (and @root.source.damage.includeBase (eq key 'hitPoints'))}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
||||
{{formField ../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." dmg.applyTo ".resultBased") localize=true classes="checkbox"}}
|
||||
{{/if}}
|
||||
|
|
@ -65,6 +66,9 @@
|
|||
</fieldset>
|
||||
{{/if}}
|
||||
<input type="hidden" name="{{concat ../path "damage.parts." dmg.applyTo ".base"}}" value="{{dmg.base}}">
|
||||
{{else}}
|
||||
<span class="hint">{{localize "DAGGERHEART.ACTIONS.Config.itemDamageIsUsed"}}</span>
|
||||
{{/unless}}
|
||||
</fieldset>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<fieldset class="one-column{{#if source.useDefault}} child-disabled{{/if}}">
|
||||
<legend>
|
||||
Roll
|
||||
{{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip="Use default Item values" tooltipDirection="UP")}}{{/if}}
|
||||
{{localize "DAGGERHEART.GENERAL.roll"}}
|
||||
{{#if @root.hasBaseDamage}}{{formInput fields.useDefault name="roll.useDefault" value=source.useDefault dataset=(object tooltip=(localize "DAGGERHEART.ACTIONS.Config.useDefaultItemValues") tooltipDirection="UP")}}{{/if}}
|
||||
</legend>
|
||||
|
||||
{{formField fields.type label="DAGGERHEART.GENERAL.type" name="roll.type" value=source.type localize=true choices=@root.getRollTypeOptions localize=true}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue