Browse Source

shade sneak recast

lakebane-master
FatBoy-DOTC 8 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 {
boolean skipCheck = false; 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; boolean CSRCast = false;
@ -292,14 +286,6 @@ public enum PowersManager {
// get power // get power
PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID()); 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()) { if(pb.description.equals("Personal Movement Buff") && playerCharacter.isFlying()) {
ChatManager.chatSystemInfo(playerCharacter, "You cannot use movement speed buffs while flying"); ChatManager.chatSystemInfo(playerCharacter, "You cannot use movement speed buffs while flying");
earlyExit = true; earlyExit = true;
@ -358,6 +344,14 @@ public enum PowersManager {
} else } else
CSRCast = true; 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 // get numTrains for power
int trains = msg.getNumTrains(); int trains = msg.getNumTrains();
int token = pb.token; int token = pb.token;
@ -644,6 +638,10 @@ public enum PowersManager {
playerCharacter.setLastMovementState(playerCharacter.getMovementState()); 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 // run timer job to end cast
if (time < 1) // run immediately if (time < 1) // run immediately
finishUsePower(copyMsg, playerCharacter, casterLiveCounter, targetLiveCounter); finishUsePower(copyMsg, playerCharacter, casterLiveCounter, targetLiveCounter);

Loading…
Cancel
Save