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 x_original = 0 |
47 |
var x_max = room_width |
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_original, (y - attack_beam_width_current / 2), x_max, (y + attack_beam_width_current / 2))) |
49 |
{ |
50 |
with (obj_heart_battle_fighting_parent) |
51 |
{ |
52 |
if (global.current_pp_self > 0) |
53 |
{ |
54 |
instance_create(x, y, obj_heart_battle_effect_expand) |
55 |
for (i = 0; i < 5; i++) |
56 |
instance_create(x, y, obj_heart_battle_effect_shard) |
57 |
global.current_pp_self -= 1 |
58 |
audio_play_sound(snd_mirrorbreak1, 20, false) |
59 |
} |
60 |
else |
61 |
{ |
62 |
global.max_hp_self -= 3 |
63 |
global.current_hp_self -= 3 |
64 |
audio_play_sound(snd_ceroba_hurt_red, 1, 0) |
65 |
} |
66 |
vulnerable = false |
67 |
global.hit_self = true |
68 |
alarm[0] |
69 |
} |
70 |
} |