name		Xamot
health		100
type		enemy
nomove		1 1
nopain		1
nodrop		2
facing		2
diesound	data/sounds/die3.wav
animationscript	data/scripts/enemy.c
load		Missil


anim idle
drawmethod 224 224
	loop	1
	offset  75 160
	delay	15
	frame	data/chars/raven/xamot1.gif
	@cmd	attack0 "ANI_ATTACK1"
	frame	data/chars/raven/xamot1.gif
	
anim walk
drawmethod 224 224
	loop	1
	offset  75 160
	delay	12
	frame	data/chars/raven/xamot1.gif
		
anim pain
drawmethod 224 224
	delay	12
	offset  75 160
	frame	data/chars/raven/xamot1.gif
	
anim fall
drawmethod 224 224
@script
    void self = getlocalvar("self");

    if( frame == 0){
      bindentity(self, NULL());
    } 
@end_script
	delay	20
	landframe 2
	offset  75 160
	jumpframe 0 3 6 0
	frame	data/chars/raven/xamot1.gif
	delay	300
	frame	data/chars/raven/xamotF.gif
	delay	20
	offset  90 125
	frame	data/chars/raven/xamotD.gif

anim rise
drawmethod 224 224
	delay	20
	offset  75 160
	frame	data/chars/raven/xamot1.gif


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

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

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_ATTACK2"));
      }
    } 
@end_script
drawmethod 224 224
	loop	1
	delay	100
	offset  75 160
	bbox	54 51 51 110 12
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	200
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 1 0 0
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	200
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 3 0 0
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	100
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 2 0 0
	frame	data/chars/raven/xamot1.gif

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

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

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_ATTACK1"));
      }
    } 
@end_script
drawmethod 224 224
	loop	1
	delay	100
	offset  75 160
	bbox	54 51 51 110 12
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	20
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 3 0 0
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	20
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 2 0 0
	frame	data/chars/raven/xamot1.gif
	delay	6
	frame	data/chars/raven/xamot2.gif
	frame	data/chars/raven/xamot3.gif
	delay	400
	sound	data/sounds/bom.wav
	@cmd	shooter2 "Missil" 76 77 0 1 0 0
	frame	data/chars/raven/xamot1.gif
