name		Croc_Master
health		400
speed		12
type		enemy
aimove		wander
gfxshadow	1
nodrop		1
death		1
blockodds	1
bflash		empty2
aggression	20
diesound	data/sounds/die3.wav
icon		data/chars/croc_master/icon.png
animationscript	data/chars/croc_master/crocM.c
load		Crocodile
load		Croc_Striker

	
anim	idle
	drawmethod 320 320
	loop	1
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/idle1.png
	frame	data/chars/croc_master/idle2.png
	frame	data/chars/croc_master/idle3.png
	frame	data/chars/croc_master/idle4.png
	
anim	walk
@script
    void self = getlocalvar("self");
    int  Enemy = openborvariant("count_enemies");

    if( Enemy == 1){
      int r = rand()%40;

      changeentityproperty(self, "velocity", 0, 0, 0);
      if( r > 20){
        performattack(self, openborconstant("ANI_FOLLOW1"));
      } else if( r < -20) {
        performattack(self, openborconstant("ANI_FOLLOW2"));
      } else if( r > 0 && r <= 20 ){
        performattack(self, openborconstant("ANI_FOLLOW3"));
      } else {
        performattack(self, openborconstant("ANI_FOLLOW4"));
      }
    }
@end_script
	drawmethod 320 320
	loop	1
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/idle1.png
	frame	data/chars/croc_master/idle2.png
	frame	data/chars/croc_master/idle3.png
	frame	data/chars/croc_master/idle4.png
	

anim	attack1
	drawmethod 320 320
	range	0 95
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/punch1.png
	frame	data/chars/croc_master/punch2.png
#	attack2	63 24 52 17 20 1 1 0 20
	attack2	63 24 82 17 20 1 1 0 20
	frame	data/chars/croc_master/punch3.png
	attack	0
	frame	data/chars/croc_master/punch4.png
	
anim	follow1
	drawmethod 320 320
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/punch1.png
	frame	data/chars/croc_master/punch2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn02 "Crocodile" -200 0 0
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/punch4.png
	
anim	follow2
	drawmethod 320 320
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/punch1.png
	frame	data/chars/croc_master/punch2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn02 "Crocodile" 680 0 0
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/punch4.png
	
anim	follow3
	drawmethod 320 320
	delay	12
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/punch1.png
	frame	data/chars/croc_master/punch2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn03 "Croc_Striker" -200 0 70 1
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	@cmd	spawn03 "Croc_Striker" 680 0 45 0
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn03 "Croc_Striker" -200 0 30 1
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	@cmd	spawn03 "Croc_Striker" 680 0 5 0
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/punch4.png
	
anim	follow4
	drawmethod 320 320
	delay	12
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/punch1.png
	frame	data/chars/croc_master/punch2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn03 "Croc_Striker" -200 0 10 1
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	@cmd	spawn03 "Croc_Striker" 680 0 25 0
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	@cmd	spawn03 "Croc_Striker" -200 0 50 1
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	@cmd	spawn03 "Croc_Striker" 680 0 65 0
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/point4.png
	frame	data/chars/croc_master/point1.png
	frame	data/chars/croc_master/point2.png
	frame	data/chars/croc_master/point3.png
	frame	data/chars/croc_master/punch4.png
	

anim	block
	drawmethod 320 320
	delay	10
	offset	50 50
	frame	data/chars/croc_master/duck1.png
	frame	data/chars/croc_master/duck2.png
	frame	data/chars/croc_master/duck3.png
	frame	data/chars/croc_master/duck4.png
	delay	200
	@cmd	teledodgez 300 0 30
	@cmd	flip
	frame	data/chars/misc/empty.gif
	delay	10
	frame	data/chars/croc_master/duck4.png
	frame	data/chars/croc_master/duck3.png
	frame	data/chars/croc_master/duck2.png
	frame	data/chars/croc_master/duck1.png
	
anim	pain
	drawmethod 320 320
	delay	10
	offset	50 50
	bbox	34 17 40 33
	frame	data/chars/croc_master/pain3.png
	frame	data/chars/croc_master/pain4.png
	
anim	pain2
	drawmethod 320 320
	delay	10
	offset	50 50
	jumpframe 0 0 -2 0
	frame	data/chars/croc_master/pain1.png
	frame	data/chars/croc_master/pain2.png
	frame	data/chars/croc_master/pain3.png
	frame	data/chars/croc_master/pain4.png
	@cmd	dasher 0 0 0
	frame	data/chars/croc_master/duck1.png
	frame	data/chars/croc_master/duck2.png
	frame	data/chars/croc_master/duck3.png
	frame	data/chars/croc_master/duck4.png
	delay	200
	@cmd	teledodgez 350 0 30
	@cmd	flip
	frame	data/chars/misc/empty.gif
	delay	10
	frame	data/chars/croc_master/duck4.png
	frame	data/chars/croc_master/duck3.png
	frame	data/chars/croc_master/duck2.png
	frame	data/chars/croc_master/duck1.png
	

anim	death
	drawmethod 320 320
	delay	10
	offset	50 50
	jumpframe 0 0 -2 0
	frame	data/chars/croc_master/pain1.png
	frame	data/chars/croc_master/pain2.png
	frame	data/chars/croc_master/pain3.png
	frame	data/chars/croc_master/pain4.png
	@cmd	dasher 0 0 0
	frame	data/chars/croc_master/dead1.png
	frame	data/chars/croc_master/dead2.png
	frame	data/chars/croc_master/duck3.png
	delay	100
	frame	data/chars/croc_master/duck4.png
