name		MindBender
health		200
nomove		1
type		enemy
death		1
nodieblink	2
nopain		1
nodrop		2
#antigravity	100
hostile		player npc

load		Peluru
load		Rocket

animationscript data/scripts/harden.c
takedamagescript data/scripts/blink.c

palette		data/chars/destro/mindbender1.png
alternatepal	data/chars/destro/mindblink.png


anim idle
	loop	1
	delay	10
        offset  60 130
        bbox    29 27 85 83
	frame	data/chars/destro/mindbender1.png
	@cmd	attack0 "ANI_FOLLOW1"
	frame	data/chars/destro/mindbender1.png

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

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

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
      }
    }
@end_script
	loop	1
	delay	1
        offset  60 130
        bbox    29 27 85 83
	frame	data/chars/destro/mindbender1.png
	delay	200
	frame	data/chars/destro/mindbender1.png
	delay	20
	@cmd	target 2 2 0 0 0 1 # Dummy targetting
	sound	data/chars/Baroness/pistol.wav
	@cmd	shooter "peluru" 95 25 0 3 0 0
	frame	data/chars/destro/mindbender2.png
	sound	data/chars/Baroness/pistol.wav
	@cmd	shooter "peluru" 95 25 0 3 0 0
	frame	data/chars/destro/mindbender1.png
	sound	data/chars/Baroness/pistol.wav
	@cmd	shooter "peluru" 95 25 0 3 0 0
	frame	data/chars/destro/mindbender2.png

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

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

      if( r > 0){
        changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));
      }
    }
@end_script
	loop	1
	delay	1
        offset  60 130
        bbox    29 27 85 83
	frame	data/chars/destro/mindbender1.png
	delay	200
	frame	data/chars/destro/mindbender1.png
	@cmd	target 2 2 0 0 0 1 # Dummy targetting
	sound	data/sounds/bom.wav
	@cmd	shoot "Rocket" -25 60 0
	frame	data/chars/destro/mindbender3.png


anim walk
	loop	1
	delay	10
        offset  60 130
        bbox    29 27 85 83
	frame	data/chars/destro/mindbender1.png

anim pain
	delay	5
        offset  60 130
	frame	data/chars/destro/mindbender1.png

anim fall
	delay	5
        offset  60 130
	frame	data/chars/destro/mindbender1.png

anim rise
	delay	5
        offset  60 130
	frame	data/chars/destro/mindbender1.png


anim death 
        delay	10
        offset  60 130
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 50 30 1
        @cmd	spawn01 "Asap" -25 60 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 60 1
        @cmd	spawn01 "Asap" -50 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 50 60 1
        @cmd	spawn01 "Asap" -25 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 30 1
        @cmd	spawn01 "Asap" -50 60 1
	frame	data/chars/destro/mindbenderD.png #
        @cmd	spawn01 "Asap" 50 30 1
        @cmd	spawn01 "Asap" -25 60 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 60 1
        @cmd	spawn01 "Asap" -50 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 50 60 1
        @cmd	spawn01 "Asap" -25 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 30 1
        @cmd	spawn01 "Asap" -50 60 1
	frame	data/chars/destro/mindbenderD.png #
        @cmd	spawn01 "Asap" 50 30 1
        @cmd	spawn01 "Asap" -25 60 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 60 1
        @cmd	spawn01 "Asap" -50 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 50 60 1
        @cmd	spawn01 "Asap" -25 30 1
	frame	data/chars/destro/mindbenderD.png
        @cmd	spawn01 "Asap" 0 30 1
        @cmd	spawn01 "Asap" -50 60 1
	frame	data/chars/destro/mindbenderD.png #
	@cmd	spawn01 "BXPlos2" 0 0 0
	frame	data/chars/misc/empty.gif
