| 1 |
if (global.current_hp_self < 0) |
| 2 |
global.current_hp_self = 0; |
| 3 |
var enemy_count = global.enemy_count; |
| 4 |
if (global.current_hp_enemy < 0) |
| 5 |
{ |
| 6 |
global.current_hp_enemy = 0; |
| 7 |
} |
| 8 |
else if (enemy_count >= 2) |
| 9 |
{ |
| 10 |
if (global.current_hp_enemy_2 < 0) |
| 11 |
global.current_hp_enemy_2 = 0; |
| 12 |
} |
| 13 |
else if (enemy_count >= 3) |
| 14 |
{ |
| 15 |
if (global.current_hp_enemy_3 < 0) |
| 16 |
global.current_hp_enemy_3 = 0; |
| 17 |
} |
| 18 |
if (global.current_pp_self > global.max_pp_self) |
| 19 |
global.current_pp_self = global.max_pp_self; |
| 20 |
if (global.current_pp_self < 0) |
| 21 |
global.current_pp_self = 0; |
| 22 |
if (global.current_sp_self > global.max_sp_self) |
| 23 |
global.current_sp_self = global.max_sp_self; |
| 24 |
if (global.current_sp_self < 0) |
| 25 |
global.current_sp_self = 0; |
| 26 |
if (instance_exists(obj_dialogue_box_battle_transformation_any) && obj_heart_battle_fighting_parent.moveable == true && global.image_alpha_enemy_attacking_immunity == false) |
| 27 |
{ |
| 28 |
if (global.image_alpha_enemy_attacking > 0.5) |
| 29 |
{ |
| 30 |
global.image_alpha_enemy_attacking -= 0.05; |
| 31 |
if (global.image_alpha_enemy_attacking <= 0.5) |
| 32 |
global.image_alpha_enemy_attacking = 0.5; |
| 33 |
} |
| 34 |
} |
| 35 |
else if (global.image_alpha_enemy_attacking < 1) |
| 36 |
{ |
| 37 |
global.image_alpha_enemy_attacking += 0.05; |
| 38 |
if (global.image_alpha_enemy_attacking >= 1) |
| 39 |
global.image_alpha_enemy_attacking = 1; |
| 40 |
} |
| 41 |
if (audio_extend == true) |
| 42 |
{ |
| 43 |
if (!audio_is_playing(audio_initial_music)) |
| 44 |
{ |
| 45 |
audio_sound_gain(audio_extend_music, 0.8, 0); |
| 46 |
audio_play_sound(audio_extend_music, 20, true); |
| 47 |
audio_extend = false; |
| 48 |
} |
| 49 |
} |