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 |
|
44 |
if (attack_beam_stage == 0) |
45 |
return; |
46 |
var y_original = 0 |
47 |
var y_max = room_height |
48 |
if (obj_heart_battle_fighting_parent.vulnerable == true && point_in_rectangle(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, (x - attack_beam_width_current / 2), y_original, (x + attack_beam_width_current / 2), y_max)) |
49 |
{ |
50 |
global.max_hp_self -= 3 |
51 |
global.current_hp_self -= 3 |
52 |
audio_play_sound(snd_ceroba_hurt_red, 1, 0) |
53 |
with (obj_heart_battle_fighting_parent) |
54 |
{ |
55 |
vulnerable = false |
56 |
global.hit_self = true |
57 |
alarm[0] |
58 |
} |
59 |
} |