DO/CTL/B101/Disassembled

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search

Olly (Talk | contribs)
(DO CTL Disassembled)
Newer edit →

Revision as of 22:00, 27 June 2017

.func 0

   init_unit X(128)
   clear_ctrl_flag CF(0x8000)
   set_label 0xabc0
   #3c 240, X(0)
   set_event_handler F(14)
   set_callback 13, 29
   set_global_r_i G(0), 0
   set_global_r_i G(1), 0
   find_and_collect_item Treasure_Chest_100gc
   set_timer 25
   play_self Get the loot (Greenskin voice)
   wait_unit_flag3_clear UF3(CollectingItem)
   find_and_collect_item Treasure_Chest_100gc
   find_enemy_uflag_attrib E(4), UF1(0), Attrib(EngineOfWar)
   test_unit_flag3 UF3(0x400)
   add_waypoint BTBId(99)
   set_timer 10


.func 1

   init_unit X(128)
   clear_ctrl_flag CF(0x8000)
   set_label 0xabc1
   set_event_handler F(14)
   set_callback 13, 30
   set_unit_flag2 UF2(0x800)
   set_unit_r_i R(6), 1
   clear_ctrl_flag CF(0x10)
   set_timer 20
   test_ctrl_flag CF(0x10)
   set_timer 20
   test_other_unit_flag2 ID(130), UF2(0x800)
   set_timer 170
   set_unit_r_i R(6), 0
   #d6 Alignment(0)
   set_unit_r_i R(6), 0
   test_unit_r_eq_i R(6), 0
   clear_unit_flag2 UF2(0x800)
   init_teleport BTB(24)
   #3c 240, X(0)
   wait_unit_flag1_clear UF1(0x8)
   find_enemy_uflag_attrib E(4), UF1(0), Attrib(EngineOfWar)
   wait_unit_flag3_clear UF3(CollectingItem)
   find_and_collect_item Treasure_Chest_100gc
   test_unit_flag3 UF3(0x400)
   add_waypoint BTBId(99)
   set_timer 10


.func 2

   init_unit X(128)
   clear_ctrl_flag CF(0x8000)
   set_label 0xabc2
   #3c 240, X(0)
   set_event_handler F(15)
   set_callback 13, 31
   goto F(7)


.func 3

   init_unit X(128)
   clear_ctrl_flag CF(0x8000)
   set_label 0xabc3
   set_event_handler F(15)
   set_callback 13, 32
   set_unit_flag2 UF2(0x800)
   set_unit_r_i R(6), 1
   clear_ctrl_flag CF(0x10)
   set_timer 20
   test_ctrl_flag CF(0x10)
   set_timer 20
   test_other_unit_alive ID(129)
   set_unit_r_i R(6), 0
   #d6 Alignment(0)
   set_unit_r_i R(6), 0
   set_timer 100
   test_unit_r_eq_i R(6), 0
   clear_unit_flag2 UF2(0x800)
   init_teleport BTB(23)
   #3c 240, X(0)
   wait_unit_flag1_clear UF1(0x8)
   goto F(10)


.func 4

   init_unit X(64)
   set_unit_flag1 UF1(0x100)
   set_ctrl_flag CF(0x1 | 0x8000)
   set_label 0xabc5
   #3c 160, X(0)
   set_event_handler F(16)
   set_callback 12, 33
   store_unit_by_label 0xabc6
   move_rand_in_radius BTBId(1)
   set_timer 90
   move_rand_in_radius BTBId(2)
   set_timer 40
   move_rand_in_radius BTBId(3)
   set_timer 200
   move_rand_in_radius BTBId(2)
   set_timer 60
   move_rand_in_radius BTBId(3)
   set_timer 110
   move_rand_in_radius BTBId(1)
   set_timer 40


.func 5

   init_unit X(64)
   set_unit_flag1 UF1(0x100)
   set_ctrl_flag CF(0x1 | 0x8000)
   set_label 0xabc6
   #3c 160, X(0)
   set_event_handler F(16)
   set_callback 12, 34
   store_unit_by_label 0xabc7
   move_rand_in_radius BTBId(1)
   set_timer 120
   move_rand_in_radius BTBId(3)
   set_timer 60
   move_rand_in_radius BTBId(2)
   set_timer 300
   move_rand_in_radius BTBId(3)
   set_timer 60
   move_rand_in_radius BTBId(2)
   set_timer 110
   move_rand_in_radius BTBId(2)
   set_timer 190


