name	 	Rattler
health		300
type		enemy
nomove		1 1
nodrop		2
nopain		1
nodieblink	2
death		1
antigravity	100
animationscript	data/chars/cobras/jetsc.c
takedamagescript data/scripts/blink.c

load		JetBullet
load		RatMissile

palette		data/chars/cobras/rattler.png
alternatepal	data/chars/cobras/ratblink.png


anim spawn
	delay	10
	offset	125 50
	frame	data/chars/cobras/rattler.png
	delay	180
	@cmd	dasher 2.5 0 0 0
	frame	data/chars/cobras/rattler.png
	delay	10
	@cmd	dasher 0 0 0 0
	frame	data/chars/cobras/rattler.png

anim idle
	loop    1
	delay	10
	offset	125 50
	bbox	16 29 204 22
	attack	16 29 204 22 50 0 0 0 10
	frame	data/chars/cobras/rattler2.png
	@cmd	attack0 "ANI_FOLLOW1"
	frame	data/chars/cobras/rattler2.png

anim follow1
	delay	1
	offset	125 50
	bbox	16 29 204 22
	attack	16 29 204 22 50 0 0 0 10
	frame	data/chars/cobras/rattler2.png
	delay	30
	@cmd	target 4 4 0 5 1 0
	@cmd	dash 0 1
	frame	data/chars/cobras/rattler2.png
	@cmd	target 4 4 0 5 1 0
	@cmd	dash 0 1
	frame	data/chars/cobras/rattler2.png
	@cmd	target 4 4 0 5 1 0
	@cmd	dash 0 1
	frame	data/chars/cobras/rattler2.png
	delay	10
	@cmd	target 4 4 0 5 1 0
	@cmd	dash 0 1
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" -16 25 -2 0
	frame	data/chars/cobras/rattler2.png
	@cmd	shooter2 "JetBullet" -16 25 -2 0
	frame	data/chars/cobras/rattler2.png
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" -16 25 -2 0
	frame	data/chars/cobras/rattler2.png
	attack	0
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" -16 25 -2 0
	frame	data/chars/cobras/rattler2.png
	delay	30
	attack	16 29 204 22 50 0 0 0 10
	@cmd	target 4 4 0 5 1 0
	@cmd	dash 0 1
	frame	data/chars/cobras/rattler2.png
	delay	10
	@cmd	looper 0 5
	frame	data/chars/cobras/rattler2.png
	delay	20
	@cmd	dasher 0 0 0 0
	frame	data/chars/cobras/rattler.png
	delay	100
	@cmd	shooter2 "RatMissile" 0 0 2 0
	frame	data/chars/cobras/rattler3.png
	@cmd	shooter2 "RatMissile" 0 0 2 0
	frame	data/chars/cobras/rattler3.png
	delay	130
	@cmd	dasher 2.5 0 0 0
	frame	data/chars/cobras/rattler3.png
	delay	200
	bbox	0
	attack	0
	@cmd	dasher 0 0 0 0
	frame	data/chars/cobras/rattler.png
	delay	10
	@cmd	anichange "ANI_FOLLOW2"
	frame	data/chars/cobras/rattler.png

anim follow2
	delay	1
	offset	125 50
	frame	data/chars/cobras/rattler.png
	delay	100
	@cmd	flip
	@cmd	shooter2 "RatMissile" 0 0 2 0
	frame	data/chars/cobras/rattler.png
	delay	200
	@cmd	shooter2 "RatMissile" 0 0 2 0
	frame	data/chars/cobras/rattler.png
	delay	30
	@cmd	teletarget 0 10
	@cmd	dasher -4.5 0 0 0
	bbox	16 29 204 22
	attack	16 29 204 22 50 0 0 0 10
	frame	data/chars/cobras/rattler.png
	delay	10
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" 112 2 3 0
	frame	data/chars/cobras/rattler.png
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" 112 2 3 0
	frame	data/chars/cobras/rattler.png
	delay	150
sound data/sounds/RatGun.wav
	@cmd	shooter2 "JetBullet" 112 2 3 0
	frame	data/chars/cobras/rattler.png
	delay	200
	bbox	0
	attack	0
	@cmd	dasher 0 0 0 0
	frame	data/chars/cobras/rattler.png
	delay	230
	@cmd	flip
	@cmd	dasher 2.5 0 0 0
	bbox	16 29 204 22
	attack	16 29 204 22 50 0 0 0 10
	frame	data/chars/cobras/rattler.png
	attack	0
	delay	10
	@cmd	dasher 0 0 0 0
	frame	data/chars/cobras/rattler.png
	@cmd	anichange "ANI_FOLLOW1"
	frame	data/chars/cobras/rattler.png


anim death
	delay	1
	offset	125 50
	frame	data/chars/cobras/rattler.png
	delay	10
	@cmd	dasher -2 -1 0 0
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	spawn01 "Asap" 30 9 1
	@cmd	spawn01 "Asap" 90 9 1
	@cmd	spawn01 "Asap" -30 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" -60 9 1
	@cmd	spawn01 "Asap" 0 9 1
	@cmd	spawn01 "Asap" -120 9 1
	frame	data/chars/cobras/rattler.png
	@cmd	spawn01 "Asap" 60 9 1
	@cmd	spawn01 "Asap" -90 9 1
	frame	data/chars/cobras/rattler.png #
	@cmd	suicide
	frame	data/chars/cobras/rattler.png
