Merge branch 'development' into task/415-action-refactor-part-2

This commit is contained in:
Dapoolp 2025-08-16 13:39:54 +02:00
commit 1228eb0105
157 changed files with 1576 additions and 1286 deletions

View file

@ -234,8 +234,9 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
async consume(config, successCost = false) {
const usefulResources = {
...foundry.utils.deepClone(this.actor.system.resources),
const actor= this.actor.system.partner ?? this.actor,
usefulResources = {
...foundry.utils.deepClone(actor.system.resources),
fear: {
value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear),
max: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear,
@ -272,7 +273,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
}, []);
await (this.actor.system.partner ?? this.actor).modifyResource(resources);
await actor.modifyResource(resources);
if (
config.uses?.enabled &&
((!successCost && (!config.uses?.consumeOnSuccess || config.roll?.success)) ||