////////////////
//   ENKER    //
////////////////

actor EnkerBoss
{
//$Category MM8BDM-Bosses
Height 46
Radius 34
Scale 2.5
Obituary "%o was slain by \ckEnker\c-."
Translation "192:192=229:229", "198:198=76:76"
//+INVULNERABLE
Health 1000
mass 99999999
damagefactor "Misc", 0.0
damagefactor "Buster", 1.3
damagefactor "FlameBlast", 1.0
damagefactor "MetalBlade", 2.3
painchance 256
Speed 8
Damage 0
MONSTER
+THRUSPECIES
floatspeed 0
gravity 2.0
meleerange 80
-COUNTKILL
-SOLID
-CANPASS
+NOBLOOD
+LOOKALLAROUND
+SLIDESONWALLS
+NOPAIN
+DONTRIP
-DROPOFF
+USEKILLSCRIPTS
states
	{
	Spawn:
	ENKR I 1 A_JumpIf(floorz==z, "SpawnLand")
	loop
	SpawnLand:
	ENKR A -1
	loop
	Intro:
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	ENKR Y 2 Thing_SetTranslation(0,65)
	ENKR Y 2 Thing_SetTranslation(0,66)
	ENKR Y 2 Thing_SetTranslation(0,52)
	Goto SpawnLand
	Spawn2:
	ENKR A 1 A_Look
	loop
	See:
	ENKR B 0 A_Jump(100,"Leap", "AbsorbStart")
	ENKR BBBBCCCCDDDDEEEEBBBBCCCCDDDDEEE 1 A_Chase("Melee", "")
	ENKR E 1 A_FaceTarget
	ENKR B 0 A_Jump(256,"DashLeft", "DashRight", "See")
	DashLeft:
	ENKR B 1 A_ChangeVelocity(0, -20, 0, CVF_REPLACE|CVF_RELATIVE)
	Goto See
	DashRight:
	ENKR B 1 A_ChangeVelocity(0, 20, 0, CVF_REPLACE|CVF_RELATIVE)
	Goto See
	Leap:
	ENKR A 0 A_Stop
	ENKR AAAAAAA 1 A_FaceTarget
	ENKR I 5 A_ChangeVelocity(20, 0, 20, CVF_REPLACE|CVF_RELATIVE)
	Falling:
	ENKR I 1 A_JumpIf(floorz==z, "Land")
	loop
	Land:
	ENKR A 0 A_Jump(100, "Leap2")
	ENKR A 0 A_JumpIfCloser(80, "Melee")
	ENKR A 5 A_Stop
	Goto AbsorbStart
	AbsorbStart:
	ENKR Y 0 A_GiveToTarget("EvilRobotShield", 1)
	ENKR Y 0 A_Stop
	ENKR Y 0 A_ChangeFlag("NODAMAGE", 1)
	ENKR Y 0 A_ChangeFlag("NOPAIN", 0)
	ENKR Y 0 A_GiveInventory("CutterFlag",1)
	ENKR Y 0 A_PlaySoundEx("weapon/mirrorabsorb", "Voice")
	ENKR Y 0 A_FaceTarget
	//Goto See+1
	Absorb:
	ENKR Y 45
	Goto Missile
	Pain:
	ENKR Y 0 A_JumpIfInventory("CutterFlag", 5, "Missile")
	ENKR Y 0 A_PlaySoundEx("weapon/mirrorabsorb", "Voice")
	ENKR Y 0 A_GiveInventory("CutterFlag",1)
	ENKR Y 0 Thing_SetTranslation(0,65)
	ENKR Y 3 
	ENKR Y 0 Thing_SetTranslation(0,66)
	ENKR Y 3
	ENKR Y 0 Thing_SetTranslation(0,52)
	Goto Absorb
	Missile:
	ENKR Y 0 Thing_SetTranslation(0,52)
	ENKR Y 0 A_Stop
	ENKR Y 0 A_ChangeFlag("NODAMAGE", 0)
	ENKR Y 0 A_ChangeFlag("NOPAIN", 1)
	ENKR Y 0 A_TakeFromTarget("EvilRobotShield", 9999)
	ENKR Y 0 A_FaceTarget
	ENKR Y 0 A_JumpIfInventory("CutterFlag", 5, "Missile4")
	ENKR Y 0 A_JumpIfInventory("CutterFlag", 3, "Missile3")
	ENKR Y 0 A_JumpIfInventory("CutterFlag", 2, "Missile2")
	Missile1:
	ENKR Y 0 A_PlaySoundEx("weapon/mirrordeflect", "Voice")
	ENKR F 10 A_CustomMissile("MirrorShotWeakBoss", 25, 0, 0, 2, 0)
	Goto AbsorbEnd
	Missile2:
	ENKR Y 0 A_PlaySoundEx("weapon/mirrordeflect2", "Voice")
	ENKR F 10 A_CustomMissile("MirrorShotStrongBoss", 25, 0, 0, 2, 0)
	Goto AbsorbEnd
	Missile3:
	ENKR Y 0 A_PlaySoundEx("weapon/mirrordeflect2", "Voice")
	ENKR F 10 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, 0, 2, 0)
	Goto AbsorbEnd
	Missile4:
	ENKR Y 0 A_PlaySoundEx("weapon/mirrordeflect2", "Voice")
	ENKR Y 0 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, 0, 2, 0)
	ENKR Y 0 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, 10, 2, 0)
	ENKR Y 0 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, 5, 2, 0)
	ENKR Y 0 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, -5, 2, 0)
	ENKR F 10 A_CustomMissile("MirrorShotStrongerBoss", 25, 0, -10, 2, 0)
	Goto AbsorbEnd
	AbsorbEnd:
	ENKR E 0 A_TakeInventory("CutterFlag", 999)
	ENKR A 1
	Goto See+1
	Melee:
	ENKR J 0 A_Stop
	ENKR JJJJ 1 A_FaceTarget
	ENKR K 0 ACS_Execute(5,0,30)
	ENKR K 0 A_PlaySoundEx("misc/enkerswing", "Voice", 0, 1)
	ENKR K 1 A_SpawnItemEx("EnkerMelee", 0, 0, 0)
	ENKR K 1
	ENKR L 12
	Goto See+1
	Death:
	ENKR H 0 //ACS_Execute(59,0)
	ENKR H 0 A_Stop
	ENKR H 0 A_FaceTarget
	ENKR H 0 A_SpawnItemEx("FakeDeathFX", 0, 0, 50)
	ENKR A 0 A_PlaySoundEx("misc/devildeath", "SoundSlot5", 0, 1)
	stop

	Leap2:
	ENKR A 0 A_Stop
	ENKR A 0 A_FaceTarget
	ENKR A 0 A_JumpIfCloser(80, "Melee")
	ENKR I 5 A_ChangeVelocity(20, 0, 20, CVF_REPLACE|CVF_RELATIVE)
	Falling2:
	ENKR I 1 A_JumpIf(floorz==z, "Land2")
	loop
	Land2:
	ENKR I 0
	Goto Land+1
}
}

