1 |
var low_hp_state = global.current_hp_enemy < (global.max_hp_enemy * 0.3) |
2 |
if (death_sprite == true && sprite_index != spr_ceroba_murder_death) |
3 |
{ |
4 |
sprite_index = spr_ceroba_murder_death |
5 |
image_speed = 0.25 |
6 |
image_index = 0 |
7 |
} |
8 |
if (global.enemy_dead == true) |
9 |
{ |
10 |
instance_create((x - 46), (y - 10), obj_ceroba_dead) |
11 |
instance_destroy() |
12 |
return; |
13 |
} |
14 |
if (sprite_index == spr_ceroba_murder_death) |
15 |
return; |
16 |
var anim_loop_time_half = anim_loop_time / 2 |
17 |
var anim_inc_current = (anim_stretch_max - 1) / anim_loop_time_half * anim_inc_multiplier |
18 |
if (anim_stage == 1) |
19 |
{ |
20 |
anim_stretch_current += anim_inc_current |
21 |
anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half) |
22 |
if (anim_stretch_current >= anim_stretch_max) |
23 |
{ |
24 |
anim_stretch_current = anim_stretch_max |
25 |
anim_stage = 2 |
26 |
anim_inc_multiplier = anim_inc_multiplier_max |
27 |
} |
28 |
} |
29 |
if (anim_stage == 2) |
30 |
{ |
31 |
anim_stretch_current -= ((anim_stretch_max - 1) / anim_loop_time_half) |
32 |
anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half) |
33 |
if (anim_stretch_current <= 1) |
34 |
{ |
35 |
anim_stretch_current = 1 |
36 |
anim_stage = 1 |
37 |
anim_inc_multiplier = anim_inc_multiplier_max |
38 |
} |
39 |
} |
40 |
if (sprite_index == spr_ceroba_body || sprite_index == spr_ceroba_body_hurt) |
41 |
image_yscale = anim_stretch_current |
42 |
else |
43 |
image_yscale = 1 |
44 |
obj_ceroba_head.y = y - anim_head_offset * image_yscale |
45 |
obj_ceroba_hand_right.y = y - anim_hand_right_offset * image_yscale |
46 |
obj_ceroba_hand_left.y = y - anim_hand_left_offset * image_yscale |
47 |
obj_ceroba_staff.y = y - anim_staff_offset * image_yscale |
48 |
obj_ceroba_ponytail.y = obj_ceroba_head.y - anim_ponytail_offset |
49 |
if (damage_disjoint_count > 0) |
50 |
damage_disjoint_count -= 1 |
51 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
52 |
{ |
53 |
damage_disjoint_count = 12 |
54 |
no_loop_damage_disjoint_count = true |
55 |
} |
56 |
else if (!instance_exists(obj_text_damage_count)) |
57 |
no_loop_damage_disjoint_count = false |
58 |
if (damage_disjoint_count == 12) |
59 |
damage_disjoint_x = -50 |
60 |
else if (damage_disjoint_count == 10) |
61 |
damage_disjoint_x = 50 |
62 |
else if (damage_disjoint_count == 8) |
63 |
damage_disjoint_x = -20 |
64 |
else if (damage_disjoint_count == 6) |
65 |
damage_disjoint_x = 20 |
66 |
else if (damage_disjoint_count == 4) |
67 |
damage_disjoint_x = -10 |
68 |
else if (damage_disjoint_count == 2) |
69 |
damage_disjoint_x = 10 |
70 |
else if (damage_disjoint_count == 0) |
71 |
{ |
72 |
damage_disjoint_x = 0 |
73 |
if (sprite_index == spr_ceroba_hurt) |
74 |
sprite_index = spr_ceroba_body |
75 |
else if (sprite_index == spr_ceroba_hurt_phase_2) |
76 |
{ |
77 |
sprite_index = spr_ceroba_body |
78 |
if low_hp_state |
79 |
{ |
80 |
sprite_index = spr_ceroba_body_hurt |
81 |
obj_ceroba_head.sprite_index = spr_ceroba_head_hurt |
82 |
obj_ceroba_hand_left.sprite_index = spr_ceroba_hand_left_hurt |
83 |
obj_ceroba_hand_right.sprite_index = spr_ceroba_hand_right_hurt |
84 |
obj_ceroba_staff.sprite_index = spr_ceroba_staff_battle_phase_2_hurt |
85 |
obj_ceroba_ponytail.sprite_index = spr_ceroba_ponytail_hurt |
86 |
} |
87 |
} |
88 |
} |
89 |
if (damage_disjoint_count > 0) |
90 |
{ |
91 |
sprite_index = spr_ceroba_hurt |
92 |
if (global.battle_phase == 2) |
93 |
sprite_index = spr_ceroba_hurt_phase_2 |
94 |
image_xscale = 1 |
95 |
image_yscale = 1 |
96 |
} |
97 |
x = starting_point_x + damage_disjoint_x |