name	 	Thunder
health		300
type		enemy
nomove		1 1
nodieblink	2
gfxshadow	1
facing		1
death		1
defense		normal2 0 100
defense		normal3 0 100
animationscript	data/scripts/truck.c
takedamagescript data/scripts/blink.c

palette		data/chars/dreadnoks/thunder1.gif
alternatepal	data/chars/dreadnoks/thblink.gif

load		bulletE

anim spawn
@script

  if(frame==5){
     void self = getlocalvar("self");
     changeentityproperty(self, "name", "Thunder_Machine");
  }
@end_script
	delay	10
	offset	170 235
	jumpframe 1 0 2 0
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif


anim idle
	loop    1
	delay	10
	offset	170 235
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	attack1 0 500 150 "ANI_ATTACK1"
	frame	data/chars/dreadnoks/thunder2.gif

anim attack1
	loop	1
	delay	10
	offset	170 235
	bbox	180 150 148 85
	attack3	130 180 220 55 40 0 1 0 20
	counterattack 1
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	target 2 1 0 0 0 0
	@cmd	dash 0 1
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	attack1 0 500 30 "ANI_ATTACK2"
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	attack	0
	frame	data/chars/dreadnoks/thunder2.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
	delay	1
	offset	170 235
	bbox	180 150 148 85
	attack3	130 180 220 55 50 0 1 0 20
	counterattack 1
	frame	data/chars/dreadnoks/thunder1.gif
	delay	10
	@cmd	dasher 0 0 0
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	sound	data/sounds/mgun.wav
	@cmd	shooter "bulletE" 161 70 0 3 0 0
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	shooter "bulletE" 161 70 0 3 0 -0.2
	frame	data/chars/dreadnoks/thunder2.gif
	@cmd	shooter "bulletE" 161 70 0 3 0 0.2
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	shooter "bulletE" 161 70 0 3 0 0.1
	frame	data/chars/dreadnoks/thunder2.gif
	@cmd	shooter "bulletE" 161 70 0 3 0 -0.1
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	shooter "bulletE" 161 70 0 3 0 0
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	attack	0
	@cmd	beidle
	frame	data/chars/dreadnoks/thunder2.gif

anim follow2
	delay	1
	offset	170 235
	bbox	180 150 148 85
	attack3	130 180 220 55 50 0 1 0 20
	counterattack 1
	frame	data/chars/dreadnoks/thunder1.gif
	delay	10
	@cmd	dasher 0 0 0
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	dasher 3 0 0
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	dasher 0 0 0
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	@cmd	dasher -5 0 0
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	frame	data/chars/dreadnoks/thunder2.gif
	frame	data/chars/dreadnoks/thunder1.gif
	attack	0
	@cmd	dasher 0 0 0
	@cmd	beidle
	frame	data/chars/dreadnoks/thunder2.gif


anim death
	delay	15
	offset	170 235
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	dasher -2 0 0
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	spawn01 "Asap" -140 50 0
	@cmd	spawn01 "Asap" 100 60 0
	@cmd	spawn01 "Asap" -50 30 0
	@cmd	spawn01 "Asap" 0 60 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 30 0
	@cmd	spawn01 "Asap" -100 60 0
	@cmd	spawn01 "Asap" 150 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" -90 50 0
	@cmd	spawn01 "Asap" 100 30 0
	@cmd	spawn01 "Asap" -50 60 0
	@cmd	spawn01 "Asap" 0 30 0
	frame	data/chars/dreadnoks/thunder3.gif
	@cmd	spawn01 "Asap" 50 60 0
	@cmd	spawn01 "Asap" -100 30 0
	@cmd	spawn01 "Asap" 150 60 0
	frame	data/chars/dreadnoks/thunder3.gif #
	@cmd	suicide
	frame	data/chars/dreadnoks/thunder3.gif
