mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
[Fix] 1676 - Horde Damage Fix (#1678)
* Fixed so that horde damage reduction is only applied to the standard attack * Changed to just adding 'isStandardAttack' in adversary data prep * .
This commit is contained in:
parent
340abbc98c
commit
1b09b44d6c
2 changed files with 6 additions and 1 deletions
|
|
@ -190,6 +190,10 @@ export default class DhpAdversary extends DhCreature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepareDerivedData() {
|
||||||
|
this.attack.roll.isStandardAttack = true;
|
||||||
|
}
|
||||||
|
|
||||||
_getTags() {
|
_getTags() {
|
||||||
const tags = [
|
const tags = [
|
||||||
game.i18n.localize(`DAGGERHEART.GENERAL.Tiers.${this.tier}`),
|
game.i18n.localize(`DAGGERHEART.GENERAL.Tiers.${this.tier}`),
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,8 @@ export default class DamageField extends fields.SchemaField {
|
||||||
if (data.hasRoll && part.resultBased && data.roll.result.duality === -1) return part.valueAlt;
|
if (data.hasRoll && part.resultBased && data.roll.result.duality === -1) return part.valueAlt;
|
||||||
|
|
||||||
const isAdversary = this.actor.type === 'adversary';
|
const isAdversary = this.actor.type === 'adversary';
|
||||||
if (isAdversary && this.actor.system.type === CONFIG.DH.ACTOR.adversaryTypes.horde.id) {
|
const isHorde = this.actor.system.type === CONFIG.DH.ACTOR.adversaryTypes.horde.id;
|
||||||
|
if (isAdversary && isHorde && this.roll?.isStandardAttack) {
|
||||||
const hasHordeDamage = this.actor.effects.find(x => x.type === 'horde');
|
const hasHordeDamage = this.actor.effects.find(x => x.type === 'horde');
|
||||||
if (hasHordeDamage && !hasHordeDamage.disabled) return part.valueAlt;
|
if (hasHordeDamage && !hasHordeDamage.disabled) return part.valueAlt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue