This commit is contained in:
WBHarry 2025-11-10 14:02:44 +01:00 committed by GitHub
parent 321b7c2da3
commit 66961d7fea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 10 deletions

View file

@ -166,11 +166,16 @@ export const healingTypes = {
export const defeatedConditions = () => { export const defeatedConditions = () => {
const defeated = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation).defeated; const defeated = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Automation).defeated;
return Object.values(defeatedConditionChoices).map(x => ({ return Object.keys(defeatedConditionChoices).reduce((acc, key) => {
...x, const choice = defeatedConditionChoices[key];
img: defeated[`${x.id}Icon`], acc[key] = {
description: `DAGGERHEART.CONFIG.Condition.${x.id}.description` ...choice,
})); img: defeated[`${choice.id}Icon`],
description: `DAGGERHEART.CONFIG.Condition.${choice.id}.description`
};
return acc;
}, {});
}; };
const defeatedConditionChoices = { const defeatedConditionChoices = {

View file

@ -85,7 +85,7 @@ export default class DamageField extends fields.SchemaField {
const targetDamage = []; const targetDamage = [];
const damagePromises = []; const damagePromises = [];
for (let target of targets) { for (let target of targets) {
const actor = fromUuidSync(target.actorId); const actor = foundry.utils.fromUuidSync(target.actorId);
if (!actor) continue; if (!actor) continue;
if (!config.hasHealing && config.onSave && target.saved?.success === true) { if (!config.hasHealing && config.onSave && target.saved?.success === true) {
const mod = CONFIG.DH.ACTIONS.damageOnSave[config.onSave]?.mod ?? 1; const mod = CONFIG.DH.ACTIONS.damageOnSave[config.onSave]?.mod ?? 1;
@ -98,17 +98,16 @@ export default class DamageField extends fields.SchemaField {
}); });
} }
const token = game.scenes.find(x => x.active).tokens.find(x => x.id === target.id);
if (config.hasHealing) if (config.hasHealing)
damagePromises.push( damagePromises.push(
actor actor.takeHealing(config.damage).then(updates => targetDamage.push({ token, updates }))
.takeHealing(config.damage)
.then(updates => targetDamage.push({ token: actor.token ?? actor.prototypeToken, updates }))
); );
else else
damagePromises.push( damagePromises.push(
actor actor
.takeDamage(config.damage, config.isDirect) .takeDamage(config.damage, config.isDirect)
.then(updates => targetDamage.push({ token: actor.token ?? actor.prototypeToken, updates })) .then(updates => targetDamage.push({ token, updates }))
); );
} }

View file

@ -1,3 +1,9 @@
.theme-light .daggerheart.placeable-hud {
.status-effects .effect-control {
filter: none;
}
}
.daggerheart.placeable-hud { .daggerheart.placeable-hud {
.col.right { .col.right {
.palette { .palette {