home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer 2000 January
/
CD-Gamer_2000-01_04_cd.bin
/
games
/
phoenix.exe
/
Tactics
/
Dogfight
/
2on1FighterFormation.tac
< prev
next >
Wrap
Text File
|
1999-10-21
|
22KB
|
806 lines
A: FIGHTER
A: SHIELDKILL
B: FIGHTER
B: HULLKILL
C: FIGHTER;FIGHTER2;EMPLACEMENT
Targets(C)
// BOX 1 **************************
Start(A)
Set Priority(A,10)
// If B is attacking me, go to "dogfight" code.
If(HeIs[C,"AWARE",A]): Goto(1_DOGFIGHT)
// I am attacking someone who is not awa1re of me
// at the moment.
Goto(28_CHASE_AND_ATTACK)
// Code for dogfighting with an enemy.
Label(1_DOGFIGHT)
Do(SayIm[A,"STOP",A])
StayHere(A)
Label(DOGFIGHT_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// If we are far apart, decide what to do about it.
If(CloseTogether[A,C,60000]): Goto(24_IN_RANGE)
// We are fairly distant from one another.
// Do I have the energy to launch an assault?
If(HasEnergy[A,600]): Goto(2_DISTANT_I_HAVE_ENERGY)
// Stay here and recharge.
If(HeIs[C,"ATTACK",A]): Goto(20_DISTANT_I_AM_LOW)
Goto(DOGFIGHT_LOOP)
// BOX 2 **************************
Label(2_DISTANT_I_HAVE_ENERGY)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
Lock(C)
Label(PICK_CHARGE)
Do(Random[A,6])
If(RandomIs[A,0]): ChargeTowards(AC)
If(RandomIs[A,1]): ChargeTowardsRollLeft(AC)
If(RandomIs[A,2]): ChargeTowardsRollRight(AC)
If(RandomIs[A,3]): ChargeTowardsTurbo(AC)
If(RandomIs[A,4]): ChargeTowardsRollLeftTurbo(AC)
If(RandomIs[A,5]): ChargeTowardsRollRightTurbo(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(DISTANT_I_HAVE_ENERGY_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// What is C doing?
If(HeIs[C,"DODGE",A]): Goto(32_ENEMY_DODGING_CHARGE)
If(HeIs[C,"CHARGE",A]): Goto(3_DISTANT_HEAD_TO_HEAD)
// C is not charging back at me.
If(HeIs[C,"STOP",-1]): Goto(14_DISTANT_I_CHARGE_HE_STOP)
// C is not stopping either.
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// I still have enough energy to continue.
If(CloseTogether[A,C,60000]): Goto(24_IN_RANGE)
If(HitBig[A]): Goto(DODGEBIG_2)
If(Timer[a]): Goto(DISTANT_I_HAVE_ENERGY_LOOP)
Goto(PICK_CHARGE)
Label(DODGEBIG_2)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_2)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_2)
Goto(PICK_CHARGE)
// BOX 3 ****************************
Label(3_DISTANT_HEAD_TO_HEAD)
Lock(C)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
ChargeTowards(AC)
Label(RANDOM_CHOICE)
Do(Random[A,2])
Timer(A,2000)
If(RandomIs[A,0]): Goto(19_STOP_WAIT_FOR_HIM)
Label(PICK_CHARGE_3)
Do(Random[A,6])
If(RandomIs[A,0]): ChargeTowards(AC)
If(RandomIs[A,1]): ChargeTowardsRollLeft(AC)
If(RandomIs[A,2]): ChargeTowardsRollRight(AC)
If(RandomIs[A,3]): ChargeTowardsTurbo(AC)
If(RandomIs[A,4]): ChargeTowardsRollLeftTurbo(AC)
If(RandomIs[A,5]): ChargeTowardsRollRightTurbo(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(DISTANT_HTH_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Is C still charging at me?
If(HeIs[C,"CHARGE",A]): Goto(4_ENEMY_BREAKS_OFF_HTH)
// Do I still have energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// Am I in range yet?
If(CloseTogether[A,C,60000]): Goto(24_IN_RANGE)
// TODO: Random chance of changing my mind.
If(HitBig[A]): Goto(DODGEBIG_3)
If(Timer[A]): Goto(DISTANT_HTH_LOOP)
Goto(RANDOM_CHOICE)
Label(DODGEBIG_3)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_3)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_3)
Goto(PICK_CHARGE_3)
// BOX 4 ***************************
Label(4_ENEMY_BREAKS_OFF_HTH)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
Lock(C)
ChargeTowards(AC)
// Is C low on energy?
If(HasEnergy[C,400]): Goto(6_ENEMY_HIGH_BREAKS_OFF_HTH)
Goto(5_ENEMY_LOW_BREAKS_OFF_HTH)
// BOX 5 ***************************
Label(5_ENEMY_LOW_BREAKS_OFF_HTH)
// Charging a weakened enemy with low energy, who
// has stopped charging.
// Is he running?
If(HeIs[C,"RUN",-1]): Goto(10_ENEMY_LOW_RUNNING)
// He's doing something else; either stopping or dodging.
Goto(28_CHASE_AND_ATTACK)
// BOX 6 ***************************
Label(6_ENEMY_HIGH_BREAKS_OFF_HTH)
// TODO Implement "clever" and "stupid" criteria
// for pilots.
Goto(7_ENEMY_HIGH_CLEVER_WHAT_DOING)
Goto(13_ENEMY_HIGH_STUPID_WHAT_DOING)
// BOX 7 ****************************
Label(7_ENEMY_HIGH_CLEVER_WHAT_DOING)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
Lock(C)
Label(PICK_CHARGE_7)
Do(Random[A,6])
If(RandomIs[A,0]): ChargeTowards(AC)
If(RandomIs[A,1]): ChargeTowardsRollLeft(AC)
If(RandomIs[A,2]): ChargeTowardsRollRight(AC)
If(RandomIs[A,3]): ChargeTowardsTurbo(AC)
If(RandomIs[A,4]): ChargeTowardsRollLeftTurbo(AC)
If(RandomIs[A,5]): ChargeTowardsRollRightTurbo(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(ENEMY_HIGH_WHAT_DOING_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Is he stopping?
If(HeIs[C,"STOP",-1]): Goto(18_DODGE_AND_ATTACK)
// Is he dodging?
If(HeIs[C,"DODGE",-1]): Goto(8_DODGE_AND_ATTACK_TIMED)
// Is he running?
If(HitBig[A]): Goto(DODGEBIG_7)
If(HeIs[C,"RUN",-1]): Goto(9_FOLLOW_HANG_BACK)
Goto(ENEMY_HIGH_WHAT_DOING_LOOP)
Label(DODGEBIG_7)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_7)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_7)
Goto(PICK_CHARGE_7)
// BOX 8 ******************************
Label(8_DODGE_AND_ATTACK_TIMED)
Do(SayIm[A,"DODGE ATTACK AWARE",C])
Lock(C)
Label(PICK_NEW_DODGE_TIMED)
Do(Random[A,5])
If(RandomIs[A,0]): DodgeToLeftAttack(AC)
If(RandomIs[A,1]): DodgeToRightAttack(AC)
If(RandomIs[A,2]): DodgeToAboveAttack(AC)
If(RandomIs[A,3]): DodgeToBelowAttack(AC)
If(RandomIs[A,4]): Goto(17_PRETEND_TO_RUN)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(DODGE_AND_ATTACK_TIMED_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Has the time limit expired yet?
If(Timer[A]): Goto(DODGE_AND_ATTACK_TIMED_LOOP)
// Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// Is HE low on energy?
If(LowEnergy[C,400]): Goto(28_CHASE_AND_ATTACK)
Goto(PICK_NEW_DODGE_TIMED)
// BOX 9 ******************************
Label(9_FOLLOW_HANG_BACK)
Do(SayIm[A,"FOLLOW AWARE",C])
FollowHangBack(AC)
Timer(A,5000)
Label(FOLLOW_HANG_BACK_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Has he rumbled that I'm not falling for it?
If(HeIs[C,"RUN",-1]): If(Timer[A]): Goto(FOLLOW_HANG_BACK_LOOP)
Goto(16_IMPASSE)
// BOX 10 ******************************
Label(10_ENEMY_LOW_RUNNING)
// Is he getting help?
If(HeIs[C,"GETHELP",-1]): Goto(11_ENEMY_LOW_RUN_GET_HELP)
// Just chase him
Goto(28_CHASE_AND_ATTACK)
// BOX 11 ******************************
Label(11_ENEMY_LOW_RUN_GET_HELP)
// are his friends close enough to help?
// TODO: Implement check for "cleverness" of pilot.
If(GetFriendTargettingMyEnemy[B,D,A]): If(Closer[D,B,A]): Goto(12_ENEMY_LOW_RUN_FRIENDS_MAY_HELP)
Goto(28_CHASE_AND_ATTACK)
// BOX 12 ******************************
Label(12_ENEMY_LOW_RUN_FRIENDS_MAY_HELP)
//If(CanHelp[D]): Goto(ABORT)
Goto(28_CHASE_AND_ATTACK)
// BOX 13 ******************************
Label(13_ENEMY_HIGH_STUPID_WHAT_DOING)
If(HeIs[C,"RUN",-1]): Goto(28_CHASE_AND_ATTACK)
Goto(29_STOP_AND_FIRE)
// BOX 14 ******************************
Label(14_DISTANT_I_CHARGE_HE_STOP)
// TODO: Implement "clever" "stupid" and "aggressive"
// characteristics for pilots.
Goto(15_CHECK_ENEMY_ENERGY)
Goto(2_DISTANT_I_HAVE_ENERGY)
// BOX 15 ******************************
Label(15_CHECK_ENEMY_ENERGY)
// Has C got energy?
If(LowEnergy[C,400]): Goto(2_DISTANT_I_HAVE_ENERGY)
Goto(16_IMPASSE)
// BOX 16 ******************************
Label(16_IMPASSE)
// TODO: Implement "random" code
Do(Random[A,3])
If(RandomIs[A,0]): Goto(2_DISTANT_I_HAVE_ENERGY)
If(RandomIs[A,1]): Goto(17_PRETEND_TO_RUN)
Goto(18_DODGE_AND_ATTACK)
// BOX 17 ******************************
Label(17_PRETEND_TO_RUN)
If(CloseTogether[A,C,60000]): Goto(39_PRETEND_TO_RUN_IN_RANGE)
Goto(40_PRETEND_TO_RUN_OUT_RANGE)
// BOX 18 ******************************
Label(18_DODGE_AND_ATTACK)
Do(SayIm[A,"DODGE ATTACK AWARE",C])
Lock(C)
// Every few seconds, randomly change the side
// I'm dodging round to.
Label(PICK_NEW_DODGE)
Do(Random[A,5])
If(RandomIs[A,0]): DodgeToLeftAttack(AC)
If(RandomIs[A,1]): DodgeToRightAttack(AC)
If(RandomIs[A,2]): DodgeToAboveAttack(AC)
If(RandomIs[A,3]): DodgeToBelowAttack(AC)
If(RandomIs[A,4]): Goto(23_NOT_WORKING)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(DODGE_AND_ATTACK_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(DODGE_AND_ATTACK_LOOP)
//Is he running away yet?
If(HeIs[C,"RUN",-1]): Goto(28_CHASE_AND_ATTACK)
//Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
Goto(PICK_NEW_DODGE)
// BOX 19 ******************************
Label(19_STOP_WAIT_FOR_HIM)
Do(SayIm[A,"STOP AWARE",C])
StayHere(A)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,2000)
If(RandomIs[A,1]): Timer(A,3000)
If(RandomIs[A,2]): Timer(A,4000)
If(RandomIs[A,3]): Timer(A,5000)
Label(STOP_WAIT_FOR_HIM_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Do I still have energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// Are we in range yet?
If(CloseTogether[A,C,60000]): Goto(24_IN_RANGE)
// Is he still approaching me?
If(HeIs[C,"CHARGE",A]): If(Timer[A]): Goto(STOP_WAIT_FOR_HIM_LOOP)
Goto(16_IMPASSE)
// BOX 20 ******************************
Label(20_DISTANT_I_AM_LOW)
If(GetFriendTargettingMyEnemy[A,D,C]): Goto(25_RUN_TO_FRIENDS)
Goto(26_DODGE_AROUND)
// BOX 21 ******************************
Label(21_IN_RANGE_BOTH_ENERGY)
Do(Random[A,3])
If(RandomIs[A,0]): Goto(17_PRETEND_TO_RUN)
If(RandomIs[A,1]): Goto(28_CHASE_AND_ATTACK)
If(RandomIs[A,2]): Goto(29_STOP_AND_FIRE)
// BOX 22 ******************************
Label(22_ENEMY_BEHIND_LOW)
Goto(24_IN_RANGE)
// BOX 23 ******************************
Label(23_NOT_WORKING)
Do(Random[A,2])
If(RandomIs[A,0]): Goto(17_PRETEND_TO_RUN)
If(RandomIs[A,1]): Goto(28_CHASE_AND_ATTACK)
// BOX 24 ******************************
Label(24_IN_RANGE)
If(HasEnergy[C,400]): Goto(21_IN_RANGE_BOTH_ENERGY)
Goto(27_IN_RANGE_ENERGY_ADVANTAGE)
// BOX 25 ******************************
Label(25_RUN_TO_FRIENDS)
// TODO: Implement "clever" and "stupid" criteria.
Goto(30_RUN_TO_FRIENDS_STUPID)
Goto(31_RUN_TO_FRIENDS_CLEVER)
// BOX 26 ******************************
Label(26_DODGE_AROUND)
Do(SayIm[A,"DODGE AWARE",C])
//Unlock
// Every few seconds, randomly change the side
// I'm dodging round to.
Label(PICK_NEW)
If(CloseTogether[A,B,60000]): Goto(PICK_NEW_CLOSE)
Do(Random[A,6])
If(RandomIs[A,0]): DodgeToLeftDistant(AB)
If(RandomIs[A,1]): DodgeToRightDistant(AB)
If(RandomIs[A,2]): DodgeToAboveDistant(AB)
If(RandomIs[A,3]): DodgeToBelowDistant(AB)
If(RandomIs[A,4]): DodgeToFrontDistant(AB)
If(RandomIs[A,5]): DodgeToBackDistant(AB)
Goto(PICKED_NEW)
Label(PICK_NEW_CLOSE)
If(Behind[A,B]): Goto(PICKDODGEBEHIND)
Do(Random[A,12])
If(RandomIs[A,0]): DodgeToLeft(AB)
If(RandomIs[A,1]): DodgeToRight(AB)
If(RandomIs[A,2]): DodgeToAbove(AB)
If(RandomIs[A,3]): DodgeToBelow(AB)
If(RandomIs[A,4]): DodgeToLeftRollLeft(AB)
If(RandomIs[A,5]): DodgeToRightRollLeft(AB)
If(RandomIs[A,6]): DodgeToAboveRollLeft(AB)
If(RandomIs[A,7]): DodgeToBelowRollLeft(AB)
If(RandomIs[A,8]): DodgeToLeftRollRight(AB)
If(RandomIs[A,9]): DodgeToRightRollRight(AB)
If(RandomIs[A,10]): DodgeToAboveRollRight(AB)
If(RandomIs[A,11]): DodgeToBelowRollRight(AB)
Goto(PICKED_NEW)
Label(PICKDODGEBEHIND)
Do(Random[A,12])
If(RandomIs[A,0]): DodgeToLeftBack(AB)
If(RandomIs[A,1]): DodgeToRightBack(AB)
If(RandomIs[A,2]): DodgeToAboveBack(AB)
If(RandomIs[A,3]): DodgeToBelowBack(AB)
If(RandomIs[A,4]): DodgeToLeftBackRollLeft(AB)
If(RandomIs[A,5]): DodgeToRightBackRollLeft(AB)
If(RandomIs[A,6]): DodgeToAboveBackRollLeft(AB)
If(RandomIs[A,7]): DodgeToBelowBackRollLeft(AB)
If(RandomIs[A,8]): DodgeToLeftBackRollRight(AB)
If(RandomIs[A,9]): DodgeToRightBackRollRight(AB)
If(RandomIs[A,10]): DodgeToAboveBackRollRight(AB)
If(RandomIs[A,11]): DodgeToBelowBackRollRight(AB)
Label(PICKED_NEW)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,2000)
If(RandomIs[A,1]): Timer(A,2500)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,3500)
Label(DODGE_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
//Do I have energy yet?
If(HasEnergy[A,600]): Goto(24_IN_RANGE)
If(Timer[A]): Goto(DODGE_LOOP)
//Is he still attacking?
If(HeIs[C,"ATTACK",A]): Goto(STILL_ATTACKING)
Goto(1_DOGFIGHT)
Label(STILL_ATTACKING)
Goto(PICK_NEW)
// BOX 27 ******************************
Label(27_IN_RANGE_ENERGY_ADVANTAGE)
If(HeIs[C,"CHARGE",A]): Goto(18_DODGE_AND_ATTACK)
Goto(29_STOP_AND_FIRE)
// BOX 28 ******************************
Label(28_CHASE_AND_ATTACK)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
Lock(C)
Label(PICK_CHASE)
Do(Random[A,3])
If(RandomIs[A,0]): ChaseTail(AB)
If(RandomIs[A,1]): ChaseTailRollLeft(AB)
If(RandomIs[A,2]): ChaseTailRollRight(AB)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,2000)
If(RandomIs[A,1]): Timer(A,3000)
If(RandomIs[A,2]): Timer(A,4000)
If(RandomIs[A,3]): Timer(A,5000)
Label(CHASE_AND_ATTACK_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
//Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
If(HitBig[A]): Goto(DODGEBIG_28)
If(Timer[A]): Goto(CHASE_AND_ATTACK_LOOP)
Goto(PICK_CHASE)
Label(DODGEBIG_28)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_28)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_28)
Goto(PICK_CHASE)
// BOX 29 ******************************
Label(29_STOP_AND_FIRE)
Do(SayIm[A,"STOP ATTACK AWARE",C])
Lock(C)
StopAndFire(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(STOP_AND_FIRE_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
//Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
//Is he charging me?
If(HeIs[C,"CHARGE",A]): Goto(18_DODGE_AND_ATTACK)
If(CloseTogether[A,C,60000]): If(Timer[A]): Goto(CHASE_AND_ATTACK_LOOP)
Goto(23_NOT_WORKING)
// BOX 30 ******************************
Label(30_RUN_TO_FRIENDS_STUPID)
Do(SayIm[A,"RUN AWARE GETHELP",C])
//Unlock
Label(RUN_TO_FRIENDS_STUPID_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
StayHere(A)
// Has my energy recharged?
If(HasEnergy[A,600]): Goto(24_IN_RANGE)
// Any friends to run to?
If(GetFriendTargettingMyEnemy[A,D,C]): Goto(STILL_FRIENDS)
Goto(26_DODGE_AROUND)
Label(STILL_FRIENDS)
ChargeTowardsTurbo(AD)
If(HitBig[A]): Goto(DODGEBIG_30)
If(CloseTogether[A,D,30000]): Goto(33_REACHED_FRIEND)
Goto(RUN_TO_FRIENDS_STUPID_LOOP)
Label(DODGEBIG_30)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_30)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_30)
Goto(RUN_TO_FRIENDS_STUPID_LOOP)
// BOX 31 ******************************
Label(31_RUN_TO_FRIENDS_CLEVER)
Do(SayIm[A,"RUN AWARE GETHELP",C])
//Unlock
Label(RUN_TO_FRIENDS_CLEVER_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
StayHere(A)
// Has my energy recharged?
If(HasEnergy[A,600]): Goto(34_GOT_ENERGY_ENEMY_BEHIND)
// Any friends to run to?
If(GetFriendTargettingMyEnemy[A,D,C]): Goto(STILL_FRIENDS_CLEVER)
Goto(26_DODGE_AROUND)
Label(STILL_FRIENDS_CLEVER)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
ChargeTowardsTurbo(AD)
If(HitBig[A]): Goto(DODGEBIG_31)
If(CloseTogether[A,D,30000]): Goto(33_REACHED_FRIEND)
Goto(RUN_TO_FRIENDS_CLEVER_LOOP)
Label(DODGEBIG_31)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_31)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_31)
Goto(RUN_TO_FRIENDS_CLEVER_LOOP)
// BOX 32 ******************************
Label(32_ENEMY_DODGING_CHARGE)
//TODO: Implement Clever and Stupid code.
If(LowEnergy[C,400]): Goto(36_CARRY_ON_CHARGING)
Goto(37_HANG_BACK)
// BOX 33 ******************************
Label(33_REACHED_FRIEND)
// Todo: replace this abort with a "split" command to force this other guy to help.
//If(GetFriend[A,D]): If(CanHelp[D]): Goto(ABORT)
//Goto(ABORT)
Goto(26_DODGE_AROUND)
// BOX 34 ******************************
Label(34_GOT_ENERGY_ENEMY_BEHIND)
If(LowEnergy[C,400]): Goto(24_IN_RANGE)
Goto(35_DODGE_AROUND_WASTE)
// BOX 35 ******************************
Label(35_DODGE_AROUND_WASTE)
Do(SayIm[A,"DODGE AWARE",C])
//Unlock
// Every few seconds, randomly change the side
// I'm dodging round to.
Label(PICK_NEW_WASTE)
Do(Random[A,5])
If(RandomIs[A,0]): DodgeToLeft(AC)
If(RandomIs[A,1]): DodgeToRight(AC)
If(RandomIs[A,2]): DodgeToAbove(AC)
If(RandomIs[A,3]): DodgeToBelow(AC)
If(RandomIs[A,4]): Goto(23_NOT_WORKING)
Do(Random[A,2])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
Label(DODGE_WASTE_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
//Has he lost energy yet?
If(LowEnergy[C,400]): Goto(24_IN_RANGE)
// Have I lost energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
//Is he still attacking?
If(HeIs[C,"ATTACK",A]): Goto(STILL_ATTACKING_WASTE)
Goto(ABORT)
Label(STILL_ATTACKING_WASTE)
If(Timer[A]): Goto(DODGE_WASTE_LOOP)
Goto(PICK_NEW_WASTE)
// BOX 36 ******************************
Label(36_CARRY_ON_CHARGING)
Do(SayIm[A,"CHARGE ATTACK AWARE",C])
ChaseTail(AC)
Lock(C)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,2000)
If(RandomIs[A,1]): Timer(A,3000)
If(RandomIs[A,2]): Timer(A,4000)
If(RandomIs[A,3]): Timer(A,5000)
Label(CARRY_ON_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
If(HitBig[A]): Goto(DODGEBIG_36)
If(HeIs[C,"RUN",-1]): Goto(10_ENEMY_LOW_RUNNING)
If(Timer[A]): Goto(CARRY_ON_LOOP)
Goto(23_NOT_WORKING)
Label(DODGEBIG_36)
Timer(A,3000)
FlyDownwards(A)
Label(GODOWN_36)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(Timer[A]): Goto(GODOWN_36)
Goto(36_CARRY_ON_CHARGING)
// BOX 37 ******************************
Label(37_HANG_BACK)
Do(SayIm[A,"FOLLOW AWARE",C])
FollowHangBack(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,2000)
If(RandomIs[A,1]): Timer(A,3000)
If(RandomIs[A,2]): Timer(A,4000)
If(RandomIs[A,3]): Timer(A,5000)
Label(HANG_BACK_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
If(HeIs[C,"RUN",-1]): Goto(28_CHASE_AND_ATTACK)
If(HeIs[C,"CHARGE",A]): Goto(38_TOY_WITH_HIM)
If(HeIs[C,"STOP",-1]): Goto(16_IMPASSE)
If(Timer[A]): Goto(HANG_BACK_LOOP)
Goto(16_IMPASSE)
// BOX 38 ******************************
Label(38_TOY_WITH_HIM)
Do(Random[A,3])
If(RandomIs[A,0]): Goto(18_DODGE_AND_ATTACK)
If(RandomIs[A,1]): Goto(28_CHASE_AND_ATTACK)
Goto(17_PRETEND_TO_RUN)
// BOX 39 ******************************
Label(39_PRETEND_TO_RUN_IN_RANGE)
Do(SayIm[A,"RUN AWARE",C])
RunBackwards(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(PRETEND_TO_RUN_LOOP)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// Is HE low on energy?
If(LowEnergy[C,400]): Goto(22_ENEMY_BEHIND_LOW)
// Am I wasting my time?
//If(CloseTogether[A,C,20000]): Goto(STILL_CLOSE_PRETEND)
//Goto(16_IMPASSE)
Label(STILL_CLOSE_PRETEND)
If(Timer[A]): Goto(PRETEND_TO_RUN_LOOP)
Goto(8_DODGE_AND_ATTACK_TIMED)
// BOX 40 ******************************
Label(40_PRETEND_TO_RUN_OUT_RANGE)
Do(SayIm[A,"RUN AWARE",C])
RunSlowly(AC)
Do(Random[A,4])
If(RandomIs[A,0]): Timer(A,1000)
If(RandomIs[A,1]): Timer(A,2000)
If(RandomIs[A,2]): Timer(A,3000)
If(RandomIs[A,3]): Timer(A,4000)
Label(PRETEND_TO_RUN_LOOP2)
If(ShotByOther[A,F]): Gosub(SHOT_BY_OTHER)
// Am I low on energy?
If(LowEnergy[A,400]): Goto(20_DISTANT_I_AM_LOW)
// Are we within range?
If(CloseTogether[A,C,60000]): Goto(24_IN_RANGE)
// Is HE low on energy?
If(LowEnergy[C,400]): Goto(22_ENEMY_BEHIND_LOW)
// Am I wasting my time?
If(Timer[A]): Goto(PRETEND_TO_RUN_LOOP2)
Goto(19_STOP_WAIT_FOR_HIM)
//***************************************
Label(ABORT)
Abort
Label(SHOT_BY_OTHER)
If(CloseTogether[A,C,60000]): GotoQuick(SHOT_BY_OTHER_STILL_IN_RANGE)
Split(ABF,2on1Fighter)
Goto(DONE)
Label(SHOT_BY_OTHER_STILL_IN_RANGE)
If(LowEnergy[C,600]): GotoQuick(SHOT_BY_OTHER_THIS_ONE_LOW)
//If(Closer[F,A,B]): GotoQuick(TAKE_NEW_ONE)
Split(ABF,2on1Fighter)
Goto(DONE)
Label(TAKE_NEW_ONE)
Split(ABF,2on1Fighter)
Goto(DONE)
Label(SHOT_BY_OTHER_THIS_ONE_LOW)
Split(ABF,2on1Fighter)
Goto(DONE)
Label(DONE)
Goto(DONE)
Start(B)
FlyFormation2(BA)
Lock(C)
Label(Bdone)
If(LowEnergy[B,300]): Goto(BABORT)
If(LowEnergy[B,500]): Goto(BSTOPFIRE)
Goto(Bdone)
Label(BSTOPFIRE)
//Unlock
Label(BCHARGEUP)
If(LowEnergy[B,300]): Goto(BABORT)
If(LowEnergy[B,700]): Goto(BCHARGEUP)
Goto(Bdone)
Label(BABORT)
//Tactic Message({B}:{}MY SHIELDS ARE DOWN,{A};{}BREAKING OFF.)
Split(AC,1on1Fighter)
Split(BC,1on1Fighter)
Goto(BABORT)