From b1dfd9a40d71205ae7196062d64f8bbeaec81612 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 5 May 2024 20:13:19 -0500 Subject: [PATCH] shade sneak recast --- src/engine/gameManager/PowersManager.java | 26 +++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index eeecbb4b..27122a13 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -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 { // 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 { } 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 { 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);