[Feature] Phase Transform (#1710)

* Added transform action to handle phased adversaries

* Added support for keeping currently marked hitPoints/stress when transforming

* Minor fixes

* Compendium update

* Added consideration for an active combatant
This commit is contained in:
WBHarry 2026-03-08 14:34:22 +01:00 committed by GitHub
parent f1f5102af1
commit a42d708f15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 406 additions and 43 deletions

View file

@ -197,7 +197,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
async executeWorkflow(config) {
for (const [key, part] of this.workflow) {
if (Hooks.call(`${CONFIG.DH.id}.pre${key.capitalize()}Action`, this, config) === false) return;
if ((await part.execute(config)) === false) return;
if ((await part.execute(config)) === false) return false;
if (Hooks.call(`${CONFIG.DH.id}.post${key.capitalize()}Action`, this, config) === false) return;
}
}
@ -224,7 +224,9 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
// Execute the Action Worflow in order based of schema fields
await this.executeWorkflow(config);
const result = await this.executeWorkflow(config);
if (result === false) return;
await config.resourceUpdates.updateResources();
if (Hooks.call(`${CONFIG.DH.id}.postUseAction`, this, config) === false) return;