~ubuntu-branches/ubuntu/utopic/frogatto-data/utopic

« back to all changes in this revision

Viewing changes to data/compiled/objects/ant_flying_platform_red.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2010-07-16 12:14:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100716121411-tobhfbyxrrz46dwz
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[prototype]
 
2
feet_width="4"
 
3
friction="1000"
 
4
hitpoints="5"
 
5
id="ant_flying_platform_red"
 
6
mass="3"
 
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=""
 
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)
 
15
                          ])"
 
16
on_collide="[if(animation in ['fly','turnFly'],
 
17
            [set(velocity_x, 0),
 
18
                 if(velocity_x*facing > 0, [animation('turnFly'), set(facing, -facing)],
 
19
                                                   animation('fly'))],
 
20
                                        animation('stand'))]"
 
21
on_collide_feet="if(animation in ['fly','turnFly'], animation('fly'),animation('stand'))"
 
22
on_collide_head=""
 
23
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', get_hit_by(collide_with, 'hurtLoseWings'))"
 
24
on_collide_object_thrown="[if(collide_with_area = 'body' and collide_with.vars.team != vars.team and vars.damage > 0,
 
25
                 [if(collide_with.get_hit_by, [collide_with.get_hit_by(me)]), die()])]"
 
26
on_create="[animation('fly'),set('traction_in_air',0)]"
 
27
on_die="[score(level,points_value), spawn_item(self), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
 
28
on_end_anim="if(animation in ['fly','turnFly'], animation('fly'),animation('stand'))"
 
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_stand_anim="[null(), fire_event('lose_wings'), set(type, consts.walking_type)]"
 
33
on_enter_thrown_anim="[[if((not tmp.cycle_thrown_anim), set(vars.damage, consts.thrown_damage), set(tmp.cycle_thrown_anim, 0))], fire_event('lose_wings'), set(type, consts.walking_type)]"
 
34
on_enter_walk_anim="[if(not is_standing, animation('stand')), fire_event('lose_wings'), set(type, consts.walking_type)]"
 
35
on_enter_water="die()"
 
36
on_hurtflicker="if(green = 100,[set(green, 255), set(blue, 255)],[set(green, 100), set(blue, 100)])"
 
37
on_jumped_on="[if(jumped_on_by.mass >= 20, die())]"
 
38
on_leave_hurtLoseWings_anim="[set(green, 255), set(blue, 255), fire_event('lose_wings'), set(type, consts.walking_type)]"
 
39
on_leave_hurt_anim="[set(green, 255), set(blue, 255)]"
 
40
on_leave_on_back_anim="set(brightness, 256)"
 
41
on_leave_thrown_anim="[set(solid_dimensions_in, consts.solid_dimensions), set(vars.team, 'evil'), set(vars.damage, consts.normal_damage)]"
 
42
on_process_fly="[if(abs(y - vars.desired_height) > 10, set(velocity_y, (600*if(vars.desired_height < y, -1, 1))), set(velocity_y, 0)),
 
43
        
 
44
        if(solid(level, front + facing*50, y, 1, y2 - y) or (facing < 0 and x < vars.x_bound) or (facing > 0 and x2 > vars.x2_bound),
 
45
        [facing(-facing), animation('turnFly')])]"
 
46
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))])"
 
47
on_process_stand="if(is_standing, animation('walk'))"
 
48
on_stomped_on="[add(hitpoints, -3), set(green, 0), set(blue, 0),
 
49
                        schedule(4, [set(green, 255), set(blue, 255)])]"
 
50
on_surface_damage="die()"
 
51
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())])"
 
52
solid_area="2,7,23,25"
 
53
solid_dimensions="enemy,common"
 
54
tags="swallowable"
 
55
timer_frequency="5"
 
56
traction="1000"
 
57
traction_in_air="1000"
 
58
        [properties]
 
59
        get_hit_by="def(collide_with) execute(me,
 
