diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 129f784a..927523ff 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -267,6 +267,13 @@ public enum PowersManager { } } } + // get power + PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID()); + + if(pb.description.equals("Personal Movement Buff") && playerCharacter.isFlying()) { + ChatManager.chatSystemInfo(playerCharacter, "You cannot use movement speed buffs while flying"); + earlyExit = true; + } if (earlyExit) { @@ -288,8 +295,7 @@ public enum PowersManager { Logger.warn("usePowerA(): Cheat attempted? '" + msg.getPowerUsedID() + "' recycle timer not finished " + playerCharacter.getName()); return false; } - // get power - PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID()); + if (pb == null) { ChatManager.chatSayInfo(playerCharacter, "This power is not implemented yet.");