mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Relocate Damage Reduction
This commit is contained in:
parent
7b24cc01eb
commit
081ebf5bb3
4 changed files with 6 additions and 9 deletions
|
|
@ -510,10 +510,10 @@ export default class DhpActor extends Actor {
|
|||
calculateDamage(baseDamage, type) {
|
||||
if (Hooks.call(`${CONFIG.DH.id}.preCalculateDamage`, this, baseDamage, type) === false) return null;
|
||||
|
||||
if(this.system.resistance[type].immunity) return 0;
|
||||
if(this.system.resistance[type].resistance) baseDamage = Math.ceil(baseDamage / 2);
|
||||
if(this.system.resistance[type]?.immunity) return 0;
|
||||
if(this.system.resistance[type]?.resistance) baseDamage = Math.ceil(baseDamage / 2);
|
||||
|
||||
const flatReduction = this.system.bonuses.damageReduction[type];
|
||||
const flatReduction = this.system.resistance[type].reduction;
|
||||
const damage = Math.max(baseDamage - (flatReduction ?? 0), 0);
|
||||
const hpDamage = this.convertDamageToThreshold(damage);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue