[V14] Effect Stacking (#1667)

* Added the ability for effects to have stacks

* Fixed effect stacking

* Improved token overlay spacing

* Compendium updaetes

* Simplify effect click event (#1748)

* Fixed a bunch of deprecations

* Corrected AgileScout Beastform json data

* Updated TokenHUD to the new v14

* Removed DestroyOnEmpty from consumables

* Fixed so that tooltips don't get stuck (#1745)

* [Feature] TagTeam Partial Rendering (#1735)

* I done did it, I think

* Think I fixed the partial rendering bug for gm->player

* [V14] 1743 - Damage Update Error (#1746)

* Fixed DamageParts causing errors on update

* Fixed ActionBaseConfig error when no damage present on the action

* Fix removal of damage field

* Removed unneccessary default value function for parts

---------

Co-authored-by: Carlos Fernandez <cfern1990@gmail.com>

* Simplify effect click event

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: WBHarry <89362246+WBHarry@users.noreply.github.com>

* Fixed stacking-value pointer event

* Set the stacking value in EffectsDisplay to be tabular-nums for monospacing

* Made baseEffect.stacking nullable instead of having an enabled property

* .

* Fixed so that actor._onUpdateDescantDocuments re-renders the EffectDisplay if effects were updated

---------

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
WBHarry 2026-03-25 13:54:14 +01:00 committed by GitHub
parent 64ce615116
commit aa1d117c43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 349 additions and 204 deletions

View file

@ -14,8 +14,12 @@
{{/each}}
</ol>
<fieldset class="armor-change-container">
<legend>{{localize "DAGGERHEART.GENERAL.armor"}} <input type="checkbox" class="armor-change-checkbox" data-index="{{typedChanges.armor.index}}" {{checked typedChanges.armor}} /></legend>
<fieldset class="armor-change-container optional">
<legend>
{{localize "DAGGERHEART.GENERAL.armor"}}
<input type="checkbox" class="armor-change-checkbox" data-index="{{typedChanges.armor.index}}" {{checked typedChanges.armor}} />
</legend>
{{#if typedChanges.armor}}
{{> "systems/daggerheart/templates/sheets/activeEffect/typeChanges/armorChange.hbs" typedChanges.armor fields=@root.systemFields.changes.element.types.armor.fields}}
{{/if}}

View file

@ -1,4 +1,18 @@
<section class="tab{{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
<fieldset class="one-column optional">
<legend>
{{localize "DAGGERHEART.ACTIVEEFFECT.Config.stacking.title"}}
<input type="checkbox" class="stacking-change-checkbox" {{checked source.system.stacking}} />
</legend>
{{#if source.system.stacking}}
<div class="two-columns even full-width">
{{formGroup systemFields.stacking.fields.value value=source.system.stacking.value localize=true }}
{{formGroup systemFields.stacking.fields.max value=source.system.stacking.max localize=true }}
</div>
{{/if}}
</fieldset>
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.ACTIVEEFFECT.Config.rangeDependence.title"}}</legend>

View file

@ -8,6 +8,9 @@
<a {{#if effect.condition}}disabled{{/if}}>
<img src="{{effect.img}}" />
</a>
{{#if (gt effect.system.stacking.value 1)}}
<span class="stacking-value">{{effect.system.stacking.value}}</span>
{{/if}}
{{#if effect.condition}}<i class="effect-locked fa-solid fa-lock"></i>{{/if}}
</span>
{{/each}}

View file

@ -17,7 +17,6 @@
{{/if}}
{{#if effect.system.duration.type}}
<div class="duration-container">
<div class="duration-inner-container">
<span>{{localize "EFFECT.DURATION.Label"}}:</span>
@ -26,9 +25,42 @@
</div>
{{/if}}
{{#if effect.system.stacking}}
<div class="effect-stacks-outer-container">
<div class="effect-stacks-title">{{localize "Stacks"}}</div>
<div class="effect-stacks-container">
<div class="effect-stacks-inner-container">
<span class="effect-stack-title">{{localize "Current"}}</span>
<span>{{effect.system.stacking.value}}</span>
</div>
<div class="effect-stacks-inner-container">
<span class="effect-stack-title">{{localize "Max"}}</span>
<span>{{effect.system.stacking.max}}</span>
</div>
</div>
</div>
{{/if}}
{{#unless effect.isLockedCondition}}
<p class="close-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}}
</p>
<div class="close-hints">
{{#if effect.system.stacking}}
<p class="close-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.EffectsDisplay.increaseStacks"}}
</p>
{{#if (gt effect.system.stacking.value 1)}}
<p class="close-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.EffectsDisplay.decreaseStacks"}}
</p>
{{else}}
<p class="close-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}}
</p>
{{/if}}
{{else}}
<p class="close-hint">
<i class="fa-solid fa-computer-mouse"></i> {{localize "DAGGERHEART.UI.EffectsDisplay.removeThing" thing=(localize "DAGGERHEART.GENERAL.Effect.single")}}
</p>
{{/if}}
</div>
{{/unless}}
</div>