From 25d70cca4f05ec3a0094875ea4e689507c95e2c2 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 31 Aug 2024 19:17:52 -0500 Subject: [PATCH] error message for flying with movement buff --- src/engine/gameManager/PowersManager.java | 2 ++ src/engine/objects/PlayerCharacter.java | 1 + 2 files changed, 3 insertions(+) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 75dcc2bf..e03ab5ec 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -295,11 +295,13 @@ public enum PowersManager { for(ActionsBase ab : pb.getActions()){ for(AbstractEffectModifier mod1 : ab.getPowerAction().getEffectsBase().getModifiers()){ if(mod1.modType.equals(ModType.Speed) && mod1.getPercentMod() > 0){ + ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); return true; } } for(AbstractEffectModifier mod2 : ab.getPowerAction().getEffectsBase2().getModifiers()){ if(mod2.modType.equals(ModType.Speed) && mod2.getPercentMod() > 0){ + ChatManager.chatSystemInfo(playerCharacter, "You Cannot Fly While Having A MovementBuff"); return true; } } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 03abf536..8b0eac61 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4830,6 +4830,7 @@ public class PlayerCharacter extends AbstractCharacter { if(this.isFlying()){ if (!AbstractCharacter.CanFly(this)) { GroundPlayer(this); + ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff"); } }