1 |
if live_call() |
2 |
return global.live_result; |
3 |
var target_direction = 270 + 30 * image_xscale |
4 |
var battle_box = obj_dialogue_box_battle_transformation_any |
5 |
switch scene |
6 |
{ |
7 |
case 0: |
8 |
if (image_index >= 2) |
9 |
scene = 1 |
10 |
break |
11 |
case 1: |
12 |
spawn_feathers = true |
13 |
scene += 1 |
14 |
break |
15 |
case 2: |
16 |
if (image_index >= (image_number - 1)) |
17 |
scene++ |
18 |
break |
19 |
case 3: |
20 |
if (vspeed < 9) |
21 |
vspeed += 1.5 |
22 |
if (bbox_top > (battle_box.bbox_top + 4)) |
23 |
surface_draw = true |
24 |
break |
25 |
} |
26 |
|
27 |
if (hp_self <= 0) |
28 |
{ |
29 |
surface_draw = true |
30 |
if (x < 320) |
31 |
hspeed -= 1 |
32 |
else |
33 |
hspeed += 1 |
34 |
if (!(place_meeting(x, y, battle_box))) |
35 |
instance_destroy() |
36 |
} |
37 |
if ((y + vspeed) < ystart) |
38 |
vspeed = 0 |
39 |
if (spawn_feathers && feather_count > 0) |
40 |
{ |
41 |
var spawn_line_length = 110 |
42 |
var spawn_angle = 90 - 70 * image_xscale |
43 |
var spawn_length_inc = spawn_line_length / feather_count |
44 |
var spawn_dist_current = 0 |
45 |
var dir_inc = feather_spread / feather_count |
46 |
var start_dir = target_direction - feather_spread * 0.5 |
47 |
var tar_dir = target_direction + feather_spread * 0.5 |
48 |
if (image_xscale == 1) |
49 |
{ |
50 |
for (var i = start_dir; i < tar_dir; i += dir_inc) |
51 |
{ |
52 |
var xx = lengthdir_x(spawn_dist_current, spawn_angle) |
53 |
var yy = lengthdir_y(spawn_dist_current, spawn_angle) |
54 |
spawn_dist_current += spawn_length_inc |
55 |
var feather = instance_create_depth((x + xx), (y + yy), (depth + 1), obj_martlet_attack_wing_feather) |
56 |
feather.direction = i |
57 |
} |
58 |
} |
59 |
else |
60 |
{ |
61 |
for (i = tar_dir; i > start_dir; i -= dir_inc) |
62 |
{ |
63 |
xx = lengthdir_x(spawn_dist_current, spawn_angle) |
64 |
yy = lengthdir_y(spawn_dist_current, spawn_angle) |
65 |
spawn_dist_current += spawn_length_inc |
66 |
feather = instance_create_depth((x + xx), (y + yy), (depth + 1), obj_martlet_attack_wing_feather) |
67 |
feather.direction = i |
68 |
} |
69 |
} |
70 |
spawn_feathers = false |
71 |
} |