[Feature] 494 - Adversaries Tier 1 (#500)

* Some work

* More work

* Finished Tier 1
This commit is contained in:
WBHarry 2025-08-01 16:43:59 +02:00 committed by GitHub
parent 3014be79ad
commit 263dfa69ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 15171 additions and 972 deletions

View file

@ -10,10 +10,8 @@ export default class DHDamageAction extends DHBaseAction {
const isAdversary = this.actor.type === 'adversary';
if (isAdversary && this.actor.system.type === CONFIG.DH.ACTOR.adversaryTypes.horde.id) {
const hasHordeDamage = this.actor.effects.find(
x => x.name === game.i18n.localize('DAGGERHEART.CONFIG.AdversaryType.horde.label')
);
if (hasHordeDamage) return part.valueAlt;
const hasHordeDamage = this.actor.effects.find(x => x.type === 'horde');
if (hasHordeDamage && !hasHordeDamage.disabled) return part.valueAlt;
}
return formulaValue;
@ -47,7 +45,9 @@ export default class DHDamageAction extends DHBaseAction {
formulas = this.formatFormulas(formulas, systemData);
const config = {
title: game.i18n.format(`DAGGERHEART.UI.Chat.${ this.type === 'healing' ? 'healing' : 'damage'}Roll.title`, { damage: game.i18n.localize(this.name) }),
title: game.i18n.format(`DAGGERHEART.UI.Chat.${this.type === 'healing' ? 'healing' : 'damage'}Roll.title`, {
damage: game.i18n.localize(this.name)
}),
roll: formulas,
targets: systemData.targets?.filter(t => t.hit) ?? data.targets,
hasSave: this.hasSave,