File: kitty_robot.cfg

package info (click to toggle)
frogatto-data 1.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 155,116 kB
  • sloc: makefile: 1
file content (171 lines) | stat: -rw-r--r-- 6,284 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
[prototype]
friction="200"
hitpoints="20"
id="kitty_robot"
mass="30"
on_child_spawned="if((not vars.my_driver), [remove_object(child), set(attached_objects, [child]), set(vars.my_driver, child)])"
on_collide="if(collide_with, [if(collide_with.get_hit_by, collide_with.get_hit_by(me)), elastic_collision(me, collide_with)], [if((velocity_x > 0) = (facing > 0), [animation('turn'), set(facing, -facing)]), set(velocity_x, 0)])"
on_collide_feet="[animation('land'),if(standing_on, [fire_event(standing_on, 'bounced_on', mapping('xxx', 5)), if(standing_on.get_hit_by, standing_on.get_hit_by(me))]), shake_screen(0,100,0,-100)]"
on_collide_object_body="if(collide_with.vars.team != vars.team and collide_with_area = 'attack', get_hit_by(collide_with))"
on_create="[spawn('kitty_pilot', midpoint_x, midpoint_y, facing), set(level.gui.vars.bosses, level.gui.vars.bosses + [me])]"
on_die="[score(level,vars.points_value), spawn('explosion_big_recurring',  midpoint_x, midpoint_y, facing), spawn('dying_robot_leg_fragment1', midpoint_x, midpoint_y, facing), spawn('dying_robot_leg_fragment2', midpoint_x, midpoint_y, facing), spawn('dying_robot_main_fragment', midpoint_x, midpoint_y, facing)]"
on_end_anim="if(animation = 'prepare_jump', [animation('jump'),set(velocity_y,-1000)],
if(animation = 'jump' and (not is_standing), animation('jump'),
if(in_attack_range and (not too_close),
  if(level.player.y2 < y and is_standing, [animation('prepare_jump')],
  if((level.player.midpoint_x > midpoint_x) != (facing > 0),
	  [animation('turn'), set(facing, -facing)],
      [set('accel_x', 0), animation('normal'), fire_missile])),

  if(facing < 0 and x < vars.move_x1 or facing > 0 and x2 > vars.move_x2, [animation('turn'), set(facing, -facing)], animation('walk')))))"
on_hurtflicker="if(green = 100,[set(green, 255), set(blue, 255)],[set(green, 100), set(blue, 100)])"
on_leave_hurt_anim="[set(green, 255), set(blue, 255)]"
on_process="[set(vars.my_driver.midpoint_x, midpoint_x + facing*10), set(vars.my_driver.midpoint_y, midpoint_y-40), set(vars.my_driver.facing, facing)]"
solid_area="14,0,44,40"
solid_dimensions="boss"
	[properties]
	get_hit_by="def(collide_with) execute(me,
	             if(not (me in collide_with.tmp.already_hit), [
				set(collide_with.tmp, 'already_hit', collide_with.tmp.already_hit + [me]),
				if((not is_invincible_posthit) and (collide_with.vars.damage > 0),
					if(collide_with.vars.damage > consts.armor,
					  [
					   if(me.hitpoints > collide_with.vars.damage,
						[
						  if(collide_with.vars.damage <= consts.flinch_threshold,
							schedule(4, [set(me.green, 255), set(me.blue, 255)]),
							set(me.animation, 'hurt')),
						  set(me.green, 100), set(me.blue, 100)
						]),
					   set(me.hitpoints, me.hitpoints - collide_with.vars.damage),
					   set(tmp.time_last_hit, me.cycle)
					  ])),
				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))),
				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)))]))"
	hurt_velocity_x="400"
	hurt_velocity_y="-800"
	is_invincible_posthit="if(tmp.time_last_hit and (abs(tmp.time_last_hit - me.cycle) < consts.posthit_invicibility_period), 1, 0)"
	[/properties]

	[tmp]
	time_last_hit="0"
	[/tmp]

	[animation]
	accel_x="0"
	accel_y="30"
	body_area="all"
	duration="6"
	frame_info="4,0,0,0,263,562,42,41"
	frames="1"
	id="normal"
	image="compiled-1.png"
	rect="259,562,304,602"
	[/animation]

	[animation]
	accel_x="0"
	accel_y="30"
	body_area="all"
	duration="6"
	frame_info="4,0,0,0,263,562,42,41"
	frames="1"
	id="hurt"
	image="compiled-1.png"
	rect="259,562,304,602"
	[/animation]

	[animation]
	accel_x="0"
	accel_y="10"
	body_area="all"
	duration="6"
	frame_info="6,1,2,0,139,604,40,40,4,1,4,0,179,604,40,40,2,1,6,0,219,604,40,40"
	frames="3"
	id="turn"
	image="compiled-1.png"
	rect="133,603,180,643"
	[/animation]

	[animation]
	accel_x="200"
	accel_y="30"
	body_area="all"
	duration="6"
	frame_info="0,0,0,0,431,562,46,41,3,1,0,0,477,562,43,40"
	frames="2"
	id="walk"
	image="compiled-1.png"
	rect="431,562,476,602"
	[/animation]

	[animation]
	accel_x="0"
	accel_y="30"
	body_area="all"
	duration="3"
	frame_info="4,0,0,0,305,562,42,41,4,1,0,0,347,562,42,40,4,5,0,0,389,562,42,36"
	frames="3"
	id="prepare_jump"
	image="compiled-1.png"
	rect="301,562,346,602"
	reverse="yes"
	[/animation]

	[animation]
	accel_x="0"
	accel_y="30"
	body_area="all"
	duration="2"
	frame_info="4,0,0,0,305,562,42,41,4,1,0,0,347,562,42,40,4,5,0,0,389,562,42,36"
	frames="3"
	id="land"
	image="compiled-1.png"
	rect="301,562,346,602"
	reverse="yes"
	sound="thump.wav"
	[/animation]

	[animation]
	accel_x="0"
	accel_y="30"
	body_area="all"
	duration="10"
	frame_info="4,0,0,0,910,423,42,46"
	frames="1"
	id="jump"
	image="compiled-1.png"
	rect="906,423,951,468"
	[/animation]

	[properties]
	fire_missile="if(vars.missile_load_count < consts.missile_load_time, set(vars.missile_load_count, vars.missile_load_count+1), [spawn('missile', midpoint_x + facing*90, midpoint_y-14, facing,
	           [set(velocity_x, 800*facing)]), spawn('explosion_spark', midpoint_x+ facing*50, midpoint_y -14, facing),sound('cannon.ogg'), set(vars.missile_load_count, 0), 
	           		schedule(4, [spawn('missile', midpoint_x + facing*20, midpoint_y-14, facing,
	           [set(velocity_x, 800*facing)]), spawn('explosion_spark', midpoint_x+ facing*1, midpoint_y -14, facing),sound('cannon.ogg')])])"
	hurt_velocity_y="-20"
	in_attack_range="abs(level.player.midpoint_x - midpoint_x) < consts.attack_range and
	  abs(level.player.midpoint_y - midpoint_y) < consts.vertical_attack_range"
	too_close="abs(level.player.midpoint_x - midpoint_x) < consts.too_close_range"
	[/properties]

	[consts]
	armor="2"
	attack_range="500"
	missile_load_time="12"
	too_close_range="200"
	vertical_attack_range="200"
	[/consts]

	[vars]
	damage="1"
	missile_load_count="0"
	move_x1="0"
	move_x2="0"
	my_driver="0"
	points_value="100"
	team="'evil'"
	[/vars]

[/prototype]