2
affected_by_currents="yes"
5
functions="#function which returns true if the object is in an animation that
6
requires frogatto be on the ground#
7
def animation_requires_standing(object_type obj)
8
obj.animation in ['stand', 'stand_up_slope', 'stand_down_slope', 'run', 'walk', 'land', 'lookup', 'crouch', 'enter_crouch', 'leave_crouch', 'turn', 'roll','skid'];
9
def set_facing(object_type obj, facing) if(obj.facing != facing and (not (obj.animation in ['interact', 'slide'])),
10
[facing(facing), if(obj.is_standing, animation('turn'))]);
12
def stand(object_type obj)
13
if(abs(obj.velocity_x) > 240 and (not obj.animation in ['walk']), animation('skid'),
14
if(abs(obj.slope_standing_on) < 20, animation('stand'),
15
if(obj.slope_standing_on*obj.facing > 0, animation('stand_down_slope'),
16
animation('stand_up_slope'))));
19
#make Frogatto walk. anim can be either 'walk' or 'run'. Does checking
20
to make sure Frogatto is in a state where he can walk or run.
21
Will make Frogatto 'glide' if in mid air.#
22
def walk(object_type obj, dir, anim)
23
if(obj.is_standing and (not (obj.animation in ['walk', 'run', 'jump', 'jump_attack', 'turn', 'run', 'crouch', 'enter_crouch', 'roll', 'run_attack', 'energyshot', 'attack', 'up_attack', 'interact', 'spit'])), [animation(anim), if(anim = 'run', [sound('run.wav')])],
24
#Frogatto is in the air, so make him glide.#
25
if(((not obj.is_standing) and (not (obj.animation in ['slide', 'swim_up', 'swim_down', 'swim_side']))), add(obj.velocity_x, obj.vars.jump_glide*dir)));
27
#Function to attempt to make Frogatto crouch; does checking to make
28
sure he's in a state that allows entering a crouch.#
29
def crouch(object_type obj)
30
if(((not obj.animation in ['crouch', 'enter_crouch', 'roll', 'interact'] ) and obj.is_standing), animation('enter_crouch'));
31
def roll(object_type obj)
32
if( (not FAT) and (obj.animation in ['crouch']) and obj.is_standing, animation('roll'));
34
def tongue(object_type obj)
35
if('fat' in obj.variations,
36
if(not (obj.animation in ['interact']), [animation('spit')]),
38
if(obj.animation in ['run'], animation('run_attack')),
39
if(obj.animation in ['stand', 'leave_crouch', 'stand_up_slope', 'stand_down_slope', 'walk', 'enter_lookup', 'lookup','skid', 'land'],
40
animation(if(obj.ctrl_up, 'up_', '') + 'attack')),
41
if(obj.animation in ['jump', 'fall'],
42
if(obj.ctrl_down, animation('fall_spin_attack'),
43
animation('jump_attack')))
47
#Function to make Frogatto attack. Does checking and chooses the
48
appropriate type of attack animation, if any.#
49
def attack(object_type obj, charge_cycles)
50
[if('fat' in obj.variations, tongue(obj),
52
if((obj.animation in ['stand', 'leave_crouch', 'stand_up_slope', 'stand_down_slope', 'walk', 'enter_lookup', 'lookup','skid', 'land']) and
53
charge_cycles >= obj.vars.charge_time, animation(if(obj.ctrl_up, 'up_', '') + 'energyshot')),
55
if(obj.animation in ['run'], animation('run_attack')),
57
if(obj.animation in ['swim_side','swim_side_idle'], animation(if(charge_cycles >= obj.vars.charge_time, 'energyshot_swim_side', 'swim_side')) ),
59
if(obj.animation in ['swim_down','swim_down_idle'], animation(if(charge_cycles >= obj.vars.charge_time, 'energyshot_swim_down', 'swim_down')) ),
61
if(obj.animation in ['swim_up','swim_up_idle'], animation(if(charge_cycles >= obj.vars.charge_time, 'energyshot_swim_up', 'swim_up')) ),
63
if((obj.animation in ['jump', 'fall']) and
64
charge_cycles >= obj.vars.charge_time,
65
if(obj.ctrl_down, animation('energyshot_down'),
66
if(obj.ctrl_up, animation('up_energyshot'),
67
animation('energyshot_jump')))),
69
if(obj.animation in ['enter_crouch', 'crouch'] and (charge_cycles >= obj.vars.charge_time), animation('energyshot_crouch'))]
73
#Function to do a water-equivalent of standing.#
74
def float(object_type obj)
75
animation('swim_side_idle');
77
#Function to enter swimming frames.#
78
def swim(object_type obj,dirx,diry)
81
if(obj.animation != anim_wanted, animation(anim_wanted)),
82
add(obj.velocity_x, (obj.swim_accel*dirx)/1000),
83
add(obj.velocity_y, (obj.swim_accel*diry)/1000)
85
where anim_wanted = if(abs(diry) > 500, if(diry < 0, 'swim_up', 'swim_down'), 'swim_side')
88
#Function to test if frogatto is invincible.#
89
def is_invincible(object_type obj)
90
if(obj.invincible or obj.level.in_dialog or obj.tmp.time_last_hit and (abs(obj.tmp.time_last_hit - obj.cycle) < 100), 1, 0);
92
#Function to test if frogatto is blinking due to being invincible#
93
def is_blinking_invincible(object_type obj)
94
if(obj.tmp.time_last_hit and (abs(obj.tmp.time_last_hit - obj.cycle) < 100), 1, 0);
96
#function to decide if frogatto can slide down a wall#
97
def can_slide(object_type obj)
99
solid(obj.level, if(obj.facing > 0, obj.solid_rect.x2+1, obj.solid_rect.x-1), (obj.solid_rect.y + obj.solid_rect.y2*2)/3) and
100
obj.velocity_y < 300 and obj.velocity_y > -1000;
103
def swallowing_object(object_type frog)
104
if(frog.attached_objects, map(frog.attached_objects, 'obj',
105
if(abs(obj.midpoint_x - context.frog.midpoint_x) < 4, set(attached_objects, []), add(obj.midpoint_x, if(obj.midpoint_x > context.frog.midpoint_x, -4, 4)))
108
def bounce_on(object_type frog, obj)
109
[set(frog.velocity_y, -max(obj.consts.spring_amount,
110
(((frog.velocity_y*obj.consts.springiness)/100)*
111
(100 - abs(bounce_angle)))/100)),
112
add(frog.velocity_x, (((frog.velocity_y*obj.consts.springiness)/100)*bounce_angle)/100),
113
fire_event(obj, 'bounced_on'),
114
if(frog.animation = 'fall_spin_attack', fire_event(obj, 'stomped_on'))
116
where bounce_angle = (obj.consts.bounce_roundness*(frog.midpoint_x - obj.midpoint_x))/(max(1, obj.w));
121
id="frogatto_playable"
123
load_variations="fat"
125
no_compile_image="characters/frogatto-spritesheet1.png"
126
on_add_object_fail="[if(object and vars.swallowed = null(),
127
[set(object.vars.removed_from_play, 1),
128
set(vars.swallowed, object),
129
add(variations, ['fat'])])]"
130
on_blocking_thrown_object="get_hit_by(null())"
131
on_change_animation_failure="[animation(previous_animation)]"
132
on_change_solid_dimensions_fail="[add(hitpoints, -1), animation(if(FAT, 'spit', 'hurt')), set(green, 100), set(blue, 100), set(tmp.time_last_hit, cycle)]"
133
on_check_water="[if(underwater, animation('swim_side')), if(IPHONE_SYSTEM, set(underwater_controls, underwater))]"
134
on_child_spawned="if(child.type = 'frogatto_playable.tongue_tip',
135
[set(tmp.tongue_tip, child), set(child.tmp.tongue_shaft, tmp.tongue_shaft)],
136
if(child.type = 'frogatto_playable.tongue_shaft',
137
set(tmp.tongue_shaft, child)))"
138
on_collide="[set(velocity_x, 0), if((animation in ['jump', 'fall']) and can_slide(self) and abs(velocity_x) > 200, [animation('slide'), set(velocity_y, 0)])]"
139
on_collide_damage="[if((not is_invincible(self)), [add(hitpoints, -max(1, surface_damage)), animation(if(FAT, 'spit', 'hurt')), set(green, 100), set(blue, 100), set(tmp.time_last_hit, cycle), set(solid_dimensions_in, ['player'])])]"
141
if(IPHONE_SYSTEM, if((not underwater), set(underwater_controls, 0))),
142
if(collide_with and collide_with.consts.springiness > 0,
143
bounce_on(me, collide_with),
144
[add(velocity_x, -velocity_x/4),
145
if(has_feet and animation != 'spit' and animation != 'jump_attack', if(velocity_y > 1300, animation('land'),stand(self)) )])]"
146
on_collide_head="[if(animation = 'jump', animation('bumphead')), if(velocity_y < 0, set(velocity_y, 0))]"
147
on_collide_object_attack="if(collide_with_area = 'body' and animation = 'fall_spin_attack' and collide_with.consts.springiness > 0 and velocity_y > 0,
148
bounce_on(me, collide_with))"
149
on_collide_object_body="if( collide_with_area = 'attack' and ((not collide_with.spat_out_at) or collide_with.spat_out_at < level.cycle - 20) and collide_with.vars.team != vars.team and collide_with.vars.damage > 0,
150
if((not is_invincible(self)),
152
add(hitpoints, -collide_with.vars.damage),
153
animation(if(FAT, 'spit', 'hurt')),
154
set(green, 100), set(blue, 100),
155
set(velocity_y,-1000), set(velocity_x,400 * collide_with.facing),
156
set(tmp.time_last_hit, cycle),
157
set(solid_dimensions_in, ['player'])],
159
#avoiding being hit due to being invincible. if we have a shield,
161
if(tmp.shield, fire_event(tmp.shield, 'flash'))
164
#see if we're colliding with another object's interact area, in which case
165
we set it so we can interact with them.#
166
if(collide_with_area = 'interact', set(can_interact, 2))
168
on_collide_object_grab="[if(collide_with_area = 'body' and (not vars.swallowed),
169
if(collide_with.tags.swallowable and collide_with.consts.size <= consts.max_swallow_size,
170
[remove_object(collide_with),
171
if(animation in ['attack', 'jump_attack', 'up_attack'], set(attached_objects, [collide_with])),
172
[set(collide_with.vars.removed_from_play, 1),sound('Slurp.wav')],
173
set(vars.swallowed, collide_with), fire_event(collide_with, 'swallowed'),
174
add(variations, ['fat'])],
176
#object is not swallowable, so do damage to it instead#
177
if(collide_with.get_hit_by, collide_with.get_hit_by(me))
179
on_create="[animation('stand')]"
180
on_ctrl_down="if((not FAT), if(animation in ['fall', 'jump'], [tongue(self)]))"
181
on_ctrl_jump="[if(is_standing and velocity_y >= 0 and (not (animation in ['interact'])), [animation('jump'), add(velocity_x, velocity_x/2), if(ctrl_down and is_standing_on_platform, [set(fall_through_platforms, 15), add(velocity_y, vars.jump_power/10)], set(velocity_y, -vars.jump_power))]),
182
if(animation = 'slide', [facing(-facing), animation('jump'), set(velocity_x, -facing*800), set(velocity_y, -1000)])]"
183
on_ctrl_left="[set_facing(self, -1), roll(self), if(tmp.left and tmp.left > cycle - 15 or tmp.running = 1, [walk(self, -1, 'run'), set(tmp.running, 1)]), set(tmp.left, cycle), set(tmp.right, null())]"
184
on_ctrl_right="[set_facing(self, 1), roll(self), if(tmp.right and tmp.right > cycle - 15 or tmp.running = 1, [walk(self, 1, 'run'), set(tmp.running, 1)]), set(tmp.right, cycle), set(tmp.left, null())]"
185
on_ctrl_tongue="if(vars.has_energy_shot, attack(self, energy_charge), tongue(self))"
187
if(abs(velocity_x) < 100 and is_standing, map(filter(level.active_chars, 'char', collides(context.me, 'body', char, 'interact')), 'obj', [set(tmp.interacting_with, obj), fire_event(obj, 'interact')]))]"
188
on_die="[spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
189
on_end_attack_anim="[
190
if(('fat' in variations), animation('swallow')),
192
on_end_bumphead_anim="animation('fall')"
193
on_end_crouch_anim="if(ctrl_down, animation('crouch'), animation('leave_crouch'))"
194
on_end_ctrl_left="[set(tmp.running, 0),
195
if((not (ctrl_left or ctrl_right)) and (animation in ['walk', 'run']), stand(self))]"
196
on_end_ctrl_right="[set(tmp.running, 0),
197
if((not (ctrl_left or ctrl_right)) and (animation in ['walk', 'run']), stand(self))]"
198
on_end_ctrl_up="if((animation in ['enter_lookup', 'lookup']), stand(self))"
199
on_end_emote_confused_anim="animation('stand')"
200
on_end_emote_geez_anim="animation('stand')"
201
on_end_emote_impatient_anim="animation('stand')"
202
on_end_emote_oh_anim="animation('stand')"
203
on_end_emote_raisedfinger_anim="animation('stand')"
204
on_end_emote_talk_anim="animation('stand')"
205
on_end_energyshot_anim="stand(self)"
206
on_end_energyshot_crouch_anim="stand(self)"
207
on_end_energyshot_down_anim="stand(self)"
208
on_end_energyshot_jump_anim="stand(self)"
209
on_end_energyshot_swim_down_anim="float(self)"
210
on_end_energyshot_swim_side_anim="float(self)"
211
on_end_energyshot_swim_up_anim="float(self)"
212
on_end_enter_crouch_anim="animation('crouch')"
213
on_end_enter_lookup_anim="animation('lookup')"
214
on_end_fall_spin_attack_anim="animation('fall')"
215
on_end_hurt_anim="if((not FAT) and underwater, animation('swim_side_idle'), animation('stand'))"
216
on_end_interact_anim="animation('stand')"
217
on_end_jump_anim="animation('fall')"
218
on_end_jump_attack_anim="animation('fall')"
219
on_end_land_anim="stand(self)"
220
on_end_leave_crouch_anim="stand(self)"
221
on_end_lookup_anim="animation('lookup')"
222
on_end_roll_anim="animation('crouch')"
223
on_end_run_anim="[animation('run'), spawn('dust_cloud_run', midpoint_x + 30*facing, y2 - 12, -facing)]"
224
on_end_run_attack_anim="[animation('skid'), set(tmp.running, 0)]"
225
on_end_skid_anim="stand(self)"
226
on_end_spit_anim="if(underwater, float(self), stand(self))"
227
on_end_stand_anim="stand(self)"
228
on_end_stand_down_slope_anim="stand(self)"
229
on_end_stand_up_slope_anim="stand(self)"
230
on_end_swallow_anim="stand(self)"
231
on_end_swim_down_anim="if(underwater,animation('swim_down'),stand(self))"
232
on_end_swim_side_anim="if(underwater,animation('swim_side'),stand(self))"
233
on_end_swim_side_idle_anim="float(self)"
234
on_end_swim_up_anim="if(underwater,animation('swim_up'),stand(self))"
235
on_end_turn_anim="stand(self)"
236
on_end_up_attack_anim="stand(self)"
237
on_end_up_energyshot_anim="stand(self)"
238
on_end_walk_anim="animation('walk')"
239
on_enter_anim="set(tmp.already_hit, [])"
240
on_enter_energyshot_anim="[set(tmp.start_attack_cycle, cycle),
241
spawn('frogatto_energy_ball', midpoint_x + facing*30, midpoint_y +10, facing, [set(velocity_x, velocity_x/2 + facing*700), set(velocity_y, velocity_y/2)])]"
242
on_enter_energyshot_crouch_anim="[set(tmp.start_attack_cycle, cycle),
243
spawn('frogatto_energy_ball', midpoint_x + facing*30, midpoint_y, facing, [set(velocity_x, velocity_x/2 + facing*700), set(velocity_y, velocity_y/2)])]"
244
on_enter_energyshot_down_anim="[set(tmp.start_attack_cycle, cycle),
245
spawn('frogatto_energy_ball', midpoint_x, midpoint_y + 40, facing, [set(velocity_x, velocity_x/4), set(velocity_y, velocity_y + 1500)])]"
246
on_enter_energyshot_jump_anim="[set(tmp.start_attack_cycle, cycle),
247
spawn('frogatto_energy_ball', midpoint_x + facing*30, midpoint_y +10, facing, [set(velocity_x, if(velocity_x*facing > 0, velocity_x/2, 0) + facing*700)])]"
248
on_enter_energyshot_swim_down_anim="[set(tmp.start_attack_cycle, cycle),
249
spawn('frogatto_energy_ball', midpoint_x, midpoint_y + 40, facing, [set(velocity_x, velocity_x/4), set(velocity_y, velocity_y/2 + 1500)])]"
250
on_enter_energyshot_swim_side_anim="[set(tmp.start_attack_cycle, cycle),
251
spawn('frogatto_energy_ball', midpoint_x + facing*30, midpoint_y +10, facing, [set(velocity_x, velocity_x/2 + facing*700), set(velocity_y, velocity_y/2)])]"
252
on_enter_energyshot_swim_up_anim="[set(tmp.start_attack_cycle, cycle),
253
spawn('frogatto_energy_ball', midpoint_x, midpoint_y -40, facing, [set(velocity_x, velocity_x/2), set(velocity_y, velocity_y/2 - 700)])]"
254
on_enter_fall_anim="set(zorder, 10)"
255
on_enter_fall_spin_attack_anim="[set(zorder, 10), set(tmp.no_flinch_attack, 1)]"
256
on_enter_jump_anim="set(zorder, 10)"
257
on_enter_jump_attack_anim="set(zorder, 10)"
258
on_enter_land_anim="[spawn('dust_cloud_skid', midpoint_x + 20*facing, y2 - 8, facing), spawn('dust_cloud_skid', midpoint_x - 20*facing, y2 - 8, -facing)]"
259
on_enter_level="[if(not (level.id in vars.levels_visited),
260
add(vars.levels_visited, [level.id])),
262
on_enter_run_anim="set(accel_x, vars.run_accel)"
263
on_enter_skid_anim="if(abs(velocity_x) > 300, spawn('dust_cloud_skid', midpoint_x + 36*facing, y2 - 10, facing))"
264
on_enter_slide_anim="[set(zorder, 10),
265
if(IPHONE_SYSTEM, set(underwater_controls, 0))]"
266
on_enter_spit_anim="[set(tmp.spit_force, 0), set(variations, filter(variations, 'v', v != 'fat'))]"
267
on_enter_stand_anim="if(abs(slope_standing_on) > 20, stand(self))"
268
on_enter_stand_down_slope_anim="if(slope_standing_on*facing < 20, stand(self))"
269
on_enter_stand_up_slope_anim="if(slope_standing_on*facing > -20, stand(self))"
270
on_enter_up_energyshot_anim="[set(tmp.start_attack_cycle, cycle),
271
spawn('frogatto_energy_ball', midpoint_x, midpoint_y -40, facing, [set(velocity_x, velocity_x/2), set(velocity_y, min(velocity_y/2, 0) - 700)])]"
272
on_enter_walk_anim="set(accel_x, vars.walk_accel)"
274
if(IPHONE_SYSTEM, set(underwater_controls, 1)),
275
if((not FAT), [float(self), set(has_feet, 0)]),
277
sound('WaterPlunge.ogg'),
279
#splash if we are entering the water with reasonable velocity#
280
if(velocity_y > 200, [
281
spawn('water_splash', midpoint_x, water_bounds[1]+10, if(1d2=2,facing,-facing)),
282
spawn('water_particles', midpoint_x, water_bounds[1]+10, facing)]),
283
#record the surface level of the water for future reference,
284
especially for splashing when we exit the water#
285
set(tmp.water_surface, water_bounds[1]),
288
[add_wave(midpoint_x, y2, -2000, 5*velocity_y, 30*velocity_y, 300, 300),
289
add_wave(midpoint_x, y2, 2000, 5*velocity_y, 30*velocity_y, 300, 300),
290
add_wave(midpoint_x, y2, -1000, 3*velocity_y, 20*velocity_y, 200, 200),
291
add_wave(midpoint_x, y2, 1000, 3*velocity_y, 20*velocity_y, 200, 200),
292
add_wave(midpoint_x, y2, -500, 2*velocity_y, 10*velocity_y, 100, 100),
293
add_wave(midpoint_x, y2, 500, 2*velocity_y, 10*velocity_y, 100, 100)])
297
sound('WaterPlunge.ogg'),
298
schedule(60, fire_event('check_water')),
300
if(velocity_y < -200,
301
[spawn('water_splash', midpoint_x, tmp.water_surface+10, if(1d2=2,facing,-facing)),
302
spawn('water_particles', midpoint_x, tmp.water_surface+10, facing),
305
[add_wave(midpoint_x, y2+100, 2000, -5*velocity_y, -30*velocity_y, 300, 300),
306
add_wave(midpoint_x, y2+100, -2000, -5*velocity_y, -30*velocity_y, 300, 300),
307
add_wave(midpoint_x, y2+100, 1000, -3*velocity_y, -20*velocity_y, 200, 200),
308
add_wave(midpoint_x, y2+100, -1000, -3*velocity_y, -20*velocity_y, 200, 200),
309
add_wave(midpoint_x, y2+100, 500, -2*velocity_y, -10*velocity_y, 100, 100),
310
add_wave(midpoint_x, y2+100, -500, -2*velocity_y, -10*velocity_y, 100, 100)])]),
313
animation('fall'), if(velocity_y < 0, add(velocity_y, -JUMP_OUT_OF_WATER_BOOST)),
314
set(velocity_x, (velocity_x*JUMP_OUT_OF_WATER_BOOST_HORIZONTAL)/100)
317
on_get_powerup="null()"
318
on_handle_move_script="if(abs(midpoint_x - tmp.scripted_target_x) < 10,
319
if(abs(tmp.scripted_target_facing) = 1 and facing != tmp.scripted_target_facing,
320
[set(control_lock, if(tmp.scripted_target_facing > 0, ['ctrl_right'], ['ctrl_left'])), schedule(1, fire_event('handle_move_script'))],
322
[set(control_lock, null()),
323
set(me.tmp.scripted_target_x, null()),
324
set(me.tmp.scripted_target_facing, null()),
325
set(me.tmp.scripted_move_callback, null()),
326
tmp.scripted_move_callback]),
328
[set(control_lock, if(tmp.scripted_target_x > midpoint_x, ['ctrl_right'], ['ctrl_left'])), schedule(1, fire_event('handle_move_script'))])"
329
on_hurtflicker="if(green = 100,[set(green, 255), set(blue, 255)], [set(green, 100), set(blue, 100)])"
330
on_interacting="if(tmp.interacting_with and tmp.fired_talk = 0, [set(tmp.fired_talk, 1), fire_event(tmp.interacting_with, 'talk')])"
331
on_leave_attack_anim="[if(tmp.tongue_tip, fire_event('remove_tongue')), set(attached_objects, [])]"
332
on_leave_crouch_anim="[set(tmp.lookdown_time, 0), set(vertical_look, 0)]"
333
on_leave_fall_anim="set(zorder, 0)"
334
on_leave_fall_spin_attack_anim="[set(zorder, 0), set(tmp.no_flinch_attack, 0)]"
335
on_leave_hurt_anim="[set(green, 255), set(blue, 255)]"
336
on_leave_jump_anim="set(zorder, 0)"
337
on_leave_jump_attack_anim="[fire_event('leave_attack_anim'), set(zorder, 0), set(attached_objects, [])]"
338
on_leave_lookup_anim="[set(tmp.lookup_time, 0), set(vertical_look, 0)]"
339
on_leave_roll_anim="stop_sound('roll.ogg')"
340
on_leave_slide_anim="[set(zorder, 0), if(ctrl_left, facing(-1)), if(ctrl_right, facing(1))]"
341
on_leave_spit_anim="[
342
set(green, 255), set(blue, 255),
343
set(vars.swallowed.vars.removed_from_play, 0),
344
set(vars.swallowed.velocity_x, velocity_x + facing*(200 + tmp.spit_force*if(ctrl_up, vars.spit_power/2, vars.spit_power*2))),
345
set(vars.swallowed.velocity_y, velocity_y - (600 + if(ctrl_up, 200 + tmp.spit_force*vars.spit_power))),
347
#set the object's timestamp for when it was spat out, so we
348
can make ourselves invincible to it for a little while#
349
set(vars.swallowed.spat_out_at, level.cycle),
350
set(vars.swallowed, null()),
351
resolve_solid(vars.swallowed, facing, 0, 50),
352
resolve_solid(vars.swallowed, -facing, 0, 50),
354
#set the enemy to be dimensionless, meaning it will only collide
355
with the level. If it collides with another object we expect
357
set(vars.swallowed.solid_dimensions_in, ['thrown']),
358
set(vars.swallowed.midpoint_x, midpoint_x),
359
set(vars.swallowed.y, y),
360
if(vars.swallowed.vars.team, set(vars.swallowed.vars.team, vars.team)),
361
set(vars.swallowed.animation, 'thrown'),
363
add_object(vars.swallowed),
364
fire_event(vars.swallowed, 'spat'),
365
if(underwater, set(has_feet, 0)),
368
on_leave_up_attack_anim="set(attached_objects, [])"
369
on_load="[set(invincible, 50), set(brightness, 255)]"
370
on_load_checkpoint="[set(hitpoints, max_hitpoints),
372
#make it so that if we had a swallowed object
373
we create a fresh version of the object in our
377
set(vars.swallowed, obj),
378
set(obj.vars.removed_from_play, 1),
379
fire_event(obj, 'swallowed')
380
] where obj = object(vars.swallowed.type,
381
midpoint_x, midpoint_y, facing)
383
set(vars.powerup_time, 0),
384
set(vars.has_energy_shot, 0),
385
fire_event('lose_powerup'),
387
#remove variations that aren't upgrades#
388
set(variations, filter(variations, 'v', strstr(v, 'upgrade') or v = 'fat')),
393
set(brightness, 255),
394
schedule(2, fire_event('check_water'))
396
on_lose_powerup="null()"
398
if((not is_standing) and animation_requires_standing(self), [animation('fall')]),
399
if((not FAT) and underwater,
402
swim(self, ctrl_x, ctrl_y),
403
if((not ctrl_x) and (not ctrl_y), float(self)),
404
if(ctrl_x < 0 and facing > 0 or ctrl_x > 0 and facing < 0, set(facing, -facing))
408
swim(self, (ctrl_right - ctrl_left)*if(ctrl_down or ctrl_up, 700, 1000), (ctrl_down - ctrl_up)*if(ctrl_left or ctrl_right, 700, 1000)),
409
if((not (ctrl_left or ctrl_right or ctrl_up or ctrl_down)) and (animation in ['swim_side','swim_up','swim_down']),
415
if(ctrl_left, if(tmp.running, walk(self, -1, 'run'), walk(self, -1, 'walk'))),
416
if(ctrl_right, if(tmp.running, walk(self, 1, 'run'), walk(self, 1, 'walk'))),
417
if(ctrl_down and (not (ctrl_left or ctrl_right)), crouch(self))
419
on_process_attack="if(tmp.tongue_tip and tmp.tongue_tip.tmp.hit and time_in_animation < 9,
420
[add(time_in_animation, 2*(9-time_in_animation) + 1),
421
fire_event('process_attack')],
423
[if(time_in_animation = 4,
425
spawn('frogatto_playable.tongue_shaft',
426
if(facing > 0, x + 30, x), y + 44, facing),
427
spawn('frogatto_playable.tongue_tip',
428
if(facing > 0, x + 30, x), y + 46, facing)
430
if(tmp.tongue_tip and time_in_animation = 14,
431
fire_event('remove_tongue')),
434
set(tmp.tongue_tip.midpoint_x,
435
midpoint_x + facing*(10 + tongue_length)),
437
set(tmp.tongue_tip.midpoint_y, y + 47),
438
set(tmp.tongue_shaft.x,
439
if(facing > 0, midpoint_x + 10,
440
midpoint_x - 2 - tongue_length)),
441
tmp.tongue_shaft.set_length(tongue_length - 6),
442
set(tmp.tongue_shaft.midpoint_y, y + 44)
444
if(tmp.tongue_tip, fire_event(tmp.tongue_tip, 'calculate_position')),
445
swallowing_object(self)])
446
where tongue_length = vars.tongue_length*(5 - abs(9 - time_in_animation))"
447
on_process_crouch="[add(tmp.lookdown_time, 1), if(tmp.lookdown_time = 50, set(vertical_look, 200))]"
449
if(IPHONE_SYSTEM, if(underwater_controls, [
450
add(velocity_x, (jump_glide*ctrl_x)/1000),
451
add(velocity_y, (jump_glide*ctrl_y)/1000)])),
452
if(is_standing, animation('stand'))]"
453
on_process_jump="if(ctrl_jump, [add(velocity_y, -vars.jump_boost)])"
454
on_process_jump_attack="if(tmp.tongue_tip and tmp.tongue_tip.tmp.hit and time_in_animation < 9,
455
[add(time_in_animation, 2*(9-time_in_animation) + 1),
456
fire_event('process_jump_attack')],
458
[if(time_in_animation = 4,
460
spawn('frogatto_playable.tongue_shaft',
461
if(facing > 0, x + 30, x), y + 32, facing),
462
spawn('frogatto_playable.tongue_tip',
463
if(facing > 0, x + 30, x), y + 34, facing)
465
if(tmp.tongue_tip and time_in_animation = 14,
466
fire_event('remove_tongue')),
469
set(tmp.tongue_tip.midpoint_x, midpoint_x + facing*(10 + tongue_length)),
470
set(tmp.tongue_tip.midpoint_y, y + 35),
471
set(tmp.tongue_shaft.x,
472
if(facing > 0, midpoint_x + 10,
473
midpoint_x - 10 - tongue_length)),
474
tmp.tongue_shaft.set_length(tongue_length - 6),
475
set(tmp.tongue_shaft.midpoint_y, y + 32)
478
if(tmp.tongue_tip, fire_event(tmp.tongue_tip, 'calculate_position')),
479
swallowing_object(self)])
480
where tongue_length = vars.tongue_length*(5 - abs(9 - time_in_animation))"
481
on_process_lookup="[add(tmp.lookup_time, 1), if(tmp.lookup_time = 50, set(vertical_look, -200))]"
482
on_process_slide="if(not can_slide(self), animation('fall'))"
483
on_process_spit="if(ctrl_attack or ctrl_tongue, add(tmp.spit_force, 1))"
484
on_remove_tongue="[if(tmp.tongue_tip.vars.swallowed,
485
[set(vars.swallowed, tmp.tongue_tip.vars.swallowed),
486
add(variations, ['fat'])]),
487
set(tmp.tongue_tip.hitpoints, 0),
488
set(tmp.tongue_tip, null()),
489
set(tmp.tongue_shaft.hitpoints, 0),
490
set(tmp.tongue_shaft, null())]"
491
on_start_interact="[animation('interact'), set(tmp.fired_talk, 0)]"
492
on_stuck="if(not underwater, [animation('jump'), add(velocity_y, -vars.jump_power)])"
493
on_surface_damage="[fire_event('collide_damage')]"
495
if(ctrl_right - ctrl_left != 0 and ctrl_right - ctrl_left != facing, set_facing(me, -facing)),
496
if(ctrl_up and (animation in ['stand','stand_up_slope','stand_down_slope']), animation('enter_lookup')),
498
#handle ending of invincibility#
499
if((cycle - tmp.time_last_hit)/2 = 50, set(solid_dimensions_in, ['player', 'common', 'boss'])),
500
if(is_blinking_invincible(self), set(alpha,(wave(cycle*300)+1000)/10 + 100),
501
[if(underwater and water_object.consts.damage,
502
[add(hitpoints, -water_object.consts.damage),
503
set(tmp.time_last_hit, cycle)]),
506
solid_area="9,8,23,30"
507
solid_dimensions="player,common,boss"
509
traction_in_water="1000"
512
attack_force="if(animation = 'run_attack', 140, 20)"
513
energy_charge="if((not FAT) and vars.has_energy_shot,
514
min(vars.charge_time, cycle - tmp.start_attack_cycle), 0)"
515
get_hit_by="def(collide_with) [
516
if(me.tmp.time_last_hit and (abs(me.tmp.time_last_hit - me.cycle) < 100) or collide_with.vars.damage <= 0, [],
517
[add(me.hitpoints, -if(collide_with, collide_with.vars.damage, 1)),
518
set(me.tmp.time_last_hit, me.cycle),
519
set(solid_dimensions_in, ['player']),
520
set(me.animation, 'hurt')
522
scripted_move_to_x="def(target_x, target_facing, callback)
524
set(me.tmp.scripted_target_x, target_x),
525
set(me.tmp.scripted_target_facing, target_facing),
526
set(me.tmp.scripted_move_callback, callback),
527
fire_event(me, 'handle_move_script')
533
JUMP_OUT_OF_WATER_BOOST="1400"
534
JUMP_OUT_OF_WATER_BOOST_HORIZONTAL="200"
535
max_swallow_size="16"
550
next_unlocked_item="null()"
551
num_partial_hearts="0"
559
unlocked_items="['heart_object','points_cube','points_cube']"
569
scripted_move_callback="null()"
570
scripted_target_facing="null()"
571
scripted_target_x="null()"
573
start_attack_cycle="0"
575
tongue_shaft="null()"
580
id="invincible_particles"
590
frame_info="1,1,1,1,227,0,9,9,2,2,2,2,236,0,7,7,3,3,3,3,243,0,5,5,4,4,4,4,248,0,3,3"
593
image="compiled-0.png"
599
frame_info="2,2,2,2,303,0,7,7,3,3,3,3,310,0,5,5,4,4,4,4,315,0,3,3"
602
image="compiled-0.png"
608
frame_info="3,3,3,3,337,0,5,5,4,4,4,4,342,0,3,3"
611
image="compiled-0.png"
617
frame_info="4,4,4,4,122,11,3,3"
620
image="compiled-0.png"
627
id="powerup_invincible"
629
_target="elements.consts"
630
powerup_name="'powerup_invincible'"
631
powerup_recharge="100"
636
on_get_powerup="[set(vars.powerup_time, 200), add_particles('invincible_particles')]"
637
on_lose_powerup="[set(brightness, 255), set(invincible_particles.spawn_rate, -1)]"
638
on_process="[{on_process}, set(brightness, (wave(cycle*30)+1000)/3 + 255)]"
639
on_timer="[{on_timer}, set(invincible, 10), add(vars.powerup_time, -1), if(vars.powerup_time <= 0, [fire_event('lose_powerup'), set(variations, filter(variations, 'v', v != 'powerup_invincible'))])]"
645
id="powerup_shooting"
647
_target="elements.consts"
648
powerup_name="'powerup_shooting'"
649
powerup_recharge="150"
654
on_get_powerup="[set(vars.has_energy_shot, 1), set(vars.powerup_time, 300)]"
655
on_lose_powerup="[set(vars.has_energy_shot, 0), set(brightness, 255)]"
656
on_timer="[{on_timer}, add(vars.powerup_time, -1), if(vars.powerup_time <= 0, [fire_event('lose_powerup'), set(variations, filter(variations, 'v', v != 'powerup_shooting'))])]"
662
id="powerup_reflexes"
664
_target="elements.consts"
665
powerup_name="'powerup_reflexes'"
666
powerup_recharge="150"
671
on_enter_level="[{on_enter_level}, set(level.chars_immune_from_freeze, [me])]"
672
on_get_powerup="[set(vars.powerup_time, 300), set(level.chars_immune_from_freeze, [me]), set(tmp.start_powerup, cycle)]"
673
on_lose_powerup="[set(brightness, 255), blur(0, 0, 0)]"
674
on_process="[{on_process}, set(level.time_freeze, level.time_freeze + min(50, cycle - tmp.start_powerup, vars.powerup_time/2)*12),
675
screen_flash([0, 64, 32, (((wave(cycle*16)+2000)/16)*min(50, cycle - tmp.start_powerup, vars.powerup_time/2))/50], 1)]"
676
on_timer="[{on_timer}, blur(40, 10, 10), set(vars.powerup_time, vars.powerup_time-1), if(vars.powerup_time <= 0, [fire_event('lose_powerup'), set(variations, filter(variations, 'v', v != 'powerup_reflexes'))])]"
684
_target="filter(elements.animation, image = 'characters/frogatto-spritesheet1.png')"
685
image="characters/fat-frogatto-spritesheet1.png"
690
_target="elements.consts"
697
_target="filter(elements.animation, id = 'walk')"
702
_target="filter(elements.animation, id = 'run')"
720
image="characters/frogatto-spritesheet1.png"
733
image="characters/frogatto-spritesheet1.png"
747
image="characters/frogatto-spritesheet1.png"
762
id="stand_down_slope"
763
image="characters/frogatto-spritesheet1.png"
778
image="characters/frogatto-spritesheet1.png"
791
image="characters/frogatto-spritesheet1.png"
804
image="characters/frogatto-spritesheet1.png"
806
rect="107,197,138,229"
807
rotate_on_slope="yes"
808
solid_area="9,17,23,30"
818
image="characters/frogatto-spritesheet1.png"
821
rotate_on_slope="yes"
822
solid_area="9,17,23,30"
832
image="characters/frogatto-spritesheet1.png"
836
rotate_on_slope="yes"
847
image="characters/frogatto-spritesheet1.png"
850
solid_area="8,17,24,30"
865
image="characters/frogatto-spritesheet1.png"
868
solid_area="17,18,31,40"
880
image="characters/frogatto-spritesheet1.png"
882
solid_area="17,18,31,40"
896
image="characters/frogatto-spritesheet1.png"
898
solid_area="17,18,31,40"
912
image="characters/frogatto-spritesheet1.png"
927
image="characters/frogatto-spritesheet1.png"
929
solid_area="9,13,23,35"
930
sound="FrogJump1.ogg,FrogJump2.ogg"
943
image="characters/frogatto-spritesheet1.png"
946
solid_area="9,12,23,34"
958
image="characters/frogatto-spritesheet1.png"
960
solid_area="9,13,23,35"
974
image="characters/frogatto-spritesheet1.png"
976
solid_area="9,17,23,39"
988
frame_info="2,9,23,2,639,868,24,27,4,7,25,2,663,868,20,29,3,13,24,2,683,868,22,23,3,3,24,2,705,868,22,33,2,5,23,2,727,868,24,31,0,6,21,2,751,868,28,30"
991
image="compiled-1.png"
992
rect="637,859,685,896"
993
solid_area="6,13,20,35"
1001
frame_info="6,3,5,3,488,30,23,29,8,2,6,4,511,30,20,29,5,3,5,4,531,30,24,28"
1004
image="compiled-2.png"
1005
rect="482,27,515,61"
1006
solid_area="6,8,20,30"
1012
body_area="6,11,24,36"
1014
events="3:side_attack_fx_one,6:side_attack_fx_two,9:side_attack_fx_three,8:side_attack_contact"
1016
grab_area="32,24,49,34"
1019
image="characters/frogatto-spritesheet1.png"
1022
solid_area="7,12,21,34"
1023
sound="tongueOut1.wav,tongueOut2.wav,tongueOut3.wav,tongueOut4.wav,tongueOut5.wav,tongueOut6.wav"
1032
body_area="0,18,41,44"
1034
events="6:up_attack_contact"
1036
grab_area="16,0,28,10"
1039
image="characters/frogatto-spritesheet1.png"
1042
solid_area="7,19,21,41"
1043
sound="tongueOut1.wav,tongueOut2.wav,tongueOut3.wav,tongueOut4.wav,tongueOut5.wav,tongueOut6.wav"
1052
attack_area="20,14,70,40"
1053
body_area="0,0,30,40"
1055
events="6:7:8:9:10:11:run_attack_contact"
1059
image="characters/frogatto-spritesheet1.png"
1062
solid_area="18,6,32,28"
1072
body_area="6,11,24,36"
1074
events="3:side_attack_fx_one,6:side_attack_fx_two,9:side_attack_fx_three,8:side_attack_contact"
1076
grab_area="28,19,43,31"
1079
image="characters/frogatto-spritesheet1.png"
1082
sound="tongueOut1.wav,tongueOut2.wav,tongueOut3.wav,tongueOut4.wav,tongueOut5.wav,tongueOut6.wav"
1091
attack_area="solid:13,30,23,42"
1094
events="3:6:9:12:15:18:21:24:spin_attack_contact"
1097
id="fall_spin_attack"
1098
image="characters/frogatto-spritesheet1.png"
1101
sound="SpinAttack.ogg"
1112
events="6:12:18:hurtflicker"
1115
image="characters/frogatto-spritesheet1.png"
1117
rect="271,351,303,383"
1118
sound="TakeDamage.wav"
1132
events="15:interacting"
1138
image="characters/frogatto-spritesheet1.png"
1155
image="characters/frogatto-spritesheet1.png"
1157
solid_area="14,8,28,30"
1168
frame_info="13,14,13,6,555,30,21,28,12,14,13,6,576,30,22,28,13,15,12,5,598,30,22,28,11,14,11,5,620,30,25,29,11,14,11,6,645,30,25,28,13,15,12,6,670,30,22,27"
1172
image="compiled-2.png"
1173
rect="542,16,588,63"
1181
frame_info="4,5,4,5,233,226,31,26,4,5,4,5,264,226,31,26,4,5,4,5,295,226,31,26,4,5,4,5,326,226,31,26,4,5,4,5,357,226,31,26,4,5,4,5,388,226,31,26"
1185
image="compiled-2.png"
1186
rect="229,221,267,256"
1195
frame_info="3,4,3,5,401,173,33,27,3,5,3,5,434,173,33,26,3,4,3,5,467,173,33,27,3,4,3,5,500,173,33,27,3,5,3,5,533,173,33,26,3,4,3,5,566,173,33,27"
1199
image="compiled-2.png"
1200
rect="398,169,436,204"
1209
frame_info="7,1,6,2,779,868,26,33,7,1,6,3,805,868,26,32,7,1,6,2,831,868,26,33,7,1,6,2,857,868,26,33,7,1,6,3,883,868,26,32,7,1,6,2,909,868,26,33"
1213
image="compiled-1.png"
1214
rect="772,867,810,902"
1223
frame_info="5,5,4,6,0,277,30,25,5,5,4,6,30,277,30,25,4,5,2,7,60,277,33,24"
1226
image="compiled-2.png"
1227
rect="-5,272,33,307"
1228
sound="Paddle4.ogg,Paddle5.ogg,Paddle6.ogg,Paddle7.ogg"
1236
frame_info="11,8,11,2,870,997,17,26,6,7,6,8,887,997,27,21,7,1,5,8,914,997,27,27"
1239
image="compiled-1.png"
1240
rect="859,989,897,1024"
1241
sound="Paddle4.ogg,Paddle5.ogg,Paddle6.ogg,Paddle7.ogg"
1249
frame_info="8,2,7,8,694,966,24,26,6,2,6,4,718,966,27,30,9,2,7,3,745,966,23,31"
1252
image="compiled-1.png"
1253
rect="686,964,724,999"
1254
sound="Paddle4.ogg,Paddle5.ogg,Paddle6.ogg,Paddle7.ogg"
1262
frame_info="1,12,10,6,957,173,30,26,1,12,7,6,987,173,33,26"
1266
image="compiled-2.png"
1267
rect="956,161,996,204"
1268
solid_area="6,14,20,36"
1276
frame_info="4,9,7,5,955,0,30,30,4,9,4,5,985,0,33,30"
1279
id="energyshot_jump"
1280
image="compiled-2.png"
1281
rect="951,-9,991,34"
1289
frame_info="5,3,10,6,699,722,26,35,5,1,10,6,725,722,26,37"
1293
image="compiled-1.png"
1294
rect="694,719,734,762"
1295
solid_area="12,14,26,36"
1303
frame_info="6,8,9,8,370,966,26,28,6,8,9,5,396,966,26,31"
1306
id="energyshot_down"
1307
image="compiled-1.png"
1308
rect="364,958,404,1001"
1316
frame_info="3,16,6,10,839,369,32,18,3,16,3,10,871,369,35,18"
1319
id="energyshot_crouch"
1320
image="compiled-2.png"
1321
rect="836,353,876,396"
1322
solid_area="6,14,20,27"
1330
frame_info="0,5,2,5,643,200,37,26,0,5,0,5,680,200,39,26"
1333
id="energyshot_swim_side"
1334
image="compiled-2.png"
1335
rect="643,195,681,230"
1343
frame_info="3,2,11,3,0,868,25,31,3,2,11,0,25,868,25,34"
1346
id="energyshot_swim_down"
1347
image="compiled-1.png"
1348
rect="-3,866,35,901"
1356
frame_info="4,3,10,0,958,760,25,33,4,0,10,0,983,760,25,36"
1359
id="energyshot_swim_up"
1360
image="compiled-1.png"
1361
rect="954,757,992,792"
1369
frame_info="4,7,6,1,692,30,22,25,3,7,5,1,714,30,24,25,0,6,5,1,738,30,27,26,0,5,5,1,765,30,27,27,0,4,5,1,792,30,27,28,0,3,5,1,819,30,27,29,0,4,5,1,846,30,27,28,0,5,5,1,873,30,27,27"
1372
image="compiled-2.png"
1373
rect="688,23,719,55"
1382
frame_info="6,6,6,1,151,30,20,26,6,6,6,1,171,30,20,26,6,4,6,1,191,30,20,28,6,5,6,1,211,30,20,27,6,4,3,1,231,30,23,28,6,4,2,1,254,30,24,28,6,4,2,1,278,30,24,28,6,5,2,1,302,30,24,27,6,5,2,1,326,30,24,27,6,5,2,1,350,30,24,27,6,6,2,1,374,30,24,26,6,4,2,1,398,30,24,28,6,2,3,1,422,30,23,30,6,4,3,1,445,30,23,28,6,6,6,1,468,30,20,26"
1386
image="compiled-2.png"
1387
rect="145,24,176,56"
1395
frame_info="6,6,6,1,0,173,20,26,6,6,6,1,20,173,20,26,6,5,5,1,40,173,21,27,7,6,3,1,61,173,22,26,7,7,5,1,83,173,20,25,7,7,5,1,103,173,20,25,7,7,5,1,123,173,20,25,7,7,5,1,143,173,20,25,7,7,5,1,163,173,20,25,7,7,5,1,183,173,20,25,7,7,5,1,203,173,20,25,7,7,5,1,223,173,20,25,7,6,3,1,243,173,22,26,6,5,5,1,265,173,21,27"
1399
image="compiled-2.png"
1400
rect="-6,167,25,199"
1408
frame_info="6,6,6,1,413,997,20,26,6,5,6,1,433,997,20,27,6,5,6,1,453,997,20,27,6,6,6,1,473,997,20,26,6,6,5,1,493,997,21,26,6,6,3,1,514,997,23,26,6,6,3,1,537,997,23,26,6,6,2,1,560,997,24,26,6,6,0,1,584,997,26,26,6,6,0,1,610,997,26,26,6,6,3,1,636,997,23,26,6,6,3,1,659,997,23,26,6,6,2,1,682,997,24,26,6,6,0,1,706,997,26,26,6,6,5,1,732,997,21,26,6,6,6,1,753,997,20,26"
1411
id="emote_impatient"
1412
image="compiled-1.png"
1413
rect="407,991,438,1023"
1421
frame_info="6,6,6,1,0,0,20,26,6,4,3,1,20,0,23,28,6,3,2,1,43,0,24,29,6,2,1,1,67,0,25,30,6,3,1,1,92,0,25,29,6,4,1,1,117,0,25,28,6,5,1,1,142,0,25,27,6,3,1,1,167,0,25,29,6,3,1,1,192,0,25,29,6,4,1,1,217,0,25,28,6,5,1,1,242,0,25,27,6,4,2,1,267,0,24,28,6,3,3,1,291,0,23,29,6,4,6,1,314,0,20,28"
1424
id="emote_raisedfinger"
1425
image="compiled-2.png"
1434
frame_info="6,6,6,1,334,0,20,26,6,4,6,1,354,0,20,28,6,3,6,1,374,0,20,29,6,2,6,1,394,0,20,30,6,3,6,1,414,0,20,29,6,4,6,1,434,0,20,28,6,5,6,1,454,0,20,27,6,3,6,1,474,0,20,29,6,3,6,1,494,0,20,29,6,4,6,1,514,0,20,28,6,5,6,1,534,0,20,27,6,4,6,1,554,0,20,28,6,3,6,1,574,0,20,29,6,2,6,1,594,0,20,30,6,3,6,1,614,0,20,29,6,4,6,1,634,0,20,28"
1438
image="compiled-2.png"
1439
rect="328,-6,359,26"
1447
frame_info="6,6,6,1,0,60,20,26,6,5,6,1,20,60,20,27,6,4,6,1,40,60,20,28,6,3,6,1,60,60,20,29,6,4,6,1,80,60,20,28,6,5,6,1,100,60,20,27,6,6,6,1,120,60,20,26,6,7,6,1,140,60,20,25,6,6,6,1,160,60,20,26,6,5,6,1,180,60,20,27,6,6,6,1,200,60,20,26,6,5,6,1,220,60,20,27,6,5,6,1,240,60,20,27,6,5,6,1,260,60,20,27,6,6,6,1,280,60,20,26,6,6,6,1,300,60,20,26"
1451
image="compiled-2.png"
1459
on_enter_enter_crouch_anim="if((not tmp.shield),
1460
[if(invincible < 25, set(invincible, 25)),
1461
add_object(shield_obj), set(tmp.shield, shield_obj),
1462
schedule(50, set(tmp.shield, null()))]
1463
where shield_obj = object('frogatto_playable.shield', x+30, y+30, 1))"
1470
on_end_flash_anim="die()"
1471
on_end_normal_anim="die()"
1472
on_flash="[set(animation, 'flash'), set(time_in_animation, time_in_animation)]"
1473
on_process="if(cycle < 20, set(alpha, cycle*4), set(alpha, 80 - (cycle-20)*14))"
1478
image="characters/frogatto-spritesheet1.png"
1479
rect="286,439,317,471"
1486
image="characters/frogatto-spritesheet1.png"
1487
rect="321,439,352,471"
1495
set_length="def(len) [set(me.draw_area, [0, 0, len/2, 4]), set(me.tmp.length, len)]"
1505
image="characters/frogatto-tongue.png"
1512
on_calculate_position="[if(vars.swallowed, [add(vars.swallowed.x, x - last_x),
1513
add(vars.swallowed.y, y - last_y)]),
1514
set(last_x, x), set(last_y, y),
1515
if(collides_with_level(me),
1516
[fire_event('resolve_collide_level'),
1518
on_collide_object_grab="[if(collide_with_area = 'body' and (not vars.swallowed) and collide_with.vars.team != vars.team,
1520
if(collide_with.tags.swallowable and collide_with.consts.size <= consts.max_swallow_size,
1521
[remove_object(collide_with),
1522
set(attached_objects, [collide_with]),
1523
[set(collide_with.vars.removed_from_play, 1),sound('Slurp.wav')],
1524
set(vars.swallowed, collide_with), fire_event(collide_with, 'swallowed')],
1526
#object is not swallowable, so do damage to it instead#
1527
if(collide_with.get_hit_by, collide_with.get_hit_by(me))
1529
on_resolve_collide_level="if(collides_with_level(me) and tmp.tongue_shaft.tmp.length > 1,
1531
tmp.tongue_shaft.set_length(tmp.tongue_shaft.tmp.length-2),
1532
if(facing < 0, add(tmp.tongue_shaft.x, 2)),
1533
fire_event('resolve_collide_level')])"
1534
solid_dimensions="player,common,boss,thrown"
1545
tongue_shaft="null()"
1549
max_swallow_size="16"
1557
image="characters/frogatto-spritesheet1.png"
1558
rect="197,289,205,295"