home
This commit is contained in:
parent
71f3ba652a
commit
e2dd7f8211
@ -143,12 +143,9 @@ public class combatManagerAI {
|
||||
if(currentState == booming){
|
||||
|
||||
//enemy AI compares its own force with player's force, then make a decision whether it should attack or not
|
||||
//only start comparing after 6 minutes mark, or player is rushing with light tank delay attack mark to around 10 minutes mark
|
||||
int attackTime = 360;
|
||||
if(mainThread.ec.theMapAwarenessAI.playerIsRushingLightTank)
|
||||
attackTime = 540;
|
||||
else
|
||||
attackTime = 360;
|
||||
int attackTime = 540;
|
||||
if(mainThread.ec.theMapAwarenessAI.canRushPlayer)
|
||||
attackTime = 300;
|
||||
|
||||
int targetPlayerExpension = mainThread.ec.theMapAwarenessAI.targetPlayerExpension;
|
||||
|
||||
|
@ -477,8 +477,23 @@ public class mapAwarenessAI {
|
||||
|
||||
//determine if a rush is feasible against the player
|
||||
canRushPlayer = false;
|
||||
if(frameAI > 270 && frameAI < 300) {
|
||||
if(frameAI > 300 && frameAI < 360) {
|
||||
if(totalNumberOfPlayerUnits < 3)
|
||||
canRushPlayer = true;
|
||||
|
||||
for(int i = 0; i < playerStructures.length; i++) {
|
||||
if(playerStructures[i] != null && playerStructures[i].currentHP > 0) {
|
||||
float x1 = playerStructures[i].centre.x;
|
||||
float z1 = playerStructures[i].centre.z;
|
||||
float x2 = playerNaturalLocation.x;
|
||||
float z2 = playerNaturalLocation.z;
|
||||
|
||||
if(Math.sqrt((x1-x2)*(x1-x2) + (z1-z2)*(z1-z2)) < 3.5f) {
|
||||
canRushPlayer = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,19 +51,14 @@ public class unitProductionAI {
|
||||
this.theBaseInfo = theBaseInfo;
|
||||
rallyPoint = new vector(0,0,0);
|
||||
|
||||
if(gameData.getRandom() < 341) {
|
||||
if(gameData.getRandom() < 512) {
|
||||
rushRallyPointX = 9.5f+2;
|
||||
rushRallyPointZ = 5.5f+2;
|
||||
}else if(gameData.getRandom() < 682) {
|
||||
rushRallyPointX = 9.5f-2.75f;
|
||||
rushRallyPointZ = 5.5f+2;
|
||||
}else {
|
||||
rushRallyPointX = 9.5f+3.5f;
|
||||
rushRallyPointZ = 5.5f-0.5f;
|
||||
rushRallyPointX = 9.5f-2.75f;
|
||||
rushRallyPointZ = 5.5f+2;
|
||||
}
|
||||
|
||||
rushRallyPointX = 9.5f+2;
|
||||
rushRallyPointZ = 5.5f+2;
|
||||
|
||||
lightTanksControlledByCombatAI = new lightTank[192];
|
||||
rocketTanksControlledByCombatAI = new rocketTank[72];
|
||||
|
Loading…
x
Reference in New Issue
Block a user