590b2b407f
- revert r4853 changes to dealEnergyDamageAtDesiredRange - instead, introduce ship.dealEnergyDamage(damage,range) - apply new function to stock missiles, change default ship script for missiles git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4861 127b21dd-08f5-0310-b4b7-95ae10353056
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = ("pauseAI: 0.5", "setSpeedFactorTo: 1.0");
|
|
ECM = ("rollD: 20");
|
|
"TARGET_LOST" = ("setStateTo: EXPLODE");
|
|
"ROLL_1" = ("setStateTo: DETONATE");
|
|
"ROLL_2" = ("setStateTo: EXPLODE");
|
|
UPDATE = ("setStateTo: ATTACK_SHIP");
|
|
};
|
|
"ATTACK_SHIP" =
|
|
{
|
|
ENTER = ("setDesiredRangeTo: 25.0", performIntercept);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DETONATE");
|
|
"TARGET_DESTROYED" = ("setStateTo: EXPLODE");
|
|
"TARGET_LOST" = ("setStateTo: EXPLODE");
|
|
"GONE_BEYOND_RANGE" = ("setStateTo: EXPLODE");
|
|
ECM = ("setStateTo: CHECK_EXPLOSION");
|
|
UPDATE = ("setDesiredRangeTo: 30000.0", checkDistanceTravelled, "setDesiredRangeTo: 25.0", "pauseAI: 5.0");
|
|
};
|
|
DETONATE =
|
|
{
|
|
ENTER = ("sendScriptMessage: detonate");
|
|
};
|
|
EXPLODE =
|
|
{
|
|
ENTER = ("randomPauseAI: 0.25 1.50");
|
|
UPDATE = (becomeExplosion);
|
|
};
|
|
"CHECK_EXPLOSION" =
|
|
{
|
|
ENTER = ("rollD: 20");
|
|
"ROLL_1" = ("setStateTo: DETONATE");
|
|
"ROLL_2" = ("setStateTo: EXPLODE");
|
|
"TARGET_LOST" = ("setStateTo: EXPLODE");
|
|
UPDATE = ("setStateTo: ATTACK_SHIP");
|
|
};
|
|
}
|