60
                     if(not (me in collide_with.tmp.already_hit), [
 
61
                                set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
 
62
                                if((not is_invincible_posthit) and (collide_with.vars.damage > 0),
 
63
                                        if(collide_with.vars.damage > consts.armor,
 
64
                                          [
 
65
                                           if(me.hitpoints > collide_with.vars.damage,
 
66
                                                [
 
67
                                                  if(collide_with.vars.damage <= consts.flinch_threshold,
 
68
                                                        schedule(4, [set(me.green, 255), set(me.blue, 255)]),
 
69
                                                        set(me.animation, 'hurt')),
 
70
                                                  set(me.green, 100), set(me.blue, 100)
 
71
                                                ]),
 
72
                                           set(me.hitpoints, me.hitpoints - collide_with.vars.damage),
 
73
                                           set(tmp.time_last_hit, me.cycle)
 
74
                                          ])),
 
75
                                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))),
 
76
                                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)))]))"
 
77
        hurt_velocity_x="400"
 
78
        hurt_velocity_y="-800"
 
79
        is_invincible_posthit="if(tmp.time_last_hit and (abs(tmp.time_last_hit - me.cycle) < consts.posthit_invicibility_period), 1, 0)"
 
80
        [/properties]
 
81
 
 
82
        [tmp]
 
83
        cycle_thrown_anim="0"
 
84
        on_back_count="0"
 
85
        time_last_hit="0"
 
86
        [/tmp]
 
87
 
 
88
        [vars]
 
89
        damage="1"
 
90
        points_value="5"
 
91
        team="'evil'"
 
92
        turns_at_cliffs="1"
 
93
        [/vars]
 
94
 
 
95
        [consts]
 
96
        CYCLE_THROWN_ANIM="0"
 
97
        DISTANCE_TO_CLIFF_CHECK="30"
 
98
        bounce_roundness="70"
 
99
        normal_damage="1"
 
100
        solid_dimensions="['enemy', 'common']"
 
101
        spring_amount="1200"
 
102
        springiness="0"
 
103
        thrown_damage="5"
 
104
        walking_type="'ant_platform_red'"
 
105
        [/consts]
 
106
 
 
107
        [animation]
 
108
        accel_x="10"
 
109
        accel_y="0"
 
110
        body_area="all"
 
111
        duplicates="6"
 
112
        duration="6"
 
113
        frame_info="1,7,1,3,651,746,23,18,1,7,1,3,674,746,23,18,1,7,1,3,697,746,23,18,3,7,1,1,720,746,21,20"
 
114
        frames="4"
 
115
        id="fly"
 
116
        image="compiled-0.png"
 
117
        rect="650,739,674,766"
 
118
        reverse="yes"
 
119
        rotate_on_slope="yes"
 
120
        [/animation]
 
121
 
 
122
        [animation]
 
123
        accel_x="10"
 
124
        accel_y="0"
 
125
        body_area="all"
 
126
        duration="6"
 
127
        frame_info="1,7,1,3,561,746,23,18,1,7,1,3,584,746,23,18,1,7,1,3,607,746,23,18,3,7,1,1,630,746,21,20"
 
128
        frames="4"
 
129
        id="fly"
 
130
        image="compiled-0.png"
 
131
        rect="560,739,584,766"
 
132
        reverse="yes"
 
133
        rotate_on_slope="yes"
 
134
        [/animation]
 
135
 
 
136
        [animation]
 
137
        accel_x="0"
 
138
        accel_y="0"
 
139
        body_area="all"
 
140
        duration="4"
 
141
        frame_info="0,7,3,3,638,389,22,18,3,7,3,3,660,389,19,18"
 
142
        frames="2"
 
143
        frames_per_row="1"
 
144
        id="turnFly"
 
145
        image="compiled-2.png"
 
146
        rect="638,382,662,409"
 
147
        rotate_on_slope="yes"
 
148
        [/animation]
 
149
 
 
150
        [animation]
 
151
        accel_x="0"
 
152
        accel_y="40"
 
153
        body_area="all"
 
154
        duration="6"
 
155
        events="6:12:18:hurtflicker"
 
156
        frame_info="6,6,2,2,842,746,17,20,0,6,2,2,859,746,23,20,0,6,2,2,882,746,23,20"
 
157
        frames="3"
 
158
        id="hurtLoseWings"
 
159
        image="compiled-0.png"
 
160
        rect="836,740,860,767"
 
161
        rotate_on_slope="yes"
 
162
        [/animation]
 
