name		Ravenwing
health		60
type		enemy
hostile		obstacle
nomove		1 1
nodrop		2
nopain		1
death		1
antigravity	100
offscreenkill	13000
subject_to_platform 0

animationscript	 data/chars/cobras/jetsc.c
takedamagescript data/scripts/blink.c


palette		data/chars/cobraboat/ravenwing.png
alternatepal	data/chars/cobraboat/ravenblink.png

load		CBomb

			
anim	spawn
@script
  if(frame==1){
     void self = getlocalvar("self");
     changeentityproperty(self, "name", "Night_Raven");
  }
@end_script
	delay	5
	offset	65 30
	frame	data/chars/cobraboat/ravenwing.png
	delay	100
	bbox	7 17 130 22
        attack	7 17 130 22 200 0 0 1
	@cmd	dasher 0 1 0 1
	frame	data/chars/cobraboat/ravenwing.png

anim	idle
@script
	void self = getlocalvar("self");
	int  x = getentityproperty(self, "x");
	int  Width = openborvariant("levelwidth");

	if( x < -200){
          changeentityproperty(self, "direction", 1);
          changeentityproperty(self, "velocity", 1.5);
	} else if( x > Width+200){
          changeentityproperty(self, "direction", 0);
          changeentityproperty(self, "velocity", -1.5);
	}
@end_script	
	loop	1
	delay	5
	offset	65 30
	bbox	7 17 130 22
        attack	7 17 130 22 200 0 0 1
	frame	data/chars/cobraboat/ravenwing.png
        attack	0
	@cmd	dasher 1.5 0 0 1
	@cmd	attack1 -200 1000 -500 20 "ANI_FOLLOW1"
	frame	data/chars/cobraboat/ravenwing.png
	
anim	follow1
	delay	1
	offset	65 30
	bbox	7 17 130 22
        attack	7 17 130 22 200 0 0 1
	frame	data/chars/cobraboat/ravenwing.png
	delay	100
	@cmd	dasher 1.5 0 0 1
	@cmd	shooter2 "CBomb" 3 -4 0 -1
	sound	data/chars/cobraboat/ravenbomb.wav
	frame	data/chars/cobraboat/ravenwing.png
	@cmd	shooter2 "CBomb" 3 -4 0 -1
	sound	data/chars/cobraboat/ravenbomb.wav
	frame	data/chars/cobraboat/ravenwing.png
	@cmd	shooter2 "CBomb" 3 -4 0 -1
	sound	data/chars/cobraboat/ravenbomb.wav
	frame	data/chars/cobraboat/ravenwing.png
	delay	1
        attack	0
	frame	data/chars/cobraboat/ravenwing.png
	@cmd	beidle
	frame	data/chars/cobraboat/ravenwing.png
	

anim	death
	delay	1
	offset	65 30
	frame	data/chars/cobraboat/ravenwing.png
	delay	10
	@cmd	spawn01 "SpaceXplos" 0 0 0
	frame	data/chars/misc/empty.gif
	@cmd	suicide
	frame	data/chars/misc/empty.gif
