| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
switch (attack_beam_stage) |
| 4 |
{ |
| 5 |
case 0: |
| 6 |
attack_beam_width_current += attack_beam_width_inc; |
| 7 |
if (attack_beam_width_current >= attack_beam_width) |
| 8 |
{ |
| 9 |
attack_beam_width_current = attack_beam_width; |
| 10 |
attack_beam_stage = 1; |
| 11 |
attack_beam_draw_color = make_colour_rgb(230, 50, 50); |
| 12 |
screenshake = true; |
| 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 |
} |
| 22 |
if (attack_beam_grow == false) |
| 23 |
{ |
| 24 |
if (attack_beam_width_current > (attack_beam_width - attack_beam_width_fluctuation)) |
| 25 |
attack_beam_width_current -= 2; |
| 26 |
else |
| 27 |
attack_beam_grow = true; |
| 28 |
} |
| 29 |
if (attack_beam_timer > 0) |
| 30 |
attack_beam_timer -= 1; |
| 31 |
else |
| 32 |
attack_beam_stage = 2; |
| 33 |
break; |
| 34 |
case 2: |
| 35 |
if (attack_beam_width_current > 0) |
| 36 |
attack_beam_width_current -= 7; |
| 37 |
else |
| 38 |
instance_destroy(); |
| 39 |
break; |
| 40 |
} |
| 41 |
if (attack_beam_stage == 0) |
| 42 |
exit; |
| 43 |
var y_original = 0; |
| 44 |
var y_max = room_height; |
| 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 - (attack_beam_width_current / 2), y_original, x + (attack_beam_width_current / 2), y_max) || 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 |
var damage = (global.enemy_attack_stat - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense) + 10; |
| 50 |
if (damage < 1) |
| 51 |
damage = 1; |
| 52 |
global.current_hp_self -= damage; |
| 53 |
audio_play_sound(snd_hurt, 1, 0); |
| 54 |
with (obj_heart_battle_fighting_parent) |
| 55 |
{ |
| 56 |
vulnerable = false; |
| 57 |
global.hit_self = true; |
| 58 |
alarm[0] |
| 59 |
} |
| 60 |
} |