7
on_add_object_fail="[if(collide_with.vars.team != vars.team and collide_with.get_hit_by, collide_with.get_hit_by(me)), die()]"
8
on_bounced_on="[if(animation = 'on_back', die(), animation('spring'))]"
9
on_change_animation_failure="[die()]"
10
on_change_solid_dimensions_fail="if(tmp.in_change_dimensions_fail or (not collide_with), die(),
11
[set(tmp.in_change_dimensions_fail, 1),
12
fire_event(collide_with, 'blocking_thrown_object'),
13
set(solid_dimensions_in, consts.solid_dimensions),
14
set(tmp.in_change_dimensions_fail, 0)
16
on_collide="if(animation in ['thrown', 'on_back'], set(velocity_x, -velocity_x/2), if(not (animation in ['hurt']), [set(facing, -facing),animation('turn'),set(velocity_x,0)]))"
17
on_collide_feet="[if(animation in ['thrown', 'on_back'] and collide_with and collide_with.get_hit_by and collide_with.vars.team != vars.team and vars.damage > 0, [collide_with.get_hit_by(me), die()]),
18
if(animation = 'thrown' and velocity_y + abs(velocity_x) > 600,
19
[set(velocity_y, -(velocity_y*3)/5 - (velocity_x*slope_standing_on)/90), set(velocity_x, (velocity_x*4)/5 + (velocity_y*slope_standing_on)/90)], if(animation = 'thrown', [set(tmp.on_back_count, 0), animation('on_back')], if(animation != 'on_back', animation('walk'))))]"
20
on_collide_head="set(velocity_y, -velocity_y/2)"
21
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', get_hit_by(collide_with))"
22
on_collide_object_thrown="[if(collide_with_area = 'body' and collide_with.vars.team != vars.team and vars.damage > 0,
23
[if(collide_with.get_hit_by, [collide_with.get_hit_by(me)]), die()])]"
24
on_die="[score(level,points_value), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
25
on_end_anim="if(animation in ['on_back', 'thrown'], [set(tmp.on_back_count, tmp.on_back_count+1), if(tmp.on_back_count > 10, [animation('walk'), set(tmp.on_back_count, 0)],
26
if(CYCLE_THROWN_ANIM and (not is_standing), [set(tmp.cycle_thrown_anim, 1), animation('thrown')],
28
)], animation('walk'))"
29
on_end_hurt_anim="animation('walk')"
30
on_end_turn_anim="animation('walk')"
31
on_enter_anim="set(tmp.already_hit, [])"
32
on_enter_thrown_anim="[if((not tmp.cycle_thrown_anim), set(vars.damage, consts.thrown_damage), set(tmp.cycle_thrown_anim, 0))]"
33
on_enter_walk_anim="if(not is_standing, animation('stand'))"
34
on_enter_water="die()"
35
on_hurtflicker="if(green = 100,[set(green, 255), set(blue, 255)],[set(green, 100), set(blue, 100)])"
36
on_jumped_on="[if(jumped_on_by.mass >= 20, die())]"
37
on_leave_hurt_anim="[set(green, 255), set(blue, 255)]"
38
on_leave_on_back_anim="set(brightness, 256)"
39
on_leave_thrown_anim="[set(solid_dimensions_in, consts.solid_dimensions), set(vars.team, 'evil'), set(vars.damage, consts.normal_damage)]"
40
on_process_on_back="if(tmp.on_back_count > 8, [if(tmp.on_back_count > 10 and time_in_animation > 7, set(velocity_y, velocity_y-300)), set(brightness, if(cycle%6 > 2, 256, 512))])"
41
on_process_stand="if(is_standing, animation('walk'))"
42
on_stomped_on="[add(hitpoints, -3), set(green, 0), set(blue, 0),
43
schedule(4, [set(green, 255), set(blue, 255)])]"
44
on_surface_damage="die()"
45
on_timer="if(not (animation in ['thrown', 'on_back']), [set(rotate, slope_standing_on), if(turns_at_cliffs and is_standing and animation = 'walk' and distance_to_cliff < DISTANCE_TO_CLIFF_CHECK,[set(facing, -facing),animation('turn')],null())])"
46
solid_area="2,9,22,25"
47
solid_dimensions="enemy,common"
52
get_hit_by="def(collide_with) execute(me,
53
if(not (me in collide_with.tmp.already_hit), [
54
set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
55
if((not is_invincible_posthit) and (collide_with.vars.damage > 0),
56
if(collide_with.vars.damage > consts.armor,
58
if(me.hitpoints > collide_with.vars.damage,
60
if(collide_with.vars.damage <= consts.flinch_threshold,
61
schedule(4, [set(me.green, 255), set(me.blue, 255)]),
62
set(me.animation, 'hurt')),
63
set(me.green, 100), set(me.blue, 100)
65
set(me.hitpoints, me.hitpoints - collide_with.vars.damage),
66
set(tmp.time_last_hit, me.cycle)
68
if(collide_with.vars.damage > consts.flinch_threshold and me.hurt_velocity_y and (not collide_with.tmp.no_flinch_attack), set(me.velocity_y,(me.hurt_velocity_y))),
69
if(collide_with.vars.damage > consts.flinch_threshold and me.hurt_velocity_x and (not collide_with.tmp.no_flinch_attack), set(me.velocity_x, ((me.hurt_velocity_x * collide_with.facing + collide_with.velocity_x/2)*collide_with.mass*if(collide_with.attack_force, collide_with.attack_force, 100))/(me.mass*100)))]))"
71
hurt_velocity_y="-800"
72
is_invincible_posthit="if(tmp.time_last_hit and (abs(tmp.time_last_hit - me.cycle) < consts.posthit_invicibility_period), 1, 0)"
90
DISTANCE_TO_CLIFF_CHECK="30"
93
solid_dimensions="['enemy', 'common']"
102
attack_area="15,18,26,26"
105
frame_info="2,8,2,2,948,389,21,18"
108
image="compiled-2.png"
109
rect="946,381,970,408"
110
rotate_on_slope="yes"
118
frame_info="2,8,2,2,969,389,21,18"
121
image="compiled-2.png"
122
rect="967,381,991,408"
123
rotate_on_slope="yes"
124
thrown_area="0,0,31,36"
132
frame_info="2,8,2,2,80,407,21,18,2,8,2,2,101,407,21,18"
135
image="compiled-2.png"
136
rect="78,399,102,426"
137
rotate_on_slope="yes"
143
attack_area="15,18,26,26"
146
frame_info="2,8,2,2,232,407,21,18,2,9,2,2,253,407,21,17,2,8,2,2,274,407,21,18"
149
image="compiled-2.png"
150
rect="230,399,254,426"
151
rotate_on_slope="yes"
157
attack_area="15,18,26,26"
161
frame_info="2,8,2,2,295,407,21,18,2,9,2,2,316,407,21,17,2,8,2,2,337,407,21,18"
164
image="compiled-2.png"
165
rect="293,399,317,426"
166
rotate_on_slope="yes"
174
frame_info="1,13,1,2,545,458,23,13"
177
image="compiled-2.png"
178
rect="544,445,568,472"
179
rotate_on_slope="yes"
185
attack_area="0,18,26,26"
188
frame_info="3,9,2,2,342,425,20,17,4,9,4,2,362,425,17,17,2,9,3,2,379,425,20,17"
191
image="compiled-2.png"
192
rect="339,416,363,443"
193
rotate_on_slope="yes"
201
events="6:12:18:hurtflicker"
202
frame_info="2,8,3,1,755,369,20,19"
205
image="compiled-2.png"
206
rect="753,361,777,388"
207
rotate_on_slope="yes"