mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Fixed logic
This commit is contained in:
parent
f33dc8c4af
commit
ea708e85e2
7 changed files with 20 additions and 11 deletions
|
|
@ -9,8 +9,10 @@ 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 halfHP = Math.ceil(this.actor.system.resources.hitPoints.max / 2);
|
||||
if (this.actor.system.resources.hitPoints.value >= halfHP) return part.valueAlt;
|
||||
const hasHordeDamage = this.actor.effects.find(
|
||||
x => x.name === game.i18n.localize('DAGGERHEART.CONFIG.AdversaryType.horde.label')
|
||||
);
|
||||
if (hasHordeDamage) return part.valueAlt;
|
||||
}
|
||||
|
||||
return formulaValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue