File: bat.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 (129 lines) | stat: -rw-r--r-- 3,092 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
[object_type]
id="bat"
on_become_active="if(vars.bat, if(vars.bat.hitpoints <= 0, die(), fire_event(vars.bat, 'restore')))"
on_child_spawned="[
	  set(child.vars.zone_x1, vars.zone_x1),
	  set(child.vars.zone_x2, vars.zone_x2),
	  set(child.vars.zone_y1, vars.zone_y1),
	  set(child.vars.zone_y2, vars.zone_y2),
	  set(vars.bat, child)
	 ]"
on_create="[set(alpha, 0), spawn('bat.instance', midpoint_x, midpoint_y, facing)]"
	[vars]
	bat="null()"
	damage="1"
	team="'evil'"
	[/vars]

	[animation]
	duration="1000000"
	frame_info="1,1,1,3,1007,226,16,24"
	frames="1"
	id="hang"
	image="compiled-2.png"
	rect="1006,225,1023,252"
	[/animation]

	[object_type]
	hitpoints="1"
	id="instance"
	on_collide_object_thrown="[if(collide_with_area = 'body' and collide_with.vars.team != vars.team,
		 [if(collide_with.get_hit_by, [collide_with.get_hit_by(me)]), die()])]"
	on_create="[set(vars.start_x, x), set(vars.start_y, y)]"
	on_die="[score(level, 10), spawn_item(self), spawn('die_cloud', midpoint_x, midpoint_y, facing)]"
	on_end_alert_anim="[set(velocity_y, 200), set(accel_y, -2), animation('fly')]"
	on_end_fly_anim="animation('fly')"
	on_end_hang_anim="if(level.player.midpoint_x > vars.zone_x1 and level.player.midpoint_x < vars.zone_x2 and level.player.midpoint_y > vars.zone_y1 and level.player.midpoint_y < vars.zone_y2, [set(animation, 'alert'), set(vars.flying, 1)], set(animation, 'hang'))"
	on_end_hurt_anim="[set(velocity_y, 200), set(accel_y, -2), animation('fly')]"
	on_enter_thrown_anim="[set(vars.damage, consts.thrown_damage)]"
	on_leave_thrown_anim="[set(vars.damage, consts.normal_damage)]"
	on_restore="if(animation = 'thrown', set(hitpoints, 0), [if(vars.flying and (not active), [set(vars.flying, 0), animation('hang'), set(x, vars.start_x), set(y, vars.start_y)])])"
	prototype="hittable"
	tags="swallowable"
	traction_in_air="1000"
	zorder="20"
		[vars]
		damage="1"
		flying="0"
		start_x="0"
		start_y="0"
		team="'evil'"
		zone_x1="0"
		zone_x2="0"
		zone_y1="0"
		zone_y2="0"
		[/vars]

		[consts]
		normal_damage="1"
		thrown_damage="5"
		[/consts]

		[animation]
		accel_x="0"
		accel_y="0"
		body_area="all"
		duration="10"
		frames="2"
		frames_per_row="2"
		id="hang"
		image="enemies/bat.png"
		pad="3"
		rect="1,1,18,28"
		velocity_x="0"
		velocity_y="0"
		[/animation]

		[animation]
		body_area="all"
		duration="20"
		frames="1"
		frames_per_row="1"
		id="alert"
		image="enemies/bat.png"
		pad="0"
		rect="43,1,60,28"
		[/animation]

		[animation]
		accel_x="-10"
		attack_area="all"
		body_area="all"
		duration="8"
		frames="4"
		frames_per_row="4"
		id="fly"
		image="enemies/bat.png"
		pad="3"
		rect="1,32,26,70"
		reverse="no"
		[/animation]

		[animation]
		body_area="all"
		duration="10"
		frames="1"
		frames_per_row="1"
		id="hurt"
		image="enemies/bat.png"
		pad="0"
		rect="120,32,145,70"
		[/animation]

		[animation]
		accel_y="70"
		body_area="none"
		duration="30"
		frames="1"
		frames_per_row="1"
		id="thrown"
		image="enemies/bat.png"
		pad="0"
		rect="120,32,145,70"
		thrown_area="all"
		[/animation]

	[/object_type]

[/object_type]