1 |
switch (attack_beam_stage) |
2 |
{ |
3 |
case 0: |
4 |
attack_beam_width_current += attack_beam_width_inc; |
5 |
if (attack_beam_width_current >= attack_beam_width) |
6 |
{ |
7 |
attack_beam_width_current = attack_beam_width; |
8 |
attack_beam_stage = 1; |
9 |
attack_beam_draw_color = make_colour_rgb(230, 50, 50); |
10 |
screenshake = true; |
11 |
audio_stop_sound(snd_kamehamehacharge); |
12 |
audio_play_sound(snd_kamehamehablast, 1, 0); |
13 |
} |
14 |
attack_beam_draw_alpha = (attack_beam_width_current / attack_beam_width) * 0.5; |
15 |
break; |
16 |
case 1: |
17 |
if (attack_beam_grow == true) |
18 |
{ |
19 |
if (attack_beam_width_current < (attack_beam_width + attack_beam_width_fluctuation)) |
20 |
attack_beam_width_current += 2; |
21 |
else |
22 |
attack_beam_grow = false; |
23 |
} |
24 |
if (attack_beam_grow == false) |
25 |
{ |
26 |
if (attack_beam_width_current > (attack_beam_width - attack_beam_width_fluctuation)) |
27 |
attack_beam_width_current -= 2; |
28 |
else |
29 |
attack_beam_grow = true; |
30 |
} |
31 |
if (attack_beam_timer > 0) |
32 |
attack_beam_timer -= 1; |
33 |
else |
34 |
attack_beam_stage = 2; |
35 |
break; |
36 |
case 2: |
37 |
if (attack_beam_width_current > 0) |
38 |
attack_beam_width_current -= 8; |
39 |
else |
40 |
instance_destroy(); |
41 |
break; |
42 |
} |
43 |
if (attack_beam_stage == 0) |
44 |
exit; |
45 |
var x_original = 0; |
46 |
var x_max = room_width; |
47 |
if (obj_heart_battle_fighting_parent.vulnerable == true && point_in_rectangle(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, x_original, y - (attack_beam_width_current / 2), x_max, y + (attack_beam_width_current / 2))) |
48 |
{ |
49 |
with (obj_heart_battle_fighting_parent) |
50 |
{ |
51 |
if (global.current_pp_self > 0) |
52 |
{ |
53 |
instance_create(x, y, obj_heart_battle_effect_expand); |
54 |
for (i = 0; i < 5; i++) |
55 |
instance_create(x, y, obj_heart_battle_effect_shard); |
56 |
global.current_pp_self -= 1; |
57 |
audio_play_sound(snd_mirrorbreak1, 20, false); |
58 |
} |
59 |
else |
60 |
{ |
61 |
global.max_hp_self -= 3; |
62 |
global.current_hp_self -= 3; |
63 |
audio_play_sound(snd_ceroba_hurt_red, 1, 0); |
64 |
} |
65 |
vulnerable = false; |
66 |
global.hit_self = true; |
67 |
alarm[0] |
68 |
} |
69 |
} |