Browse Source

mele guards dont cast

master
FatBoy-DOTC 1 year ago
parent
commit
5d1ccc437c
  1. 3
      src/engine/Enum.java
  2. 18
      src/engine/mobileAI/MobAI.java

3
src/engine/Enum.java

@ -2679,6 +2679,9 @@ public class Enum {
return race; return race;
} }
public Boolean isMage(){
return this.minionClass.ordinal() == MinionClass.MAGE.ordinal();
}
} }
public enum GridObjectType { public enum GridObjectType {

18
src/engine/mobileAI/MobAI.java

@ -320,6 +320,18 @@ public class MobAI {
if (mob == null) if (mob == null)
return false; return false;
if(mob.isPlayerGuard == true){
int contractID;
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){
contractID = mob.npcOwner.contract.getContractID();
} else{
contractID = mob.contract.getContractID();
}
if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false){
return false;
}
}
if (mob.mobPowers.isEmpty()) if (mob.mobPowers.isEmpty())
return false; return false;
@ -327,12 +339,6 @@ public class MobAI {
mob.setCombatTarget(null); mob.setCombatTarget(null);
return false; return false;
} }
//int castRoll = ThreadLocalRandom.current().nextInt(1,101);
//if (castRoll < MobAIThread.AI_POWER_DIVISOR)
// return false;
if (mob.nextCastTime == 0) if (mob.nextCastTime == 0)
mob.nextCastTime = System.currentTimeMillis(); mob.nextCastTime = System.currentTimeMillis();

Loading…
Cancel
Save