From 624ba5893fecab1f1645d2a7f782b4ddc44f2977 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 22 Jan 2019 23:14:29 +1300 Subject: [PATCH] home commit --- enemyAI/combatManagerAI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/enemyAI/combatManagerAI.java b/enemyAI/combatManagerAI.java index 2f75dad..0b62d89 100644 --- a/enemyAI/combatManagerAI.java +++ b/enemyAI/combatManagerAI.java @@ -52,6 +52,8 @@ public class combatManagerAI { public float offScreenPlayerForceStrength; + public boolean staticDefenseAhead; + public combatManagerAI(baseInfo theBaseInfo){ this.theBaseInfo = theBaseInfo; @@ -301,9 +303,9 @@ public class combatManagerAI { - //check if the troops has encountered a concentration of enemy static defense - - + //check if the troops is near a concentration of player's static defense. + //If true, then check if AI has enough troops to deal with the static defense. + staticDefenseAhead = false; //send units to attack-move to target position if(!playerHasBecomeStrongerThanAIDuringMarching && !frontalTroopIverwhelmed && (unNeutralizedEntity != null || distanceToTarget > 2)){