|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|