.func 6

   init_unit X(64)
   set_unit_flag1 UF1(0x100)
   set_ctrl_flag CF(0x1 | 0x8000)
   set_label 0xabc7
   #3c 160, X(0)
   set_event_handler F(16)
   set_callback 12, 35
   store_unit_by_label 0xabc5 ; label assigned in func 4
   move_rand_in_radius BTBId(2)
   set_timer 290
   move_rand_in_radius BTBId(1)
   set_timer 140
   move_rand_in_radius BTBId(1)
   set_timer 50
   move_rand_in_radius BTBId(3)
   set_timer 160
   move_rand_in_radius BTBId(1)
   set_timer 90


.func 7

   set_unit_r_i R(0), 1
   move_to_node BTB(9)
   test_self_at_node BTB(9)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(9)
   set_timer 10


.func 8

   set_unit_r_i R(0), 2
   move_to_node BTB(17)
   set_unit_r_i R(2), 30
   test_self_at_node BTB(17)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   set_unit_r_i R(2), 30
   add_unit_r_i R(2), -1
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(17)
   set_timer 10
   test_unit_r_eq_i R(2), 0
   goto F(9)


.func 9

   set_unit_r_i R(0), 0
   move_to_node BTB(26)
   set_unit_r_i R(2), 30
   test_self_at_node BTB(26)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   set_unit_r_i R(2), 30
   add_unit_r_i R(2), -1
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(26)
   set_timer 10
   test_unit_r_eq_i R(2), 0
   goto F(7)


.func 10

   set_unit_r_i R(0), 1
   move_to_node BTB(22)
   test_self_at_node BTB(22)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(22)
   set_timer 10


.func 11

   set_unit_r_i R(0), 2
   move_to_node BTB(27)
   set_unit_r_i R(2), 30
   test_self_at_node BTB(27)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   set_unit_r_i R(2), 30
   add_unit_r_i R(2), -1
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(27)
   set_timer 10
   test_unit_r_eq_i R(2), 0
   goto F(12)


.func 12

   set_unit_r_i R(0), 0
   move_to_node BTB(28)
   set_unit_r_i R(2), 30
   test_self_at_node BTB(28)
   find_enemy_distance_uflag E(58), 100, UF1(0x200)
   set_unit_r_i R(2), 30
   add_unit_r_i R(2), -1
   find_enemy_distance_uflag E(58), 50, UF1(0x200)
   test_unit_flag1 UF1(0x10)
   move_to_node BTB(28)
   set_timer 10
   test_unit_r_eq_i R(2), 0
   goto F(10)


.func 13

   move_to_node BTB(10)
   set_timer 10
   test_self_at_node BTB(10)
   set_unit_flag1 UF1(0x100)
   #3c 0, X(0)
   set_unit_flag2 UF2(0x800)
   set_attribute Attrib(NeverRegroup)
   move_to_node BTB(10)
   wait_unit_flag1_set UF1(0x10)
   set_timer 100


.func 14

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       #14 8, E(4)
       end_event Filter
   on_event E(20)
       #14 8, E(4)
       end_event Filter
   on_event E(21)
       #14 9, E(4)
       end_event Filter
   on_event E(5)
       #14 5, No_Event
       send_event_to_stored_unit E(21)
       end_event Filter
   on_event E(3)
       set_return_func_iftrue F(128)
       end_event Filter
   on_event E(85)
       set_unit_flag2 UF2(0x10)
       set_return_func_iftrue F(139)
       end_event Filter
   on_event E(4)
       set_return_func_iftrue F(127)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(71)
       event_test_distance_and_collect_this_item 240
       set_return_func_iftrue F(137)
       end_event Filter
   on_event E(68)
       test_unit_flag3 UF3(0x200)
       test_attribute_set Attrib(AlwaysPursue)
       send_event_to_self_iffalse E(16)
       end_event Filter
   on_event E(69)
       event_test_item Treasure_Chest_100gc
       test_global_r_eq_i G(1), 1
       play_self Voice(66)
       set_global_r_i G(1), 1
       broadcast_event_to_friends E(17)
       set_return_func_with_restart_iftrue F(127)
       set_return_func F(134)
       end_event Filter
   on_event E(70)
       test_label_eq_i 0xabc0 ; label assigned in func 0
       test_event_source_eq_i ID(58)
       set_return_func F(13)
       set_return_func F(134)
       set_return_func F(134)
       end_event Filter
   on_event E(29)
       test_global_r_eq_i G(0), 1
       test_label_eq_i 0xabc0 ; label assigned in func 0
       play_other ID(1), They're heading for the trading post. Let's spill their green blood
       set_global_r_i G(0), 1
       end_event Propagate
   on_event E(10)
       broadcast_event_to_friends E(17)
       end_event Propagate
   on_event E(12)
       broadcast_event_to_friends E(17)
       end_event Propagate
   on_event E(22)
       broadcast_event_to_friends E(17)
       end_event Propagate
   call F(122)
   @Filter


