2005-04-19 19:53:18 +00:00
|
|
|
{
|
2005-06-08 10:14:52 +00:00
|
|
|
ATTACK_SHIP = {
|
|
|
|
ENERGY_LOW = (
|
|
|
|
"setSpeedFactorTo: 1.0",
|
|
|
|
"pauseAI: 15.0",
|
|
|
|
"setStateTo: EXIT_SYSTEM"
|
|
|
|
);
|
|
|
|
ENTER = (
|
|
|
|
performAttack
|
|
|
|
);
|
|
|
|
EXIT = (
|
|
|
|
);
|
|
|
|
INCOMING_MISSILE = (
|
|
|
|
fightOrFleeMissile,
|
|
|
|
"setSpeedFactorTo: 1.0",
|
|
|
|
"pauseAI: 15.0",
|
|
|
|
"setStateTo: EXIT_SYSTEM"
|
|
|
|
);
|
|
|
|
TARGET_DESTROYED = (
|
|
|
|
"setStateTo: HEAD_AWAY_FROM_PLANET"
|
|
|
|
);
|
|
|
|
TARGET_LOST = (
|
|
|
|
"setStateTo: HEAD_AWAY_FROM_PLANET"
|
|
|
|
);
|
|
|
|
UPDATE = (
|
|
|
|
);
|
|
|
|
};
|
|
|
|
EXIT_SYSTEM = {
|
|
|
|
ENTER = (
|
|
|
|
);
|
|
|
|
EXIT = (
|
|
|
|
);
|
|
|
|
UPDATE = (
|
|
|
|
performHyperSpaceExit
|
|
|
|
);
|
|
|
|
};
|
2005-04-19 19:53:18 +00:00
|
|
|
FLEE = {
|
2005-06-08 10:14:52 +00:00
|
|
|
ATTACKED = (
|
|
|
|
fightOrFleeHostiles
|
|
|
|
);
|
|
|
|
ENTER = (
|
|
|
|
"setDesiredRangeTo: 25600",
|
|
|
|
performFlee
|
|
|
|
);
|
|
|
|
EXIT = (
|
|
|
|
);
|
|
|
|
FIGHTING = (
|
|
|
|
setTargetToPrimaryAggressor,
|
|
|
|
"setStateTo: ATTACK_SHIP"
|
|
|
|
);
|
|
|
|
FLEEING = (
|
|
|
|
setTargetToPrimaryAggressor,
|
|
|
|
"setStateTo: FLEE"
|
|
|
|
);
|
|
|
|
INCOMING_MISSILE = (
|
|
|
|
setTargetToPrimaryAggressor,
|
|
|
|
broadcastDistressMessage,
|
|
|
|
fightOrFleeMissile
|
|
|
|
);
|
|
|
|
REACHED_SAFETY = (
|
|
|
|
performIdle,
|
|
|
|
"setStateTo: GLOBAL"
|
|
|
|
);
|
|
|
|
TARGET_DESTROYED = (
|
|
|
|
performIdle,
|
|
|
|
"setStateTo: GLOBAL"
|
|
|
|
);
|
|
|
|
TARGET_LOST = (
|
|
|
|
performIdle,
|
|
|
|
"setStateTo: GLOBAL"
|
|
|
|
);
|
|
|
|
UPDATE = (
|
|
|
|
);
|
|
|
|
};
|
|
|
|
GLOBAL = {
|
|
|
|
ENTER = (
|
|
|
|
"setStateTo: HEAD_AWAY_FROM_PLANET"
|
|
|
|
);
|
|
|
|
EXIT = (
|
|
|
|
);
|
|
|
|
UPDATE = (
|
|
|
|
);
|
|
|
|
};
|
|
|
|
HEAD_AWAY_FROM_PLANET = {
|
|
|
|
ATTACKED = (
|
|
|
|
fightOrFleeHostiles
|
|
|
|
);
|
|
|
|
DESIRED_RANGE_ACHIEVED = (
|
|
|
|
dockEscorts,
|
|
|
|
"setSpeedFactorTo: 1.0",
|
|
|
|
"pauseAI: 15.0",
|
|
|
|
"setStateTo: EXIT_SYSTEM"
|
|
|
|
);
|
|
|
|
ENTER = (
|
|
|
|
getWitchspaceEntryCoordinates,
|
|
|
|
setDestinationFromCoordinates,
|
|
|
|
"setDesiredRangeTo: 100.0",
|
|
|
|
"setSpeedFactorTo: 0.75",
|
|
|
|
performFlyToRangeFromDestination
|
|
|
|
);
|
|
|
|
EXIT = (
|
|
|
|
);
|
|
|
|
FIGHTING = (
|
|
|
|
setTargetToPrimaryAggressor,
|
|
|
|
"setStateTo: ATTACK_SHIP"
|
|
|
|
);
|
|
|
|
FLEEING = (
|
|
|
|
setTargetToPrimaryAggressor,
|
|
|
|
"setStateTo: FLEE"
|
|
|
|
);
|
|
|
|
INCOMING_MISSILE = (
|
|
|
|
fightOrFleeMissile,
|
|
|
|
"setStateTo: FLEE"
|
|
|
|
);
|
|
|
|
UPDATE = (
|
|
|
|
);
|
|
|
|
};
|
2005-04-19 19:53:18 +00:00
|
|
|
}
|