From 5f92345d3e666030619d4645cc2e67f1e4043d92 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 1 Jun 2024 12:29:25 -0500 Subject: [PATCH] loreInore category of spells addition --- src/engine/gameManager/PowersManager.java | 2 +- src/engine/powers/PowersBase.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index a10a14fa..e309d309 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -172,7 +172,7 @@ public enum PowersManager { public static void usePower(final PerformActionMsg msg, ClientConnection origin, boolean sendCastToSelf) { - if (ConfigManager.MB_RULESET.getValue().equals("LORE")) { + if (ConfigManager.MB_RULESET.getValue().equals("LORE") && getPowerByToken(msg.getPowerUsedID()).ignoreLore() == false) { PowersBase pb = PowersManager.powersBaseByToken.get(msg.getPowerUsedID()); PlayerCharacter caster = origin.getPlayerCharacter(); PlayerCharacter target = PlayerCharacter.getFromCache(msg.getTargetID()); diff --git a/src/engine/powers/PowersBase.java b/src/engine/powers/PowersBase.java index efd5af71..1df1af04 100644 --- a/src/engine/powers/PowersBase.java +++ b/src/engine/powers/PowersBase.java @@ -633,4 +633,15 @@ public class PowersBase { return description; } + public boolean ignoreLore(){ + switch(this.category){ + case "HEAL": + case "BUFF": + case "DISPELL": + case "SUMMON": + return false; + } + return true; + } + }