.func 15

   clear_ctrl_flag CF(0x8)
   test_unit_r_eq_i R(4), 1
   test_unit_flag2 UF2(0x800)
   #d6 Alignment(0)
   set_return_func_iffalse F(148)
   on_event E(19)
       #14 8, E(58)
       end_event Filter
   on_event E(20)
       #14 8, E(58)
       end_event Filter
   on_event E(21)
       #14 9, E(58)
       end_event Filter
   on_event E(5)
       #14 5, No_Event
       send_event_to_stored_unit E(21)
       end_event Filter
   on_event E(3)
       clear_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(85)
       set_unit_flag2 UF2(0x10)
       set_return_func_iftrue F(139)
       end_event Filter
   on_event E(4)
       set_return_func_iftrue F(127)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(71)
       event_test_distance_and_collect_this_item 240
       set_return_func_iftrue F(137)
       end_event Filter
   on_event E(69)
       clear_unit_flag1 UF1(0x4000000)
       test_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(109)
       set_return_func_with_restart F(108)
       set_return_func_with_restart F(111)
       set_return_func F(134)
       end_event Filter
   on_event E(70)
       set_return_func F(134)
       end_event Filter
   on_event E(72)
       clear_unit_flag1 UF1(0x4000000)
       #87 80
       end_event Filter
   on_event E(58)
       clear_unit_flag1 UF1(0x4000000)
       test_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(109)
       set_return_func_with_restart F(108)
       set_return_func_with_restart F(111)
       end_event Filter
   on_event E(61)
       play_self We're under fire
       test_unit_flag1 UF1(0x10)
       set_unit_r_random1to10 R(3)
       test_unit_r_eq_r R(3), R(4)
       add_unit_r_i R(1), 1
       set_unit_r_random1to10 R(4)
       test_unit_r_eq_i R(1), 2
       set_unit_r_i R(1), 0
       test_label_eq_i 0xabc2 ; label assigned in func 2
       test_unit_r_eq_i R(0), 0
       set_return_func_iftrue F(7)
       test_unit_r_eq_i R(0), 1
       set_return_func_iftrue F(8)
       test_unit_r_eq_i R(0), 2
       set_return_func_iftrue F(9)
       test_unit_r_eq_i R(0), 0
       set_return_func_iftrue F(10)
       test_unit_r_eq_i R(0), 1
       set_return_func_iftrue F(11)
       test_unit_r_eq_i R(0), 2
       set_return_func_iftrue F(12)
       play_self Watch your back
       end_event Filter
   on_event E(10)
       broadcast_event_to_friends E(17)
       end_event Propagate
   on_event E(12)
       broadcast_event_to_friends E(17)
       end_event Propagate
   on_event E(22)
       broadcast_event_to_friends E(17)
       end_event Propagate
   call F(125)
   @Filter


.func 16

   clear_ctrl_flag CF(0x8)
   on_event E(5)
       #14 5, No_Event
       end_event Filter
   on_event E(3)
       send_event_to_self E(12)
       end_event Filter
   on_event E(12)
       send_event_to_stored_unit E(12)
       set_return_func F(131)
       end_event Filter
   @Filter