163
 
 
164
        [animation]
 
165
        accel_x="0"
 
166
        accel_y="80"
 
167
        attack_area="15,18,26,26"
 
168
        body_area="all"
 
169
        duration="6"
 
170
        frame_info="5,7,2,2,572,369,18,19"
 
171
        frames="1"
 
172
        id="stand"
 
173
        image="compiled-2.png"
 
174
        rect="567,362,591,389"
 
175
        rotate_on_slope="yes"
 
176
        [/animation]
 
177
 
 
178
        [animation]
 
179
        accel_x="0"
 
180
        accel_y="80"
 
181
        body_area="none"
 
182
        duration="60"
 
183
        frame_info="4,9,3,1,740,389,18,18"
 
184
        frames="1"
 
185
        id="thrown"
 
186
        image="compiled-2.png"
 
187
        rect="736,380,760,407"
 
188
        rotate_on_slope="yes"
 
189
        thrown_area="0,0,31,36"
 
190
        [/animation]
 
191
 
 
192
        [animation]
 
193
        accel_x="0"
 
194
        accel_y="80"
 
195
        body_area="all"
 
196
        duration="5"
 
197
        frame_info="4,9,3,1,740,389,18,18"
 
198
        frames="1"
 
199
        id="on_back"
 
200
        image="compiled-2.png"
 
201
        rect="736,380,760,407"
 
202
        rotate_on_slope="yes"
 
203
        [/animation]
 
204
 
 
205
        [animation]
 
206
        accel_x="300"
 
207
        accel_y="80"
 
208
        attack_area="15,18,26,26"
 
209
        body_area="all"
 
210
        duration="6"
 
211
        frame_info="5,7,2,2,590,369,18,19,5,8,2,2,608,369,18,18,5,7,2,2,626,369,18,19"
 
212
        frames="3"
 
213
        id="walk"
 
214
        image="compiled-2.png"
 
215
        rect="585,362,609,389"
 
216
        rotate_on_slope="yes"
 
217
        [/animation]
 
218
 
 
219
        [animation]
 
220
        accel_x="300"
 
221
        accel_y="80"
 
222
        attack_area="15,18,26,26"
 
223
        body_area="all"
 
224
        duplicates="6"
 
225
        duration="6"
 
226
        frame_info="5,7,2,2,665,369,18,19,5,8,2,2,683,369,18,18,5,7,2,2,701,369,18,19"
 
227
        frames="3"
 
228
        id="walk"
 
229
        image="compiled-2.png"
 
230
        rect="660,362,684,389"
 
231
        rotate_on_slope="yes"
 
232
        [/animation]
 
233
 
 
234
        [animation]
 
235
        accel_x="0"
 
236
        accel_y="80"
 
237
        body_area="all"
 
238
        duration="4"
 
239
        frame_info="4,9,2,2,399,425,19,17"
 
240
        frames="1"
 
241
        id="spring"
 
242
        image="compiled-2.png"
 
243
        rect="395,416,419,443"
 
244
        rotate_on_slope="yes"
 
245
        [/animation]
 
246
 
 
247
        [animation]
 
248
        accel_x="0"
 
249
        accel_y="80"
 
250
        attack_area="0,18,26,26"
 
251
        body_area="all"
 
252
        duration="4"
 
253
        frame_info="4,8,5,2,758,389,16,18,4,8,4,2,774,389,17,18,5,8,4,2,791,389,16,18"
 
254
        frames="3"
 
255
        id="turn"
 
256
        image="compiled-2.png"
 
257
        rect="754,381,778,408"
 
258
        rotate_on_slope="yes"
 
259
        [/animation]
 
260
 
 
261
        [animation]
 
262
        accel_x="0"
 
263
        accel_y="80"
 
264
        body_area="all"
 
265
        duration="18"
 
266
        events="6:12:18:hurtflicker"
 
267
        frame_info="5,7,3,1,1007,129,17,20"
 
268
        frames="1"
 
269
        id="hurt"
 
270
        image="compiled-1.png"
 
271
        rect="1002,122,1026,149"
 
272
        rotate_on_slope="yes"
 
273
        [/animation]
 
274
 
 
275
[/prototype]
 
276