Fixed AttackTrait reducing damage.

This commit is contained in:
MobiusDevelopment
2019-07-14 20:44:46 +00:00
parent 75a040641d
commit c248b6ff85
24 changed files with 36 additions and 36 deletions

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

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

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

@@ -581,7 +581,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] += value;
_attackTraitValues[traitType.ordinal()] *= value;
_attackTraits.add(traitType);
}
finally
@@ -595,7 +595,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] -= value;
_attackTraitValues[traitType.ordinal()] /= value;
if (_attackTraitValues[traitType.ordinal()] == 1)
{
_attackTraits.remove(traitType);

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

@@ -581,7 +581,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] += value;
_attackTraitValues[traitType.ordinal()] *= value;
_attackTraits.add(traitType);
}
finally
@@ -595,7 +595,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] -= value;
_attackTraitValues[traitType.ordinal()] /= value;
if (_attackTraitValues[traitType.ordinal()] == 1)
{
_attackTraits.remove(traitType);

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

@@ -581,7 +581,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] += value;
_attackTraitValues[traitType.ordinal()] *= value;
_attackTraits.add(traitType);
}
finally
@@ -595,7 +595,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] -= value;
_attackTraitValues[traitType.ordinal()] /= value;
if (_attackTraitValues[traitType.ordinal()] == 1)
{
_attackTraits.remove(traitType);

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

@@ -581,7 +581,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] += value;
_attackTraitValues[traitType.ordinal()] *= value;
_attackTraits.add(traitType);
}
finally
@@ -595,7 +595,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] -= value;
_attackTraitValues[traitType.ordinal()] /= value;
if (_attackTraitValues[traitType.ordinal()] == 1)
{
_attackTraits.remove(traitType);

View File

@@ -45,7 +45,7 @@ public final class AttackTrait extends AbstractEffect
for (Entry<String, Object> param : params.getSet().entrySet())
{
_attackTraits.put(TraitType.valueOf(param.getKey()), Float.parseFloat((String) param.getValue()) / 100);
_attackTraits.put(TraitType.valueOf(param.getKey()), (Float.parseFloat((String) param.getValue()) / 100) + 1);
}
}

View File

@@ -581,7 +581,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] += value;
_attackTraitValues[traitType.ordinal()] *= value;
_attackTraits.add(traitType);
}
finally
@@ -595,7 +595,7 @@ public class CreatureStat
_lock.readLock().lock();
try
{
_attackTraitValues[traitType.ordinal()] -= value;
_attackTraitValues[traitType.ordinal()] /= value;
if (_attackTraitValues[traitType.ordinal()] == 1)
{
_attackTraits.remove(traitType);