actor MirrorShotWeakBoss : MirrorShotSmall
{
damage (10)
speed 38
height 50
states
{
Spawn:
MIRR D 0
MIRR D 0 //ThrustThingZ(0,0,0,0)
MIRR C 1
loop
}
}

actor MirrorShotStrongBoss : MirrorShotLarge
{
damage (20)
speed 50
height 50
states
{
Spawn:
MIRR D 0
MIRR D 0 //ThrustThingZ(0,0,0,0)
MIRR DE 2
loop
}
}

actor MirrorShotStrongerBoss : MirrorShotLarge
{
damage (30)
speed 50
height 50
states
{
Spawn:
MIRR D 0
MIRR DE 2
loop
}
}

actor EnkerMelee
{
PROJECTILE
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(18, 250, 0, 0, 12)
stop
}
}

////////////////
//    PUNK    //						"The worst boss in 8bdm"
////////////////

actor PunkBoss
{
//$Category MM8BDM-Bosses
Height 46
Radius 34
Scale 2.5
Obituary "%o got in \cgPunk\c-'s way."
Translation "192:192=4:4", "198:198=42:42"
//+INVULNERABLE
Health 1000
mass 99999999
damagefactor "Misc", 0.0
damagefactor "Buster", 2.8
damagefactor "NeedleCannon", 2.1
damagefactor "HyperBomb", 1.0
damagefactor "RemoteMine", 1.2
painchance 256
Speed 11
Damage 0
MONSTER
+THRUSPECIES
floatspeed 0
gravity 1.2
meleerange 80
-COUNTKILL
-SOLID
-CANPASS
+NOBLOOD
+NOGRAVITY
+LOOKALLAROUND
+SLIDESONWALLS
+NOPAIN
-DROPOFF
+USEKILLSCRIPTS
states
	{
	Spawn:
	TNT1 A 35
	PUNK Y 0 A_SpawnItemEx("PunkRock1", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock1", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_PlaySoundEx("weapon/spreaddrillhit", "Voice", 0, 1) 
	PUNK K 0 A_Quake(9, 12, 0, 9000)
	TNT1 A 18 
	PUNK Y 0 A_SpawnItemEx("PunkRock1", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_PlaySoundEx("weapon/spreaddrillhit", "Voice", 0, 1) 
	PUNK K 0 A_Quake(9, 12, 0, 9000)
	TNT1 A 18 
	PUNK Y 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_SpawnItemEx("PunkRock1", random(-64,64), 0, 0, random(10,30),0,-20, random(0,360)) 
	PUNK Y 0 A_PlaySoundEx("weapon/spreaddrillhit", "Voice", 0, 1) 
	PUNK K 0 A_Quake(9, 12, 0, 9000)
	TNT1 A 40
	PUNK Y 0 A_PlaySoundEx("misc/mm3explosion", "Voice", 0, 1) 
	PUNK K 0 A_Quake(9, 12, 0, 9000)
	TNT1 AAAA 3 A_SpawnItemEx("DrillExplode", random(0, 100), 0, 0, 0, 0, 0, random(0,360))
	PUNK YYYY 0 A_SpawnItemEx("PunkRock1", random(-64,64), 0, 0, random(5,10),0,-20, random(0,360)) 
	PUNK YYYY 0 A_SpawnItemEx("PunkRock2", random(-64,64), 0, 0, random(5,10),0,-20, random(0,360)) 
	PUNK Y 0 A_ChangeFlag("NOGRAVITY",0)
	SpawnFall:
	PUNK XXXXYYYY 1 A_JumpIf(floorz==z, "SpawnAppear")
	loop
	SpawnAppear:
	PUNK WV 4
	PUNK A -1
	stop
	Intro:
	PUNK A 4
	PUNK FG 6
	PUNK A 8
	PUNK N -1
	stop

	Spawn2:
	PUNK A 1 A_Look
	loop
	See:
	PUNK A 1 A_FaceTarget
	Leap:
	PUNK A 0 A_SpawnItemEx("PunkMelee")
	PUNK A 2 A_Stop
	PUNK A 0 A_JumpIfInventory("CutterFlag", 5, "BallStart")
	PUNK A 0 A_FaceTarget
	PUNK I 0 A_ChangeVelocity(2, random(-10,10), 20, CVF_REPLACE|CVF_RELATIVE)
	PUNK IIIIIII 1 A_FaceTarget
	PUNK J 6 A_FaceTarget
	PUNK L 0 A_FaceTarget
	PUNK K 0 A_GiveInventory("CutterFlag",random(1,2))
	Missile:
	PUNK K 0 A_PlaySoundEx("weapon/screwcrusher", "Voice", 0, 1)
	PUNK K 8 A_CustomMissile("ScrewCrusherPunk", 35, 0, 0)
	Goto Leaping
	Leap2:
	PUNK A 0 A_SpawnItemEx("PunkMelee")
	PUNK A 2 A_Stop
	PUNK A 0 A_JumpIfInventory("CutterFlag", 5, "BallStart")
	PUNK A 0 A_FaceTarget
	PUNK I 0 A_ChangeVelocity(2, random(-10,10), 20, CVF_REPLACE|CVF_RELATIVE)
	PUNK IIIIIII 1 A_FaceTarget
	PUNK J 6 A_FaceTarget
	PUNK L 0 A_FaceTarget
	PUNK K 0 A_GiveInventory("CutterFlag",random(1,2))
	Missile2:
	PUNK K 0 A_PlaySoundEx("weapon/screwcrusher", "Voice", 0, 1)
	PUNK K 0 A_CustomMissile("ScrewCrusherPunk", 35, 0, -18)
	PUNK K 8 A_CustomMissile("ScrewCrusherPunk", 35, 0, 18)
	Goto Leaping2
	Leaping:
	PUNK I 0 //A_Jump(5, "BallFall")
	PUNK I 1 A_JumpIf(floorz==z, "Leap2")
	loop
	Leaping2:
	PUNK I 0 //A_Jump(5, "BallFall")
	PUNK I 1 A_JumpIf(floorz==z, "Leap")
	loop

	BallStart:
	PUNK A 0 A_ChangeFlag("INVULNERABLE", 1)
	PUNK A 0 A_GiveToTarget("EvilRobotShield", 1)
	PUNK A 2 A_FaceTarget
	PUNK VW 4 A_TakeInventory("CutterFlag", 999)
	BallBounce:
	PUNK X 0 A_ChangeVelocity(0,0,10, CVF_REPLACE|CVF_RELATIVE)
	PUNK X 0 A_FaceTarget
	PUNK X 0 A_GiveInventory("CutterFlag",1)
	PUNK XY 4
	PUNK X 0 A_JumpIfInventory("CutterFlag", 4, "BallCharge")
	BallBouncing:
	PUNK XXXXYYYY 1 A_JumpIf(floorz==z, "BallBouncer")
	loop
	BallBouncer:
	PUNK K 0 A_PlaySoundEx("misc/truck1", "Voice", 0, 1)
	PUNK X 0 A_JumpIfHealthLower(500, "BallChargeFast")
	Goto BallBounce
	BallChargeFast:
	PUNK X 0 A_ChangeVelocity(0,0,10, CVF_REPLACE|CVF_RELATIVE)
	PUNK X 0 A_FaceTarget
	PUNK XY 4
	BallCharge:
	PUNK X 0 A_ChangeFlag("NOGRAVITY",1)
	PUNK X 0 A_ChangeFlag("SLIDESONWALLS",0)
	PUNK X 0 A_Stop
	PUNK XY 4 A_FaceTarget
	PUNK K 0 A_PlaySoundEx("weapon/screwcrusher", "Voice", 0, 1)
	PUNK X 0 A_SpawnItemEx("PunkBallBody", 0, 0, 0, 70)
	PUNK X 0 A_Recoil(-70)
	BallLoop:
	PUNK XX 2 //A_SpawnItemEx("PunkBallBody", 0,0,10,50)
	PUNK X 0 A_JumpIfInventory("AtomicFireAmmo", 2, "BallHitPlayer")
	PUNK X 0 A_JumpIfInventory("AtomicFireAmmo", 1, "BallHit")
	PUNK YY 2 //A_SpawnItemEx("PunkBallBody", 0,0,10,50)
	PUNK X 0 A_JumpIfInventory("AtomicFireAmmo", 2, "BallHitPlayer")
	PUNK X 0 A_JumpIfInventory("AtomicFireAmmo", 1, "BallHit")
	loop
	BallHit:
	PUNK K 0 A_PlaySoundEx("misc/quake", "Voice", 0, 1)
	PUNK K 0 A_Quake(9, 12, 0, 9000)
	PUNK X 0 A_ChangeFlag("NOGRAVITY",0)
	PUNK X 0 A_ChangeFlag("SLIDESONWALLS",1)
	PUNK XXXXXXXX 0 A_SpawnItemEx("PunkRockSpawner", random(-512,512), 0, 32, 0, 0, 999, random(0,360))
	BallHitPlayer:
	PUNK X 0 A_ChangeFlag("NOGRAVITY",0)
	PUNK X 0 A_ChangeFlag("SLIDESONWALLS",1)
	PUNK A 0 A_ChangeVelocity(-8,0,10, CVF_REPLACE|CVF_RELATIVE)
	PUNK XYXY 4
	PUNK X 0 A_FaceTarget
	PUNK A 0 A_ChangeFlag("INVULNERABLE", 0)
	PUNK A 0 A_TakeFromTarget("EvilRobotShield", 1)
	PUNK A 0 A_TakeInventory("CutterFlag", 999)
	PUNK A 0 A_TakeInventory("AtomicFireAmmo", 999)
	PUNK WV 4
	PUNK AAAAAA 4 A_FaceTarget
	PUNK A 0 A_Look
	Goto See

	Death:
	ENKR H 0 //ACS_Execute(59,0)
	ENKR H 0 A_Stop
	ENKR H 0 A_FaceTarget
	ENKR H 0 A_SpawnItemEx("FakeDeathFX", 0, 0, 50)
	ENKR A 0 A_PlaySoundEx("misc/devildeath", "SoundSlot5", 0, 1)
	stop
}
}

actor PunkRockSpawner
{
+MISSILE
states
{
Spawn:
PLAY A 1
loop
Death:
PLAY A 0 A_Jump(128, 2)
PLAY A 0 A_SpawnItemEx("PunkRock1", 0, 0, -2, random(0,2), 0, random(-5,-15), random(0,360))
stop
PLAY A 0
PLAY A 0 A_SpawnItemEx("PunkRock2", 0, 0, -2, random(0,2), 0, random(-5,-15), random(0,360))
stop
}
}

actor PunkRock1
{
PROJECTILE
+DOOMBOUNCE
bouncecount 3
-NOGRAVITY
+RIPPER
damage 0
scale 2.5
bouncefactor 0.3
States
{
Spawn:
PUNK L -1
stop
}
}

actor PunkRock2 : PunkRock1
{
bouncefactor 0.5
States
{
Spawn:
PUNK M -1
stop
}
}


actor PunkBallBody
{
PROJECTILE
damage (35)
renderstyle none
//+RIPPER
Height 32
Radius 56
States
{
Spawn:
PLAY A 1
loop
Death:
PLAY H 1 A_GiveToTarget("AtomicFireAmmo", 1)
stop
Crash:
PLAY H 1 A_GiveToTarget("AtomicFireAmmo", 2)
stop
}
}

actor PunkMelee
{
PROJECTILE
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(20, 100, 0, 0, 20)
stop
}
}

actor ScrewCrusherPunk
{
PROJECTILE
Damage (10)
Radius 25
Height 25
scale 2.5
Speed 35
+HEXENBOUNCE
//bouncefactor 0.5
bouncecount 2
States
{
Spawn:
SCRE ABAB 3
SCRE A 0 A_ChangeFlag("NOGRAVITY",0)
loop
}
}

////////////////
//  BALLADE   //
////////////////

actor BalladeBoss
{
//$Category MM8BDM-Bosses
Height 52
Radius 34
Scale 2.5
Obituary "%o was destroyed by \ctBallade."
Translation "192:192=229:229", "198:198=62:62"
//+INVULNERABLE
Health 1000
mass 99999999
damagefactor "Misc", 0.0
damagefactor "Buster", 0.9
damagefactor "AirShooter", 0.5
damagefactor "PharaohShot3", 1.75
painchance 256
Speed 11
Damage 0
MONSTER
+THRUSPECIES
floatspeed 0
gravity 1.0
meleerange 80
-COUNTKILL
-SOLID
-CANPASS
+NOBLOOD
+LOOKALLAROUND
+SLIDESONWALLS
+NOPAIN
-DROPOFF
+USEKILLSCRIPTS
maxstepheight 40
states
	{
	Spawn:
	BALD A 0 A_JumpIfInventory("AtomicFireAmmo", 1, "SpawnB")
	BALD Y 1 A_JumpIf(floorz==z, "SpawnLand")
	loop
	SpawnLand:
	BALD I -1
	stop
	Spawn2:
	BALD A 0 A_JumpIfInventory("AtomicFireAmmo", 1, "SpawnB")
	BALD A 1 A_Look
	loop
	Scan:
	BALD A 1 A_Look
	loop
	See:
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BALD A 0 A_Stop
	BALD A 2 A_JumpIfHealthLower(500, "Transform")
	BALD A 0 A_JumpIfInventory("CutterFlag", 3, "DashStart")
	BALD A 0 A_GiveInventory("CutterFlag", 1)
	Leap:
	BALD AA 2 A_FaceTarget
	BALD A 0 A_FaceTarget
	BALD Y 0 A_ChangeVelocity(10, random(-10,10), 14, CVF_REPLACE|CVF_RELATIVE)
	BALD Y 0 A_SpawnItemEx("BalladeMine",0,0,0)
	BALD Y 4
	Falling:
	BALD Y 1 A_JumpIf(floorz==z, "Scan")
	loop
	DashStart:
	BALD A 0 A_TakeInventory("CutterFlag", 9999)
	BALD AAAAAAAA 2 A_FaceTarget
	BALD B 0 A_Recoil(-20)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BALD B 2 A_SpawnItemEx("BalladeAfterImage1")
	BALD B 0 A_Recoil(-10)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 //A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BALD B 2 A_SpawnItemEx("BalladeAfterImage1")
	BALD B 0 A_Recoil(-10)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BALD C 2 A_SpawnItemEx("BalladeAfterImage2")
	BALD B 0 A_Recoil(-10)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 1)
	BALD C 2 A_SpawnItemEx("BalladeAfterImage2")
	BALD Y 0 A_SpawnItemEx("BalladeMine",0,0,0)
	BALD B 0 A_Recoil(-8)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BALD D 2 A_SpawnItemEx("BalladeAfterImage3")
	BALD B 0 A_Recoil(-8)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 //A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BALD D 2 A_SpawnItemEx("BalladeAfterImage3")
	BALD B 0 A_Recoil(-8)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BALD E 2 A_SpawnItemEx("BalladeAfterImage4")
	BALD B 0 A_Recoil(-8)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 1)
	BALD E 2 A_SpawnItemEx("BalladeAfterImage4")
	BALD B 0 A_Recoil(-5)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BALD B 2 A_SpawnItemEx("BalladeAfterImage1")
	BALD B 0 A_Recoil(-5)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 //A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BALD B 2 A_SpawnItemEx("BalladeAfterImage1")
	BALD B 0 A_Recoil(-5)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BALD C 2 A_SpawnItemEx("BalladeAfterImage2")
	BALD B 0 A_Recoil(-5)
	BALD B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 1)
	BALD C 2 A_SpawnItemEx("BalladeAfterImage2")
	DashEnd:
	BALD A 0 A_Stop
	BALD A 2 A_JumpIfHealthLower(500, "Transform")
	BALD A 4 A_TakeInventory("CutterFlag", 999)
	BALD A 0 A_Look
	BALD AAAAAAAAAAAAAAA 2 A_FaceTarget
	Missile:
	BALD A 0 A_FaceTarget
	BAL2 A 0 A_PlaySoundEx("weapon/crackerthrow", "Voice", 0, 1)
	BALD G 12 A_CustomMissile("BossBalladeCracker", 40, 0, 0, 0, 0)
	BALD A 6
	BALD AA 2 A_FaceTarget
	BALD A 0 A_FaceTarget
	BALD Y 0 A_ChangeVelocity(18, 0, 14, CVF_REPLACE|CVF_RELATIVE)
	BALD Y 4
	Goto Falling
	Transform:
	BALD I 0 A_ChangeFlag("INVULNERABLE", 1)
	BALD I 50 A_GiveToTarget("EvilRobotShield",1)
	BALD I 35 ACS_ExecuteAlways(5,0,31)
	Transformed:
	BALD I 0 A_PlaySoundEx("weapon/mirrorabsorb", "Voice", 0, 1)
	BAL2 I 50
	BAL2 I 0 A_TakeFromTarget("EvilRobotShield",1)
	BAL2 I 0 A_ChangeFlag("INVULNERABLE", 0)
	BAL2 I 0 A_GiveInventory("AtomicFireAmmo", 1)
	BALD A 0 A_TakeInventory("CutterFlag", 9999)
	BAL2 A 0 A_FaceTarget
	Goto SpawnB

	SpawnB:
	BAL2 A 1 A_LookEx(0,0,0,0,360,"See2")
	loop
	See2:
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 2 A_Stop
	BAL2 A 0 A_JumpIfInventory("CutterFlag", 4, "DashStart2")
	BAL2 A 0 A_GiveInventory("CutterFlag", 1)
	Leap2:
	BAL2 A 1 A_FaceTarget
	BAL2 A 0 A_FaceTarget
	BAL2 Y 0 A_ChangeVelocity(8, random(-13,13), 18, CVF_REPLACE|CVF_RELATIVE)
	BAL2 Y 0 A_SpawnItemEx("BalladeMine",0,0,0)
	BAL2 Y 4
	Falling2:
	BAL2 Y 0 A_ChangeVelocity(0, 0, -1, CVF_RELATIVE)
	BAL2 Y 1 A_JumpIf(floorz==z, "SpawnB")
	loop
	DashStart2:
	BAL2 A 0 A_TakeInventory("CutterFlag", 9999)
	BAL2 AAAAA 2 A_FaceTarget
	BAL2 B 0 A_Recoil(-20)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 D 2 A_SpawnItemEx("BalladeAfterImage3B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 D 2 A_SpawnItemEx("BalladeAfterImage3B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 E 2 A_SpawnItemEx("BalladeAfterImage4B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 E 2 A_SpawnItemEx("BalladeAfterImage4B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 A 0 A_Stop
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 A 10
	BAL2 AAAAA 2 A_FaceTarget
	BAL2 B 0 A_Recoil(-20)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-10)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 D 2 A_SpawnItemEx("BalladeAfterImage3B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 D 2 A_SpawnItemEx("BalladeAfterImage3B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 E 2 A_SpawnItemEx("BalladeAfterImage4B")
	BAL2 B 0 A_Recoil(-8)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 E 2 A_SpawnItemEx("BalladeAfterImage4B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 B 2 A_SpawnItemEx("BalladeAfterImage1B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 B 0 A_Recoil(-5)
	BAL2 B 0 A_SpawnItemEx("BalladeMelee")
	BAL2 C 2 A_SpawnItemEx("BalladeAfterImage2B")
	BAL2 A 0 A_Stop
	BAL2 A 0 A_PlaySoundEx("misc/truck2", "Voice", 0, 0)
	BAL2 A 4
	BAL2 AAAAAAAA 2 A_FaceTarget
	Missile2:
	BAL2 A 0 A_FaceTarget
	BAL2 A 0 A_PlaySoundEx("weapon/crackerthrow", "Voice", 0, 1)
	BAL2 G 25 A_CustomMissile("BossBalladeCracker2", 40, 0, random(-2,2), 0, 0)
	BAL2 A 0 A_FaceTarget
	BAL2 A 0 A_PlaySoundEx("weapon/crackerthrow", "Voice", 0, 1)
	BAL2 G 25 A_CustomMissile("BossBalladeCracker2", 40, 0, random(-2,2), 0, 0)
	BAL2 A 0 A_FaceTarget
	BAL2 A 0 A_PlaySoundEx("weapon/crackerthrow", "Voice", 0, 1)
	BAL2 G 25 A_CustomMissile("BossBalladeCracker2", 40, 0, random(-2,2), 0, 0)
	BAL2 A 12
	BAL2 AA 2 A_FaceTarget
	BAL2 A 0 A_FaceTarget
	BAL2 Y 0 A_ChangeVelocity(20, 0, 18, CVF_REPLACE|CVF_RELATIVE)
	BAL2 Y 4
	Goto Falling2
	Death:
	ENKR H 0 //ACS_Execute(59,0)
	ENKR H 0 A_Stop
	ENKR H 0 A_FaceTarget
	ENKR H 0 A_SpawnItemEx("FakeDeathFX", 0, 0, 50)
	ENKR A 0 A_PlaySoundEx("misc/devildeath", "SoundSlot5", 0, 1)
	stop
}
}

actor BalladeAfterImage1
{
+NOINTERACTION
-SOLID
+NOGRAVITY
renderstyle stencil
stencilcolor "Purple"
Translation "192:192=229:229", "198:198=62:62"
alpha 1.0
scale 2.5
States
{
Spawn:
TNT1 A 2
Fade:
BALD B 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage2 : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BALD C 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage3 : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BALD D 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage4 : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BALD E 1 A_FadeOut(0.1)
loop
}
}


actor BalladeAfterImage1B : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BAL2 B 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage2B : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BAL2 C 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage3B : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BAL2 D 1 A_FadeOut(0.1)
loop
}
}

