Browse Source

loreInore category of spells addition

combat-3
FatBoy-DOTC 6 months ago
parent
commit
5f92345d3e
  1. 2
      src/engine/gameManager/PowersManager.java
  2. 11
      src/engine/powers/PowersBase.java

2
src/engine/gameManager/PowersManager.java

@ -172,7 +172,7 @@ public enum PowersManager { @@ -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());

11
src/engine/powers/PowersBase.java

@ -633,4 +633,15 @@ public class PowersBase { @@ -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;
}
}

Loading…
Cancel
Save