6 changed files with 77 additions and 1 deletions
@ -0,0 +1,9 @@ |
|||||||
|
package engine.mobileAI.MobHandlers; |
||||||
|
|
||||||
|
import engine.objects.Mob; |
||||||
|
|
||||||
|
public class MobHandler { |
||||||
|
public static void run(Mob mob){ |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
package engine.mobileAI.MobHandlers; |
||||||
|
|
||||||
|
import engine.objects.Mob; |
||||||
|
|
||||||
|
public class PetHandler { |
||||||
|
|
||||||
|
public static void run(Mob pet){ |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,9 @@ |
|||||||
|
package engine.mobileAI.MobHandlers; |
||||||
|
|
||||||
|
import engine.objects.Mob; |
||||||
|
|
||||||
|
public class PlayerGuardHandler { |
||||||
|
public static void run(Mob guard){ |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package engine.mobileAI.MobHandlers; |
||||||
|
|
||||||
|
import engine.Enum; |
||||||
|
import engine.objects.Mob; |
||||||
|
|
||||||
|
public class SiegeHandler { |
||||||
|
public static void run(Mob engine){ |
||||||
|
|
||||||
|
if(!engine.isAlive()) |
||||||
|
return; |
||||||
|
|
||||||
|
if(engine.getOwner() == null || !engine.getOwner().isAlive()) |
||||||
|
return; |
||||||
|
|
||||||
|
if(engine.combatTarget == null || !engine.combatTarget.getObjectType().equals(Enum.GameObjectType.Building)) |
||||||
|
return; |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package engine.mobileAI; |
||||||
|
|
||||||
|
import engine.mobileAI.MobHandlers.MobHandler; |
||||||
|
import engine.mobileAI.MobHandlers.PetHandler; |
||||||
|
import engine.mobileAI.MobHandlers.PlayerGuardHandler; |
||||||
|
import engine.mobileAI.MobHandlers.SiegeHandler; |
||||||
|
import engine.objects.Mob; |
||||||
|
|
||||||
|
public class SuperSimpleMobAI { |
||||||
|
|
||||||
|
public static void run(Mob mob){ |
||||||
|
if(mob.isPet() && !mob.isSiege()) { |
||||||
|
PetHandler.run(mob); |
||||||
|
return; |
||||||
|
} |
||||||
|
if (mob.isSiege()) { |
||||||
|
SiegeHandler.run(mob); |
||||||
|
return; |
||||||
|
} |
||||||
|
if(mob.isPlayerGuard()){ |
||||||
|
PlayerGuardHandler.run(mob); |
||||||
|
return; |
||||||
|
} |
||||||
|
MobHandler.run(mob); |
||||||
|
} |
||||||
|
|
||||||
|
//##generic methods for all mobs
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue