Add trait bonus instead of multiplying.
This commit is contained in:
parent
badd7c95b2
commit
38b7674feb
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -605,7 +605,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -648,7 +648,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -662,7 +662,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -595,7 +595,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -638,7 +638,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -652,7 +652,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -595,7 +595,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -638,7 +638,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -652,7 +652,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -595,7 +595,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -638,7 +638,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -652,7 +652,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -595,7 +595,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -638,7 +638,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -652,7 +652,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
|
|
||||||
for (Entry<String, Object> param : params.getSet().entrySet())
|
for (Entry<String, Object> param : params.getSet().entrySet())
|
||||||
{
|
{
|
||||||
_defenceTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) + 100) / 100);
|
_defenceTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().mergeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public final class DefenceTrait extends AbstractEffect
|
|||||||
{
|
{
|
||||||
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
for (Entry<TraitType, Float> trait : _defenceTraits.entrySet())
|
||||||
{
|
{
|
||||||
if (trait.getValue() < 2.0f)
|
if (trait.getValue() < 1.0f)
|
||||||
{
|
{
|
||||||
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
effected.getStat().removeDefenceTrait(trait.getKey(), trait.getValue());
|
||||||
}
|
}
|
||||||
|
@ -581,7 +581,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] *= value;
|
_attackTraitValues[traitType.ordinal()] += value;
|
||||||
_attackTraits.add(traitType);
|
_attackTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -595,7 +595,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_attackTraitValues[traitType.ordinal()] /= value;
|
_attackTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_attackTraitValues[traitType.ordinal()] == 1)
|
if (_attackTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_attackTraits.remove(traitType);
|
_attackTraits.remove(traitType);
|
||||||
@ -638,7 +638,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] *= value;
|
_defenceTraitValues[traitType.ordinal()] += value;
|
||||||
_defenceTraits.add(traitType);
|
_defenceTraits.add(traitType);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@ -652,7 +652,7 @@ public class CreatureStat
|
|||||||
_lock.readLock().lock();
|
_lock.readLock().lock();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_defenceTraitValues[traitType.ordinal()] /= value;
|
_defenceTraitValues[traitType.ordinal()] -= value;
|
||||||
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
if (_defenceTraitValues[traitType.ordinal()] == 1)
|
||||||
{
|
{
|
||||||
_defenceTraits.remove(traitType);
|
_defenceTraits.remove(traitType);
|
||||||
|
Loading…
Reference in New Issue
Block a user