Will reimplement

This commit is contained in:
Nikhil Nagarajan 2025-12-27 10:43:45 -05:00
parent 84b28bd9c9
commit b8fcd440c6
3 changed files with 29 additions and 0 deletions

View file

@ -121,6 +121,11 @@
}, },
"cost": { "cost": {
"stepTooltip": "+{step} per step" "stepTooltip": "+{step} per step"
},
"summon":{
"addSummonEntry": "Add Summon Entry",
"actorUUID": "Actor to Summon",
"count": "Count"
} }
} }
}, },

View file

@ -23,4 +23,14 @@ export default class DHSummonAction extends DHBaseAction {
get canSummon() { get canSummon() {
return game.user.can('TOKEN_CREATE'); return game.user.can('TOKEN_CREATE');
} }
//Accessor for summon manager for performing the summon action
get summonManager() {
return game.dh.summon; //incomplete implementation
}
//Logic to perform the summon action - incomplete implementation
async _performAction(event, ...args) {
return this.summonManager.summonTokens(this.tokenArray);
}
} }

View file

@ -0,0 +1,14 @@
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.ACTIONS.TYPES.summon.name"}}</legend>
<p class="hint">{{localize "DAGGERHEART.ACTIONS.Settings.summonHint"}}</p>
<div class="nest-inputs">
{{#each source.tokenArray}}
<div class="summon-entry">
{{formField ../fields.documentUUID label=DAGGERHEART.ACTIONS.Settings.summon.actorUUID name="tokenArray.{{@index}}.actorUUID" value=this.actorUUID documentType="Actor"}}
{{formField ../fields.number label=DAGGERHEART.ACTIONS.Settings.summon.count name="tokenArray.{{@index}}.count" value=this.count min=1}}
<button type="button" class="remove-summon-entry" data-index="{{@index}}" title="{{localize 'DAGGERHEART.UI.Button.remove'}}"><i class="fa-solid fa-trash"></i></button>
</div>
{{/each}}
<button type="button" class="add-summon-entry" title="{{localize 'DAGGERHEART.UI.Button.add'}}"><i class="fa-solid fa-plus"></i> {{localize "DAGGERHEART.ACTIONS.Settings.summon.addSummonEntry"}}</button>
</div>
</fieldset>