//------------------------------------------------------------------------------------------------------------------------
//	Flesh Wizard
//
//
//	Taken from Realm667
//	Modified by M@@@H!aK (death types etc.)
//------------------------------------------------------------------------------------------------------------------------
Actor Satanic_FleshWizard
{
	DropItem "Satanic_TaintedCrossAltAmmo" 64
	Obituary "%o was cold-showered by Flesh Wizard."
	Health 	320
	Radius 	20
	Height 	80
	Mass 	100
	Speed	80
	DamageFactor NoDamage,	0
	DamageFactor Posession,	0
	MeleeDamage 3
	PainChance 200
	SeeSound 	"Satanic/Monsters/FleshWizard/Sight"
	PainSound 	"Satanic/Monsters/FleshWizard/Pain"
	DeathSound 	"Satanic/Monsters/FleshWizard/Death"
	ActiveSound "Satanic/Monsters/FleshWizard/Active"
	MONSTER
	+FLOORCLIP
	+STEALTH
	-SOLID
	States
	{
	Spawn:
		LMWZ E 0 Thing_Hate(0,669,3)
		LMWZ E 10 A_Look
		Goto Spawn+1
	See:
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ E 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ E 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ F 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ F 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ E 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ E 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ F 1 A_FastChase
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,"Wander",AAPTR_PLAYER1)
		LMWZ F 1 A_FastChase
		Loop
	Wander:
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ EEE 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ EEE 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ FFF 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ FFF 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ EEE 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ EEE 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ FFF 1 A_Wander
		TNT1 A 0 A_JumpIfInventory("PowerNecShroud",1,1,AAPTR_PLAYER1)
		Goto See
		LMWZ FFF 1 A_Wander
		Goto See
	Missile:
		LMWZ E 0 A_Jump (127, 15, 30, 45, 60, 75, 90, 105)
		LMWZ E 50
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 60
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 70
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 80
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 90
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 100
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 110
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
		LMWZ E 0
		LMWZ E 120
		LMWZ E 0 A_SetShootable
		LMWZ EFG 10 A_FaceTarget
		LMWZ H 3 A_FatAttack1("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack2("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ H 3 A_FatAttack3("Satanic_FleshWizardShot")
		LMWZ H 4
		LMWZ G 5
		LMWZ E 5 A_UnSetShootable
		LMWZ E 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
	Pain:
		LMWZ I 3
		LMWZ I 5 A_Pain
		LMWZ I 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
	Pain.DrainHealthEver:
		LMWZ I 3
		LMWZ I 0 ACS_ExecuteAlways(772,0,4,0,0)
		LMWZ I 5 A_Pain
		LMWZ I 0 A_PlaySound ("Satanic/Monsters/FleshWizard/Teleport")
		Goto See
	Death:
		LMWZ J 6 A_Scream
		LMWZ K 6 A_NoBlocking
		LMWZ LMNO 6
		LMWZ P -1
		Stop
	Death.DrainMana:
		LMWZ J 6 A_Scream
		LMWZ J 0 ACS_ExecuteAlways(779,0,12,0,0)
		LMWZ K 6 A_NoBlocking
		LMWZ LMNO 6
		LMWZ P -1
		Stop
	Death.DrainHealthEver:
	Death.DrainHealth:
		LMWZ J 6 A_Scream
		LMWZ J 0 ACS_ExecuteAlways(772,0,20,0,0)
		LMWZ K 6 A_NoBlocking
		LMWZ LMNO 6
		LMWZ P -1
		Stop
	Death.DemonFire:
	Burn:
		BMWZ J 6 A_Scream
		BMWZ J 0 A_CustomMissile("Satanic_HellfireDeviceBoltSecondary",Random(0,64),0,Random(-360,360),0,0)
		BMWZ J 0 A_CustomMissile("Satanic_HellfireDeviceBoltSecondary",Random(0,64),0,Random(-360,360),0,0)
		BMWZ J 0 A_CustomMissile("Satanic_HellfireDeviceBoltSecondary",Random(0,64),0,Random(-360,360),0,0)
		BMWZ J 0 A_CustomMissile("Satanic_HellfireDeviceBoltSecondary",Random(0,64),0,Random(-360,360),0,0)
		BMWZ J 0 A_CustomMissile("Satanic_HellfireDeviceBoltSecondary",Random(0,64),0,Random(-360,360),0,0)
		BMWZ J 0 A_CustomMissile("Satanic_FireStarter",6,Random(-20,20),Random(-360,360),0)         
		BMWZ J 0 A_CustomMissile("Satanic_FireStarter",6,Random(-20,20),Random(-360,360),0)
		BMWZ K 6 A_NoBlocking
		BMWZ LMNO 6
		BMWZ PPPPPPPPP 4 A_SpawnItem("Satanic_SmokeSpawner")
		BMWZ P -1
		Stop
	}
}

Actor Satanic_FleshWizardShot
{
	Radius	3
	Height	3
	Speed	24
	Damage	(Random(1,8))
	RenderStyle	Translucent
	Decal 		BloodSmear
	Alpha		0.8 
	Scale		1.5
	Seesound "Satanic/Monsters/Archvile/Attack"
	PROJECTILE
	+THRUGHOST
	+NOGRAVITY
	+EXTREMEDEATH
	+RIPPER
	States
	{
	Spawn:
		FBLD A 1 Bright A_BishopMissileWeave
		FBLD A 0 A_SpawnItem("Satanic_FleshWizardShotTrail",0,0)
		FBLD B 1 Bright A_BishopMissileWeave
		FBLD B 0 A_SpawnItem("Satanic_FleshWizardShotTrail",0,0)
		Loop
	Death:
		FBLD CDE 3 Bright
		Stop
	}
}

Actor Satanic_FleshWizardShotTrail
{   
	Radius 1
	Height 1
	RenderStyle	Translucent
	Alpha		0.66
	Scale 1.5
	PROJECTILE
	States
	{
	Spawn:
		NULL A 3
		FBLD FGH 3 Bright
		Stop 
	}
}