.func 100

   init_unit X(0)
   set_ctrl_flag CF(0x1 | 0x8000)
   #3c 240, X(0)
   set_event_handler F(102)
   test_unit_class Artillery
   set_event_handler F(103)
   test_unit_class Wizard
   set_event_handler F(104)
   test_unit_class Archer
   set_event_handler F(105)
   test_unit_class Monster
   test_missile_weapon No_Missile
   set_event_handler F(105)
   set_event_handler F(102)
   set_callback 10, 30
   set_timer 100


.func 101

   init_unit X(0)
   set_ctrl_flag CF(0x1 | 0x8000)
   #3c 240, X(0)
   set_event_handler F(102)
   set_callback 10, 30
   set_timer 75
   play_self Voice(80)
   test_unit_flag1_and_close_combat UF1(0x1)
   goto F(106)
   set_timer 100


.func 102

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(51)
       test_objective Objective_G
       end_event Filter
   on_event E(3)
       test_unit_flag1 UF1(0x8000000)
       set_return_func_iftrue F(128)
       end_event Filter
   on_event E(26)
       #46 E(4)
       end_event Filter
   on_event E(9)
       #46 E(4)
       end_event Filter
   on_event E(4)
       set_return_func_with_restart_iftrue F(106)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       set_return_func F(107)
       end_event Filter
   call F(122)
   @Filter


.func 103

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(3)
       clear_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(4)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       end_event Filter
   on_event E(23)
       clear_unit_flag2 UF2(0x1)
       set_unit_class Infantry
       set_event_handler F(102)
       test_unit_flag1 UF1(Retreat)
       end_event Filter
   call F(123)
   @Filter


.func 104

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(3)
       #9b X(0), X(0)
       end_event Filter
   on_event E(4)
       #9b X(0), X(0)
       set_return_func_with_restart_iftrue F(106)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       #9b X(0), X(0)
       set_return_func F(107)
       end_event Filter
   call F(124)
   @Filter


.func 105

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(3)
       clear_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(4)
       set_return_func_with_restart_iftrue F(106)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       set_return_func F(107)
       end_event Filter
   call F(125)
   @Filter


.func 106

   #14 4, No_Event
   wait_unit_flag1_clear UF1(0x8 | 0x4000)
   play_self Attack!
   for 2
       set_timer 10
       goto_iftrue F(129)
       test_unit_flag1 UF1(0x10)


.func 107

   play_self Charge!
   #14 19, No_Event
   #b0 0
   test_unit_flag1 UF1(0x10)
   goto F(134)


.func 108

   set_unit_flag2 UF2(Shooting | 0x10)
   #7d X(0)
   #81 0
   play_self I protest my lord
   play_self I see
   set_unit_flag2 UF2(Shooting | 0x10)
   #7a X(0)
   call F(113)
   set_timer 10
   test_unit_flag2 UF2(Shooting)


.func 109

   set_unit_flag2 UF2(Shooting | 0x10)
   #7d X(0)
   #81 0
   play_self I protest my lord
   play_self I see
   set_unit_flag2 UF2(Shooting | 0x10)
   #7a X(0)
   call F(112)
   set_timer 10
   test_unit_flag2 UF2(Shooting)


.func 110

   set_x_i 0
   play_self Target received
   add_x_i 1
   #7b X(0)
   #7d X(0)
   #81 0
   #7c X(32887)
   play_self Target received
   add_x_i 1
   #7a X(0)
   play_self Target received
   play_self I see
   set_unit_flag2 UF2(Shooting)
   #7a X(0)
   call F(115)
   set_timer 10
   test_unit_flag2 UF2(Shooting)


.func 111

   set_x_i 1
   #7b X(0)
   #7d X(0)
   #81 0
   #7a X(0)
   call F(115)
   set_timer 25


.func 112

   test_unit_class Archer
   test_missile_weapon Crossbow
   #8b 7, 34, 1
   #8b 7, 34, 2
   #8c 7, 34


.func 113

   test_unit_class Archer
   test_missile_weapon Crossbow
   #8b 7, 59, 1
   #8b 7, 59, 2
   #8c 7, 59


.func 114

   test_event_source_eq_i ID(-1)
   test_unit_class Artillery
   set_timer 10


