| 1 | var x_target = lengthdir_x(beam_length, direction); |
| 2 | var y_target = lengthdir_y(beam_length, direction); |
| 3 | if (obj_heart_battle_fighting_parent.vulnerable == true && collision_line(x, y, x + x_target, y + y_target, obj_heart_battle_fighting_red, false, false)) |
| 4 | { |
| 5 | var damage = (global.enemy_attack_stat - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense) + 10; |
| 6 | global.current_hp_self -= damage; |
| 7 | audio_play_sound(snd_hurt, 1, 0); |
| 8 | with (obj_heart_battle_fighting_parent) |
| 9 | { |
| 10 | vulnerable = false; |
| 11 | global.hit_self = true; |
| 12 | alarm[0] |
| 13 | } |
| 14 | } |
| 15 | can_fire = 1; |