|
1
|
reticle_over_good_shot = false;
|
|
2
|
if (place_meeting(x, y, obj_shutta_falling_item) && obj_shutta_falling_item.sprite_index == spr_realisticexplosion && obj_shutta_falling_item.image_index > 2 && obj_shutta_falling_item.image_index < 13)
|
|
3
|
reticle_over_good_shot = true;
|
|
4
|
switch (subact_state)
|
|
5
|
{
|
|
6
|
case "init":
|
|
7
|
with (enemy)
|
|
8
|
{
|
|
9
|
x = xstart;
|
|
10
|
y = ystart;
|
|
11
|
sprite_index = spr_shutta_idle;
|
|
12
|
image_speed = 0.16666666666666666;
|
|
13
|
}
|
|
14
|
with (obj_monsterparent)
|
|
15
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (x + 180, y, 8);
|
|
16
|
with (obj_heroparent)
|
|
17
|
{
|
|
18
|
if (object_index != obj_herosusie)
|
|
19
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (x - 180, y, 8);
|
|
20
|
}
|
|
21
|
last_item_x = 0;
|
|
22
|
last_item_y = 0;
|
|
23
|
last_item = -4;
|
|
24
|
susie_walk_time = 0;
|
|
25
|
susie_walk_duration = 0;
|
|
26
|
subact_state = "create_item";
|
|
27
|
obj_herosusie.state = 0;
|
|
28
|
global.faceaction[obj_herosusie.myself] = 0;
|
|
29
|
break;
|
|
30
|
case "create_item":
|
|
31
|
var _gap = 70;
|
|
32
|
var _gap_width = 2;
|
|
33
|
var _gap_height = 3;
|
|
34
|
var _min_x = (camerax() + (camerawidth() / 2)) - 50;
|
|
35
|
var _min_y = cameray() + 90;
|
|
36
|
var _xx, _yy;
|
|
37
|
do
|
|
38
|
{
|
|
39
|
_xx = _min_x + (irandom(_gap_width) * _gap);
|
|
40
|
_yy = _min_y + (irandom(_gap_height) * _gap);
|
|
41
|
}
|
|
42
|
until ((_xx != last_item_x && _yy != last_item_y) && !position_meeting(_xx, _yy - 10, obj_herosusie));
|
|
43
|
if (_yy < (cameray() + 140))
|
|
44
|
_yy = cameray() + 140;
|
|
45
|
last_item_x = _xx;
|
|
46
|
last_item_y = _yy;
|
|
47
|
last_item = instance_create_depth(last_item_x, last_item_y, depth, obj_shutta_falling_item);
|
|
48
|
susie_target_x = last_item_x - 100;
|
|
49
|
susie_target_y = last_item_y - 90;
|
|
50
|
susie_walk_time = 0;
|
|
51
|
susie_walk_duration = floor(point_distance(obj_herosusie.x, obj_herosusie.y, susie_target_x, susie_target_y) / 10);
|
|
52
|
subact_state = "susie_move";
|
|
53
|
break;
|
|
54
|
case "susie_move":
|
|
55
|
if (last_item.falling)
|
|
56
|
break;
|
|
57
|
if (susie_walk_time == 0)
|
|
58
|
{
|
|
59
|
if (last_item_x > obj_herosusie.x)
|
|
60
|
scr_battle_sprite_setscr_battle_sprite_set
function scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 8;
hurt = 0;
attacktimer = 0;
sprite_index = arg1;
image_speed = arg2;
image_index = 0;
if (arg3 == 0)
maxframes = image_number;
global.faceaction[myself] = 0;
}
}
} ("susie", spr_susie_walk_right_dw, 0.5, true);
|
|
61
|
else
|
|
62
|
scr_battle_sprite_setscr_battle_sprite_set
function scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 8;
hurt = 0;
attacktimer = 0;
sprite_index = arg1;
image_speed = arg2;
image_index = 0;
if (arg3 == 0)
maxframes = image_number;
global.faceaction[myself] = 0;
}
}
} ("susie", spr_susie_walk_left_dw, 0.5, true);
|
|
63
|
with (obj_herosusie)
|
|
64
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (other.susie_target_x, other.susie_target_y, other.susie_walk_duration);
|
|
65
|
}
|
|
66
|
susie_walk_time++;
|
|
67
|
if (susie_walk_time == (susie_walk_duration - 2))
|
|
68
|
{
|
|
69
|
instance_create_depth(last_item.x - 20, last_item.y - 10, last_item.depth - 10, obj_shutta_shine);
|
|
70
|
with (obj_shutta_shine)
|
|
71
|
image_blend = c_red;
|
|
72
|
}
|
|
73
|
if (susie_walk_time == susie_walk_duration)
|
|
74
|
{
|
|
75
|
scr_battle_sprite_setscr_battle_sprite_set
function scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 8;
hurt = 0;
attacktimer = 0;
sprite_index = arg1;
image_speed = arg2;
image_index = 0;
if (arg3 == 0)
maxframes = image_number;
global.faceaction[myself] = 0;
}
}
} ("susie", spr_susie_attack, 0.5, false);
|
|
76
|
with (last_item)
|
|
77
|
{
|
|
78
|
event_user(0);
|
|
79
|
if (!i_ex(obj_shutta_shine))
|
|
80
|
{
|
|
81
|
instance_create(x - 20, y - 10, obj_shutta_shine);
|
|
82
|
with (obj_shutta_shine)
|
|
83
|
image_blend = c_red;
|
|
84
|
}
|
|
85
|
}
|
|
86
|
subact_state = "susie_attack";
|
|
87
|
}
|
|
88
|
break;
|
|
89
|
case "susie_attack":
|
|
90
|
if (obj_herosusie.sprite_index != spr_susie_attack)
|
|
91
|
subact_state = "create_item";
|
|
92
|
break;
|
|
93
|
case "capture":
|
|
94
|
with (obj_shutta_falling_item)
|
|
95
|
{
|
|
96
|
if (!place_meeting(x, y, obj_shutta_photo_controller))
|
|
97
|
{
|
|
98
|
if (other.got_kris && other.closest_hero == "kris")
|
|
99
|
{
|
|
100
|
endmessage = other.message_nicephoto;
|
|
101
|
if (other.enemy.amiabossfight == true)
|
|
102
|
{
|
|
103
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_kris;
|
|
104
|
if (global.flag[513 shuttah_kris_pic] > 0)
|
|
105
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_kris2;
|
|
106
|
}
|
|
107
|
global.flag[513 shuttah_kris_pic] = 1;
|
|
108
|
}
|
|
109
|
else if (other.got_susie && other.closest_hero == "susie")
|
|
110
|
{
|
|
111
|
endmessage = other.message_nicephoto;
|
|
112
|
if (other.enemy.amiabossfight == true)
|
|
113
|
{
|
|
114
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_susie;
|
|
115
|
if (global.flag[514 shuttah_susie_pic] > 0)
|
|
116
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_susie2;
|
|
117
|
}
|
|
118
|
global.flag[514 shuttah_susie_pic] = 1;
|
|
119
|
}
|
|
120
|
else if (other.got_ralsei && other.closest_hero == "ralsei")
|
|
121
|
{
|
|
122
|
endmessage = other.message_nicephoto;
|
|
123
|
if (other.enemy.amiabossfight == true)
|
|
124
|
{
|
|
125
|
if (global.flag[515 shuttah_ralsei_pic] == 0)
|
|
126
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_ralsei;
|
|
127
|
if (global.flag[515 shuttah_ralsei_pic] > 0)
|
|
128
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_ralsei2;
|
|
129
|
}
|
|
130
|
global.flag[515 shuttah_ralsei_pic] = 1;
|
|
131
|
}
|
|
132
|
}
|
|
133
|
else if (sprite_index == spr_realisticexplosion && image_index > 2 && image_index < 13)
|
|
134
|
{
|
|
135
|
scr_battle_sprite_setscr_battle_sprite_set
function scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 8;
hurt = 0;
attacktimer = 0;
sprite_index = arg1;
image_speed = arg2;
image_index = 0;
if (arg3 == 0)
maxframes = image_number;
global.faceaction[myself] = 0;
}
}
} ("susie", spr_susie_attack, 0, false);
|
|
136
|
obj_herosusie.image_index = 1;
|
|
137
|
var _cx = x - 40;
|
|
138
|
var _cy = y;
|
|
139
|
with (obj_shutta_photo_controller)
|
|
140
|
{
|
|
141
|
uncentered_subject = false;
|
|
142
|
offside_subject = false;
|
|
143
|
if (collision_circle(x, y, reticle_size + 60, obj_shutta_shine, false, true))
|
|
144
|
{
|
|
145
|
var _comment = instance_create(x, y, obj_shutta_text);
|
|
146
|
_comment.text = comment_center;
|
|
147
|
_comment.color = c_yellow;
|
|
148
|
endmessage = message_splendidphoto;
|
|
149
|
if (enemy.amiabossfight == true)
|
|
150
|
endmessage = message_toilet2;
|
|
151
|
if (enemy.amiabossfight == true)
|
|
152
|
{
|
|
153
|
if (powerphoto)
|
|
154
|
mercygained += 10;
|
|
155
|
mercygained += 10;
|
|
156
|
}
|
|
157
|
else
|
|
158
|
{
|
|
159
|
mercygained += 100;
|
|
160
|
}
|
|
161
|
enemy.photosuccessballoon = 1;
|
|
162
|
}
|
|
163
|
else
|
|
164
|
{
|
|
165
|
offside_subject = true;
|
|
166
|
endmessage = message_badphoto;
|
|
167
|
if (enemy.amiabossfight == true)
|
|
168
|
endmessage = message_unposed;
|
|
169
|
if (enemy.amiabossfight == true)
|
|
170
|
{
|
|
171
|
if (powerphoto)
|
|
172
|
mercygained += 6;
|
|
173
|
mercygained += 6;
|
|
174
|
}
|
|
175
|
else
|
|
176
|
{
|
|
177
|
if (powerphoto)
|
|
178
|
mercygained += 25;
|
|
179
|
mercygained += 25;
|
|
180
|
}
|
|
181
|
}
|
|
182
|
}
|
|
183
|
break;
|
|
184
|
}
|
|
185
|
else
|
|
186
|
{
|
|
187
|
if (sprite_index == spr_item_toilet)
|
|
188
|
{
|
|
189
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_unposed;
|
|
190
|
if (other.enemy.amiabossfight == true)
|
|
191
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_toilet;
|
|
192
|
}
|
|
193
|
else
|
|
194
|
{
|
|
195
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_badphoto;
|
|
196
|
if (obj_shutta_photo_controller.enemy.amiabossfight == true)
|
|
197
|
obj_shutta_photo_controller.endmessage = obj_shutta_photo_controller.message_unposed;
|
|
198
|
}
|
|
199
|
if (other.enemy.amiabossfight == true)
|
|
200
|
{
|
|
201
|
if (other.powerphoto)
|
|
202
|
other.mercygained += 6;
|
|
203
|
other.mercygained += 6;
|
|
204
|
}
|
|
205
|
else
|
|
206
|
{
|
|
207
|
if (other.powerphoto)
|
|
208
|
other.mercygained += 20;
|
|
209
|
other.mercygained += 25;
|
|
210
|
}
|
|
211
|
}
|
|
212
|
}
|
|
213
|
with (obj_heroparent)
|
|
214
|
{
|
|
215
|
if (object_index == obj_heroralsei || object_index == obj_herokris)
|
|
216
|
{
|
|
217
|
x = xstart;
|
|
218
|
y = ystart;
|
|
219
|
}
|
|
220
|
}
|
|
221
|
with (enemy)
|
|
222
|
{
|
|
223
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (xstart, ystart, 8);
|
|
224
|
x = xstart;
|
|
225
|
y = ystart;
|
|
226
|
}
|
|
227
|
break;
|
|
228
|
case "post_capture":
|
|
229
|
with (obj_heroparent)
|
|
230
|
{
|
|
231
|
if (object_index == obj_heroralsei || object_index == obj_herokris)
|
|
232
|
{
|
|
233
|
x = xstart;
|
|
234
|
y = ystart;
|
|
235
|
}
|
|
236
|
}
|
|
237
|
with (obj_monsterparent)
|
|
238
|
{
|
|
239
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (xstart, ystart, 8);
|
|
240
|
x = xstart;
|
|
241
|
y = ystart;
|
|
242
|
}
|
|
243
|
instance_destroy(obj_shutta_falling_item);
|
|
244
|
instance_destroy(obj_shutta_falling_item_piece);
|
|
245
|
instance_destroy(obj_move_to_point);
|
|
246
|
scr_battle_sprite_resetscr_battle_sprite_reset
function scr_battle_sprite_reset(arg0)
{
_charactor = arg0;
_charinstance = obj_herokris;
if (_charactor == "noelle")
{
_charinstance = obj_heronoelle;
_charnum = 4;
}
if (_charactor == "ralsei")
{
_charinstance = obj_heroralsei;
_charnum = 3;
}
if (_charactor == "susie")
{
_charinstance = obj_herosusie;
_charnum = 2;
}
if (_charactor == "kris")
{
_charinstance = obj_herokris;
_charnum = 1;
}
if (instance_exists(_charinstance))
{
with (_charinstance)
{
state = 0;
hurt = 0;
attacktimer = 0;
attacked = 0;
maxframes = 0;
global.faceaction[myself] = 0;
}
}
} ("susie");
|
|
247
|
with (obj_herosusie)
|
|
248
|
{
|
|
249
|
x = xstart;
|
|
250
|
y = ystart;
|
|
251
|
}
|
|
252
|
break;
|
|
253
|
}
|