From 66bc73a2b6a08caf5ca6616ed970161ba1b9a8ec Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 29 Apr 2024 18:55:04 -0500 Subject: [PATCH] harmful spells break stealth --- src/engine/gameManager/PowersManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 5f1fb37d..2e78d872 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -217,6 +217,7 @@ public enum PowersManager { origin); if (playerCharacter == null) return false; + boolean CSRCast = false; @@ -283,6 +284,14 @@ 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;