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