Browse Source

fortitudes handled after resist calculations

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
7dfc1dea0f
  1. 4
      src/engine/objects/Resists.java

4
src/engine/objects/Resists.java

@ -393,8 +393,6 @@ public class Resists {
* Expects heals as negative damage and damage as positive damage for fortitudes. * Expects heals as negative damage and damage as positive damage for fortitudes.
*/ */
public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, DamageType type, float damage, int trains) { public float getResistedDamage(AbstractCharacter source, AbstractCharacter target, DamageType type, float damage, int trains) {
//handle fortitudes
damage = handleFortitude(target, type, damage);
//calculate armor piercing //calculate armor piercing
float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.None); float ap = source.getBonuses().getFloatPercentAll(ModType.ArmorPiercing, SourceType.None);
float damageAfterResists = damage * (1 - (this.getResist(type, trains) * 0.01f) + ap); float damageAfterResists = damage * (1 - (this.getResist(type, trains) * 0.01f) + ap);
@ -417,6 +415,8 @@ public class Resists {
} }
target.cancelOnTakeDamage(type, (damageAfterResists)); target.cancelOnTakeDamage(type, (damageAfterResists));
} }
//handle fortitudes last
damageAfterResists = handleFortitude(target, type, damageAfterResists);
return damageAfterResists; return damageAfterResists;
} }

Loading…
Cancel
Save