Browse Source

simplified mob aI

lakebane
FatBoy-DOTC 1 month ago
parent
commit
58b287bc4b
  1. 6
      src/engine/mobileAI/Behaviours/StandardMob.java

6
src/engine/mobileAI/Behaviours/StandardMob.java

@ -116,6 +116,9 @@ public class StandardMob {
return; return;
} }
if(!mob.BehaviourType.isAgressive)
return;
if(mob.BehaviourType.equals(Enum.MobBehaviourType.HamletGuard)){ if(mob.BehaviourType.equals(Enum.MobBehaviourType.HamletGuard)){
return; return;
} }
@ -180,6 +183,9 @@ public class StandardMob {
public static void CheckForMovement(Mob mob){ public static void CheckForMovement(Mob mob){
if(!mob.BehaviourType.canRoam)
return;
if(mob.combatTarget != null){ if(mob.combatTarget != null){
//chase player //chase player
if(!CombatUtilities.inRange2D(mob,mob.combatTarget,mob.getRange())) { if(!CombatUtilities.inRange2D(mob,mob.combatTarget,mob.getRange())) {

Loading…
Cancel
Save