1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (enemy_dead == false && enemy_spared == false && can_draw_ghost == true) |
4 |
image_alpha = global.image_alpha_enemy_attacking; |
5 |
if (base_sprite != 1934) |
6 |
{ |
7 |
image_xscale = 2; |
8 |
image_yscale = 2; |
9 |
can_draw_ghost = false; |
10 |
} |
11 |
else if (global.image_alpha_enemy_attacking_immunity == false) |
12 |
{ |
13 |
can_draw_ghost = true; |
14 |
image_xscale = 1; |
15 |
image_yscale = 1; |
16 |
} |
17 |
if (can_draw_ghost) |
18 |
{ |
19 |
if (irandom(glitch_chance) == 1) |
20 |
instance_create_depth(0, 0, -99999999, obj_flowey_battle_screen_glitch_fight); |
21 |
if (alt_alpha_new != 0) |
22 |
{ |
23 |
alt_alpha = lerp(alt_alpha, alt_alpha_new, 0.2); |
24 |
if (abs(alt_alpha - alt_alpha_new) < 0.01) |
25 |
alt_alpha_new = 0; |
26 |
} |
27 |
else |
28 |
{ |
29 |
alt_alpha = lerp(alt_alpha, 0.05, 0.1); |
30 |
} |
31 |
if (base_alpha_new != 0) |
32 |
{ |
33 |
base_alpha = lerp(base_alpha, base_alpha_new, 0.2); |
34 |
if (abs(base_alpha - base_alpha_new) < 0.01) |
35 |
base_alpha_new = 0; |
36 |
} |
37 |
else |
38 |
{ |
39 |
base_alpha = lerp(base_alpha, 1, 0.1); |
40 |
} |
41 |
if (alt_alpha_timer > 0) |
42 |
{ |
43 |
alt_alpha_timer -= 1; |
44 |
} |
45 |
else |
46 |
{ |
47 |
base_alpha_new = 0.7; |
48 |
alt_alpha_new = 0.25; |
49 |
alt_alpha_timer = random_range(30, 120); |
50 |
} |
51 |
} |
52 |
if (keyboard_check_pressed(ord("O"))) |
53 |
{ |
54 |
if (current_attack < 10) |
55 |
current_attack += 1; |
56 |
else |
57 |
current_attack = 1; |
58 |
global.enemy_attack = "Flowey Attack " + string(current_attack); |
59 |
} |
60 |
if (keyboard_check_pressed(ord("P"))) |
61 |
{ |
62 |
with (obj_dialogue_box_battle_transformation_any) |
63 |
event_user(0); |
64 |
instance_destroy(obj_dialogue_box_battle_transformation_any_out); |
65 |
} |