Fixed so fear is available as a resource to be deducted by actions

This commit is contained in:
WBHarry 2025-08-10 03:09:10 +02:00
parent 300719c116
commit ff889164fa

View file

@ -208,7 +208,14 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
} }
async consume(config, successCost = false) { 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) { for (var cost of config.costs) {
if (cost.keyIsID) { if (cost.keyIsID) {