mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
[Feature] 1766 - Group Attack (#1770)
* Implemented group attack logic * Updated all minions in the SRD to use the group attack functionality * . * Renamed groupAttack.nr to groupAttack.numAttackers * Moved the flag vs global setting logic to documents/scene * .
This commit is contained in:
parent
b505e15eb2
commit
ae480157d1
32 changed files with 1286 additions and 220 deletions
|
|
@ -8,13 +8,16 @@
|
|||
{{/if}}
|
||||
{{#unless (eq path 'system.attack.')}}<a data-action="addDamage" {{#if @root.allDamageTypesUsed}}disabled{{/if}}><i class="fa-solid fa-plus icon-button"></i></a>{{/unless}}
|
||||
</legend>
|
||||
<div class="nest-inputs space-between">
|
||||
<div class="nest-inputs">
|
||||
{{#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 directField value=source.direct name=(concat path "damage.direct") localize=true classes="checkbox"}}
|
||||
{{formField baseFields.direct value=source.direct name=(concat path "damage.direct") localize=true classes="checkbox"}}
|
||||
{{/unless}}
|
||||
{{#if (and @root.isNPC (not (eq path 'system.attack.')))}}
|
||||
{{formField baseFields.groupAttack value=source.groupAttack name=(concat path "damage.groupAttack") localize=true classes="select"}}
|
||||
{{/if}}
|
||||
</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 --}}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,24 @@
|
|||
</button>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#if damageOptions.groupAttack}}
|
||||
<fieldset class="group-attack-container">
|
||||
<legend>{{localize "DAGGERHEART.ACTIONS.Settings.groupAttack.label"}}</legend>
|
||||
|
||||
<div class="group-attack-inner-container">
|
||||
<input type="text" data-dtype="Number" name="damageOptions.groupAttack.numAttackers" value="{{damageOptions.groupAttack.numAttackers}}" />
|
||||
|
||||
<div class="group-attack-tools">
|
||||
<select name="damageOptions.groupAttack.range">
|
||||
{{selectOptions rangeOptions selected=damageOptions.groupAttack.range localize=true}}
|
||||
</select>
|
||||
<button data-action="updateGroupAttack"><i class="fa-solid fa-crosshairs"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
{{#unless (empty @root.modifiers)}}
|
||||
<fieldset class="modifier-container two-columns">
|
||||
<legend>{{localize "DAGGERHEART.GENERAL.Modifier.plural"}}</legend>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
>
|
||||
{{#if fields.roll}}{{> 'systems/daggerheart/templates/actionTypes/roll.hbs' fields=fields.roll.fields source=source.roll}}{{/if}}
|
||||
{{#if fields.save}}{{> 'systems/daggerheart/templates/actionTypes/save.hbs' fields=fields.save.fields source=source.save}}{{/if}}
|
||||
{{#if fields.damage}}{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage directField=fields.damage.fields.direct }}{{/if}}
|
||||
{{#if fields.damage}}{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=fields.damage.fields.parts.element.fields source=source.damage baseFields=fields.damage.fields }}{{/if}}
|
||||
{{#if fields.macro}}{{> 'systems/daggerheart/templates/actionTypes/macro.hbs' fields=fields.macro source=source.macro}}{{/if}}
|
||||
{{#if fields.effects}}{{> 'systems/daggerheart/templates/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}}
|
||||
{{#if fields.beastform}}{{> 'systems/daggerheart/templates/actionTypes/beastform.hbs' fields=fields.beastform.fields source=source.beastform}}{{/if}}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@
|
|||
</div>
|
||||
{{formGroup systemFields.criticalThreshold value=document._source.system.criticalThreshold label="DAGGERHEART.ACTIONS.Settings.criticalThreshold" name="system.criticalThreshold" localize=true}}
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack." directField=systemFields.attack.fields.damage.fields.direct horde=(eq document._source.system.type 'horde')}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack." baseFields=systemFields.attack.fields.damage.fields horde=(eq document._source.system.type 'horde')}}
|
||||
</section>
|
||||
|
|
@ -18,5 +18,5 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack." directField=systemFields.attack.fields.damage.fields.direct}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack." baseFields=systemFields.attack.fields.damage.fields}}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue