Browse Source

ZergMultiplier fix

lakebane-master
FatBoy-DOTC 5 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 {
} }
} }
public final float modifyHealth( public final float modifyHealth(float value,final AbstractCharacter attacker,final boolean fromCost) {
final float value, if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
final AbstractCharacter attacker, value *= ((PlayerCharacter)attacker).ZergMultiplier;
final boolean fromCost) {
try { try {
try { try {
@ -1248,9 +1246,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
} }
public final float modifyMana( public final float modifyMana(
final float value, float value,
final AbstractCharacter attacker final AbstractCharacter attacker
) { ) {
if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
value *= ((PlayerCharacter)attacker).ZergMultiplier;
return this.modifyMana(value, attacker, false); return this.modifyMana(value, attacker, false);
} }
@ -1287,9 +1287,11 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
*/ */
public final float modifyStamina( public final float modifyStamina(
final float value, float value,
final AbstractCharacter attacker final AbstractCharacter attacker
) { ) {
if(attacker.getObjectType().equals(GameObjectType.PlayerCharacter))
value *= ((PlayerCharacter)attacker).ZergMultiplier;
return this.modifyStamina(value, attacker, false); return this.modifyStamina(value, attacker, false);
} }

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

@ -171,15 +171,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
} }
if (modAmount == 0f) if (modAmount == 0f)
return; 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)) { if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;

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

@ -134,15 +134,6 @@ public class ManaEffectModifier extends AbstractEffectModifier {
} }
if (modAmount == 0f) if (modAmount == 0f)
return; 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)) { if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;
int powerID = 0, effectID = 0; int powerID = 0, effectID = 0;

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

@ -130,15 +130,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
} }
if (modAmount == 0f) if (modAmount == 0f)
return; 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)) { if (AbstractWorldObject.IsAbstractCharacter(awo)) {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;

Loading…
Cancel
Save