Advertisement
Geshtar

Secret Of Mana: Boss AI

Jul 16th, 2014
1,985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 62.07 KB | None | 0 0
  1. ## Unless otherwise noted, all boss weapons have an accuracy of 99%.
  2.  
  3. ---------------------------------------
  4. [57: Mantis Ant]
  5. ---------------------------------------
  6. ## Kama Swing has a Power of 07.
  7. ## Kama Throw has a Power of 10 and causes Knocked Out (99% Chance).
  8. ## Acid Breath has a Power of 12.
  9. ## Black Magic Spell Power: 12
  10. ## White Magic Spell Power: 12
  11.  
  12. AI:Setup {
  13.   Spawn Monster: Scared Elliot.
  14. }
  15. AI: Movement {
  16.   Select Closest Opponent.
  17.  
  18.   If (Target.Distance == Close Range) Then
  19.       If (1/3) Chance Then
  20.          If (1/3) Chance Then
  21.              Set Animation: Guard Pose
  22.          Else
  23.              Set Animation: Idle
  24.          End If
  25.       Else
  26.          If (Target.Direction == North)
  27.              Use <Jump>.
  28.          Else
  29.              Walk Towards Target.
  30.          End If
  31.       End If
  32.   Else
  33.       If (Target.Direction == North)
  34.          Use <Jump>.
  35.       Else
  36.          Walk Towards Target.
  37.       End If
  38.   End If
  39. }
  40. AI:Attack {
  41.   Select Closest Opponent.
  42.  
  43.   If (Target.Distance != Extreme Range) Then
  44.       If (Target.Distance == Long Range) Then
  45.          If (50% Chance) Then  
  46.              Cast Spell: 'Gem Missile' On Target.
  47.          Else
  48.              Use <Kama Throw> On Target.
  49.          End If
  50.       ElseIf (Target.Distance == Mid-Range) Then
  51.          Use Skill: <Acid Breath> On Target.
  52.       Else
  53.          Use <Kama Swing> On Target.
  54.       End If
  55.   End If
  56. }
  57. ---------------------------------------
  58. [58: Wall Face]
  59. [6C: Chamber Eye]
  60. ---------------------------------------
  61. ## Spawning Wall Face on any map other then his normal one will likely
  62. ## get you instantly killed by his Desperation attack.
  63.  
  64. ## Leaden Glare has a Power of 22 and causes Tangle (50% Chance).
  65. ## Flash Beam has a Power of 11.
  66. ## Wall Face Black Magic Power: 02.
  67. ## Wall Face White Magic Power: 02.
  68. ## Chamber's Eye Black Magic Power: 02.
  69. ## Chamber's Eye White Magic Power: 02.
  70.  
  71. AI:Setup {
  72.   TempVar:IsDesperate == False
  73.   TempVar:TurnCounter == 0
  74.   TempVar:LeftEyeDead == 0
  75.   TempVar:RightEyeDead == 0
  76.  
  77.   Spawn Monster: Left Chamber Eye.
  78.   Spawn Monster: Right Chamber Eye.
  79. }
  80. AI:Movement {
  81.   if (TempVar:IsDesperate == True) Then
  82.       Select Wall Face.
  83.       Target.YCoordinate = Target.YCoordinate + 1
  84.  
  85.       If (Target.YCoordinate >= 280) Then
  86.          Select Randi.
  87.          Target.CurrentHitPoints == 0.
  88.  
  89.          Select Purim.
  90.          Target.CurrentHitPoints == 0.
  91.  
  92.          Select Popoie.
  93.          Target.CurrentHitPoints == 0.
  94.       End If
  95.   End If
  96. }
  97. AI:Attack {
  98.   If (TempVar:IsDesperate == True) Then
  99.       TempVar:TurnCounter == 0
  100.   End If
  101.  
  102.   If (TempVar:TurnCounter > 2) Then
  103.       TempVar:TurnCounter == 0
  104.   End If
  105.  
  106.   Select Left Chamber Eye.
  107.   If (Target.StatusEffects == Dead) Then
  108.       TempVar:LeftEyeDead == True
  109.   End If
  110.  
  111.   Select Right Chamber Eye.
  112.   If (Target.StatusEffects == Dead) Then
  113.       TempVar:RightEyeDead == True
  114.   End If
  115.  
  116.   If (TempVar:TurnCounter == 0) Then
  117.       If (TempVar:LeftEyeDead == True & TempVar:RightEyeDead == True)
  118.          TempVar:IsDesperate == True
  119.       ElseIf (TempVar:LeftEyeDead == True)
  120.          If (1/3 Chance) Then
  121.              Select Left Chamber Eye.
  122.              Cast Spell: Revivifer On Target.
  123.              TempVar:LeftEyeDead == False
  124.          End If
  125.       End If
  126.       ElseIf (TempVar:RightEyeDead == True)
  127.          If (1/3 Chance) Then
  128.              Select Right Chamber Eye.
  129.              Cast Spell: Revivifer On Target.
  130.              TempVar:RightEyeDead == False
  131.          End If
  132.       End If
  133.   End If
  134.  
  135.   If (TempVar:TurnCounter == 1) Then
  136.       If (TempVar:LeftEyeDead == True)
  137.          TempVar:TurnCounter++
  138.          Return To Top Of Script
  139.       Else
  140.          If (1/3 Chance) Then
  141.              Select Closest Opponent.
  142.              Use Skill: <Leaden Glare> On Target.
  143.          ElseIf (1/3 Chance) Then
  144.              Select Closest Opponent.
  145.              Use Skill: <Flash Beam> On Target.
  146.          Else
  147.              Select Wall Face.
  148.              Cast Spell: 'Cure Water' on Target.
  149.          End If
  150.       End If
  151.   End If
  152.  
  153.   If (TempVar:TurnCounter == 2) Then
  154.       If (TempVar:RightEyeDead == True)
  155.          TempVar:TurnCounter++
  156.          Return To Top Of Script
  157.       Else
  158.          If (50% Chance) Then
  159.              Select Closest Opponent.
  160.              Cast Spell: 'Energy Absorb' On Target.
  161.          Else
  162.              Select Closest Opponent.
  163.              Cast Spell: 'Freeze' On Target.
  164.          End If
  165.       End If
  166.   End If
  167.  
  168.   TempVar:TurnCounter++
  169. }
  170. ---------------------------------------
  171. [5A: Minotaur]
  172. ---------------------------------------
  173. ## Note: Due to the way Minotaur calculates distance, he can only cast spells
  174. ##       if you are extremely North or South of him.
  175.  
  176. ## Suplex has a Power of 98 and causes Knocked Out (99% Chance).
  177. ## Punch has a Power of 70.
  178. ## Gore Horn has a Power of 84.
  179. ## Horn Charge has a Power of 94.
  180. ## Black Magic Spell Power: 01
  181. ## White Magic Spell Power: 64
  182.  
  183. AI:Setup {
  184.   TempVar:IsAngry == False.
  185. }
  186. AI:Movement {
  187.   Select Closest Opponent.
  188.  
  189.   If (Target.Distance == Close Range) Then
  190.       If (2/3) Chance Then
  191.          Set Animation: Guard Pose.
  192.       Else
  193.          Set Animation: Idle.
  194.       End If
  195.   Else
  196.       Walk Towards Target.
  197.   End If
  198. }
  199. AI:Attack {
  200.   If (TempVar:IsAngry != True) Then
  201.       If (Minotaur.CurrentHitPoints <= 50% Minotaur.MaxHitPoints) Then
  202.          TempVar:IsAngry == True.
  203.  
  204.          Set Animation: Angry.
  205.       End If
  206.   End If
  207.  
  208.   If (TempVar:IsAngry != True) Then
  209.       Select Closest Opponent.
  210.  
  211.       If (Target.Distance == Extreme Close Range) Then
  212.          If (50% Chance) Then
  213.              Use <Suplex> On Target.
  214.          Else
  215.              If (50% Chance) Then
  216.                  Use <Punch> On Target.
  217.              Else
  218.                  Use <Gore Horn> On Target.
  219.              End If
  220.          End If
  221.       Else If (Target.Distance == Close Range) Then
  222.          If (50% Chance) Then
  223.              Use <Punch> On Target.
  224.          Else
  225.              Use <Gore Horn> On Target.
  226.          End If
  227.       Else If (Target.Distance == Extreme North/South) Then
  228.          If (10% Chance) Then
  229.              If (1/3 Chance) Then
  230.                  Cast Spell: 'Earth Slide' On Target.
  231.              Else
  232.                  Select Self.
  233.                  Cast Spell: 'Defender' On Target.
  234.              End If
  235.          End If
  236.       End If
  237.   Else
  238.       If (Target.Distance == Extreme Close Range) Then
  239.          If (50% Chance) Then
  240.              Use <Suplex> On Target.
  241.          Else
  242.              Use <Horn Charge> On Target.
  243.          End If
  244.       Else If (Target.Distance == Extreme North/South) Then
  245.          If (10% Chance) Then
  246.              If (1/3 Chance) Then
  247.                  Cast Spell: 'Earth Slide' On Target.
  248.              Else
  249.                  Select Self.
  250.                  Cast Spell: 'Defender' On Target.
  251.              End If
  252.          End If
  253.       Else
  254.          Use <Horn Charge> On Target.
  255.       End If
  256.   End If
  257. }
  258. ---------------------------------------
  259. [5B: Spikey Tiger]
  260. ---------------------------------------
  261. ## Spikey Tiger's movement script contains nothing interesting as
  262. ## his platform jumping is controlled by his attack script.
  263.  
  264. ## Pinball has a Power of 34 and causes Knocked Out (50% Chance).
  265. ## Ball Slam has a Power of 36 and causes Knocked Out (33% Chance).
  266. ## Fire Breath has a Power of 35 and causes Engulf (99% Chance).
  267. ## Bite has a Power of 33.
  268. ## Black Magic Spell Power: 13
  269. ## White Magic Spell Power: 13
  270.  
  271. AI:Setup {
  272.   TempVar:OnPillar == False.
  273. }
  274. AI:Attack {
  275.   If (TempVar:OnPillar == False) Then
  276.       If (1/3 Chance) Then
  277.          If (50% Chance) Then
  278.              Use <Move To Left Pillar> On Self.
  279.          Else
  280.              Use <Move To Right Pillar> On Self.
  281.          End If
  282.       Else
  283.          Select Closest Opponent.
  284.  
  285.          If (Target.Distance == Mid-Range OR Target Is North Of Spikey Tiger) Then
  286.              If (50% Chance) Then
  287.                  Use <Ball Slam> On Target.
  288.              Else
  289.                  Use <Pinball> On Target.
  290.              End If
  291.          Else
  292.              If (Target.Distance == Close Range) Then
  293.                  Use <Bite> On Target.
  294.              End If
  295.          End If
  296.       End If
  297.   Else
  298.       If (1/3 Chance) Then
  299.          Use <Return To Battleground> On Self.
  300.       Else
  301.          Select Closest Opponent.
  302.  
  303.          If (1/3 Chance) Then
  304.              Cast Spell: 'Fire Bouquet' On Target.
  305.          Else
  306.              Use Skill: <Fire Breath> On Target.
  307.       End If
  308.   End If
  309. }
  310. AI:Action:MoveToLeftPillar {
  311.   Set Animation: Ball Jump.
  312.  
  313.   Select Self.
  314.  
  315.   Target.XCoordinate == 0x0070.
  316.   Target.YCoordinate == 0x00C0.
  317.  
  318.   TempVar:OnPillar == True.
  319.  
  320.   Set Animation: Ball Slam.
  321.   Set Animation: Ball Bounce.
  322. }
  323. AI:Action:MoveToRightPillar {
  324.   Set Animation: Ball Jump.
  325.  
  326.   Select Self.
  327.  
  328.   Target.XCoordinate == 0x0130.
  329.   Target.YCoordinate == 0x00C0.
  330.  
  331.   TempVar:OnPillar == True.
  332.  
  333.   Set Animation: Ball Slam.
  334.   Set Animation: Ball Bounce.
  335. }
  336. AI:Action:ReturnToBattleground {
  337.   Set Animation: Ball Jump.
  338.  
  339.   Select Self.
  340.  
  341.   Target.XCoordinate == 0x00D0.
  342.   Target.YCoordinate == 0x00E0.
  343.  
  344.   TempVar:OnPillar == False.
  345.  
  346.   Set Animation: Ball Slam.
  347.   Set Animation: Ball Bounce.
  348. }
  349. ---------------------------------------
  350. [5E: Frost Gigas]
  351. ---------------------------------------
  352. # The Gigas Family seems to be the only boss to randomly target opponents.
  353. # And they only do it to determine who they re-appear on.
  354.  
  355. ## Claw Smash has a Power of 34.
  356. ## Black Magic Spell Power: 36
  357. ## White Magic Spell Power: 36
  358.  
  359. AI:Setup {
  360.   TempVar:Disassembled == False.
  361.   TempVar:DisassembleWait == 0.
  362. }
  363. AI:Movement {
  364.   If (TempVar:Disassembled == False) Then
  365.       If (25% Chance) Then
  366.          Select Random Opponent.
  367.  
  368.          Use <Disassemble> On Self.
  369.          TempVar:Disassembled == True.
  370.       Else
  371.          If (FrostGigas.Direction == South) Then
  372.              Set Animation: Idle.
  373.          ElseIf  (FrostGigas.Direction == East) Then
  374.              Set Animation: Walk East.
  375.          Else
  376.              Set Animation: Walk West.
  377.       End If
  378.   End If
  379. }
  380. AI:Attack {
  381.   Select Closest Opponent.
  382.  
  383.   If (Target.Distance == Mid-Range) Then
  384.       Select All Opponents.
  385.       Cast Spell: 'Freeze' On Target.
  386.       Use <Claw Smash> On Target.
  387.   Else
  388.       If (1/3 Chance) Then
  389.          Use Skill: <Freeze Breath> On Target.
  390.       Else
  391.          If (50% Chance) Then
  392.              Select All Opponents.
  393.              Cast Spell: 'Ice Saber' On Target.
  394.          Else
  395.              Select All Opponents.
  396.              Cast Spell: 'Acid Storm' On Target.
  397.          End If
  398.       End If
  399.   End If
  400. }
  401. AI:Special {
  402.   If (TempVar:Disassembled == True) Then
  403.       TempVar:DisassembleWait == 74.
  404.  
  405.       Halt Movement Script().
  406.       Halt Attack Script().
  407.  
  408.       While (TempVar:DisassembleWait != 0)
  409.          Set Animation: Random Orb Movement.
  410.  
  411.          TempVar:DisassembleWait--.
  412.       End While
  413.  
  414.       Enable Movement Script().
  415.       Enable Attack Script().
  416.  
  417.       FrostGigas.XCoordinate == Target.XCoordinate.
  418.       FrostGigas.YCoordinate == Target.YCoordinate.
  419.  
  420.       Use <Appear> On Self.
  421.   End If
  422. }
  423. ---------------------------------------
  424. [5F: Snap Dragon]
  425. ---------------------------------------
  426. ## Swallow Whole has a Power of 52.
  427. ## Black Magic Spell Power: 29
  428. ## White Magic Spell Power: 02
  429.  
  430. AI:Setup {
  431.   TempVar:SwallowedOpponent == False.
  432.  
  433.   Enable Special Death Handling For Snap Dragon.
  434. }
  435. AI:Movement {
  436.   If (TempVar:SwallowedOpponent == True) Then
  437.       Use <Throw Up Target> On Self.
  438.       TempVar:SwallowedOpponent == False
  439.   Else
  440.       Select Closest Opponent.
  441.  
  442.       If (Target.Distance == Long-Range) Then
  443.          Walk Towards Target.
  444.       ElseIf (Target.Distance == Mid-Range) Then
  445.          Set Animation: Idle.
  446.       Else
  447.          Hop Towards Target.
  448.       End If
  449.   End If
  450. }
  451. AI:Attack {
  452.  
  453.   Select Closest Opponent.
  454.  
  455.   If (Target.Distance <= 0x0002) Then
  456.       If (50% Chance) Then
  457.          Hop Towards Target.
  458.       Else
  459.          If (Target.Distance > 0x0004 OR Target.Distance > 0x0008) Then
  460.              Select Self.
  461.              
  462.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  463.                  Cast Spell: 'Cure Water' On Target.
  464.              End If
  465.          ElseIf (Self.ScreenX > 64 OR Self.ScreenX > 192) Then
  466.              Select Self.
  467.              
  468.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  469.                  Cast Spell: 'Cure Water' On Target.
  470.              End If
  471.          ElseIf (Self.ScreenY > 64 OR Self.ScreenY > 160) Then
  472.              Select Self.
  473.              
  474.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  475.                  Cast Spell: 'Cure Water' On Target.
  476.              End If
  477.          ElseIf (Target.CurrentFloor != Self.CurrentFloor) Then
  478.              Select Self.
  479.              
  480.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  481.                  Cast Spell: 'Cure Water' On Target.
  482.              End If
  483.          ElseIf (Target.0060 != 0) Then (I dunno what this address is used for)
  484.              Select Self.
  485.              
  486.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  487.                  Cast Spell: 'Cure Water' On Target.
  488.              End If
  489.          ElseIf (Target.ActiveAnimation == Suprised Animation) Then
  490.              Select Self.
  491.              
  492.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  493.                  Cast Spell: 'Cure Water' On Target.
  494.              End If
  495.          Else
  496.              Use <Swallow Whole> On Target.
  497.          End If
  498.       End If
  499.   Else
  500.       If (Target.Distance > 0x0004 OR Target.Distance > 0x0008) Then
  501.          Select Self.
  502.              
  503.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  504.              Cast Spell: 'Cure Water' On Target.
  505.          End If
  506.       ElseIf (Self.ScreenX > 64 OR Self.ScreenX > 192) Then
  507.          Select Self.
  508.              
  509.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  510.              Cast Spell: 'Cure Water' On Target.
  511.          End If
  512.       ElseIf (Self.ScreenY > 64 OR Self.ScreenY > 160) Then
  513.          Select Self.
  514.              
  515.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  516.              Cast Spell: 'Cure Water' On Target.
  517.          End If
  518.       ElseIf (Target.CurrentFloor != Self.CurrentFloor) Then
  519.          Select Self.
  520.              
  521.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  522.              Cast Spell: 'Cure Water' On Target.
  523.          End If
  524.       ElseIf (Target.0060 != 0) Then (I dunno what this address is used for)
  525.          Select Self.
  526.              
  527.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  528.              Cast Spell: 'Cure Water' On Target.
  529.          End If
  530.       ElseIf (Target.ActiveAnimation == Suprised Animation) Then
  531.          Select Self.
  532.              
  533.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  534.              Cast Spell: 'Cure Water' On Target.
  535.          End If
  536.       Else
  537.          Use <Swallow Whole> On Target.
  538.       End If
  539.   End If
  540. }
  541. AI:Damage {
  542.   If (TempVar:SwallowedOpponent == True) Then
  543.       Set Animation: Damaged Spit-Up.
  544.       Remove Swallowed From Target.
  545.   Else
  546.       Set Animation: Damaged.
  547.   End If
  548. }
  549. AI:Death {
  550.   Set Animation: Dead Lizard.
  551.  
  552.   Remove Swallowed From Target.
  553.  
  554.   Use <Fade Away> On Self.
  555. }
  556. AI:Action:SwallowWhole {
  557.   Target.ActiveAnimation == Surprised Animation.
  558.   Target.StatusEffects == Stunned.
  559.   Target.StunTimer == 36.
  560.  
  561.   SetAnimation: Full Belly.
  562.  
  563.   Target.SpriteFlags == Invisible.
  564.  
  565.   TempVar:SwallowedTarget == True.
  566. }
  567. ---------------------------------------
  568. [60: Mech Rider I]
  569. ---------------------------------------
  570. ## Geshtar you poor poor thing. You really insist on maintaining the same
  571. ## Y-Axis alignment as your target. You even have a special targeting system
  572. ## just for you.
  573. ## Of note: Missile Barrage fires 3 missiles. Damage is per missile.
  574.  
  575. ## Straight Bike Impale has a Power of 44 and causes Knocked Out. (33% Chance)
  576. ## Missile has a Power of 60.
  577. ## Black Magic Spell Power: 07
  578. ## White Magic Spell Power: 07
  579.  
  580. AI:Setup {
  581.   TempVar:EscapeTimer == 24.
  582.  
  583.   Select Mech Rider I.
  584.  
  585.   Target.ZCoordinate == 0x0020.
  586.  
  587.   Enable Special Death Handling For Target().
  588. }
  589. AI:Movement {
  590.   Select Closest Y-Axis Opponent.
  591.  
  592.   If (Target Is South Of Mech Rider) Then
  593.       Use <Align Y-Axis To Target> On Self.
  594.   ElseIf (Target.YDistance > 0x0020) Then
  595.       Use <Align Y-Axis To Target> On Self.
  596.   Else
  597.       Set Animation: Idle.
  598.   End If
  599. }
  600. AI:Attack {
  601.   Select Closest Y-Axis Opponent.
  602.  
  603.   If (Target Is South Of Mech Rider OR Target.YDistance > 0x0020) Then
  604.       If (Mech Rider I Has No Buffs) Then
  605.          Select Self.
  606.  
  607.          Cast Spell: 'Speed Up' On Target.
  608.       Else
  609.          Use <Missile Barrage> On Target.
  610.       End If
  611.   Else
  612.       Use <Straight Bike Impale> On Target.
  613.   End If
  614. }
  615. AI:Death {
  616.   Select Self.
  617.  
  618.   Target.HorizontalFlip == !Target.HorizontalFlip.
  619.   Target.EnableNoClip == True.
  620.   Target.XSpeed == 5.
  621.  
  622.   Set Animation: Turn Tail.
  623.  
  624.   Set Death Throws Target: Mech Rider Bike.
  625.   Set Boss Palette: Explosion.
  626.  
  627.   While (TempVar:EscapeTimer != 0) Then
  628.       TempVar:EscapeTimer--.
  629.   End While
  630.  
  631.   Play Event: 7F8. (Victory!)
  632. }
  633. ---------------------------------------
  634. [61: Doom Wall]
  635. [7E: Doom Eye]
  636. ---------------------------------------
  637. ## Leaden Glare has a Power of 22 and causes Tangle (50% Chance).
  638. ## Confuse Hoops has a Power of 00 and causes Confusion (50% Chance).
  639. ## Cave-In has a Power of 35.
  640. ## Rock Assault has a Power of 35.
  641. ## Doom's Wall Black Magic Spell Power: 04
  642. ## Doom's Wall White Magic Spell Power: 04
  643. ## Doom's Eye Black Magic Spell Power: 04
  644. ## Doom's Eye White Magic Spell Power: 04
  645.  
  646. AI:Setup {
  647.   TempVar:IsDesperate == False
  648.   TempVar:TurnCounter == 0
  649.   TempVar:LeftEyeDead == 0
  650.   TempVar:RightEyeDead == 0
  651.  
  652.   Spawn Monster: Left Doom Eye.
  653.   Spawn Monster: Right Doom Eye.
  654. }
  655. AI:Attack {
  656.   If (TempVar:IsDesperate == True) Then
  657.       TempVar:TurnCounter == 0
  658.  
  659.       If (50% Chance) Then
  660.       Select Closest Opponent.
  661.          Use Skill: <Cave-In> On Target.
  662.       Else
  663.          Select Farthest Opponent.
  664.              If (Target.Distance < Long Range) Then
  665.                 Use <Rock Assault> On Target.
  666.              End If
  667.       End If
  668.   End If
  669.  
  670.   If (TempVar:TurnCounter > 2) Then
  671.       TempVar:TurnCounter == 0
  672.   End If
  673.  
  674.   Select Left Doom Eye.
  675.   If (Target.StatusEffects == Dead) Then
  676.       TempVar:LeftEyeDead == True
  677.   End If
  678.  
  679.   Select Right Doom Eye.
  680.   If (Target.StatusEffects == Dead) Then
  681.       TempVar:RightEyeDead == True
  682.   End If
  683.  
  684.   If (TempVar:TurnCounter == 0) Then
  685.       If (TempVar:LeftEyeDead == True & TempVar:RightEyeDead == True)
  686.          TempVar:IsDesperate == True
  687.       ElseIf (TempVar:LeftEyeDead == True)
  688.          If (1/3 Chance) Then
  689.              Select Left Doom Eye.
  690.              Cast Spell: Revivifer On Target.
  691.              TempVar:LeftEyeDead == False
  692.          End If
  693.       End If
  694.       ElseIf (TempVar:RightEyeDead == True)
  695.          If (1/3 Chance) Then
  696.              Select Right Doom Eye.
  697.              Cast Spell: Revivifer On Target.
  698.              TempVar:RightEyeDead == False
  699.          End If
  700.       End If
  701.   End If
  702.  
  703.   If (TempVar:TurnCounter == 1) Then
  704.       If (TempVar:LeftEyeDead == True)
  705.          TempVar:TurnCounter++
  706.          Return To Top Of Script
  707.       Else
  708.          If (1/3 Chance) Then
  709.              Select Closest Opponent.
  710.              Use Skill: <Leaden Glare> On Target.
  711.          ElseIf (1/3 Chance) Then
  712.              Select Closest Opponent.
  713.              Use Skill: <Confuse Hoops> On Target.
  714.          Else
  715.              Select Wall Face.
  716.              Cast Spell: 'Cure Water' on Target.
  717.          End If
  718.       End If
  719.   End If
  720.  
  721.   If (TempVar:TurnCounter == 2) Then
  722.       If (TempVar:RightEyeDead == True)
  723.          TempVar:TurnCounter++
  724.          Return To Top Of Script
  725.       Else
  726.          If (50% Chance) Then
  727.              Select Closest Opponent.
  728.              Cast Spell: 'Energy Absorb' On Target.
  729.          Else
  730.              Select Closest Opponent.
  731.              Cast Spell: 'Thunderbolt' On Target.
  732.          End If
  733.       End If
  734.   End If
  735.  
  736.   TempVar:TurnCounter++
  737. }
  738. ---------------------------------------
  739. [62: Vampire]
  740. ---------------------------------------
  741. ## Jump Kick has a Power of 85 and causes Knocked Out (33% Chance).
  742. ## Claw Swipe has a Power of 76 and causes Poison (99% Chance).
  743. ## Blood Drain has a Power of 81.
  744. ## Sleep Ring has a Power of 81 and causes Knocked Out (99% Chance).
  745. ## Black Magic Spell Power: 13
  746. ## White Magic Spell Power: 13
  747.  
  748. AI:Setup {
  749.   TempVar:Flying = False
  750. }
  751. AI:Movement {
  752.   If (TempVar:Flying = True) Then
  753.       If (25% Chance) Then
  754.          TempVar:Flying = False
  755.          Use <Land> On Self.
  756.       End If
  757.   Else
  758.       If (1/3 Chance) Then
  759.          TempVar:Flying = False
  760.          Use <Fly> On Self.
  761.       End If
  762.   End If
  763. }
  764. AI:Attack {
  765.   Select Closest Opponent.
  766.  
  767.   If (TempVar:Flying = True) Then
  768.       If (1/3 Chance) Then
  769.          Cast Spell: 'Energy Absorb' On Target.
  770.       ElseIf (1/3 Chance) Then
  771.          Cast Spell: 'Freeze' On Target.
  772.       Else
  773.          Use Skill: <Sleep Ring> On Target.
  774.       End If
  775.   Else
  776.       If (Target.Distance == Long Range) Then
  777.          Use <Jump Kick> On Target.
  778.       ElseIf (Vampire.Direction == North) Then
  779.          Use <Jump Kick> On Target.
  780.       Else
  781.          If (1/3 Chance) Then
  782.              Use <Blood Drain> On Target.
  783.          Else
  784.              Use <Claw Swipe> On Target.
  785.          End If
  786.       End If
  787.   End If
  788. }
  789. ---------------------------------------
  790. [63: Metal Mantis]
  791. ---------------------------------------
  792. ## Couple Of Flaws In Metal Mantis AI.
  793. ## He uses the same Kama Swing and Kama Throw as Mantis Ant, making the attacks harmless.
  794. ## He has Flash Beam in his Command Set, but his AI tells him to use Fire Beam or Fire Beam
  795. ## I guess his sky high spell power is to make up for his worthless physical attacks.
  796.  
  797. ## Kama Swing has a Power of 07.
  798. ## Kama Throw has a Power of 10 and causes Knocked Out (99% Chance).
  799. ## Fire Beam has a Power of 11 and causes Engulf (99% Chance).
  800. ## Flash Beam has a Power of 12.
  801. ## Black Magic Spell Power: 85
  802. ## White Magic Spell Power: 85
  803.  
  804. AI: Movement {
  805.   Select Closest Opponent.
  806.  
  807.   If (Target.Distance == Close Range) Then
  808.       If (1/3) Chance Then
  809.          If (1/3) Chance Then
  810.              Set Animation: Guard Pose
  811.          Else
  812.              Set Animation: Idle
  813.          End If
  814.       Else
  815.          If (Target.Direction == North)
  816.              Use <Jump>.
  817.          Else
  818.              Walk Towards Target.
  819.          End If
  820.       End If
  821.   Else
  822.       If (Target.Direction == North)
  823.          Use <Jump>.
  824.       Else
  825.          Walk Towards Target.
  826.       End If
  827.   End If
  828. }
  829. AI:Attack {
  830.   Select Closest Opponent.
  831.  
  832.   If (Target.Distance == Long Range) Then
  833.       If (2/3 Chance) Then
  834.          Use <Kama Throw> On Target.
  835.       Else
  836.          If (50% Chance) Then
  837.              Select All Opponents.
  838.              Cast Spell: 'Gem Missile' On Target.
  839.          Else
  840.              Select Self.
  841.              Cast Spell: 'Lunar Boost' On Target.
  842.          End If
  843.       End If
  844.   ElseIf (Target.Distance = Mid-Range) Then
  845.       If (50% Chance) Then
  846.          Use Skill: <Fire Beam> On Target.
  847.       Else
  848.          Use Skill: <Fire Beam> On Target.
  849.       End If
  850.   Else
  851.     Use <Kama Swing> On Target.
  852. End If
  853. }
  854. ---------------------------------------
  855. [64: Mech Rider II]
  856. ---------------------------------------
  857. ## Mech Rider's insane Y-Axis tracking exposes him to a bug on this map.
  858. ## If you stand in the corner of one of the lower overhangs his AI will get stuck.
  859. ## His Y-Axis follow halts his Movement & Attack Scripts til he's lined up. But standing there
  860. ## you will both be below him and in a small enough space so he can't squeeze down there.
  861. ## Has a result he'll just rock back and forth vainly trying to line himself up with you.
  862. ## He'll get one attack everytime you damage him. (Either Missile Barrage or Wave Cannon) then
  863. ## go back to being stuck. The missiles will miss you roughly half the time while standing there.
  864. ## Of note: Missile Barrage fires 3 missiles. Damage is per missile.
  865. ## For some reason, Mech Rider II has the highest black magic power in the game.
  866. ## If only he had any spells to use it with.
  867.  
  868. ## Straight Bike Impale has a Power of 44 and causes Knocked Out. (33% Chance)
  869. ## Psycho Bike Impale has a Power of 46 and causes Knocked Out. (33% Chance)
  870. ## Bike Drift has a Power of 44 and causes Knocked Out. (33% Chance)
  871. ## Missile has a Power of 60.
  872. ## Wave Cannon has a Power of 93.
  873. ## Black Magic Spell Power: 105
  874. ## White Magic Spell Power: 02
  875.  
  876. AI:Setup {
  877.   TempVar:EscapeTimer == 24.
  878.  
  879.   Select Mech Rider II.
  880.  
  881.   Target.ZCoordinate == 0x0020.
  882.  
  883.   Enable Special Death Handling For Target().
  884. }
  885. AI:Movement {
  886.   Select Closest Y-Axis Opponent.
  887.  
  888.   If (Target Is South Of Mech Rider) Then
  889.       Use <Align Y-Axis To Target> On Self.
  890.   ElseIf (Target.YDistance > 0x0020) Then
  891.       Use <Align Y-Axis To Target> On Self.
  892.   Else
  893.       Set Animation: Idle.
  894.   End If
  895. }
  896. AI:Attack {
  897.   Select Closest Y-Axis Opponent.
  898.  
  899.   If (Target Is South Of Mech Rider OR Target.YDistance > 0x0020) Then
  900.       If (Mech Rider II Has No Buffs) Then
  901.          Select Self.
  902.  
  903.          Cast Spell: 'Speed Up' On Target.
  904.       Else
  905.          Select Self.
  906.          If (Target.CurrentHitPoints > 50% Target.MaxHitPoints) Then
  907.              Select Closest Y-Axis Opponent.
  908.              Use <Missile Barrage> On Target.
  909.          Else
  910.              If (50% Chance) Then
  911.                 Select Closest Y-Axis Opponent.
  912.                 Use <Missile Barrage> On Target.
  913.              Else
  914.                 Select Closest Y-Axis Opponent.
  915.                 Use Skill: <Wave Cannon> On Target.
  916.              End If
  917.          End If
  918.       End If
  919.   Else
  920.       If (33% Chance) Then
  921.          Use <Straight Bike Impale> On Target.
  922.       ElseIf (33% Chance) Then
  923.          Use <Psycho Bike Impale> On Target.
  924.       Else
  925.          Use <Bike Drift> On Target.
  926.       End If
  927.   End If
  928. }
  929. AI:Death {
  930.   Select Self.
  931.  
  932.   Target.HorizontalFlip == !Target.HorizontalFlip.
  933.   Target.EnableNoClip == True.
  934.   Target.XSpeed == 5.
  935.  
  936.   Set Animation: Turn Tail.
  937.  
  938.   Set Death Throws Target: Mech Rider Bike.
  939.   Set Boss Palette: Explosion.
  940.  
  941.   While (TempVar:EscapeTimer != 0) Then
  942.       TempVar:EscapeTimer--.
  943.   End While
  944.  
  945.   Play Event: 7F8. (Victory!)
  946. }
  947. ---------------------------------------
  948. [65: Kilroy]
  949. ---------------------------------------
  950. ## Moogle Hammer Smash has a Power of 48 and causes Moogle (33% Chance)
  951. ## Moogle Hammer Swing has a Power of 43 and causes Moogle (33% Chance)
  952. ## Hammer Spin has a Power of 52 and causes Moogle (33% Chance)
  953. ## Black Magic Spell Power: 26
  954. ## White Magic Spell Power: 26
  955.  
  956. AI:Setup {
  957.   TempVar:AIPattern == 0.
  958.   Spawn Monster: Kilroy Legs.
  959. }
  960. AI:Movement {
  961.   If (TempVar:AIPattern != 8) Then
  962.       If (Kilroy.CurrentHitPoints <= 50% Kilroy.MaxHitPoints) Then
  963.          TempVar:AIPattern == 8.
  964.       End If
  965.   End If
  966.  
  967.   If (TempVar:AIPattern == 8) Then
  968.       Kilroy.Speed == 4.
  969.   Else
  970.       Kilroy.Speed == 2.
  971.   End If
  972. }
  973. AI:Attack {
  974.   If (TempVar:AIPattern != 8) Then
  975.       If (Kilroy.CurrentHitPoints <= 50% Kilroy.MaxHitPoints) Then
  976.          TempVar:AIPattern == 8.
  977.       End If
  978.   End If
  979.  
  980.   If (TempVar:AIPattern != 8) Then
  981.      Select Closest Opponent.
  982.  
  983.      If (Target.Distance == Long Range) Then
  984.          If (50% Chance) Then
  985.              Select Self.
  986.              Cast Spell: 'Lunar Boost' On Target.
  987.          End If
  988.      Else
  989.          If (1/3 Chance) Then
  990.               Use <Moogle Hammer Smash> On Target.
  991.          ElseIf (1/3 Chance) Then
  992.              Use <Moogle Hammer Swing> On Target.
  993.          Else
  994.              Use <Hammer Spin> On Target.
  995.          End If
  996.      End If
  997.   Else
  998.      Select Closest Opponent.
  999.  
  1000.      If (Target.Distance == Long Range) Then
  1001.          If (50% Chance) Then
  1002.              Select Self.
  1003.              Cast Spell: Lunar Boost On Target.
  1004.          End If
  1005.      Else
  1006.          If (1/3 Chance) Then
  1007.               Use <Moogle Hammer Smash> On Target.
  1008.          ElseIf (1/3 Chance) Then
  1009.              Use <Moogle Hammer Swing> On Target.
  1010.          Else
  1011.              Use <Hammer Spin> On Target.
  1012.          End If
  1013.      End If
  1014.   End If
  1015. }
  1016. ---------------------------------------
  1017. [66: Gorgon Bull]
  1018. ---------------------------------------
  1019. ## Note: Due to the way Gorgon Bull calculates distance, he can only cast spells
  1020. ##      if you are extremely North or South of him.
  1021. ##      Also, strangely, Gorgon Bull can only use Petrify Gas if you are within Suplex range.
  1022.  
  1023. ## Suplex has a Power of 98 and causes Knocked Out (99% Chance).
  1024. ## Petrify Gas has a Power of 65 and causes Petrify (99% Chance).
  1025. ## Arm Claw Rush has a Power of 101 and causes Knocked Out (33% Chance).
  1026. ## Punch has a Power of 70.
  1027. ## Horn Charge has a Power of 94.
  1028. ## Claw Punch has a Power of 94.
  1029. ## Black Magic Spell Power: 100 (Why Gorgon Bull has higher black magic power then Dark Lich I'll never know).
  1030. ## White Magic Spell Power: 01
  1031.  
  1032. AI:Setup {
  1033.   TempVar:IsAngry == False.
  1034. }
  1035. AI:Movement {
  1036.   Select Closest Opponent.
  1037.  
  1038.   If (Target.Distance == Close Range) Then
  1039.       If (2/3) Chance Then
  1040.          Set Animation: Guard Pose.
  1041.       Else
  1042.          Set Animation: Idle.
  1043.       End If
  1044.   Else
  1045.       Walk Towards Target.
  1046.   End If
  1047. }
  1048. AI:Attack {
  1049.   If (TempVar:IsAngry != True) Then
  1050.       If (GorgonBull.CurrentHitPoints <= 50% GorgonBull.MaxHitPoints) Then
  1051.          TempVar:IsAngry == True.
  1052.  
  1053.          Set Animation: Arm Blade Show Off.
  1054.       End If
  1055.   End If
  1056.  
  1057.   If (TempVar:IsAngry != True) Then
  1058.       Select Closest Opponent.
  1059.  
  1060.       If (Target.Distance == Extreme Close Range) Then
  1061.          If (50% Chance) Then
  1062.              If (50% Chance) Then
  1063.                  Use <Suplex> On Target.
  1064.              Else
  1065.                  Use Skill: <Petrify Gas> On Target.
  1066.              End If
  1067.          Else
  1068.              If (50% Chance) Then
  1069.                  Use <Punch> On Target.
  1070.              Else
  1071.                  Use <Horn Charge> On Target.
  1072.              End If
  1073.          End If
  1074.       Else If (Target.Distance == Close Range) Then
  1075.          If (50% Chance) Then
  1076.              Use <Punch> On Target.
  1077.          Else
  1078.              Use <Horn Charge> On Target.
  1079.          End If
  1080.       Else If (Target.Distance == Extreme North/South) Then
  1081.          If (10% Chance) Then
  1082.              If (1/3 Chance) Then
  1083.                  Select All Opponents.
  1084.                  Cast Spell: 'Earth Slide' On Target.
  1085.              Else
  1086.                  Select Self.
  1087.                  Cast Spell: 'Defender' On Target.
  1088.              End If
  1089.          End If
  1090.       End If
  1091.   Else
  1092.       If (Target.Distance == Extreme Close Range) Then
  1093.          If (50% Chance) Then
  1094.              If (50% Chance) Then
  1095.                  Use <Suplex> On Target.
  1096.              Else
  1097.                  Use Skill: <Petrify Gas> On Target.
  1098.              End If
  1099.          Else
  1100.              If (50% Chance) Then
  1101.                  Use <Claw Punch> On Target.
  1102.              Else
  1103.                  Use <Arm Claw Rush> On Target.
  1104.              End If
  1105.          End If
  1106.       Else If (Target.Distance == Close Range) Then
  1107.          If (50% Chance) Then
  1108.              Use <Claw Punch> On Target.
  1109.          Else
  1110.              Use <Arm Claw Rush> On Target.
  1111.          End If
  1112.       Else If (Target.Distance == Extreme North/South) Then
  1113.          If (10% Chance) Then
  1114.              If (1/3 Chance) Then
  1115.                  Select All Opponents.
  1116.                  Cast Spell: 'Earth Slide' On Target.
  1117.              Else
  1118.                  Select Self.
  1119.                  Cast Spell: 'Defender' On Target.
  1120.              End If
  1121.          End If
  1122.       End If
  1123.   End If
  1124. }
  1125. ---------------------------------------
  1126. [6B: Blue Spike]
  1127. ---------------------------------------
  1128. ## Blue Spike's movement script contains nothing interesting as
  1129. ## his platform jumping is controlled by his attack script.
  1130.  
  1131. ## Blue Spike continues the sad tradition of using the base bosses weapons.
  1132.  
  1133. ## Pinball has a Power of 34 and causes Knocked Out (50% Chance).
  1134. ## Ball Slam has a Power of 36 and causes Knocked Out (33% Chance).
  1135. ## Moogle Glare has a Power of 22 and causes Moogle (99% Chance).
  1136. ## Acid Bubbles has a Power of 37.
  1137. ## Bite has a Power of 33.
  1138. ## Black Magic Spell Power: 22
  1139. ## White Magic Spell Power: 02
  1140.  
  1141. AI:Setup {
  1142.   TempVar:FakedDeath == False.
  1143.   TempVar:OnPillar == False.
  1144. }
  1145. AI:Attack {
  1146.   Select Self.
  1147.  
  1148.   If (Target.CurrentHitPoints < 33% Target.MaxHitPoints) Then
  1149.       If (TempVar:FakedDeath == False) Then
  1150.          Use <False Demise> On Self.
  1151.       End If
  1152.   End If
  1153.  
  1154.   If (TempVar:OnPillar == False) Then
  1155.       If (1/3 Chance) Then
  1156.          If (50% Chance) Then
  1157.              Use <Move To Left Pillar> On Self.
  1158.          Else
  1159.              Use <Move To Right Pillar> On Self.
  1160.          End If
  1161.       Else
  1162.          Select Closest Opponent.
  1163.  
  1164.          If (Target.Distance == Mid-Range OR Target Is North Of Blue Spike) Then
  1165.              If (50% Chance) Then
  1166.                  Use <Ball Slam> On Target.
  1167.              Else
  1168.                  Use <Pinball> On Target.
  1169.              End If
  1170.          Else
  1171.              If (Target.Distance == Close Range) Then
  1172.                  Use <Bite> On Target.
  1173.              End If
  1174.          End If
  1175.       End If
  1176.   Else
  1177.       If (1/3 Chance) Then
  1178.          TempVar:OnPillar == False
  1179.          Use <Return To Battleground> On Self.
  1180.       Else
  1181.          Select Closest Opponent.
  1182.  
  1183.          If (1/3 Chance) Then
  1184.              Cast Spell: 'Fireball' On Target.
  1185.          ElseIf (1/3 Chance) Then
  1186.              Use Skill: <Moogle Glare> On Target.
  1187.          Else
  1188.              Use Skill: <Acid Bubbles> On Target.
  1189.       End If
  1190.   End If
  1191. }
  1192. AI:Action:MoveToLeftPillar {
  1193.   Set Animation: Ball Jump.
  1194.  
  1195.   Select Self.
  1196.  
  1197.   Target.XCoordinate == 0x0080.
  1198.   Target.YCoordinate == 0x0130.
  1199.  
  1200.   TempVar:OnPillar == True.
  1201.  
  1202.   Set Animation: Ball Slam.
  1203.   Set Animation: Ball Bounce.
  1204. }
  1205. AI:Action:MoveToRightPillar {
  1206.   Set Animation: Ball Jump.
  1207.  
  1208.   Select Self.
  1209.  
  1210.   Target.XCoordinate == 0x0160.
  1211.   Target.YCoordinate == 0x00F0.
  1212.  
  1213.   TempVar:OnPillar == True.
  1214.  
  1215.   Set Animation: Ball Slam.
  1216.   Set Animation: Ball Bounce.
  1217. }
  1218. AI:Action:ReturnToBattleground {
  1219.   Set Animation: Ball Jump.
  1220.  
  1221.   Select Self.
  1222.  
  1223.   Target.XCoordinate == 0x00F0.
  1224.   Target.YCoordinate == 0x0120.
  1225.  
  1226.   TempVar:OnPillar == False.
  1227.  
  1228.   Set Animation: Ball Slam.
  1229.   Set Animation: Ball Bounce.
  1230. }
  1231. AI:Action:FalseDemise {
  1232.   Halt Movement Script().
  1233.   Halt Attack Script().
  1234.  
  1235.   TempVar:FakedDeath == True.
  1236.   TempVar:ExplosionTimer == 60.
  1237.  
  1238.   Set Animation: Lost Head.
  1239.   Set Boss Palette: Explosion.
  1240.  
  1241.   While (TempVar:ExplosionTimer != 0)
  1242.       Set Boss Animation: Death Explosions.
  1243.       TempVar:ExplosionTimer--.
  1244.   End While
  1245.  
  1246.   Set Boss Palette: Blue Spike Palette.
  1247.   Set Animation: Grow New Head.
  1248.  
  1249.   Enable Movement Script().
  1250.   Enable Attack Script().
  1251. }
  1252. ---------------------------------------
  1253. [6E: Aegagropilon]
  1254. ---------------------------------------
  1255. ## Devour can never be used. The Angry flag is set by his Legless AI, but reset by the Grow Legs command.
  1256. ## Also, his Movement script casting Burst is cheating as the movement script isn't bound by the Attack Wait Timer.
  1257.  
  1258. ## Devour has a Power of 100.
  1259. ## Pinball has a Power of 111.
  1260. ## Jump has a Power of 120.
  1261. ## Black Magic Spell Power: 11
  1262. ## White Magic Spell Power: 01
  1263.  
  1264. AI:Setup {
  1265.   TempVar:HasLegs == True.
  1266.   TempVar:Angry == False.
  1267.  
  1268.   Spawn Monster: Aegagropilon Left Leg.
  1269.   Spawn Monster: Aegagropilon Right Leg.
  1270.   Aegagropilon.ActiveWeapon == 'Aegagropilon Jump'.
  1271. }
  1272. AI:Movement {
  1273.   If (TempVar:HasLegs == True) Then
  1274.       If (TempVar:Angry == True) Then
  1275.          Select Closest Opponent.
  1276.          Cast Spell: 'Burst' On Target.
  1277.       Else
  1278.          If (1/3 Chance) Then
  1279.              Select Closest Opponent.
  1280.              Cast Spell: 'Burst' On Target.
  1281.          Else
  1282.              Walk South.
  1283.          End If
  1284.       End If
  1285.   Else
  1286.       Set Animation: Mouth Chomping.
  1287.   End If
  1288. }
  1289. AI:Attack {
  1290.   Select Closest Opponent.
  1291.  
  1292.   If (TempVar:HasLegs == True) Then
  1293.       If ([TempVar:Angry == True] &&
  1294.           [Aegagropilon.Direction == South] &&
  1295.           [Target.Distance == Close Range]) Then
  1296.  
  1297.          Use <Devour> On Target.
  1298.       Else
  1299.          If (Aegagropilon.Direction == Any North or East) Then
  1300.              Use <Remove Legs> On Self.
  1301.          Else
  1302.              If (Aegagropilon Does Not Have Wall Status) Then
  1303.                 Select Self.
  1304.                 Cast Spell: 'Wall' On Target.
  1305.              Else
  1306.                 If (Target.StatusEffects == NoStatusEffects) Then
  1307.                    If (50% Chance) Then
  1308.                       Cast Spell: 'Burst' On Target.
  1309.                    Else
  1310.                       Cast Spell: 'Sleep Flower' On Target.
  1311.                    End If
  1312.                 Else
  1313.                    Cast Spell: 'Burst' On Target.
  1314.                 End If
  1315.              End If
  1316.          End If
  1317.       End If
  1318.   Else
  1319.       If (TempVar:Angry == True) Then
  1320.          Use <Grow Legs> On Self.
  1321.       Else
  1322.          TempVar:Angry == True.
  1323.  
  1324.          If (50% Chance) Then
  1325.              Use <Grow Legs> On Self.
  1326.          Else If (25% Chance) Then
  1327.              Use <Pinball> On Target.
  1328.          Else If (25% Chance) Then
  1329.              Use <Jump> On Target.
  1330.          End If
  1331.       End If
  1332.   End If
  1333. }
  1334. ---------------------------------------
  1335. [6F: Hexas]
  1336. ---------------------------------------
  1337. ## Hexas Movement AI is horrible. For some reason it controls his element changes.
  1338. ## Note that the directions here aren't completely correct, but close enough.
  1339. ## Stay below him and he'll never even change elements forcing him to spam Dispel & Pygmus Glare.
  1340. ## As a result of his terra-bad AI, his Sylphid form goes unused.
  1341. ## Hexas has a constant hit box around him. Touching him will damage you.
  1342.  
  1343. ## Tail Whip has a Power of 71.
  1344. ## Black Magic Spell Power: 16
  1345. ## White Magic Spell Power: 01
  1346.  
  1347. AI:Setup {
  1348.   TempVar:ForceElementChange == False.
  1349.   Spawn Monster: Hexas Serpent Body.
  1350. }
  1351. AI:Movement {
  1352.   Select Closest Opponent.
  1353.  
  1354.   If (Target.Distance = Long Range) Then
  1355.       Set Animation: Idle
  1356.   ElseIf (Target.Distance = Mid-Range) Then
  1357.       If (Target.Direction == North-West) Then
  1358.          Hexas.Element == 'Undine'
  1359.       ElseIf (Target.Direction == North) Then
  1360.          Hexas.Element == 'Gnome'
  1361.       If (Target.Direction == North-East) Then
  1362.          Hexas.Element == 'Salamando'
  1363.       ElseIf (Target.Direction == West) Then
  1364.          Hexas.Element == 'Luna'
  1365.       Else
  1366.          Walk Towards Target.
  1367.       End If
  1368.   Else
  1369.       Walk Away From Target.
  1370.   End If
  1371. }
  1372. AI:Attack {
  1373.   If (1/3 Chance) Then
  1374.       If (TempVar:ForceElementChange == True) Then
  1375.          TempVar.RandomElement = GetRandomElement().
  1376.  
  1377.          If (TempVar.RandomElement != Hexas.Element) Then
  1378.                  Hexas.Element = TempVar.RandomElement
  1379.          End If
  1380.       End If
  1381.   End If
  1382.  
  1383.   Select Closest Opponent.
  1384.  
  1385.   If (Hexas.Element == 'Luna') Then
  1386.       If (50% Chance) Then
  1387.          Cast Spell: 'Dispel Magic' On Target.
  1388.       Else
  1389.          Use Skill: <Pygmus Glare> On Target.
  1390.          Hexas.ActiveWeapon == TailWhip.
  1391.       End If
  1392.   ElseIf (Hexas.Element == 'Undine') Then
  1393.       If (1/3 Chance) Then
  1394.          Cast Spell: 'Freeze' On Target.
  1395.       ElseIf (1/3 Chance) Then
  1396.          Cast Spell: 'Acid Storm' On Target.
  1397.       Else
  1398.          Cast Spell: 'Freeze' On Target.
  1399.          Cast Spell: 'Acid Storm' On Target.
  1400.   ElseIf (Hexas.Element == 'Gnome') Then
  1401.       If (1/3 Chance) Then
  1402.          Cast Spell: 'Gem Missile' On Target.
  1403.       ElseIf (1/3 Chance) Then
  1404.          Cast Spell: 'Earth Slide' On Target.
  1405.       Else
  1406.          Cast Spell: 'Gem Missile' On Target.
  1407.          Cast Spell: 'Earth Slide' On Target.
  1408.   ElseIf (Hexas.Element == 'Salamando') Then
  1409.       If (1/3 Chance) Then
  1410.          Cast Spell: 'Fireball' On Target.
  1411.       ElseIf (1/3 Chance) Then
  1412.          Cast Spell: 'Lava Wave' On Target.
  1413.       Else
  1414.          Cast Spell: 'Fireball' On Target.
  1415.          Cast Spell: 'Lava Wave' On Target.
  1416.   Else
  1417.       If (1/3 Chance) Then
  1418.          Cast Spell: 'Air Blast' On Target.
  1419.       ElseIf (1/3 Chance) Then
  1420.          Cast Spell: 'Silence' On Target.
  1421.       Else
  1422.          Cast Spell: 'Air Blast' On Target.
  1423.          Cast Spell: 'Silence' On Target.
  1424.   End If
  1425. }
  1426. ---------------------------------------
  1427. [70: Kettle Kin]
  1428. ---------------------------------------
  1429. ## Kettle Kin has an unfinished attack in his Command Set.
  1430. ## Judging by Id Numbers it should be Doom Beam.
  1431.  
  1432. ## Knockout Hammer has a Power of 106 and causes Knocked Out. (33% Chance)
  1433. ## Hammer Spin has a Power of 111 and causes Knocked Out. (50% Chance)
  1434. ## Black Magic Spell Power: 13
  1435. ## White Magic Spell Power: 02
  1436.  
  1437. AI:Setup {
  1438.   TempVar:AIPattern == 0.
  1439.   Spawn Monster: Kilroy Legs.
  1440. }
  1441. AI:Movement {
  1442.   If (TempVar:AIPattern != 8) Then
  1443.       If (KettleKin.CurrentHitPoints <= 50% KettleKin.MaxHitPoints) Then
  1444.          TempVar:AIPattern == 8.
  1445.       End If
  1446.   End If
  1447.  
  1448.   If (TempVar:AIPattern == 8) Then
  1449.       KettleKin.Speed == 4.
  1450.   Else
  1451.       KettleKin.Speed == 2.
  1452.   End If
  1453. }
  1454. AI:Attack {
  1455.   If (TempVar:AIPattern != 8) Then
  1456.       If (KettleKin.CurrentHitPoints <= 50% KettleKin.MaxHitPoints) Then
  1457.          TempVar:AIPattern == 8.
  1458.       End If
  1459.   End If
  1460.  
  1461.   If (TempVar:AIPattern != 8) Then
  1462.      Select Closest Opponent.
  1463.  
  1464.      If (Target.Distance == Long Range) Then
  1465.          If (50% Chance) Then
  1466.              Select Self.
  1467.              Cast Spell: 'Lunar Boost' On Target.
  1468.          End If
  1469.      Else
  1470.          If (1/3 Chance) Then
  1471.              Use <Knockout Hammer> On Target.
  1472.          Else If (1/3 Chance) Then
  1473.              Use <Hammer Spin> On Target.
  1474.          Else
  1475.              Select Self.
  1476.              Cast Spell: 'Lunar Boost' On Target.
  1477.          End If
  1478.      End If
  1479.   Else
  1480.      Select Closest Opponent.
  1481.  
  1482.      If (Target.Distance == Long Range) Then
  1483.          If (50% Chance) Then
  1484.              Select Self.
  1485.              Cast Spell: 'Lunar Boost' On Target.
  1486.          End If
  1487.      Else
  1488.          If (1/3 Chance) Then
  1489.              Use <Knockout Hammer> On Target.
  1490.          Else If (1/3 Chance) Then
  1491.              Use <Hammer Spin> On Target.
  1492.          Else
  1493.              Select Self.
  1494.              Cast Spell: 'Lunar Boost' On Target.
  1495.          End If
  1496.      End If
  1497.   End If
  1498. }
  1499. ---------------------------------------
  1500. [72: Mech Rider III]
  1501. ---------------------------------------
  1502. ## No escape this time. Special Death Handling is disabled.
  1503. ## Mech Rider IIIs AI is backwords. He uses Diffuser Cannon at <50% HP but
  1504. ## Diffuser Cannon is weaker then Wave Cannon for some reason.
  1505. ## Of course that doesn't matter since the bug in his spell AI effectly makes
  1506. ## it impossible for him to use either skill. Making Diffuser Cannon unused.
  1507. ## Geshtar lost some brain cells when Thantos made him a zombie.
  1508. ## He's more then happy to cast Speed Up while he has Wall active.
  1509.  
  1510. ## Straight Bike Impale has a Power of 44 and causes Knocked Out. (33% Chance)
  1511. ## Psycho Bike Impale has a Power of 46 and causes Knocked Out. (33% Chance)
  1512. ## Bike Drift has a Power of 44 and causes Knocked Out. (33% Chance)
  1513. ## Wave Cannon has a Power of 93.
  1514. ## Diffuser Cannon has a Power of 69.
  1515. ## Black Magic Spell Power: 37
  1516. ## White Magic Spell Power: 02
  1517.  
  1518. AI:Setup {
  1519.   Select Mech Rider III.
  1520.  
  1521.   Target.ZCoordinate == 0x0020.
  1522.  
  1523.   Disable Special Death Handling For Target().
  1524. }
  1525. AI:Movement {
  1526.   Select Closest Y-Axis Opponent.
  1527.  
  1528.   If (Target Is South Of Mech Rider) Then
  1529.       Use <Align Y-Axis To Target> On Self.
  1530.   ElseIf (Target.YDistance > 0x0020) Then
  1531.       Use <Align Y-Axis To Target> On Self.
  1532.   Else
  1533.       Set Animation: Idle.
  1534.   End If
  1535. }
  1536. AI:Attack {
  1537.   Select Closest Y-Axis Opponent.
  1538.  
  1539.   If (Target Is South Of Mech Rider OR Target.YDistance > 0x0020) Then
  1540.       If (Mech Rider III Does Not Have Wall Status) Then
  1541.          Select Self.
  1542.  
  1543.          Cast Spell: 'Wall' On Target.
  1544.       ElseIf (Mech Rider III Has No Buffs) Then
  1545.          Select Self.
  1546.  
  1547.          Cast Spell: 'Speed Up' On Target.
  1548.       Else
  1549.          Select Self.
  1550.          If (Target.CurrentHitPoints > 50% Target.MaxHitPoints) Then
  1551.              Select Closest Y-Axis Opponent.
  1552.              Use Skill: <Wave Cannon> On Target.
  1553.          Else
  1554.              Select Closest Y-Axis Opponent.
  1555.              Use Skill: <Diffuser Cannon> On Target.
  1556.          End If
  1557.       End If
  1558.   Else
  1559.       If (33% Chance) Then
  1560.          Use <Straight Bike Impale> On Target.
  1561.       ElseIf (33% Chance) Then
  1562.          Use <Psycho Bike Impale> On Target.
  1563.       Else
  1564.          Use <Bike Drift> On Target.
  1565.       End If
  1566.   End If
  1567. }
  1568. ---------------------------------------
  1569. [71: Tonpole]
  1570. ---------------------------------------
  1571. ## Tonpole uses the same special death handling as Biting Lizard,
  1572. ## So if you remove all his HP before he can transform you can skip
  1573. ## the secondary boss battle.
  1574. ## Tonpole never selects a target and just hops around randomly, but if he
  1575. ## collides with you he'll still manage to do some damage.
  1576.  
  1577. ## Tonpole Hop has a Power of 35.
  1578. ## Black Magic Spell Power: 20
  1579. ## White Magic Spell Power: 20
  1580.  
  1581. AI:Setup {
  1582.   Enable Special Death Handling For Tonpole.
  1583. }
  1584. AI:Movement {
  1585.   Select Self.
  1586.  
  1587.   If (Target.CurrentHP < 50% Target.MaxHP) Then
  1588.       Use <Transform> On Self.
  1589.   Else
  1590.       Use <RandomHop> On Self.
  1591.   End If
  1592. }
  1593. AI:Attack {
  1594.   Use <RandomHop> On Self.
  1595. }
  1596. AI:Action:Transform {
  1597.   Set Animation: Tonpole Explosion.
  1598.  
  1599.   Spawn Monster: Biting Lizard.
  1600.  
  1601.   Despawn Self.
  1602. }
  1603. ---------------------------------------
  1604. [74: Fire Gigas]
  1605. ---------------------------------------
  1606. ## Why does the weakest Gigas have the highest spell power of the bunch?
  1607.  
  1608. ## Claw Smash has a Power of 34.
  1609. ## Black Magic Spell Power: 42
  1610. ## White Magic Spell Power: 42
  1611.  
  1612. AI:Setup {
  1613.   TempVar:Disassembled == False.
  1614.   TempVar:DisassembleWait == 0.
  1615. }
  1616. AI:Movement {
  1617.   If (TempVar:Disassembled == False) Then
  1618.       If (25% Chance) Then
  1619.          Select Random Opponent.
  1620.  
  1621.          Use <Disassemble> On Self.
  1622.          TempVar:Disassembled == True.
  1623.       Else
  1624.          If (FrostGigas.Direction == South) Then
  1625.              Set Animation: Idle.
  1626.          ElseIf  (FrostGigas.Direction == East) Then
  1627.              Set Animation: Walk East.
  1628.          Else
  1629.              Set Animation: Walk West.
  1630.       End If
  1631.   End If
  1632. }
  1633. AI:Attack {
  1634.   Select Closest Opponent.
  1635.  
  1636.   If (Target.Distance == Mid-Range) Then
  1637.       Select All Opponents.
  1638.       Cast Spell: 'Exploder' On Target.
  1639.       Use <Claw Smash> On Target.
  1640.   Else
  1641.       If (1/3 Chance) Then
  1642.          Use Skill: <Fire Breath> On Target.
  1643.       Else
  1644.          If (50% Chance) Then
  1645.              Select All Opponents.
  1646.              Cast Spell: 'Lava Wave' On Target.
  1647.          Else
  1648.              Select All Opponents.
  1649.              Cast Spell: 'Fireball' On Target.
  1650.          End If
  1651.       End If
  1652.   End If
  1653. }
  1654. AI:Special {
  1655.   If (TempVar:Disassembled == True) Then
  1656.       TempVar:DisassembleWait == 74.
  1657.  
  1658.       Halt Movement Script().
  1659.       Halt Attack Script().
  1660.  
  1661.       While (TempVar:DisassembleWait != 0)
  1662.          Set Animation: Random Orb Movement.
  1663.  
  1664.          TempVar:DisassembleWait--.
  1665.       End While
  1666.  
  1667.       Enable Movement Script().
  1668.       Enable Attack Script().
  1669.  
  1670.       FireGigas.XCoordinate == Target.XCoordinate.
  1671.       FireGigas.YCoordinate == Target.YCoordinate.
  1672.  
  1673.       Use <Appear> On Self.
  1674.   End If
  1675. }
  1676. ---------------------------------------
  1677. [78: Buffy]
  1678. ---------------------------------------
  1679. ## Buffy uses the same weapons for his Jump Kicks/Claws/Blood Drain as Vampire does.
  1680. ## Jump Kick has a Power of 85 and causes Knocked Out (33% Chance).
  1681. ## Claw Swipe has a Power of 76 and causes Poison (99% Chance).
  1682. ## Blood Drain has a Power of 81.
  1683. ## Bat Attack has a Power of 95. (I've never seen him use this. Guess I shouldn't annihilate him with Lucent Beam so quickly)
  1684. ## Leaden Glare has a power of 76 and causes Tangle (99% Chance).
  1685. ## Black Magic Spell Power: 57
  1686. ## White Magic Spell Power: 01
  1687.  
  1688. AI:Setup {
  1689.   TempVar:Flying = False
  1690. }
  1691. AI:Movement {
  1692.   If (TempVar:Flying = True) Then
  1693.       If (25% Chance) Then
  1694.          TempVar:Flying = False
  1695.          Use <Land> On Self.
  1696.       End If
  1697.   Else
  1698.       If (1/3 Chance) Then
  1699.          TempVar:Flying = False
  1700.          Use <Fly> On Self.
  1701.       End If
  1702.   End If
  1703. }
  1704. AI:Attack {
  1705.   Select Closest Opponent.
  1706.  
  1707.   If (TempVar:Flying = True) Then
  1708.       If (1/6 Chance) Then
  1709.          Cast Spell: 'Energy Absorb' On Target.
  1710.       ElseIf (1/6 Chance) Then
  1711.          Cast Spell: 'Freeze' On Target.
  1712.       ElseIf (1/6 Chance) Then
  1713.          Cast Spell: 'Dark Force' On Target.
  1714.       ElseIf (1/6 Chance) Then
  1715.          Cast Spell: 'Dispel Magic' On Target.
  1716.       ElseIf (1/6 Chance) Then
  1717.          Use Skill: <Leaden Glare> On Target.
  1718.       Else
  1719.          Use <Bat Attack> On Target.
  1720.       End If
  1721.   Else
  1722.       If (Target.Distance == Long Range) Then
  1723.          Use <Jump Kick> On Target.
  1724.       ElseIf (Buffy.Direction == North) Then
  1725.          Use <Jump Kick> On Target.
  1726.       Else
  1727.          If (1/3 Chance) Then
  1728.              Use <Blood Drain> On Target.
  1729.          Else
  1730.              Use <Claw Swipe> On Target.
  1731.          End If
  1732.       End If
  1733.   End If
  1734. }
  1735. ---------------------------------------
  1736. [79: Dark Lich]
  1737. ---------------------------------------
  1738. ## Skeletal Squeeze ties the Mana Sword for most power attack in the entire game.
  1739. ## Dark Lich will alternate between using a skill and casting a spell.
  1740. ## His spell-casting is extremely telegraphed. Everyone of his spells has a unique
  1741. ## animation used only for that spell.
  1742. ## The "Head Bang" bug is caused by lack of options. Dark Lich cannot attack when his
  1743. ## skull is out. (Probably an oversight, as that animation equips his skeleton hands weapon, but there is no hitbox)
  1744. ## Dark Lich is also one of the few bosses to have personal collison disabled. You can walk right though him.
  1745. ## The skull and hands (including the sleeves) are the actual boss. The body is just a background prop.
  1746.  
  1747. ## Skeletal Squeeze has a Power of 127 and causes Knocked Out (99% Chance).
  1748. ## Black Magic Spell Power: 44
  1749. ## White Magic Spell Power: 44
  1750. AI:Setup {
  1751.   TempVar:Underground == False.
  1752.   TempVar:HeadVisible == False.
  1753.   TempVar:CanCastSpell == True.
  1754.  
  1755.   Spawn Prop: Dark Lich Body.
  1756. }
  1757. AI:Movement {
  1758.   If (TempVar:Underground == True) Then
  1759.       Select Closest Opponent.
  1760.  
  1761.       If (TempVar:HeadVisible == True) Then
  1762.          If (Target.Direction == East OR Target.Direction == West) Then
  1763.              If (50% Chance) Then
  1764.                  Use <Vanish Skull> On Self.
  1765.              Else
  1766.                  Set Animation: Idle.
  1767.              End If
  1768.          Else
  1769.              Move Towards Target.
  1770.          End If
  1771.       Else
  1772.          If (20% Chance) Then
  1773.              Use <Appear> On Self.
  1774.          ElseIf (Target.Direction == East OR Target.Direction == West) Then
  1775.              If (50% Chance) Then
  1776.                  Use <Skull Appear> On Self.
  1777.              Else
  1778.                  Set Animation: Idle.
  1779.              End If
  1780.          Else
  1781.              Move Towards Target.
  1782.          End If
  1783.       End If
  1784.   Else
  1785.       Select Closest Opponent.
  1786.  
  1787.       If (20% Chance) Then
  1788.          Use <Vanish> On Self.
  1789.       Else
  1790.          If (Target.Distance == LongRange) Then
  1791.              Float Towards Target.
  1792.          Else
  1793.              If (Target.Direction == North OR Target.Direction == South) Then
  1794.                  Set Animation: Idle.
  1795.              Else
  1796.                  Set Animation: Look At Target.
  1797.              End If
  1798.          End if
  1799.       End If
  1800.   End If
  1801. }
  1802. AI:Attack {
  1803.   If (TempVar:Underground == True) Then
  1804.       If (TempVar:HeadVisible == False) Then
  1805.           Select Closest Opponent.
  1806.  
  1807.           Use <Skeletal Squeeze> On Target.
  1808.       End If
  1809.   Else
  1810.       Select Closest Opponent.
  1811.  
  1812.       TempVar:CanCastSpell == !TempVar:CanCastSpell.
  1813.  
  1814.       If (TempVar:CanCastSpell) Then
  1815.          If (1/7 Chance) Then
  1816.              Cast Spell: 'Evil Gate' On Target.
  1817.          ElseIf (1/7 Chance) Then
  1818.              Cast Spell: 'Energy Absorb' On Target.
  1819.          ElseIf (1/7 Chance) Then
  1820.              Cast Spell: 'Dark Force' On Target.
  1821.          ElseIf (1/7 Chance) Then
  1822.              Cast Spell: 'Dispel Magic' On Target.
  1823.          ElseIf (1/7 Chance) Then
  1824.              Cast Spell: 'Thunderbolt' On Target.
  1825.          ElseIf (1/7 Chance) Then
  1826.              Cast Spell: 'Earth Slide' On Target.
  1827.          ElseIf (1/7 Chance) Then
  1828.              Cast Spell: 'Freeze' On Target.
  1829.       Else
  1830.          If (2/9 Chance) Then
  1831.              Use Skill: <Petrify Beam> On Target.
  1832.          ElseIf (1/9 Chance) Then
  1833.              Use Skill: <Freeze Beam> On Target.
  1834.          ElseIf (1/9 Chance) Then
  1835.              Use Skill: <Poison Gas> On Target.
  1836.          ElseIf (1/9 Chance) Then
  1837.              Use Skill: <Sleep Gas> On Target.
  1838.          ElseIf (1/9 Chance) Then
  1839.              Use Skill: <Leaden Glare> On Target.
  1840.          ElseIf (1/9 Chance) Then
  1841.              Use Skill: <Pygmus Glare> On Target.
  1842.          ElseIf (1/9 Chance) Then
  1843.              Use Skill: <Confuse Hoops> On Target.
  1844.          ElseIf (1/9 Chance) Then
  1845.              Use Skill: <Balloon Ring> On Target.
  1846.       End If
  1847.   End If
  1848. }
  1849. AI:Damaged {
  1850.   If (TempVar:Underground == True) Then
  1851.       Set Animation: Skeletal Flinch.
  1852.   Else
  1853.       Set Animation: Floating Flinch.
  1854.   End If
  1855. }
  1856. AI:Action:Vanish {
  1857.   Halt Movement Script().
  1858.   Halt Attack Script().
  1859.  
  1860.   TempVar:FadeTimer == 36.
  1861.  
  1862.   Select Self.
  1863.  
  1864.   Set Animation: Invisible.
  1865.   Target.IsAttacking == False.
  1866.  
  1867.   Set Boss Palette: Dark Lich Fade Out.
  1868.  
  1869.   Select Dark Lich Body.
  1870.   Target.Visible == False.
  1871.  
  1872.   Select Self.
  1873.  
  1874.   While (TempVar:FadeTimer != 0) Then
  1875.       TempVar:FadeTimer--.
  1876.   End While
  1877.  
  1878.   Set Animation: Invisible.
  1879.   Target.IsAttacking == False.
  1880.  
  1881.   Set Boss Palette: Dark Lich Hand Fade In.
  1882.  
  1883.   TempVar:FadeTimer == 36.
  1884.  
  1885.   While (TempVar:FadeTimer != 0) Then
  1886.       TempVar:FadeTimer--.
  1887.   End While
  1888.  
  1889.   Set Animation: Skeletal Hands Idle.
  1890.  
  1891.   TempVar:Underground == True.
  1892.  
  1893.   Enable Movement Script().
  1894.   Enable Attack Script().
  1895. }
  1896. AI:Action:Appear {
  1897.   Halt Movement Script().
  1898.   Halt Attack Script().
  1899.  
  1900.   TempVar:FadeTimer == 36.
  1901.  
  1902.   Select Self.
  1903.  
  1904.   Set Animation: Invisible.
  1905.   Target.IsAttacking == False.
  1906.  
  1907.   Set Boss Palette: Dark Lich Hand Fade Out.
  1908.  
  1909.   While (TempVar:FadeTimer != 0) Then
  1910.       TempVar:FadeTimer--.
  1911.   End While
  1912.  
  1913.   Set Animation: Invisible.
  1914.   Target.IsAttacking == False.
  1915.  
  1916.   Set Boss Palette: Dark Lich Fade In.
  1917.  
  1918.   TempVar:FadeTimer == 36.
  1919.  
  1920.   Select Dark Lich Body.
  1921.   Target.Visible == False.
  1922.  
  1923.   Select Self.
  1924.  
  1925.   While (TempVar:FadeTimer != 0) Then
  1926.       TempVar:FadeTimer--.
  1927.   End While
  1928.  
  1929.   Set Animation: Idle.
  1930.  
  1931.   TempVar:Underground == False.
  1932.  
  1933.   Enable Movement Script().
  1934.   Enable Attack Script().
  1935. }
  1936. AI:Action:SkullAppear {
  1937.   TempVar:HeadVisible == True.
  1938.  
  1939.   Equip Boss Weapon: Skeletal Hands.
  1940.  
  1941.   Set Animation: Head Peak.
  1942. }
  1943. AI:Action:VanishSkull {
  1944.   TempVar:HeadVisible == False.
  1945.  
  1946.   Set Animation: Head Vanishing.
  1947. }
  1948. ---------------------------------------
  1949. [7A: Biting Lizard]
  1950. ---------------------------------------
  1951. ## Swallow Whole has a Power of 38.
  1952. ## Black Magic Spell Power: 14
  1953. ## White Magic Spell Power: 14
  1954.  
  1955. AI:Setup {
  1956.   TempVar:SwallowedOpponent == False.
  1957.  
  1958.   Enable Special Death Handling For Biting Lizard.
  1959. }
  1960. AI:Movement {
  1961.   If (TempVar:SwallowedOpponent == True) Then
  1962.       Use <Throw Up Target> On Self.
  1963.       TempVar:SwallowedOpponent == False
  1964.   Else
  1965.       Select Closest Opponent.
  1966.  
  1967.       If (Target.Distance == Long-Range) Then
  1968.          Walk Towards Target.
  1969.       ElseIf (Target.Distance == Mid-Range) Then
  1970.          Set Animation: Idle.
  1971.       Else
  1972.          Hop Towards Target.
  1973.       End If
  1974.   End If
  1975. }
  1976. AI:Attack {
  1977.  
  1978.   Select Closest Opponent.
  1979.  
  1980.   If (Target.Distance <= 0x0002) Then
  1981.       If (50% Chance) Then
  1982.          Hop Towards Target.
  1983.       Else
  1984.          If (Target.Distance > 0x0004 OR Target.Distance > 0x0008) Then
  1985.              Select Self.
  1986.              
  1987.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  1988.                  Select All-Allies.
  1989.  
  1990.                  Cast Spell: 'Cure Water' On Target.
  1991.              End If
  1992.          ElseIf (Self.ScreenX > 64 OR Self.ScreenX > 192) Then
  1993.              Select Self.
  1994.              
  1995.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  1996.                  Select All-Allies.
  1997.  
  1998.                  Cast Spell: 'Cure Water' On Target.
  1999.              End If
  2000.          ElseIf (Self.ScreenY > 64 OR Self.ScreenY > 160) Then
  2001.              Select Self.
  2002.              
  2003.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  2004.                  Select All-Allies.
  2005.  
  2006.                  Cast Spell: 'Cure Water' On Target.
  2007.              End If
  2008.          ElseIf (Target.CurrentFloor != Self.CurrentFloor) Then
  2009.              Select Self.
  2010.              
  2011.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  2012.                  Select All-Allies.
  2013.  
  2014.                  Cast Spell: 'Cure Water' On Target.
  2015.              End If
  2016.          ElseIf (Target.0060 != 0) Then (I dunno what this address is used for)
  2017.              Select Self.
  2018.              
  2019.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  2020.                  Select All-Allies.
  2021.  
  2022.                  Cast Spell: 'Cure Water' On Target.
  2023.              End If
  2024.          ElseIf (Target.ActiveAnimation == Suprised Animation) Then
  2025.              Select Self.
  2026.              
  2027.              If (Target.CurrentHP < 50% Target.MaxHP) Then
  2028.                  Select All-Allies.
  2029.  
  2030.                  Cast Spell: 'Cure Water' On Target.
  2031.              End If
  2032.          Else
  2033.              Use <Swallow Whole> On Target.
  2034.          End If
  2035.       End If
  2036.   Else
  2037.       If (Target.Distance > 0x0004 OR Target.Distance > 0x0008) Then
  2038.          Select Self.
  2039.              
  2040.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2041.              Select All-Allies.
  2042.  
  2043.              Cast Spell: 'Cure Water' On Target.
  2044.          End If
  2045.       ElseIf (Self.ScreenX > 64 OR Self.ScreenX > 192) Then
  2046.          Select Self.
  2047.              
  2048.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2049.              Select All-Allies.
  2050.  
  2051.              Cast Spell: 'Cure Water' On Target.
  2052.          End If
  2053.       ElseIf (Self.ScreenY > 64 OR Self.ScreenY > 160) Then
  2054.          Select Self.
  2055.              
  2056.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2057.              Select All-Allies.
  2058.  
  2059.              Cast Spell: 'Cure Water' On Target.
  2060.          End If
  2061.       ElseIf (Target.CurrentFloor != Self.CurrentFloor) Then
  2062.          Select Self.
  2063.              
  2064.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2065.              Select All-Allies.
  2066.  
  2067.              Cast Spell: 'Cure Water' On Target.
  2068.          End If
  2069.       ElseIf (Target.0060 != 0) Then (I dunno what this address is used for)
  2070.          Select Self.
  2071.              
  2072.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2073.              Select All-Allies.
  2074.  
  2075.              Cast Spell: 'Cure Water' On Target.
  2076.          End If
  2077.       ElseIf (Target.ActiveAnimation == Suprised Animation) Then
  2078.          Select Self.
  2079.              
  2080.          If (Target.CurrentHP < 50% Target.MaxHP) Then
  2081.              Select All-Allies.
  2082.  
  2083.              Cast Spell: 'Cure Water' On Target.
  2084.          End If
  2085.       Else
  2086.          Use <Swallow Whole> On Target.
  2087.       End If
  2088.   End If
  2089. }
  2090. AI:Damage {
  2091.   If (TempVar:SwallowedOpponent == True) Then
  2092.       Set Animation: Damaged Spit-Up.
  2093.       Remove Swallowed From Target.
  2094.   Else
  2095.       Set Animation: Damaged.
  2096.   End If
  2097. }
  2098. AI:Death {
  2099.   Set Animation: Dead Lizard.
  2100.  
  2101.   Remove Swallowed From Target.
  2102.  
  2103.   Use <Fade Away> On Self.
  2104. }
  2105. AI:Action:SwallowWhole {
  2106.   Target.ActiveAnimation == Surprised Animation.
  2107.   Target.StatusEffects == Stunned.
  2108.   Target.StunTimer == 36.
  2109.  
  2110.   SetAnimation: Full Belly.
  2111.  
  2112.   Target.SpriteFlags == Invisible.
  2113.  
  2114.   TempVar:SwallowedTarget == True.
  2115. }
  2116. ---------------------------------------
  2117. [7D: Thunder Gigas]
  2118. ---------------------------------------
  2119. ## Claw Smash has a Power of 34.
  2120. ## Black Magic Spell Power: 37
  2121. ## White Magic Spell Power: 01
  2122.  
  2123. AI:Setup {
  2124.   TempVar:Disassembled == False.
  2125.   TempVar:DisassembleWait == 0.
  2126. }
  2127. AI:Movement {
  2128.   If (TempVar:Disassembled == False) Then
  2129.       If (25% Chance) Then
  2130.          Select Random Opponent.
  2131.  
  2132.          Use <Disassemble> On Self.
  2133.          TempVar:Disassembled == True.
  2134.       Else
  2135.          If (FrostGigas.Direction == South) Then
  2136.              Set Animation: Idle.
  2137.          ElseIf  (FrostGigas.Direction == East) Then
  2138.              Set Animation: Walk East.
  2139.          Else
  2140.              Set Animation: Walk West.
  2141.       End If
  2142.   End If
  2143. }
  2144. AI:Attack {
  2145.   Select Closest Opponent.
  2146.  
  2147.   If (Target.Distance == Mid-Range) Then
  2148.       Cast Spell: Thunderbolt On Target.
  2149.       Use <Claw Smash> On Target.
  2150.   Else
  2151.       If (1/3 Chance) Then
  2152.          Use Skill: <Blitz Breath> On Target.
  2153.       Else
  2154.          If (1/3 Chance) Then
  2155.              Cast Spell: 'Air Blast' On Target.
  2156.          ElseIf (1/3 Chance) Then
  2157.              Cast Spell: 'Thunder Saber' On Target.
  2158.          Else
  2159.              If (Target.StatusEffects == NoStatusEffects)
  2160.                  Cast Spell: 'Silence' On Target.
  2161.              End If
  2162.       End If
  2163.   End If
  2164. }
  2165. AI:Special {
  2166.   If (TempVar:Disassembled == True) Then
  2167.       TempVar:DisassembleWait == 74.
  2168.  
  2169.       Halt Movement Script().
  2170.       Halt Attack Script().
  2171.  
  2172.       While (TempVar:DisassembleWait != 0)
  2173.          Set Animation: Random Orb Movement.
  2174.  
  2175.          TempVar:DisassembleWait--.
  2176.       End While
  2177.  
  2178.       Enable Movement Script().
  2179.       Enable Attack Script().
  2180.  
  2181.       ThunderGigas.XCoordinate == Target.XCoordinate.
  2182.       ThunderGigas.YCoordinate == Target.YCoordinate.
  2183.  
  2184.       Use <Appear> On Self.
  2185.   End If
  2186. }
  2187. ---------------------------------------
  2188. [7F: Mana Beast]
  2189. ---------------------------------------
  2190. ## Thanks to Crow! for pointing out my mistake.
  2191. ## Mana Beast has Defender, Lunar Boost, Speed Up and Lucid Barrier in his spell
  2192. ## list, but has no way to actually cast them.
  2193.  
  2194. ## Spell Casting AI only. Mode 7 Boss.
  2195. ## The Mana Beast has an Agility Score of 01. Thus he attacks very slowly.
  2196.  
  2197. ## Black Magic Spell Power: 45
  2198. ## White Magic Spell Power: 45
  2199.  
  2200. AI:Attack {
  2201.  Select Self.
  2202.  
  2203.  Target.MaxManaPoints == 99.
  2204.  Target.CurrentManaPoints == 99.
  2205.  
  2206.  If (Mana Beast Does Not Have Wall Status) Then
  2207.       Select Self.
  2208.  
  2209.       Cast Spell: 'Wall' On Target.
  2210.  Else
  2211.       Select Closest Opponent.
  2212.  
  2213.       If (Target Has Wall Status) Then
  2214.          Cast Spell: 'Dispel Magic' on Target.
  2215.       Else
  2216.          If (1/3 Chance) Then
  2217.              Cast Spell: 'Lucent Beam' On Target.
  2218.          End If
  2219.       End If
  2220.  End If
  2221. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement