{ GLOBAL = { ENTER = ("setStateTo: HEAD_AWAY_FROM_PLANET"); }; "ATTACK_SHIP" = { ENTER = (performAttack); "ENERGY_LOW" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM"); "INCOMING_MISSILE" = (fightOrFleeMissile, "setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM"); "CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist"); "TARGET_DESTROYED" = ("setStateTo: HEAD_AWAY_FROM_PLANET"); "TARGET_LOST" = ("setStateTo: HEAD_AWAY_FROM_PLANET"); RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET"); }; "EXIT_SYSTEM" = { "WITCHSPACE OKAY" = (wormholeEscorts); "WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 30000.0", performFlyToRangeFromDestination); "WITCHSPACE UNAVAILABLE" = ("switchAITo: route1traderAI.plist"); UPDATE = (performHyperSpaceExit, "pauseAI: 5.0"); }; FLEE = { ENTER = ("setDesiredRangeTo: 25600", performFlee); ATTACKED = (fightOrFleeHostiles); FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP"); FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE"); "TARGET_LOST" = (performIdle, "setStateTo: HEAD_AWAY_FROM_PLANET"); "TARGET_DESTROYED" = (performIdle, "setStateTo: HEAD_AWAY_FROM_PLANET"); "INCOMING_MISSILE" = (setTargetToPrimaryAggressor, broadcastDistressMessage, fightOrFleeMissile); "CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist"); "REACHED_SAFETY" = (performIdle, "setStateTo: HEAD_AWAY_FROM_PLANET"); RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET"); }; "HEAD_AWAY_FROM_PLANET" = { ENTER = ( getWitchspaceEntryCoordinates, setDestinationFromCoordinates, "setDesiredRangeTo: 100.0", "setSpeedFactorTo: 0.75", performFlyToRangeFromDestination ); "DESIRED_RANGE_ACHIEVED" = ("setSpeedFactorTo: 1.0", "pauseAI: 15.0", "setStateTo: EXIT_SYSTEM"); ATTACKED = (fightOrFleeHostiles); FIGHTING = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP"); FLEEING = (setTargetToPrimaryAggressor, "setStateTo: FLEE"); "INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE"); "CASCADE_WEAPON_DETECTED" = ("setAITo: fleeQMineAI.plist"); "EXITED WITCHSPACE" = ("switchAITo: enteringTraderAI.plist"); "LAUNCHED OKAY" = ("setStateTo: HEAD_AWAY_FROM_PLANET"); RESTARTED = ("setStateTo: HEAD_AWAY_FROM_PLANET"); }; }