HandleEvent(NextStrategicState) 'AI_Suicide_Attacks' pre { // <= NB: must be pre int_t i; int_t HumanTarget; if ( !IsHumanPlayer(player[0]) && player[0].owner>0){ if (AtWarCount(player[0]==1){ for (i=1;i0){ if (player[0].publicworkslevel > 5000*PlayerCityCount(player[0].owner) ){ ConsiderStrategicState(player[0],2650,StrategyDB(STRATEGY_NO_PW),-1,-1,-1); } if (AtWarCount(player[0]) ){// when at war with anybody always default to military plus more OFFENSE and DEFENSE ConsiderStrategicState(player[0],2550,StrategyDB(STRATEGY_WAR_BUILDLISTS_MED),-1,-1,-1); //prioritize long range goals ? !!! if (CTC_SEA_TACTICS[player[0].owner]>0){//so we're at war with a human ConsiderStrategicState(player[0],2700,StrategyDB(STRATEGY_SEA_TACTICS),-1,-1,-1); } // should only need to do this once: ClearSpecialsFromBuildLists(player[0]); if (AtWarCount(player[0])>1){ //if in trouble, no more specials, few settlers, and really prioritize units ConsiderStrategicState(player[0],2650,StrategyDB(STRATEGY_WAR_BUILDLISTS_HIGH),-1,-1,-1); } else{//when at war with one opponant ConsiderStrategicState(player[0],2600,StrategyDB(STRATEGY_SEIGE),-1,-1,-1); for (i=1;i this will eventually put all AI civs who don't like their Human neighbour //on BUILD_LIST_SEQUENCE_DEFAULT_MIL plus more OFFENSE and DEFENSE // diplomatically, they're open to negotiations elseif ( GeogThreat == CTC_AI_FEAR_RADIUS+1 && GetEffectiveRegard(player[0],HumanTarget)<275){ ConsiderStrategicState(player[0],2500,StrategyDB(STRATEGY_PREPARE_FOR_WAR),-1,-1,-1); } // else default personality strategy if (GeogThreat < CTC_AI_FEAR_RADIUS+2){ if (g.year<150){// exploration stuff (find the enemy) if (AtWarCount(player[0])==0){ ConsiderStrategicState(player[0],2500,StrategyDB(STRATEGY_EXPLORE_WIDE),-1,-1,-1); if (GetEffectiveRegard(HumanTarget,player[0])==300 ){ ConsiderStrategicState(player[0],2525,StrategyDB(STRATEGY_MAKE_CONTACT),-1,-1,-1); } } // exploring while at war??? elseif (!AtWarWith(player[0],HumanTarget)) { ConsiderStrategicState(player[0],2500,StrategyDB(STRATEGY_EXPLORE_FAR),-1,-1,-1); } } // preemptive attack stuff if (!AtWarWith(player[0],HumanTarget)){ if (AtWarCount(HumanTarget)==0){ triggerAttack=1; } elseif (AtWarCount(HumanTarget)<=CTC_AI_FEAR_RADIUS) { if (MilitaryRank(HumanTarget)==100 || CitiesRank(HumanTarget)==100 || PopulationRank(HumanTarget)==100){ triggerAttack=1; } // science rank ? } if (triggerAttack){ //if he's not at war or he's strong if (g.year>150){ player[1]=HumanTarget; if (player[0].militaryunits CTC_AI_FEAR_RADIUS-1){ //do nothing more, give him a break } else{// so GeogThreat < CTC_AI_FEAR_RADIUS ConsiderStrategicState(player[0],2700,StrategyDB(STRATEGY_PREEMPTIVE_ATTACK),-1,-1,-1); for (j=1;j160 && AtWarCount(player[0])==0 ){ //in any case ConsiderStrategicState(player[0],2500,StrategyDB(STRATEGY_PRIORITIZE_WONDERS),-1,-1,-1); } } }