.func 115

   #7b X(0)
   play_self Open fire
   set_x_i 1
   call F(112)
   #7d X(0)
   #81 0
   set_unit_flag2 UF2(Shooting)
   set_timer 30
   #7b X(0)
   play_self Open fire
   set_x_i 1
   call F(113)
   set_x_i 0
   set_timer 90
   #7d X(0)
   #81 0
   set_unit_flag2 UF2(Shooting)
   set_x_i 0
   set_timer 90


.func 116

   play_self Crush them!
   #14 1, No_Event
   send_event_to_self_iftrue E(3)
   clear_unit_flag1 UF1(0x8 | 0x10 | 0x80 | 0x4000 | 0x100000 | 0x1000000)
   clear_unit_flag2 UF2(0x10)
   goto F(110)


.func 117

   #81 1
   set_unit_flag2 UF2(Casting)
   wait_unit_flag1_clear UF1(0x8 | 0x4000)
   #8c 7, 67
   test_unit_flag2 UF2(Casting)


.func 118

   #14 1, No_Event
   send_event_to_self_iftrue E(3)
   clear_unit_flag1 UF1(0x8 | 0x10 | 0x80 | 0x4000 | 0x100000 | 0x1000000)
   cast_spell_on_other E(66), MF(0x80), 2


.func 119

   clear_ctrl_flag CF(0x8)


.func 120

   clear_ctrl_flag CF(0x8)
   on_event E(19)
       #14 8, E(4)
       end_event Filter
   on_event E(23)
       test_unit_class Chariot
       end_event Filter
   on_event E(3)
       set_return_func_iftrue F(128)
       end_event Filter
   on_event E(4)
       set_return_func_iftrue F(127)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(12)
       set_return_func F(132)
       end_event Filter
   on_event E(13)
       set_return_func F(133)
       end_event Filter
   on_event E(7)
       set_return_func_iftrue F(130)
       end_event Filter
   on_event E(15)
       set_return_func_with_restart_iftrue F(135)
       end_event Filter
   call F(121)
   @Filter


.func 121

   @Filter
   on_event E(66)
       #95 0
       end_event Filter
   on_event E(68)
       end_event Filter
   on_event E(69)
       end_event Filter
   on_event E(61)
       play_self We're under fire
       play_self Watch your back
       send_event_to_source E(63)
       end_event Filter
   on_event E(65)
       play_self Enemy lost
       send_event_to_self E(25)
       end_event Filter
   on_event E(78)
       test_members_alive_geq_i 5
       #ad 3, 13
       spawn_unit Fanatic, F(140), 1, 0
       test_members_alive_geq_i 11
       spawn_unit Fanatic, F(140), 1, -20
       test_members_alive_geq_i 17
       spawn_unit Fanatic, F(140), 1, 20
       clear_attribute Attrib(ContainFanatics)
       end_event Filter
   on_event E(48)
       test_unit_flag1 UF1(Retreat | 0x8000)
       set_return_func_iffalse F(134)
       end_event Filter
   on_event E(54)
       end_event Filter
   on_event E(1)
       end_event 0x0
   on_event E(25)
       test_unit_flag1 UF1(0x8000)
       play_self Regroup
       set_return_func F(134)
       end_event Filter
   on_event E(57)
       set_return_func F(134)
       end_event Filter
   on_event E(26)
       #46 E(57)
       end_event Filter
   on_event E(9)
       #46 E(57)
       end_event Filter
   on_event E(14)
       #14 18, No_Event
       end_event Filter
   on_event E(22)
       #14 17, No_Event
       end_event Filter
   on_event E(24)
       set_return_func_iftrue F(134)
       end_event Filter
   on_event E(48)
       set_return_func_iftrue F(134)
       end_event Filter
   on_event E(2)
       end_event Filter
   on_event E(5)
       #14 5, No_Event
       end_event Filter
   on_event E(11)
       #14 7, No_Event
       end_event Filter
   on_event E(10)
       #c5 128
       set_return_func F(136)
       end_event Filter
   on_event E(8)
       end_event Filter
   on_event E(16)
       play_self Regroup
       set_return_func F(134)
       end_event Filter
   on_event E(28)
       end_event Filter
   on_event E(29)
       end_event Filter
   on_event E(17)
       set_ctrl_flag CF(0x10)
       end_event Filter
   @Filter
   @0x0
   clear_ctrl_flag CF(0x8)


