Browse Source

shades dont break hide when moving

lakebane-optimize
FatBoy-DOTC 2 weeks ago
parent
commit
d8379ae5a9
  1. 15
      src/engine/gameManager/PowersManager.java
  2. 10
      src/engine/objects/AbstractCharacter.java

15
src/engine/gameManager/PowersManager.java

@ -787,14 +787,13 @@ public enum PowersManager { @@ -787,14 +787,13 @@ public enum PowersManager {
if (playerCharacter == null || msg == null)
return;
if((msg.getPowerUsedID() == 429495514 || msg.getPowerUsedID() == 429407306) && playerCharacter.getRace().getName().toLowerCase().contains("shade")){
//use sneak instead of hide
PowersBase pb = PowersManager.getPowerByToken(429397210);
float movementPenalty = 0.01f * (50 - msg.getNumTrains());
int offsetTrains = (40 - msg.getNumTrains()) ;
applyPower(playerCharacter,playerCharacter,playerCharacter.loc,429397210,msg.getNumTrains(),false);
applyPower(playerCharacter,playerCharacter,playerCharacter.loc,427857146,offsetTrains,false);
}
//if((msg.getPowerUsedID() == 429495514 || msg.getPowerUsedID() == 429407306) && playerCharacter.getRace().getName().toLowerCase().contains("shade")){
// //use sneak instead of hide
// PowersBase pb = PowersManager.getPowerByToken(429397210);
// int offsetTrains = (40 - msg.getNumTrains()) ;
// applyPower(playerCharacter,playerCharacter,playerCharacter.loc,429397210,msg.getNumTrains(),false);
// applyPower(playerCharacter,playerCharacter,playerCharacter.loc,427857146,offsetTrains,false);
//}
if(msg.getPowerUsedID() == 429494441) {//wildkins chase
playerCharacter.removeEffectBySource(EffectSourceType.Root,40,true);
playerCharacter.removeEffectBySource(EffectSourceType.Snare,40,true);

10
src/engine/objects/AbstractCharacter.java

@ -1558,7 +1558,15 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -1558,7 +1558,15 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
Effect eff = this.effects.get(s);
if (eff == null)
continue;
if (eff.cancelOnMove() && eff.cancel()) {
Boolean override = false;
if(this.getObjectType().equals(GameObjectType.PlayerCharacter)) {
PlayerCharacter pc = (PlayerCharacter) this;
if (eff.getEffectsBase().getIDString().equals("INVIS-B") && s.equals("Invisible") && pc.getRace().getName().contains("Shade"))
override = true;
}
if (!override && eff.cancelOnMove() && eff.cancel()) {
//System.out.println("canceling on Move");
eff.cancelJob();
this.effects.remove(s);

Loading…
Cancel
Save