Fixed so fear is available as a resource to be deducted by actions (#757)

This commit is contained in:
WBHarry 2025-08-10 07:58:19 +02:00 committed by GitHub
parent 300719c116
commit 4d2c72fb84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -208,7 +208,14 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
}
async consume(config, successCost = false) {
const usefulResources = foundry.utils.deepClone(this.actor.system.resources);
const usefulResources = {
...foundry.utils.deepClone(this.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,
reversed: false
}
};
for (var cost of config.costs) {
if (cost.keyIsID) {