Merge branch 'main' into development

This commit is contained in:
WBHarry 2025-08-16 02:22:27 +02:00
commit 2820c96259
157 changed files with 1576 additions and 1286 deletions

View file

@ -209,8 +209,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,
@ -247,7 +248,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)) ||