| 1 |
if (instance_exists(obj_heart_hitbox_parent)) |
| 2 |
{ |
| 3 |
with (obj_heart_hitbox_parent) |
| 4 |
instance_destroy(); |
| 5 |
} |
| 6 |
if (instance_exists(obj_heart_battle_effect_parent)) |
| 7 |
{ |
| 8 |
with (obj_heart_battle_effect_parent) |
| 9 |
instance_destroy(); |
| 10 |
} |
| 11 |
if (moveable == true && global.current_sp_self > 0) |
| 12 |
global.current_sp_self -= 1; |
| 13 |
if (global.current_rp_self > 0) |
| 14 |
{ |
| 15 |
global.current_rp_self -= 1; |
| 16 |
audio_play_sound(snd_battle_item_eat, 20, false); |
| 17 |
if (global.current_hp_self > global.max_hp_self) |
| 18 |
exit; |
| 19 |
global.current_hp_self += 15; |
| 20 |
if (global.current_hp_self > global.max_hp_self) |
| 21 |
global.current_hp_self = global.max_hp_self; |
| 22 |
} |