#include "types.h" #include "Isometric Utils.h" #include "Animation Control.h" #include "Overhead.h" #include "random.h" #include "Points.h" #include #include extern BOOLEAN gfTurnBasedAI; #define MAX_DIST 160 // THIS IS AN ITEM # - AND FOR NOW JUST COMPLETELY FAKE... #define MAX_TOSS_SEARCH_DIST 1 // must throw within this of opponent #define NPC_TOSS_SAFETY_MARGIN 4 // all friends must be this far away #define ACTING_ON_SCHEDULE( p ) ( (p)->aiData.fAIFlags & AI_CHECK_SCHEDULE ) // the AI should try to have this many APs before climbing a roof, if possible //THIS IS NOT EXTERNALIZED!!! CHECK THIS! GOTTHARD 7/2/08 #define AI_AP_CLIMBROOF 15 #define TEMPORARILY 0 #define FOREVER 1 #define IGNORE_PATH 0 #define ENSURE_PATH 1 #define ENSURE_PATH_COST 2 //Kris: November 10, 1997 //Please don't change this value from 10. It will invalidate all of the maps and soldiers. //#define MAXPATROLGRIDS 10//dnl ch33 200909 already defined in Soldier Control.h #define NOWATER 0 #define WATEROK 1 #define DONTADDTURNCOST 0 #define ADDTURNCOST 1 enum { URGENCY_LOW = 0, URGENCY_MED, URGENCY_HIGH, NUM_URGENCY_STATES }; #define DONTFORCE 0 #define FORCE 1 #define MAX_ROAMING_RANGE WORLD_COLS #define PTR_CIV_OR_MILITIA ( PTR_CIVILIAN || (pSoldier->bTeam == MILITIA_TEAM) ) #define REALTIME_AI_DELAY (10000 + Random( 1000 )) #define REALTIME_CIV_AI_DELAY ( 1000 * (gTacticalStatus.Team[ MILITIA_TEAM ].bMenInSector + gTacticalStatus.Team[ CIV_TEAM ].bMenInSector) + 5000 + 2000 * Random( 3 ) ) #define REALTIME_CREATURE_AI_DELAY ( 10000 + 1000 * Random( 3 ) ) //#define PLAYINGMODE 0 //#define CAMPAIGNLENGTH 1 //#define LASTUSABLESLOT 2 //#define RANDOMMERCS 3 //#define AVAILABLEMERCS 4 //#define HIRINGKNOWLEDGE 5 //#define EQUIPMENTLEVEL 6 //#define ENEMYTEAMSIZE 7 #define ENEMYDIFFICULTY 8 // this is being used in this module //#define FOG_OF_WAR 9 //#define TURNLENGTH 10 //#define INCREASEDAP 11 //#define BLOODSTAINS 12 //#define STARTINGBALANCE 13 #define MAXGAMEOPTIONS 14 #define NOSHOOT_WAITABIT -1 #define NOSHOOT_WATER -2 #define NOSHOOT_MYSELF -3 #define NOSHOOT_HURT -4 #define NOSHOOT_NOAMMO -5 #define NOSHOOT_NOLOAD -6 #define NOSHOOT_NOWEAPON -7 #define PERCENT_TO_IGNORE_THREAT 50 // any less, use threat value #define ACTION_TIMEOUT_CYCLES 50 // # failed cycles through AI #define MAX_THREAT_RANGE 400 // 30 tiles worth #define MIN_PERCENT_BETTER 5 // 5% improvement in cover is good #define TOSSES_PER_10TURNS 18 // max # of grenades tossable in 10 turns #define SHELLS_PER_10TURNS 13 // max # of shells firable in 10 turns #define SEE_THRU_COVER_THRESHOLD 5 // min chance to get through #undef min #define min(a,b) ((a) < (b) ? (a) : (b)) #undef max #define max(a,b) ((a) > (b) ? (a) : (b)) // Added by feynman - remove all the ugly #ifdefs printf combinations for required for DebugAI //#define DEBUGAI #ifdef DEBUGAI #define DEBUGAIMSG(X) std::cerr<<"AIDEBUGMSG "<