Browse Source

shade sneak recast

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
b1dfd9a40d
  1. 26
      src/engine/gameManager/PowersManager.java

26
src/engine/gameManager/PowersManager.java

@ -220,12 +220,6 @@ public enum PowersManager { @@ -220,12 +220,6 @@ public enum PowersManager {
boolean skipCheck = false;
if(msg.getPowerUsedID() == 429495514 && playerCharacter.getRace().getName().contains("Shade")){
msg.setPowerUsedID(429397210);//intercept shade using hide and cast sneak instead
skipCheck = true;
}
boolean CSRCast = false;
@ -292,14 +286,6 @@ public enum PowersManager { @@ -292,14 +286,6 @@ public enum PowersManager {
// get power
PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID());
if(pb.isHarmful){
//manually break stealth for offensive casts
if(playerCharacter.getHidden() > 0) {
playerCharacter.setHidden(0);
playerCharacter.removeEffectBySource(EffectSourceType.Invisibility,40, true);
}
}
if(pb.description.equals("Personal Movement Buff") && playerCharacter.isFlying()) {
ChatManager.chatSystemInfo(playerCharacter, "You cannot use movement speed buffs while flying");
earlyExit = true;
@ -358,6 +344,14 @@ public enum PowersManager { @@ -358,6 +344,14 @@ public enum PowersManager {
} else
CSRCast = true;
if(pb.isHarmful){
//manually break stealth for offensive casts
if(playerCharacter.getHidden() > 0) {
playerCharacter.setHidden(0);
playerCharacter.removeEffectBySource(EffectSourceType.Invisibility,40, true);
}
}
// get numTrains for power
int trains = msg.getNumTrains();
int token = pb.token;
@ -644,6 +638,10 @@ public enum PowersManager { @@ -644,6 +638,10 @@ public enum PowersManager {
playerCharacter.setLastMovementState(playerCharacter.getMovementState());
if(msg.getPowerUsedID() == 429495514 && playerCharacter.getRace().getName().contains("Shade")){
copyMsg.setPowerUsedID(429397210);//intercept shade using hide and cast sneak instead
}
// run timer job to end cast
if (time < 1) // run immediately
finishUsePower(copyMsg, playerCharacter, casterLiveCounter, targetLiveCounter);

Loading…
Cancel
Save