.func 122

   @Filter
   on_event E(12)
       set_return_func F(132)
       end_event Filter
   on_event E(13)
       set_return_func F(133)
       end_event Filter
   on_event E(7)
       set_return_func_iftrue F(130)
       end_event Filter
   on_event E(15)
       set_return_func_with_restart_iftrue F(135)
       end_event Filter
   call F(121)
   @Filter
   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(3)
       clear_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(4)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       end_event Filter
   on_event E(23)
       clear_unit_flag2 UF2(0x1)
       set_unit_class Infantry
       set_event_handler F(102)
       test_unit_flag1 UF1(Retreat)
       end_event Filter
   call F(123)
   @Filter


.func 123

   @Filter
   on_event E(64)
       end_event Filter
   on_event E(60)
       end_event Filter
   on_event E(65)
       test_unit_flag2 UF2(Shooting)
       play_self Target lost
       test_unit_flag1 UF1(0x200)
       #14 17, No_Event
       send_event_to_self E(25)
       end_event Filter
   on_event E(22)
       test_unit_flag2 UF2(Shooting)
       play_self Target destroyed
       end_event Propagate
   on_event E(58)
       clear_unit_flag1 UF1(0x4000000)
       test_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(109)
       set_return_func_with_restart F(108)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(23)
       clear_unit_flag2 UF2(0x1)
       set_unit_class Infantry
       test_unit_flag1 UF1(Retreat)
       end_event Filter
   on_event E(15)
       end_event Filter
   on_event E(9)
       end_event Filter
   on_event E(12)
       set_unit_class Infantry
       clear_unit_flag2 UF2(0x1)
       set_event_handler F(102)
       play_self Retreat!
       set_return_func F(126)
       end_event Filter
   on_event E(13)
       play_self We terrified
       set_return_func F(126)
       end_event Filter
   on_event E(7)
       set_return_func_iftrue F(130)
       end_event Filter
   on_event E(34)
       call F(114)
       end_event Filter
   on_event E(59)
       call F(114)
       end_event Filter
   call F(121)
   @Filter


.func 124

   @Filter
   on_event E(73)
       play_self Spell negated
       end_event Filter
   on_event E(74)
       end_event Filter
   on_event E(66)
       #95 0
       set_return_func F(117)
       end_event Filter
   on_event E(67)
       end_event Filter
   on_event E(10)
       #9b X(0), X(0)
       #c5 128
       set_return_func F(136)
       end_event Filter
   on_event E(12)
       set_return_func F(132)
       end_event Filter
   on_event E(13)
       set_return_func F(133)
       end_event Filter
   on_event E(7)
       set_return_func_iftrue F(130)
       end_event Filter
   on_event E(15)
       test_unit_flag1 UF1(0x8000000)
       set_return_func_with_restart_iftrue F(118)
       send_event_to_self E(25)
       end_event Filter
   on_event E(9)
       test_unit_flag1 UF1(0x8000000)
       set_return_func_with_restart_iftrue F(118)
       send_event_to_self E(25)
       end_event Filter
   call F(121)
   @Filter
   clear_ctrl_flag CF(0x8)
   on_event E(19)
       end_event Filter
   on_event E(3)
       clear_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(4)
       set_return_func_with_restart_iftrue F(106)
       end_event Filter
   on_event E(27)
       send_event_to_self E(25)
       end_event Filter
   on_event E(6)
       set_return_func F(107)
       end_event Filter
   call F(125)
   @Filter


