Proceeding with DefenceTrait adjustments.
This commit is contained in:
@ -90,7 +90,7 @@ public class CreatureStat
|
||||
for (int i = 0; i < TraitType.values().length; i++)
|
||||
{
|
||||
_attackTraitValues[i] = 1;
|
||||
_defenceTraitValues[i] = 1;
|
||||
_defenceTraitValues[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ public class CreatureStat
|
||||
_lock.readLock().lock();
|
||||
try
|
||||
{
|
||||
_attackTraitValues[traitType.ordinal()] *= value;
|
||||
_attackTraitValues[traitType.ordinal()] += value;
|
||||
_attackTraits.add(traitType);
|
||||
}
|
||||
finally
|
||||
@ -605,7 +605,7 @@ public class CreatureStat
|
||||
_lock.readLock().lock();
|
||||
try
|
||||
{
|
||||
_attackTraitValues[traitType.ordinal()] /= value;
|
||||
_attackTraitValues[traitType.ordinal()] -= value;
|
||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||
{
|
||||
_attackTraits.remove(traitType);
|
||||
@ -663,7 +663,7 @@ public class CreatureStat
|
||||
try
|
||||
{
|
||||
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||
if (_defenceTraitValues[traitType.ordinal()] == 0)
|
||||
{
|
||||
_defenceTraits.remove(traitType);
|
||||
}
|
||||
|
@ -1331,7 +1331,7 @@ public final class Formulas
|
||||
|
||||
public static double calcWeaponTraitBonus(Creature attacker, Creature target)
|
||||
{
|
||||
return Math.max(0, 2.0 - target.getStat().getDefenceTrait(attacker.getAttackType().getTraitType()));
|
||||
return Math.max(0, 1.0 - target.getStat().getDefenceTrait(attacker.getAttackType().getTraitType()));
|
||||
}
|
||||
|
||||
public static double calcAttackTraitBonus(Creature attacker, Creature target)
|
||||
|
Reference in New Issue
Block a user