Mobius based fix for weakness type.
Fixed issue:
If u have a bonus atk for some kind of mob lets say FAIRY. Dont matter if mob are fairy or not, he will have the weakness with value 0 add, so u will add the atk bonus VS 0 defence fairy.
Correct way: Fairy vs Fairy
Wrong: Fairy vs Undead
The fix dont add wrong weakness with 0 value to mobs, fixing mob receiving dmg from other race types weakness.
Ty for @Salty Mike and @Gaikotsu for assistence.
OBS: I forget put this also. Change this lines in Formulas.java
Like for pass.
Fixed issue:
If u have a bonus atk for some kind of mob lets say FAIRY. Dont matter if mob are fairy or not, he will have the weakness with value 0 add, so u will add the atk bonus VS 0 defence fairy.
Correct way: Fairy vs Fairy
Wrong: Fairy vs Undead
The fix dont add wrong weakness with 0 value to mobs, fixing mob receiving dmg from other race types weakness.
Ty for @Salty Mike and @Gaikotsu for assistence.
OBS: I forget put this also. Change this lines in Formulas.java
Java:
public static double calcWeaknessBonus(Creature attacker, Creature target, TraitType traitType)
{
double result = 1;
for (TraitType trait : TraitType.getAllWeakness())
{
if (traitType == trait && target.getStat().hasDefenceTrait(trait) && attacker.getStat().hasAttackTrait(trait) && !target.getStat().isInvulnerableTrait(traitType))
{
result *= Math.max(attacker.getStat().getAttackTrait(trait) - target.getStat().getDefenceTrait(trait), 0.05);
break;
}
}
return result;
}
Like for pass.
Для просмотра скрытого содержимого вы должны войти или зарегистрироваться.