.func 125

   @Filter
   on_event E(64)
       end_event Filter
   on_event E(60)
       end_event Filter
   on_event E(65)
       test_unit_flag2 UF2(Shooting)
       play_self Enemy lost
       play_self Target lost
       send_event_to_self E(25)
       end_event Filter
   on_event E(22)
       test_unit_flag2 UF2(Shooting)
       play_self Target destroyed
       end_event Propagate
   on_event E(58)
       clear_unit_flag1 UF1(0x4000000)
       test_unit_flag2 UF2(0x10)
       set_return_func_with_restart F(109)
       set_return_func_with_restart F(108)
       set_return_func_with_restart F(110)
       end_event Filter
   on_event E(12)
       set_return_func F(132)
       end_event Filter
   on_event E(15)
       test_unit_flag1 UF1(0x8000000)
       set_return_func_with_restart_iftrue F(116)
       test_unit_flag2 UF2(Shooting)
       send_event_to_self E(25)
       end_event Filter
   on_event E(13)
       set_return_func F(133)
       end_event Filter
   on_event E(7)
       set_return_func_iftrue F(130)
       end_event Filter
   on_event E(9)
       test_unit_flag1 UF1(0x8000000)
       set_return_func_with_restart_iftrue F(116)
       send_event_to_self E(25)
       end_event Filter
   on_event E(34)
       call F(114)
       end_event Filter
   on_event E(59)
       call F(114)
       end_event Filter
   call F(121)
   @Filter
   @Filter
   on_event E(66)
       #95 0
       end_event Filter
   on_event E(68)
       end_event Filter
   on_event E(69)
       end_event Filter
   on_event E(61)
       play_self We're under fire
       play_self Watch your back
       send_event_to_source E(63)
       end_event Filter
   on_event E(65)
       play_self Enemy lost
       send_event_to_self E(25)
       end_event Filter
   on_event E(78)
       test_members_alive_geq_i 5
       #ad 3, 13
       spawn_unit Fanatic, F(140), 1, 0
       test_members_alive_geq_i 11
       spawn_unit Fanatic, F(140), 1, -20
       test_members_alive_geq_i 17
       spawn_unit Fanatic, F(140), 1, 20
       clear_attribute Attrib(ContainFanatics)
       end_event Filter
   on_event E(48)
       test_unit_flag1 UF1(Retreat | 0x8000)
       set_return_func_iffalse F(134)
       end_event Filter
   on_event E(54)
       end_event Filter
   on_event E(1)
       end_event 0x0
   on_event E(25)
       test_unit_flag1 UF1(0x8000)
       play_self Regroup
       set_return_func F(134)
       end_event Filter
   on_event E(57)
       set_return_func F(134)
       end_event Filter
   on_event E(26)
       #46 E(57)
       end_event Filter
   on_event E(9)
       #46 E(57)
       end_event Filter
   on_event E(14)
       #14 18, No_Event
       end_event Filter
   on_event E(22)
       #14 17, No_Event
       end_event Filter
   on_event E(24)
       set_return_func_iftrue F(134)
       end_event Filter
   on_event E(48)
       set_return_func_iftrue F(134)
       end_event Filter
   on_event E(2)
       end_event Filter
   on_event E(5)
       #14 5, No_Event
       end_event Filter
   on_event E(11)
       #14 7, No_Event
       end_event Filter
   on_event E(10)
       #c5 128
       set_return_func F(136)
       end_event Filter
   on_event E(8)
       end_event Filter
   on_event E(16)
       play_self Regroup
       set_return_func F(134)
       end_event Filter
   on_event E(28)
       end_event Filter
   on_event E(29)
       end_event Filter
   on_event E(17)
       set_ctrl_flag CF(0x10)
       end_event Filter
   @Filter
   @0x0
   clear_ctrl_flag CF(0x8)


.func 126


.func 127

   #14 4, No_Event
   send_event_to_stored_unit E(20)
   wait_unit_flag1_clear UF1(0x8 | 0x4000)
   play_self Attack!
   for 2
       set_timer 10
       goto_iftrue F(129)
       test_unit_flag1 UF1(0x10)


.func 128

   broadcast_event_to_friends E(19)
   play_self Attack!
   wait_unit_flag1_clear UF1(0x8)
   for 2
       set_timer 10
       goto_iftrue F(129)
       test_unit_flag1 UF1(0x10)
       goto F(128)


.func 129

   play_self Charge!
   #14 19, No_Event
   #b0 0
   test_unit_flag1 UF1(0x10)
   goto F(134)


.func 130

   #14 6, No_Event
   set_timer 20


.func 131

   skip_iftrue 1


.func 132

   skip_iftrue 1
   play_self Retreat!


.func 133

   skip_iftrue 1
   play_self We terrified


.func 134

   wait_unit_flag1_clear UF1(0x8)


.func 135

   play_self Crush them!
   #14 1, No_Event
   send_event_to_self_iftrue E(3)


