Browse Source

zerg multiplier application work

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
d14144cdf3
  1. 11
      src/engine/gameManager/CombatManager.java
  2. 31
      src/engine/powers/effectmodifiers/HealthEffectModifier.java
  3. 16
      src/engine/powers/effectmodifiers/ManaEffectModifier.java
  4. 17
      src/engine/powers/effectmodifiers/StaminaEffectModifier.java

11
src/engine/gameManager/CombatManager.java

@ -812,10 +812,6 @@ public enum CombatManager {
float damage; float damage;
damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists); damage = calculateDamage(ac, tarAc, minDamage, maxDamage, damageType, resists);
//if(ac.getObjectType().equals(GameObjectType.PlayerCharacter) && target.getObjectType().equals(GameObjectType.PlayerCharacter)){
// damage *= ZergManager.getReducedZergMultiplier((PlayerCharacter)ac,(PlayerCharacter)target);
//}
float d = 0f; float d = 0f;
errorTrack = 12; errorTrack = 12;
@ -844,9 +840,6 @@ public enum CombatManager {
} }
mobTarget.handleDirectAggro(ac); mobTarget.handleDirectAggro(ac);
} }
if(ac.getObjectType().equals(GameObjectType.PlayerCharacter) && tarAc.getObjectType().equals(GameObjectType.PlayerCharacter) && tarAc.equals(ac) == false){
damage *= ((PlayerCharacter)ac).ZergMultiplier;
}
if (tarAc.getHealth() > 0) if (tarAc.getHealth() > 0)
d = tarAc.modifyHealth(-damage, ac, false); d = tarAc.modifyHealth(-damage, ac, false);
subTrack = 5; subTrack = 5;
@ -1041,7 +1034,9 @@ public enum CombatManager {
damage += minDamage; damage += minDamage;
//calculate resists in if any //calculate resists in if any
if(source.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
}
if (resists != null) if (resists != null)
return resists.getResistedDamage(source, target, damageType, damage, 0); return resists.getResistedDamage(source, target, damageType, damage, 0);
else else

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

@ -171,16 +171,21 @@ 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;
if (!ac.isAlive()) if (!ac.isAlive())
return; return;
//if(ac.getObjectType().equals(GameObjectType.PlayerCharacter) && ac.combatTarget.getObjectType().equals(GameObjectType.PlayerCharacter)){
// modAmount *= ZergManager.getReducedZergMultiplier((PlayerCharacter)ac,(PlayerCharacter)ac.combatTarget);
//}
int powerID = 0, effectID = 0; int powerID = 0, effectID = 0;
String powerName = ""; String powerName = "";
if (effect.getPower() != null) { if (effect.getPower() != null) {
@ -199,15 +204,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
//see if target is immune to heals //see if target is immune to heals
if (modAmount > 0f) { if (modAmount > 0f) {
boolean skipImmune = false; boolean skipImmune = false;
// first tick of HoT going thru SM was removed in a later patch
/*if (effect.getAction().getPowerAction() instanceof DirectDamagePowerAction) {
ArrayList<ActionsBase> actions = effect.getPower().getActions();
for (ActionsBase ab : actions) {
AbstractPowerAction apa = ab.getPowerAction();
if (apa instanceof DamageOverTimePowerAction)
skipImmune = true;
}
}*/
PlayerBonuses bonus = ac.getBonuses(); PlayerBonuses bonus = ac.getBonuses();
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) { if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) {
@ -318,15 +314,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;
if (ac.isSit()) if (ac.isSit())
damage *= 2.5f; // increase damage if sitting damage *= 2.5f; // increase damage if sitting
if(source.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
}
if(source.getObjectType().equals(GameObjectType.Mob) && ((Mob)source).isPet()){
AbstractCharacter owner = ((Mob)source).guardCaptain;
if(owner.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)owner).ZergMultiplier;
}
}
} }
return damage; return damage;

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

@ -14,7 +14,6 @@ import engine.Enum.DamageType;
import engine.Enum.ModType; import engine.Enum.ModType;
import engine.Enum.SourceType; import engine.Enum.SourceType;
import engine.gameManager.ChatManager; import engine.gameManager.ChatManager;
import engine.gameManager.ZergManager;
import engine.jobs.AbstractEffectJob; import engine.jobs.AbstractEffectJob;
import engine.jobs.DamageOverTimeJob; import engine.jobs.DamageOverTimeJob;
import engine.net.DispatchMessage; import engine.net.DispatchMessage;
@ -135,6 +134,15 @@ 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;
@ -158,9 +166,6 @@ public class ManaEffectModifier extends AbstractEffectModifier {
skipImmune = true; skipImmune = true;
} }
} }
//if(ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && ac.combatTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
// modAmount *= ZergManager.getReducedZergMultiplier((PlayerCharacter)ac,(PlayerCharacter)ac.combatTarget);
//}
PlayerBonuses bonus = ac.getBonuses(); PlayerBonuses bonus = ac.getBonuses();
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) { if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) {
ModifyHealthMsg mhm = new ModifyHealthMsg(source, ac, 0f, 0f, 0f, powerID, powerName, trains, effectID); ModifyHealthMsg mhm = new ModifyHealthMsg(source, ac, 0f, 0f, 0f, powerID, powerName, trains, effectID);
@ -207,9 +212,6 @@ public class ManaEffectModifier extends AbstractEffectModifier {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;
if (ac.isSit()) if (ac.isSit())
damage *= 2.5f; // increase damage if sitting damage *= 2.5f; // increase damage if sitting
if(ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && !source.equals(ac)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
}
} }
return damage; return damage;

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

@ -14,7 +14,6 @@ import engine.Enum.DamageType;
import engine.Enum.ModType; import engine.Enum.ModType;
import engine.Enum.SourceType; import engine.Enum.SourceType;
import engine.gameManager.ChatManager; import engine.gameManager.ChatManager;
import engine.gameManager.ZergManager;
import engine.jobs.AbstractEffectJob; import engine.jobs.AbstractEffectJob;
import engine.jobs.DamageOverTimeJob; import engine.jobs.DamageOverTimeJob;
import engine.net.DispatchMessage; import engine.net.DispatchMessage;
@ -131,6 +130,16 @@ 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;
int powerID = 0, effectID = 0; int powerID = 0, effectID = 0;
@ -154,9 +163,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
skipImmune = true; skipImmune = true;
} }
} }
//if(ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && ac.combatTarget.getObjectType().equals(Enum.GameObjectType.PlayerCharacter)){
// modAmount *= ZergManager.getReducedZergMultiplier((PlayerCharacter)ac,(PlayerCharacter)ac.combatTarget);
//}
PlayerBonuses bonus = ac.getBonuses(); PlayerBonuses bonus = ac.getBonuses();
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) { if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) {
ModifyHealthMsg mhm = new ModifyHealthMsg(source, ac, 0f, 0f, 0f, powerID, powerName, trains, effectID); ModifyHealthMsg mhm = new ModifyHealthMsg(source, ac, 0f, 0f, 0f, powerID, powerName, trains, effectID);
@ -205,9 +211,6 @@ public class StaminaEffectModifier extends AbstractEffectModifier {
AbstractCharacter ac = (AbstractCharacter) awo; AbstractCharacter ac = (AbstractCharacter) awo;
if (ac.isSit()) if (ac.isSit())
damage *= 2.5f; // increase damage if sitting damage *= 2.5f; // increase damage if sitting
if(ac.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && !source.equals(ac)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
}
} }
return damage; return damage;

Loading…
Cancel
Save