Browse Source

zerg multiplier application work

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
e222cb3543
  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 { @@ -812,10 +812,6 @@ public enum CombatManager {
float damage;
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;
errorTrack = 12;
@ -844,9 +840,6 @@ public enum CombatManager { @@ -844,9 +840,6 @@ public enum CombatManager {
}
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)
d = tarAc.modifyHealth(-damage, ac, false);
subTrack = 5;
@ -1041,7 +1034,9 @@ public enum CombatManager { @@ -1041,7 +1034,9 @@ public enum CombatManager {
damage += minDamage;
//calculate resists in if any
if(source.getObjectType().equals(GameObjectType.PlayerCharacter)){
damage *= ((PlayerCharacter)source).ZergMultiplier;
}
if (resists != null)
return resists.getResistedDamage(source, target, damageType, damage, 0);
else

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

@ -171,16 +171,21 @@ public class HealthEffectModifier extends AbstractEffectModifier { @@ -171,16 +171,21 @@ 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;
if (!ac.isAlive())
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;
String powerName = "";
if (effect.getPower() != null) {
@ -199,15 +204,6 @@ public class HealthEffectModifier extends AbstractEffectModifier { @@ -199,15 +204,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
//see if target is immune to heals
if (modAmount > 0f) {
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();
if (!skipImmune && bonus.getFloat(ModType.BlackMantle, SourceType.Heal) >= trains) {
@ -318,15 +314,6 @@ public class HealthEffectModifier extends AbstractEffectModifier { @@ -318,15 +314,6 @@ public class HealthEffectModifier extends AbstractEffectModifier {
AbstractCharacter ac = (AbstractCharacter) awo;
if (ac.isSit())
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;

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

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

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

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

Loading…
Cancel
Save