1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_menu_number = global.battle_menu_number |
4 |
var battle_enemy_name = global.battle_enemy_name |
5 |
var enemy_count = global.enemy_count |
6 |
var game_mode = global.game_mode |
7 |
fade_in = true |
8 |
if (fade_in == true && image_alpha < 1) |
9 |
image_alpha += 0.1 |
10 |
else |
11 |
fade_in = false |
12 |
if key_select_simulate |
13 |
{ |
14 |
key_select_simulate = 0 |
15 |
if (battle_menu_number == 1) |
16 |
{ |
17 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_fight) |
18 |
if (enemy_count >= 2) |
19 |
{ |
20 |
if (global.enemy_dead_2 == false && global.enemy_spared_2 == false) |
21 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_fight_2) |
22 |
} |
23 |
if (enemy_count >= 3) |
24 |
{ |
25 |
if (global.enemy_dead_3 == false && global.enemy_spared_3 == false) |
26 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_fight_3) |
27 |
} |
28 |
instance_create_depth((obj_dialogue_box_battle.x + 44), (obj_dialogue_box_battle.y + 36), -700, obj_heart_battle_menu_fight_fake_martlet) |
29 |
instance_destroy() |
30 |
script_execute(gml_Script_scr_battle_core_directory_hp_displacements) |
31 |
script_execute(gml_Script_scr_determine_can_display_enemy_hp_ui) |
32 |
if (enemy_count >= 1) |
33 |
{ |
34 |
if (global.enemy_vulnerable == false && global.enemy_dead == false && global.enemy_spared == false) |
35 |
{ |
36 |
with (obj_battle_hp_current_enemy) |
37 |
instance_destroy() |
38 |
with (obj_battle_hp_max_enemy) |
39 |
instance_destroy() |
40 |
} |
41 |
} |
42 |
if (enemy_count >= 2) |
43 |
{ |
44 |
if (global.enemy_vulnerable_2 == false && global.enemy_dead_2 == false && global.enemy_spared_2 == false) |
45 |
{ |
46 |
with (obj_battle_hp_current_enemy_2) |
47 |
instance_destroy() |
48 |
with (obj_battle_hp_max_enemy_2) |
49 |
instance_destroy() |
50 |
} |
51 |
} |
52 |
if (enemy_count >= 3) |
53 |
{ |
54 |
if (global.enemy_vulnerable_3 == false && global.enemy_dead_3 == false && global.enemy_spared_3 == false) |
55 |
{ |
56 |
with (obj_battle_hp_current_enemy_3) |
57 |
instance_destroy() |
58 |
with (obj_battle_hp_max_enemy_3) |
59 |
instance_destroy() |
60 |
} |
61 |
} |
62 |
with (obj_dialogue_battle_move_select_parent) |
63 |
instance_destroy() |
64 |
audio_play_sound(snd_battle_item_weapon_select, 20, false) |
65 |
image_alpha = 0 |
66 |
} |
67 |
if (battle_menu_number == 2) |
68 |
{ |
69 |
if (global.enemy_dead == false && global.enemy_spared == false) |
70 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_name) |
71 |
if (enemy_count >= 2) |
72 |
{ |
73 |
if (global.enemy_dead_2 == false && global.enemy_spared_2 == false) |
74 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_name_2) |
75 |
} |
76 |
if (enemy_count >= 3) |
77 |
{ |
78 |
if (global.enemy_dead_3 == false && global.enemy_spared_3 == false) |
79 |
instance_create(0, 0, obj_text_battle_move_selected_enemy_name_3) |
80 |
} |
81 |
instance_create((obj_dialogue_box_battle.x + 44), (obj_dialogue_box_battle.y + 36), obj_heart_battle_menu_act) |
82 |
with (obj_dialogue_battle_move_select_parent) |
83 |
instance_destroy() |
84 |
audio_play_sound(snd_battle_item_weapon_select, 20, false) |
85 |
image_alpha = 0 |
86 |
} |
87 |
if (battle_menu_number == 3) |
88 |
{ |
89 |
if (obj_item.image_index == 1) |
90 |
{ |
91 |
global.item_page_count = 1 |
92 |
global.item_number_row = 1 |
93 |
global.item_number_column = 1 |
94 |
if (global.item_slot[1] != "Nothing") |
95 |
instance_create(0, 0, obj_text_battle_move_selected_item_1) |
96 |
if (global.item_slot[2] != "Nothing") |
97 |
instance_create(0, 0, obj_text_battle_move_selected_item_2) |
98 |
if (global.item_slot[3] != "Nothing") |
99 |
instance_create(0, 0, obj_text_battle_move_selected_item_3) |
100 |
if (global.item_slot[4] != "Nothing") |
101 |
instance_create(0, 0, obj_text_battle_move_selected_item_4) |
102 |
instance_create(0, 0, obj_text_battle_move_selected_item_page_count) |
103 |
instance_create((obj_dialogue_box_battle.x + 44), (obj_dialogue_box_battle.y + 36), obj_heart_battle_menu_item) |
104 |
with (obj_dialogue_battle_move_select_parent) |
105 |
instance_destroy() |
106 |
audio_play_sound(snd_battle_item_weapon_select, 20, false) |
107 |
image_alpha = 0 |
108 |
} |
109 |
else |
110 |
audio_play_sound(snd_hurt, 20, false) |
111 |
} |
112 |
if (battle_menu_number == 4) |
113 |
{ |
114 |
instance_create(0, 0, obj_text_battle_move_selected_spare) |
115 |
if (global.enemy_fleeable == true) |
116 |
instance_create(0, 0, obj_text_battle_move_selected_flee) |
117 |
instance_create((obj_dialogue_box_battle.x + 44), (obj_dialogue_box_battle.y + 36), obj_heart_battle_menu_mercy) |
118 |
with (obj_dialogue_battle_move_select_parent) |
119 |
instance_destroy() |
120 |
audio_play_sound(snd_battle_item_weapon_select, 20, false) |
121 |
image_alpha = 0 |
122 |
} |
123 |
} |