| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
var turns_passed = global.attack_cycle; |
| 4 |
var turns_passed_max = global.attack_cycle_max; |
| 5 |
var main_heart; |
| 6 |
if (in_battle_twitch == true && !in_battle_twitch_finished) |
| 7 |
{ |
| 8 |
main_heart = 2979; |
| 9 |
if (in_battle_twitch_timer < 100) |
| 10 |
in_battle_twitch_timer++; |
| 11 |
else |
| 12 |
in_battle_twitch_finished = true; |
| 13 |
var modifier = in_battle_twitch_timer / 100; |
| 14 |
probability = modifier * 80; |
| 15 |
if (random(100) < probability) |
| 16 |
{ |
| 17 |
var twitch_sound = audio_play_sound(snd_soul_charge, 1, 0); |
| 18 |
audio_sound_pitch(twitch_sound, 1 + modifier); |
| 19 |
var twitch_heart = instance_create_depth(main_heart.x + random_range(-3, 3), main_heart.y + random_range(-3, 3), -800, obj_heart_battle_menu_effect_axis_geno_twitch); |
| 20 |
with (twitch_heart) |
| 21 |
{ |
| 22 |
var twitch_range = (turns_passed / turns_passed_max) * 40; |
| 23 |
image_angle = random_range(-twitch_range, twitch_range); |
| 24 |
} |
| 25 |
} |
| 26 |
exit; |
| 27 |
} |
| 28 |
if (instance_exists(obj_heart_battle_menu) && obj_heart_battle_menu.image_alpha > 0) |
| 29 |
main_heart = 2971; |
| 30 |
else if (instance_exists(obj_heart_battle_menu_act) && obj_heart_battle_menu_act.image_alpha > 0) |
| 31 |
main_heart = 2975; |
| 32 |
else if (instance_exists(obj_heart_battle_menu_fight) && obj_heart_battle_menu_fight.image_alpha > 0) |
| 33 |
main_heart = 2972; |
| 34 |
else if (instance_exists(obj_heart_battle_menu_item) && obj_heart_battle_menu_item.image_alpha > 0) |
| 35 |
main_heart = 2976; |
| 36 |
else if (instance_exists(obj_heart_battle_menu_mercy) && obj_heart_battle_menu_mercy.image_alpha > 0) |
| 37 |
main_heart = 2977; |
| 38 |
else if (instance_exists(obj_heart_battle_menu_flee) && obj_heart_battle_menu_flee.image_alpha > 0) |
| 39 |
main_heart = 2978; |
| 40 |
else |
| 41 |
exit; |
| 42 |
var probability = (turns_passed / turns_passed_max) * 70; |
| 43 |
if (random(100) < probability) |
| 44 |
{ |
| 45 |
var twitch_heart = instance_create_depth(main_heart.x, main_heart.y, -800, obj_heart_battle_menu_effect_axis_geno_twitch); |
| 46 |
with (twitch_heart) |
| 47 |
{ |
| 48 |
var twitch_range = (turns_passed / turns_passed_max) * 40; |
| 49 |
image_angle = random_range(-twitch_range, twitch_range); |
| 50 |
} |
| 51 |
} |