home
This commit is contained in:
parent
ac2dcdfa9d
commit
2a751e6e5d
@ -69,8 +69,8 @@ public class combatManagerAI {
|
||||
public combatManagerAI(){
|
||||
this.theBaseInfo = mainThread.ec.theBaseInfo;
|
||||
|
||||
standardAttackTime = 600;
|
||||
rushAttackTime = 300 + gameData.getRandom()/4;
|
||||
standardAttackTime = 550;
|
||||
rushAttackTime = 250 + gameData.getRandom()/4;
|
||||
|
||||
goldMines = mainThread.theAssetManager.goldMines;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class defenseManagerAI {
|
||||
lightTanksControlledByCombatAI = mainThread.ec.theUnitProductionAI.lightTanksControlledByCombatAI;
|
||||
|
||||
//after 500 seconds mark, borrow 2 stealth tanks from combat manager, and send them to guard western and southern side of the main base
|
||||
if(frameAI >= 480) {
|
||||
if(frameAI >= 480 && mainThread.ec.theCombatManagerAI.checkIfAIHasBiggerForce(0.8f)) {
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(observers[i] == null || observers[i].currentHP <=0) {
|
||||
for(int j = 0; j < stealthTanksControlledByCombatAI.length; j++) {
|
||||
@ -374,10 +374,7 @@ public class defenseManagerAI {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//System.out.println("mainPlayerForceSize: " + mainPlayerForceSize + " " + "numOfGunTurretNearThreat: " +numOfGunTurretNearThreat + " " + "numOfMissileTurretNearThreat: " + numOfMissileTurretNearThreat);
|
||||
|
||||
|
||||
|
||||
for(int i = 0; i < constructionYards.length; i++){
|
||||
if(constructionYards[i] != null && constructionYards[i].teamNo != 0 && constructionYards[i].currentHP >0) {
|
||||
@ -424,7 +421,7 @@ public class defenseManagerAI {
|
||||
if(distanceToThreat > d + missileTurret.attackRange)
|
||||
d = distanceToThreat - missileTurret.attackRange;
|
||||
if(distanceToThreat < 2.2)
|
||||
d = 1f;
|
||||
d = 1.25f;
|
||||
|
||||
missileTurretDeployLocation.x = constructionYards[i].centre.x + (threatX - constructionYards[i].centre.x)/distanceToThreat*d;
|
||||
missileTurretDeployLocation.z = constructionYards[i].centre.z + (threatZ - constructionYards[i].centre.z)/distanceToThreat*d;
|
||||
|
@ -110,7 +110,7 @@ public class unitProductionAI {
|
||||
}
|
||||
if(z != 999999) {
|
||||
|
||||
rallyPoint.set(x - 2f, 0, z - 1.5f);
|
||||
rallyPoint.set(x - 2.5f, 0, z - 2f);
|
||||
|
||||
if(frameAI < 240) {
|
||||
rallyPoint.set(mainThread.theAssetManager.goldMines[5].centre);
|
||||
@ -173,20 +173,15 @@ public class unitProductionAI {
|
||||
(playerHasMostlyHeavyAndStealthTanks ||
|
||||
!playerHasManyLightTanksButNoHeavyTank
|
||||
&& !playerHasMostlyLightTanks
|
||||
&& !(numberOfHeavyTanks_player == 0 && maxNumberOfStealthTanks_playerInLastFiveMinutes < 3 && mainThread.gameFrame/30 > 600)
|
||||
&& !(numberOfHeavyTanks_player == 0 && maxNumberOfStealthTanks_playerInLastFiveMinutes < 3 && frameAI > 600)
|
||||
&& !(playerHasMostlyHeavyTanks && numberOfStealthTanks_player < numberOfHeavyTanks_AI*2)
|
||||
&& (playIsRushingHighTierUnits || maxNumberOfStealthTanks_playerInLastFiveMinutes*4 > numberOfHeavyTanks_AI || (mainThread.gameFrame/30 > 400 && mainThread.gameFrame/30 < 550 && numberOfPlayerGunTurrets + numberOfPlayerMissileTurrets+ numberOfLightTanks_player + numberOfRocketTanks_player + numberOfHeavyTanks_player*5 < 5)))){
|
||||
&& (playIsRushingHighTierUnits || maxNumberOfStealthTanks_playerInLastFiveMinutes*4 > numberOfHeavyTanks_AI || (frameAI > 400 && frameAI < 500 && numberOfPlayerGunTurrets + numberOfPlayerMissileTurrets+ numberOfLightTanks_player + numberOfRocketTanks_player + numberOfHeavyTanks_player*5 < 5)))){
|
||||
currentProductionOrder = produceHeavyTank;
|
||||
}else if(theBaseInfo.canBuildStealthTank && (playerHasMostlyLightTanks || playerLikelyCanNotProduceHighTierUnits || playerDoesntHaveMassHeavyTanks) && !playerHasMostlyHeavyTanks && (frameAI > 450 || numberOfLightTanks_player > 8)){
|
||||
currentProductionOrder = produceStealthTank;
|
||||
}else{
|
||||
currentProductionOrder = produceLightTank;
|
||||
}
|
||||
|
||||
System.out.println("playerHasMostlyHeavyAndStealthTanks: " + playerHasMostlyHeavyAndStealthTanks);
|
||||
System.out.println("playerHasManyLightTanksButNoHeavyTank: " + playerHasManyLightTanksButNoHeavyTank);
|
||||
System.out.println("playerHasMostlyLightTanks: " + playerHasMostlyLightTanks);
|
||||
System.out.println(currentProductionOrder);
|
||||
|
||||
//make decision on what tech to research
|
||||
if(mainThread.ec.theBuildingManagerAI.theBaseInfo.numberOfCommunicationCenter > 0) {
|
||||
|
@ -79,8 +79,8 @@ public class factory extends solidObject{
|
||||
public static int harvesterType = 2;
|
||||
public static int droneType = 5;
|
||||
public static int MCVType = 3;
|
||||
public static int stealthTankType = 4;
|
||||
public static int heavyTankType = 6;
|
||||
public static int stealthTankType = 6;
|
||||
public static int heavyTankType = 7;
|
||||
|
||||
public int currentStatus;
|
||||
public static int isBuilding = 1;
|
||||
@ -824,7 +824,7 @@ public class factory extends solidObject{
|
||||
canBuildMCV = theBaseInfo.canBuildMCV;
|
||||
canBuildStealthTank = theBaseInfo.canBuildStealthTank;
|
||||
canBuildHeavyTank = theBaseInfo.canBuildHeavyTank;
|
||||
|
||||
|
||||
|
||||
//process emerging from ground animation
|
||||
if(centre.y < -0.79f){
|
||||
@ -1946,6 +1946,19 @@ public class factory extends solidObject{
|
||||
theBaseInfo.currentCredit+=creditSpentOnBuilding;
|
||||
creditSpentOnBuilding = 0;
|
||||
currentStatus = isIdle;
|
||||
lightTankProgress = 255;
|
||||
rocketTankProgress = 255;
|
||||
harvesterProgress = 255;
|
||||
droneProgress = 255;
|
||||
MCVProgress = 255;
|
||||
stealthTankProgress = 255;
|
||||
heavyTankProgress = 255;
|
||||
for(int i = 0; i < productionQueue.length; i++)
|
||||
productionQueue[i] = -1;
|
||||
numOfLightTankOnQueue = 0;
|
||||
numOfStealthTankOnQueue = 0;
|
||||
numOfRocketTankOnQueue = 0;
|
||||
numOfHeavyTankOnQueue = 0;
|
||||
}
|
||||
|
||||
//draw the model
|
||||
|
Loading…
x
Reference in New Issue
Block a user