name		SAWViper
type		enemy
health		80
nomove		1
nodrop		2
death		1
gfxshadow	1
#offscreenkill	200
hostile		player npc
candamage	player npc
animationscript	data/scripts/enemy.c
diesound	data/sounds/die4.wav

load		Burst
load		bulletE

anim idle
drawmethod 240 240
	offset	70 180
	bbox	48 75  51  105
	frame	data/chars/SAWViper/ShootD1.gif

anim pain
drawmethod 240 240
	delay	20
	offset  70 180
	bbox	48 75  51  105
	frame	data/chars/SAWViper/pain.gif

anim death
drawmethod 240 240
	delay	30
	offset  70 180
	jumpframe 0 0 -2 0
	frame	data/chars/SAWViper/dead1.gif
	@cmd	dasher 0 0 0
	frame	data/chars/SAWViper/dead2.gif


anim attack1
drawmethod 240 240
	range	0 100
	delay	20
	offset  70 180
	bbox	48  75  51  105
	frame	data/chars/SAWViper/ShootD1.gif
	delay	10
	attack  83 52 83 105 20 1 0 0 15
	dropv	4 1 0
	frame	data/chars/SAWViper/Up.gif
	delay	20
	attack	0
	frame	data/chars/SAWViper/Up.gif

anim attack2
@script
    void self = getlocalvar("self");

    if( frame == 0){
      int r = rand()%30;

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
      }
    }
@end_script
drawmethod 240 240
	range	100 480
	delay	1
	offset  70  180
	bbox	48  75  51  105
	frame	data/chars/SAWViper/Shoot1.gif
	delay	60
	frame	data/chars/SAWViper/Shoot1.gif
	delay	10
	sound	data/sounds/mgun.wav
	@cmd	shoot "bulletE" 94 78 0
	frame	data/chars/SAWViper/Shoot2.gif
	frame	data/chars/SAWViper/Shoot3.gif
	@cmd	shoot "bulletE" 94 78 0
	frame	data/chars/SAWViper/Shoot2.gif
	frame	data/chars/SAWViper/Shoot4.gif
	@cmd	shoot "bulletE" 94 78 0
	frame	data/chars/SAWViper/Shoot5.gif
	delay	100
	frame	data/chars/SAWViper/Shoot1.gif

anim follow2
drawmethod 240 240
	delay	1
	offset  70  180
	bbox	48  75  51  105
	frame	data/chars/SAWViper/ShootD1.gif
	delay	30
	frame	data/chars/SAWViper/ShootD1.gif
	delay	12
	@cmd	spawn01 "Burst" 100 5 0
	frame	data/chars/SAWViper/ShootD2.gif
	@cmd	spawn01 "Burst" 135 5 0
	frame	data/chars/SAWViper/ShootD3.gif
	@cmd	spawn01 "Burst" 170 5 0  
	frame	data/chars/SAWViper/ShootD2.gif
	@cmd	spawn01 "Burst" 205 5 0 
	frame	data/chars/SAWViper/Shoot3.gif
	@cmd	spawn01 "Burst" 240 5 0 
	frame	data/chars/SAWViper/Shoot2.gif
	@cmd	spawn01 "Burst" 275 5 0
	frame	data/chars/SAWViper/Shoot3.gif
	@cmd	spawn01 "Burst" 310 5 0 
	frame	data/chars/SAWViper/Shoot2.gif
	@cmd	spawn01 "Burst" 345 5 0 
	frame	data/chars/SAWViper/Shoot3.gif
	@cmd	spawn01 "Burst" 380 5 0 
	frame	data/chars/SAWViper/Shoot2.gif
	@cmd	spawn01 "Burst" 415 5 0 
	frame	data/chars/SAWViper/Shoot3.gif
	@cmd	spawn01 "Burst" 450 5 0 
	frame	data/chars/SAWViper/Shoot2.gif
	@cmd	spawn01 "Burst" 485 5 0 
	frame	data/chars/SAWViper/Shoot4.gif
	frame	data/chars/SAWViper/Shoot5.gif
	delay	100
	frame	data/chars/SAWViper/Shoot1.gif
