Browse Source

ZergMultiplier fix

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
2b1299ec4a
  1. 16
      src/engine/objects/AbstractCharacter.java
  2. 9
      src/engine/powers/effectmodifiers/HealthEffectModifier.java
  3. 9
      src/engine/powers/effectmodifiers/ManaEffectModifier.java
  4. 9
      src/engine/powers/effectmodifiers/StaminaEffectModifier.java

16
src/engine/objects/AbstractCharacter.java

@ -1188,11 +1188,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -1188,11 +1188,9 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
}
}
public final float modifyHealth(
final float value,
final AbstractCharacter attacker,
final boolean fromCost) {
public final float modifyHealth(float value,final AbstractCharacter attacker,final boolean fromCost) {
if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
value *= ((PlayerCharacter)attacker).ZergMultiplier;
try {
try {
@ -1248,9 +1246,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -1248,9 +1246,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
}
public final float modifyMana(
final float value,
float value,
final AbstractCharacter attacker
) {
if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
value *= ((PlayerCharacter)attacker).ZergMultiplier;
return this.modifyMana(value, attacker, false);
}
@ -1287,9 +1287,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -1287,9 +1287,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
*/
public final float modifyStamina(
final float value,
float value,
final AbstractCharacter attacker
) {
if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
value *= ((PlayerCharacter)attacker).ZergMultiplier;
return this.modifyStamina(value, attacker, false);
}

9
src/engine/powers/effectmodifiers/HealthEffectModifier.java

@ -171,15 +171,6 @@ public class HealthEffectModifier extends AbstractEffectModifier { @@ -171,15 +171,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
}
if (modAmount == 0f)
return;
if(source.getObjectType().equals(GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)source).ZergMultiplier;
}
if(source.getObjectType().equals(GameObjectType.Mob)){
Mob mob = (Mob)source;
if(mob.isPet() && mob.guardCaptain.getObjectType().equals(GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)mob.guardCaptain).ZergMultiplier;
}
}
if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo;

9
src/engine/powers/effectmodifiers/ManaEffectModifier.java

@ -134,15 +134,6 @@ public class ManaEffectModifier extends AbstractEffectModifier { @@ -134,15 +134,6 @@ public class ManaEffectModifier extends AbstractEffectModifier {
}
if (modAmount == 0f)
return;
if(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)source).ZergMultiplier;
}
if(source.getObjectType().equals(Enum.GameObjectType.Mob)){
Mob mob = (Mob)source;
if(mob.isPet() && mob.guardCaptain.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)mob.guardCaptain).ZergMultiplier;
}
}
if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo;
int powerID = 0, effectID = 0;

9
src/engine/powers/effectmodifiers/StaminaEffectModifier.java

@ -130,15 +130,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier { @@ -130,15 +130,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
}
if (modAmount == 0f)
return;
if(source.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)source).ZergMultiplier;
}
if(source.getObjectType().equals(Enum.GameObjectType.Mob)){
Mob mob = (Mob)source;
if(mob.isPet() && mob.guardCaptain.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
modAmount *= ((PlayerCharacter)mob.guardCaptain).ZergMultiplier;
}
}
if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo;

Loading…
Cancel
Save