Difference between revisions of "StationAI"

From Elite Wiki
 
m
Line 49: Line 49:
   
 
[[AI|BACK]]
 
[[AI|BACK]]
  +
  +
[[Category:Oolite]]

Revision as of 14:24, 12 July 2006

This AI regulates the behaviour of stations.

Defined states:

  • GLOBAL: →IDLE
  • IDLE: →CHECK_FOR_DEBRIS, →DEFENSE_MODE
  • CHECK_FOR_DEBRIS: →IDLE, →DEFENSE_MODE
  • DEFENSE_MODE: →IDLE, →CHECK_FOR_DEBRIS


{
   "DEFENSE_MODE" = {
       ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel); 
       ENTER = (checkTargetLegalStatus); 
       EXIT = (); 
       "RED_ALERT" = (launchDefenseShip); 
       "YELLOW_ALERT" = ("setStateTo: IDLE"); 
       "CONDITION_YELLOW" = ("setStateTo: IDLE"); 
       "CONDITION_GREEN" = ("setStateTo: CHECK_FOR_DEBRIS"); 
       "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
       "TARGET_OFFENDER" = (increaseAlertLevel); 
       "TARGET_FUGITIVE" = (increaseAlertLevel); 
       "ENERGY_FULL" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
       "TARGET_DESTROYED" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
       "TARGET_LOST" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
       "NO_TARGET" = ("pauseAI: 20.0", "setStateTo: IDLE"); 
       UPDATE = ();     };
   "CHECK_FOR_DEBRIS" = {
       ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
       ENTER = (); 
       EXIT = (); 
       "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
       "TARGET_FOUND" = (launchScavenger, "setStateTo: IDLE"); 
       "NOTHING_FOUND" = ("setStateTo: IDLE", "pauseAI: 20.0"); 
       UPDATE = (scanForLoot, "pauseAI: 10.0");     }; 
   GLOBAL = {
       ENTER = ("setStateTo: IDLE"); 
       EXIT = (); 
       UPDATE = (); }; 
   IDLE = {
       ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
       ENTER = (); 
       EXIT = (); 
       "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
       UPDATE = (decreaseAlertLevel, "setStateTo: CHECK_FOR_DEBRIS");     }; 
}

BACK