
	[object_type]
	id=spitting_flower
	prototype=stationary_vulnerable
	hitpoints=4
	zorder=0
	
	[editor_info]
	category=plants
		[var]
		name=loading_time
		value="3"
		[/var]
	[/editor_info]

	[vars]
		load=0
		team="'evil'"
		points_value="50"
		damage=1
	[/vars]
	
	
	on_end_normal_anim="if(vars.load >= vars.loading_time,
					     [animation('fire'), set_var('load', 0)],
						 [animation('normal'), set_var('load', vars.load + 1)])"
	on_end_spring_anim="animation('normal')"
	on_end_fire_anim="animation('normal')"
	on_end_dying_anim="animation('dead')"
	on_end_dead_anim="animation('respawn')"
	on_end_respawn_anim="animation('normal')"

	on_shoot="[spawn('pollen_ball_weightless', midpoint_x+ facing*50, midpoint_y -15, facing, set(velocity_x,800*facing)),sound('FlowerShot.ogg')]"
	on_die="[spawn('die_cloud', midpoint_x, midpoint_y, facing), set(hitpoints, max_hitpoints), animation('dying')]"

	solid_area=12,6,24,30

		[base:animation]
		image=enemies/spittingflower.png
		pad=3
		accel_y=80
		body_area=all
		[/animation]
		
		[animation]
		id=normal
		rect=1,1,43,37
		frames=3
		pad=3
		duration=5
		duplicates=5
		reverse=yes
		[/animation]
			
		[animation]
		id=normal
		rect=140,1,182,37
		frames=3
		pad=3
		duration=5
		reverse=yes
		[/animation]
		
		#the spring animation is a duplicate of the normal animation,
		#unless/until we have a proper one.
		[animation]
		id=spring
		rect=1,1,43,37
		frames=3
		frames_per_row=1
		reverse=yes
		duration=5
		[/animation]

		[animation]
		id=fire
		rect=1,161,43,197
		pad=3
		frames=6
		duration=4
		events="20:shoot"
		[/animation]

		[animation]
		id=hurt
		rect=1,121,43,157
		pad=3
		frames=7
		duration=4
		[/animation]

		[animation]
		id=dying
		rect=1,201,43,237
		pad=3
		frames=3
		duration=8
		body_area=none
		[/animation]

		[animation]
		id=dead
		rect=139,201,181,237
		frames=1
		duration=300
		body_area=none
		[/animation]

		[animation]
		id=respawn
		rect=1,41,43,77
		pad=3
		frames=7
		duration=6
		body_area=none
		[/animation]

	[/object_type]