.func 136


.func 137

   wait_unit_flag3_clear UF3(CollectingItem)


.func 138

   set_timer 20


.func 139

   set_timer 300
   test_unit_flag1 UF1(0x10)


.func 140

   set_event_handler F(141)
   #3c 64, X(0)
   set_timer 10
   #14 16, No_Event


.func 141

   clear_ctrl_flag CF(0x8)
   on_event E(52)
       #14 15, No_Event
       end_event Filter
   @Filter


.func 142

   #9b X(0), X(0)
   cast_spell_on_other No_Event, MF(0x100), 3
   set_unit_flag2 UF2(0x10)
   cast_spell_on_other E(66), MF(0x100), 3
   clear_ctrl_flag CF(0x4)
   #9b X(0), X(0)
   cast_spell_on_other No_Event, MF(0x100), 3
   set_unit_flag2 UF2(0x10)
   cast_spell_on_other E(66), MF(0x100), 3
   set_unit_flag2 UF2(0x10)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x2000), 3
   cast_spell_on_other E(66), MF(0x80), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x4000), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   set_event_id E(66)
   #a1 80
   set_unit_flag2 UF2(0x10)
   test_magic_points_leq_i 7
   cast_spell_on_other No_Event, MF(0x100), 2
   cast_spell_on_other E(66), MF(0x100), 2
   set_return_func_iftrue F(139)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   @0x0
   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 143

   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x2000), 3
   cast_spell_on_other E(66), MF(0x80), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x4000), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   set_event_id E(66)
   #a1 80
   set_unit_flag2 UF2(0x10)
   test_magic_points_leq_i 7
   cast_spell_on_other No_Event, MF(0x100), 2
   cast_spell_on_other E(66), MF(0x100), 2
   set_return_func_iftrue F(139)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   @0x0
   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 144

   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x4000), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   set_event_id E(66)
   #a1 80
   set_unit_flag2 UF2(0x10)
   test_magic_points_leq_i 7
   cast_spell_on_other No_Event, MF(0x100), 2
   cast_spell_on_other E(66), MF(0x100), 2
   set_return_func_iftrue F(139)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   @0x0
   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 145

   set_event_id E(66)
   #a1 80
   set_unit_flag2 UF2(0x10)
   test_magic_points_leq_i 7
   cast_spell_on_other No_Event, MF(0x100), 2
   cast_spell_on_other E(66), MF(0x100), 2
   set_return_func_iftrue F(139)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   @0x0
   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 146

   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 147

   #9b X(0), X(0)
   cast_spell_on_other No_Event, MF(0x100), 3
   set_unit_flag2 UF2(0x10)
   cast_spell_on_other E(66), MF(0x100), 3
   set_unit_flag2 UF2(0x10)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x2000), 3
   cast_spell_on_other E(66), MF(0x80), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   #9b X(0), X(0)
   cast_spell_on_other E(66), MF(0x4000), 3
   clear_ctrl_flag CF(0x4)
   @0x0
   set_event_id E(66)
   #a1 80
   set_unit_flag2 UF2(0x10)
   test_magic_points_leq_i 7
   cast_spell_on_other No_Event, MF(0x100), 2
   cast_spell_on_other E(66), MF(0x100), 2
   set_return_func_iftrue F(139)
   set_return_func_iftrue F(139)
   clear_ctrl_flag CF(0x4)
   @0x0
   on_event E(82)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x200), 3
       end_event Filter
   on_event E(81)
       test_unit_flag2 UF2(0x800)
       #9b X(0), X(0)
       cast_spell_on_self E(66), MF(0x400), 3
       end_event Filter
   @Filter


.func 148

   set_unit_r_i R(4), 1
   find_enemy_distance_uflag E(58), 82, UF1(0x200)
   find_enemy_uflag_attrib E(72), UF1(0x200), Attrib(EngineOfWar)
   set_unit_r_i R(7), 9
   set_timer 10
   find_enemy_distance_uflag E(58), 82, UF1(0x200)
   set_unit_r_i R(7), 0
   add_unit_r_i R(7), -1
   test_unit_r_eq_i R(7), 0
   test_unit_flag3 UF3(0x400)
   add_waypoint BTBId(99)
   set_timer 10
Personal tools
communication