1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
var enemy_dead = global.enemy_dead; |
4 |
var enemy_spared = global.enemy_spared; |
5 |
var enemy_sparing = global.enemy_sparing; |
6 |
if (enemy_dead == false && enemy_spared == false) |
7 |
image_alpha = global.image_alpha_enemy_attacking; |
8 |
if (enemy_dead == true) |
9 |
{ |
10 |
x = starting_point_x; |
11 |
y = starting_point_y; |
12 |
image_xscale = starting_point_xscale; |
13 |
image_yscale = starting_point_yscale; |
14 |
instance_create(starting_point_x, starting_point_y, obj_tellyvis_dead); |
15 |
instance_destroy(); |
16 |
exit; |
17 |
image_alpha = 0.5; |
18 |
} |
19 |
else if (enemy_spared == true) |
20 |
{ |
21 |
tellyvis_draw_face = false; |
22 |
sprite_index = spr_tellyvis_body; |
23 |
x = starting_point_x; |
24 |
y = starting_point_y; |
25 |
image_xscale = starting_point_xscale; |
26 |
image_yscale = starting_point_yscale; |
27 |
image_speed = 0; |
28 |
image_index = 0; |
29 |
image_alpha = 0.5; |
30 |
if (no_loop_create_clouds == false) |
31 |
{ |
32 |
for (i = 0; i <= 11; i += 1) |
33 |
instance_create(x, y - 22, obj_spare_cloud); |
34 |
} |
35 |
no_loop_create_clouds = true; |
36 |
} |
37 |
if (damage_disjoint_count > 0) |
38 |
{ |
39 |
damage_disjoint_count -= 1; |
40 |
} |
41 |
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0 && !instance_exists(obj_battle_enemy_attack_tellyvis_remote_generator)) |
42 |
{ |
43 |
if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy) |
44 |
{ |
45 |
sprite_index = spr_tellyvis_low_hp; |
46 |
tellyvis_face_default = 3787; |
47 |
} |
48 |
else if ((enemy_sparing == true && global.enemy_attacking == false) || (enemy_sparing == false && global.action_3_selected_count >= 1)) |
49 |
{ |
50 |
sprite_index = spr_tellyvis_body; |
51 |
tellyvis_face_default = 2544; |
52 |
} |
53 |
else if (!instance_exists(obj_battle_enemy_attack_tellyvis_remote_generator)) |
54 |
{ |
55 |
sprite_index = spr_tellyvis_body; |
56 |
} |
57 |
} |
58 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
59 |
{ |
60 |
time_elapsed = 0; |
61 |
sign_modifier = 1; |
62 |
damage_disjoint_count = 12; |
63 |
no_loop_damage_disjoint_count = true; |
64 |
} |
65 |
else if (!instance_exists(obj_text_damage_count)) |
66 |
{ |
67 |
no_loop_damage_disjoint_count = false; |
68 |
} |
69 |
if (damage_disjoint_count == 12) |
70 |
damage_disjoint_x = -50; |
71 |
else if (damage_disjoint_count == 10) |
72 |
damage_disjoint_x = 50; |
73 |
else if (damage_disjoint_count == 8) |
74 |
damage_disjoint_x = -20; |
75 |
else if (damage_disjoint_count == 6) |
76 |
damage_disjoint_x = 20; |
77 |
else if (damage_disjoint_count == 4) |
78 |
damage_disjoint_x = -10; |
79 |
else if (damage_disjoint_count == 2) |
80 |
damage_disjoint_x = 10; |
81 |
else if (damage_disjoint_count == 0) |
82 |
damage_disjoint_x = 0; |
83 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
84 |
sprite_index = spr_tellyvis_body; |
85 |
x = draw_position_x + damage_disjoint_x; |
86 |
y = draw_position_y + damage_disjoint_y; |
87 |
image_xscale = starting_point_xscale; |
88 |
image_yscale = starting_point_yscale; |
89 |
if (global.action_1_selected_count >= 1 && enemy_sparing == true && global.enemy_attacking == true && global.enemy_low_hp == false) |
90 |
{ |
91 |
if (tellyvis_face_default != 3420) |
92 |
tellyvis_face_default = 3420; |
93 |
} |
94 |
if (tellyvis_face_change == true && tellyvis_face_current != 3498) |
95 |
{ |
96 |
tellyvis_face_frame = 0; |
97 |
tellyvis_face_current = 3498; |
98 |
} |
99 |
else if ((tellyvis_face_current != tellyvis_face_next && tellyvis_face_change == false) || tellyvis_face_next_stored != tellyvis_face_next) |
100 |
{ |
101 |
tellyvis_face_next_stored = tellyvis_face_next; |
102 |
tellyvis_face_change = true; |
103 |
alarm[0] = 10; |
104 |
} |
105 |
if (!instance_exists(obj_quote_bubble_battle) && tellyvis_face_current != tellyvis_face_default && tellyvis_face_next != tellyvis_face_default) |
106 |
tellyvis_face_next = tellyvis_face_default; |
107 |
if (tellyvis_face_frame < sprite_get_number(tellyvis_face_current)) |
108 |
tellyvis_face_frame += 0.3; |
109 |
else |
110 |
tellyvis_face_frame = 0; |