actor BalladeAfterImage4B : BalladeAfterImage1
{
States
{
Spawn:
TNT1 A 2
Fade:
BAL2 E 1 A_FadeOut(0.1)
loop
}
}
actor BossBalladeCracker : BalladeCracker
{
speed 30
radius 32
}

actor BossBalladeCracker2 : BalladeCracker
{
speed 30
radius 32
}

actor BalladeMine
{
PROJECTILE
//+SHOOTABLE
//-NOBLOCKMAP
Radius 32
Height 32
scale 2.5
speed 0
//reactiontime 20
damage (2)
health 5
//DamageFactor "Buster", 0.4
//+NOTARGETSWITCH
States
{
Spawn:
BALA A 0 
BALA A 0 A_PlaySoundEx("weapon/crackermine", "Weapon")
BALA EFGHEFGHEFGHEFGHEFGHEFGHEFGHEFGHEFGHEFGHE 3
BALA A 1 A_Die
Death:
BALA A 0 A_Stop
BALA A 0 A_PlaySoundEx("weapon/crackerexplode", "Weapon")
BALA A 0 A_Explode(12, 100, 0,0, 100)
NAPA EFGHIJKLMNOPQRS 1
stop
}
}


actor BalladeMelee
{
PROJECTILE
damagetype "QuickBoomerang"
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 A_Explode(8, 60, 0)
stop
}
}