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 |
alt_alpha = lerp(alt_alpha, 0.05, 0.1) |
29 |
if (base_alpha_new != 0) |
30 |
{ |
31 |
base_alpha = lerp(base_alpha, base_alpha_new, 0.2) |
32 |
if (abs(base_alpha - base_alpha_new) < 0.01) |
33 |
base_alpha_new = 0 |
34 |
} |
35 |
else |
36 |
base_alpha = lerp(base_alpha, 1, 0.1) |
37 |
if (alt_alpha_timer > 0) |
38 |
alt_alpha_timer -= 1 |
39 |
else |
40 |
{ |
41 |
base_alpha_new = 0.7 |
42 |
alt_alpha_new = 0.25 |
43 |
alt_alpha_timer = random_range(30, 120) |
44 |
} |
45 |
} |
46 |
if keyboard_check_pressed(ord("O")) |
47 |
{ |
48 |
if (current_attack < 10) |
49 |
current_attack += 1 |
50 |
else |
51 |
current_attack = 1 |
52 |
global.enemy_attack = "Flowey Attack " + string(current_attack) |
53 |
} |
54 |
if keyboard_check_pressed(ord("P")) |
55 |
{ |
56 |
with (obj_dialogue_box_battle_transformation_any) |
57 |
event_user(0) |
58 |
instance_destroy(obj_dialogue_box_battle_transformation_any_out) |
59 |
} |