Actor Mohoph : PlayerPawn
{
	Health 100
	Mass 1500
	PainChance 255
	Scale 0.2
	Alpha 0.8
	RenderStyle Translucent
	BloodType "MohophBlood"
	BloodColor "White"
	Player.ForwardMove 0.90
	Player.SideMove 0.88
	Player.MaxHealth 100
	Player.DisplayName "Mohoph"
	Player.CrouchSprite "MOPH"
	Player.ScoreIcon "MOHOPHST"
	Player.SoundClass "Mohoph"
	Player.ColorRange 112, 127
	Player.StartItem "MorphScreamer"
	Player.StartItem "MorphRanged"
	Player.StartItem "MorphAmmo", 1
	Player.StartItem "UnMorph", 1
	Player.StartItem "ClassID", 17
	Player.startitem "ArrowSingle", 35
	Player.StartItem "GhoulTeam", 1
	Player.StartItem "MorphRangeAmmo", 5
	DamageFactor "DeathDart", 0.9
	DamageFactor "CyborgPlasma", 0.75
	damagefactor "HunterLightningRail", 0.5
    damagefactor "HunterSuperLightningRail", 0.5
	DamageFactor "GhostbusterProton", 0.7
	DamageFactor "GhostbusterBlood", 0.7
	DamageFactor "GhostbusterEcho", 0.7
	DamageFactor "GhostbusterSoul", 0.7
	DamageFactor "GhostbusterIceFall", 0.7
	DamageFactor "GhostbusterIceBall", 0.7
	DamageFactor "GhostbusterDefilerBall", 0.7
	DamageFactor "GhostbusterBoneCannon", 0.7
	DamageFactor "GhostbusterExpander", 0.7
	Species "Ghoul"
	LimitedToTeam 1
	+NOICEDEATH
//	+DONTTRANSLATE
	+NOSKIN
	+QUICKTORETALIATE
	States
    {
    Spawn:
		TNT1 A 0 A_TakeInventory("HumanTeam", 1)
		MOPH A 0 A_GiveInventory("GhoulAmmo",1)
		TNT1 A 0 A_GiveInventory("NormalMohoph", 1)
		TNT1 A 0 ACS_NamedExecute("MohophAmmoRecharge",0,0,0,0)
        MOPH A 1 bright A_StopSoundEx("Body")
		MOPH A 42
        wait
    See:
		TNT1 A 0 A_TakeInventory("HumanTeam", 1)
		TNT1 A 0 A_GiveInventory("GhoulTeam", 1)
		MOPH A 0 A_TakeInventory("GhoulAmmo",999)
		TNT1 A 0 A_GiveInventory("NormalMohoph", 1)
		//TNT1 A 0 A_JumpIfInventory("MohophClone", 1, 1)
		Goto SkipSound
		TNT1 A 0 A_GiveInventory("MorphRangeAmmo", 1)
		MOPH A 0 A_PlaySoundEx("MohophPresence","Body")
	SkipSound:
//		MOPH AA 0 A_CustomMissile("MophTrail",random(30,-30),0,random(-45,45),2,random(-10,10))
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		MOPH AA 0 A_SpawnItemEx("MophTrail", random(-36, 36), random(-36, 36), random(-24, 24), random(-11, 11), random(-11, 11), random(-4, 4), random(0, 359), SXF_TRANSFERTRANSLATION)
		MOPH A 4 bright
		Goto Spawn
    Missile:
		MOPH A 0 A_StopSoundEx("Body")
		MOPH A 0 A_GiveInventory("GhoulAmmo",1)
		MOPH B 8 bright A_PlayWeaponSound("MohophAttack1")
		MOPH C 8 bright A_PlayWeaponSound("MohophAttack2")
		MOPH D 8 bright A_PlayWeaponSound("MohophAttack3")
		MOPH E 8 bright A_PlayWeaponSound("MohophAttack4")
		MOPH A 40 bright
        Goto Spawn
    Melee:
		MOPH A 0 A_StopSoundEx("Body")
		MOPH B 8 bright A_PlayWeaponSound("MohophAttack1")
		MOPH C 8 bright A_PlayWeaponSound("MohophAttack2")
		MOPH D 8 bright A_PlayWeaponSound("MohophAttack3")
		MOPH A 40 bright
        Goto Spawn		
    Death:
	DeathAnim:
		MOPH A 0 A_GiveInventory("GhoulAmmo",1)
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		MOPH A 0 A_StopSoundEx("Voice")
		MOPH A 0 A_StopSoundEx("Weapon")
		MOPH A 0 A_PlaySoundEx("MohophDie","Voice")
        MOPH A 0 A_Fall
        MOPH A 0 A_NoBlocking
		MOPH AAAAA 2 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MOPH A 4
		MOPH AAAAA 2 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MOPH A 4
		MOPH AAAAA 2 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MOPH A 4
		MOPH AAAAA 2 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MOPH A 4 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MOPH A 2 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MOPH A 4 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MOPH A 2 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MOPH A 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		MOPH A 0 A_GiveInventory("GhoulAmmo",1)
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
        MOPH A 0 A_Fall
        MOPH A 0 A_NoBlocking		
		TNT1 A 0 A_PlaySound("Ghostbuster/Enlarge")
		TNT1 A 0 A_SpawnItem("ExpanderExplosion", 0, 32)
		TNT1 A 0 A_SpawnItemEx("MohophEnlarge_1", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION)		
		MOPH A 1
		BLAN A -1
		Stop
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("PlaneWalkCheck", 1, 1)
		Goto DeathAnim
		TNT1 A 0 A_GiveToTarget("PlaneDashKill", 1)
		Goto DeathAnim		
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("PlaneWalkCheck", 1, 1)
		Goto DeathAnim
		TNT1 A 0 A_giveToTarget("PlaneDashKill", 1)
		Goto DeathAnim
	Death.PlaneBlade:
		TNT1 A 0 A_GiveToTarget("PlaneBladeKill", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("PlaneWalkCheck", 1, 1)
		Goto DeathAnim
		TNT1 A 0 A_giveToTarget("PlaneDashKill", 1)
		Goto DeathAnim		
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
    }
}

Actor MohophBlood : Blood
{
	States
	{
	Spawn:
		BLUD C 0
		BLUD C 0 A_PlaySoundEx("MohophPain","Body")
		BLUD C 8 A_SpawnItemEx("NashGore_FlyingBlood", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), 161, 0)
		BLUD B 8 
		BLUD A 8 
		Stop
	}
}

Actor MophTrail
{
	PROJECTILE
	Speed 16
	Radius 16
	Height 56
	Alpha 0.66
	Scale 0.2
	Renderstyle Translucent
	BounceType Hexen
	BounceCount 4
	//VisibleToTeam 0
	+CANBOUNCEWATER
	+THRUACTORS
	+NOBLOOD
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		MOPH A 0
		TNT1 A 0 A_JumpIfInTargetInventory("MohophClone", 1, "SpawnClones")
	Stop
	SpawnClones:
		MOPH A 0 A_PlaySoundEx("TrailMohophs","SoundSlot6",0,-1)
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		MOPH A 0 A_JumpIfInTargetInventory("GhoulAmmo",1,"Death")
		MOPH A 5 Bright
		Stop
	Death:
		MOPH Z 3 A_FadeOut(0.1)
		loop
	}
}

Actor MorphScreamer : Weapon
{
	Weapon.SlotNumber 1
	Weapon.SelectionOrder 350
	Weapon.AmmoType2 "MorphAmmo"
	Weapon.AmmoGive2 0
	Weapon.AmmoUse2 0
	Weapon.Kickback 0
	Weapon.YAdjust 0
	Inventory.Icon "MOPHATT" 
	+WEAPON.DONTBOB
	+WEAPON.MELEEWEAPON
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		MOPW A 1
		Stop
	Ready:
		MOPW A 15
		MOPW A 0 A_TakeInventory("MohophNotReady", 1)
		MOPW A 1 A_WeaponReady
		wait
	Deselect:
		MOPW AAAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
		MOPW A 1 A_Lower
		Loop
	Select:
		MOPW AAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		MOPW A 1 A_Raise
		Loop
	Fire:
		MOPW B 1 A_GiveInventory("MohophNotReady", 1)
		TNT1 A 0 A_JumpIfInventory("MohophRange", 1, "FireX")
		TNT1 A 0 A_JumpIfInventory("MohophDasher", 1, "FireThrust")
		MOPW B 7 A_FireCustomMissile("MohophAttack")	
		MOPW C 8 A_FireCustomMissile("MohophAttack")		
		MOPW D 8 A_FireCustomMissile("MohophAttack")			
		MOPW E 3 A_FireCustomMissile("MohophAttack")	
		MOPW E 5 ACS_ExecuteAlways(782,0)
		MOPW A 45 A_FireCustomMissile("MohophAttack2")
		Goto Ready+1
	FireX: // Caused desyncs otherwise so I copied a lot of times etc...
		TNT1 A 0 A_JumpIfInventory("MohophDasher", 1, "FireXThrust")
		MOPW B 7 A_FireCustomMissile("MohophAttackX")		
		MOPW C 8 A_FireCustomMissile("MohophAttackX")	
		MOPW D 8 A_FireCustomMissile("MohophAttackX")		
		MOPW E 3 A_FireCustomMissile("MohophAttackX")
		MOPW E 5 ACS_ExecuteAlways(782,0)
		MOPW A 45 A_FireCustomMissile("MohophAttack2X")
		Goto Ready+1	
	FireThrust:
		MOPW B 7 A_FireCustomMissile("MohophAttack")	
		TNT1 A 0 A_Recoil(-3.6)
		MOPW C 8 A_FireCustomMissile("MohophAttack")		
		TNT1 A 0 A_Recoil(-3.6)
		MOPW D 8 A_FireCustomMissile("MohophAttack")	
		TNT1 A 0 A_Recoil(-3.6)
		MOPW E 3 A_FireCustomMissile("MohophAttack")	
		TNT1 A 0 A_Recoil(-3.6)
		MOPW E 5 ACS_ExecuteAlways(782,0)
		MOPW A 45 A_FireCustomMissile("MohophAttack2")	
		Goto Ready+1
	FireXThrust:
		MOPW B 7 A_FireCustomMissile("MohophAttackX")
		TNT1 A 0 A_Recoil(-3.6)		
		MOPW C 8 A_FireCustomMissile("MohophAttackX")
		TNT1 A 0 A_Recoil(-3.6)			
		MOPW D 8 A_FireCustomMissile("MohophAttackX")
		TNT1 A 0 A_Recoil(-3.6)				
		MOPW E 3 A_FireCustomMissile("MohophAttackX")
		TNT1 A 0 A_Recoil(-3.6)			
		MOPW E 5 ACS_ExecuteAlways(782,0)
		MOPW A 45 A_FireCustomMissile("MohophAttack2X")	
		Goto Ready+1
	AltFire:
	    MOPW B 6 A_GiveInventory("MohophNotReady", 1)
		MOPW A 0 A_JumpIfInventory("MorphAmmo",1,"Morph")
		MOPW CDE 6
		MOPW A 15
		Goto Ready+1
	Morph:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 15 A_TakeInventory("MorphAmmo",1)
		MOPW A 0 A_JumpIfInventory("KilledMarine",1,"MorphMarine")
		MOPW A 0 A_JumpIfInventory("KilledHunter",1,"MorphHunter")
		MOPW A 0 A_JumpIfInventory("KilledCyborg",1,"MorphCyborg")
		MOPW A 0 A_JumpIfInventory("KilledGhostbuster",1,"MorphGBuster")
		MOPW A 0 A_JumpIfInventory("KilledEngineer",1,"MorphEngineer")
		MOPW A 0 A_JumpIfInventory("KilledWitchHunter",1,"MorphWH")
		MOPW A 0 A_JumpIfInventory("KilledWarlock",1,"MorphWarlock")
		MOPW A 0 A_JumpIfInventory("killedplanewalker",1,"MorphPlane")
		MOPW A 0 A_JumpIfInventory("killedprotector",1,"MorphProtector")
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 10 ACS_ExecuteAlways(781,0,0)
		Goto Ready+1
	MorphMarine:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,2)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphHunter:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,3)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphCyborg:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,4)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphGBuster:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,5)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphEngineer:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,6)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphWH:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,7)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphWarlock:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,8)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphPlane:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,9)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphProtector:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,10)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready		
	}
}

Actor MorphRanged : Weapon
{
	Weapon.SlotNumber 1
	Weapon.SelectionOrder 350
	Weapon.AmmoType "MorphRangeAmmo"
	Weapon.AmmoUse 1
	Weapon.AmmoType2 "MorphAmmo"
	Weapon.AmmoGive2 0
	Weapon.AmmoUse2 0
	Weapon.Kickback 0
	Weapon.YAdjust 0
	Inventory.Icon "MOPHATT2" 
	+WEAPON.DONTBOB
	+WEAPON.MELEEWEAPON
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		MOPW A 1
		Stop
	Ready:
		MOPW A 15
		MOPW A 0 A_TakeInventory("MohophNotReady", 1)
		MOPW A 1 A_WeaponReady
		Wait
	Deselect:
		MOPW AAAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
		MOPW A 1 A_Lower
		Loop
	Select:
		MOPW AAAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		MOPW A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_GiveInventory("MohophNotReady", 1)
		MOPW B 1 A_GunFlash 
		TNT1 A 0 A_JumpIfInventory("MohophRange", 1, "FireX")
		MOPW B 7
		MOPW C 8
		MOPW A 45 A_FireCustomMissile("MohophAttackRange", 0, 1, 0, -8)
		Goto Ready+1
	FireX:
		MOPW B 7	
		MOPW C 8	
		MOPW A 45 A_FireCustomMissile("MohophAttackRangeX", 0, 1, 0, -8)
		Goto Ready+1				
	AltFire:
	    MOPW B 6 A_GiveInventory("MohophNotReady", 1)
		MOPW A 0 A_JumpIfInventory("MorphAmmo",1,"Morph")
		MOPW CDE 6
		MOPW A 15
		Goto Ready+1
	Morph:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 15 A_TakeInventory("MorphAmmo",1)
		MOPW A 0 A_JumpIfInventory("KilledMarine",1,"MorphMarine")
		MOPW A 0 A_JumpIfInventory("KilledHunter",1,"MorphHunter")
		MOPW A 0 A_JumpIfInventory("KilledCyborg",1,"MorphCyborg")
		MOPW A 0 A_JumpIfInventory("KilledGhostbuster",1,"MorphGBuster")
		MOPW A 0 A_JumpIfInventory("KilledEngineer",1,"MorphEngineer")
		MOPW A 0 A_JumpIfInventory("KilledWitchHunter",1,"MorphWH")
		MOPW A 0 A_JumpIfInventory("KilledWarlock",1,"MorphWarlock")
		MOPW A 0 A_JumpIfInventory("killedplanewalker",1,"MorphPlane")
		MOPW A 0 A_JumpIfInventory("killedprotector",1,"MorphProtector")
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 10 ACS_ExecuteAlways(781,0,0)
		Goto Ready+1
	MorphMarine:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,2)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphHunter:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,3)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphCyborg:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,4)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphGBuster:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,5)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphEngineer:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,6)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphWH:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,7)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphWarlock:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,8)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphPlane:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,9)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	MorphProtector:
		MOPW A 0 A_GiveInventory("MorphCount1",1)
		MOPW A 0 A_GiveInventory("MorphCount2",1)
		MOPW A 0 A_GiveInventory("MorphActivator",1)
		MOPW A 0 ACS_ExecuteAlways(781,0,10)
		TNT1 A 0 A_GiveInventory("CheckAchievements", 1)
		Goto Ready
	Pain.GhostbusterHorror:
		TNT1 A 0 A_GiveInventory("VisionDimEffect", 1)
		Goto Pain
	}
}

Actor MorphCount1 : Inventory
{
	Inventory.Amount 1
	Inventory.MaxAmount 9999
}

Actor MorphCount2 : Inventory
{
	Inventory.Amount 1
	Inventory.MaxAmount 9999
}

Actor MorphActivator : CustomInventory
{
	Inventory.Amount 0
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	Spawn:
		TNT1 A 0
		Stop
	Use:
		TNT1 A 0 A_SpawnItemEx("MorphSpawner")
		Stop
	}
}

Actor MorphSpawner
{
	Radius 5
	Height 5
	+RIPPER
	+NOGRAVITY
	+BLOODLESSIMPACT
	States
	{
	Spawn:
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,0,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,45,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,90,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,135,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,180,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-45,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-90,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,112)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,180)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,-22)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,-45)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,-67)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,-90)
		TNT1 A 0 A_CustomMissile("MorphBall",32,0,-135,2,-112)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,0,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,22,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,45,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,67,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,90,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,112,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,135,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,157,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,180,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-157,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-135,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-112,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-90,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-67,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-45,2,40)
		TNT1 A 0 A_CustomMissile("MorphBall2",10,0,-22,2,40)
		TNT1 A 1
		Stop
	}
}

Actor MorphBall
{
	Radius 2
	Height 2
	Speed 10
	Alpha 0.65
	RenderStyle Add
	+RIPPER
	+NOGRAVITY
	+BLOODLESSIMPACT
	+FORCEXYBILLBOARD
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		6AL1 DEFGHI 3 A_FadeOut(0.1)
		Stop
	}
}

Actor MorphBall2 : MorphBall
{
	Speed 20
	Alpha 1.0
	-NOGRAVITY
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		6AL1 ABCB 3 A_FadeOut(0.1)
		Loop
	}
}

Actor UnMorph : CustomInventory
{
	Inventory.Amount 1
	Inventory.MaxAmount 1
	+INVBAR
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		TNT1 A 1
		Stop
	Use:
		TNT1 A 0 ACS_ExecuteAlways(781,0,1)
		Fail
	}
}

Actor MorphAmmo : Ammo
{
	Inventory.PickupMessage ""
	Inventory.Amount 5
	Inventory.MaxAmount 5
	Inventory.Icon "GHOULAMM"
	Ammo.BackPackAmount 5
	Ammo.BackPackMaxAmount 5
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}

Actor MorphRangeAmmo : Ammo
{
	Inventory.Amount 1
	inventory.maxamount 5
	Ammo.BackPackAmount 5
	Ammo.BackPackMaxAmount 5
	+INVENTORY.IGNORESKILL	
	inventory.icon "IF_ICON1"
	States
	{
		spawn:
			TNT1 A -1
		Stop
	}
}

Actor MohophAttack
{
	Speed 6
	Height 5
	Obituary "%o saw %k's true face." 
	Damage (10)
	DamageType "Mohoph"
	Radius 4
	PROJECTILE
	+NOEXTREMEDEATH
	+DONTREFLECT
	-CANBLAST
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2 A_Explode(40, 128, 0)
		Stop
	}
}

Actor MohophAttack2 : MohophAttack
{
	Speed 6
	Damage (210)
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2 A_Explode(100, 128, 0)
		Stop
	}
}

Actor MohophAttackX : MohophAttack
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2 A_Explode(40, 176, 0)
		Stop
	}
}

Actor MohophAttack2X : MohophAttack2
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2 A_Explode(100, 176, 0)
		Stop
	}
}

Actor MohophAttackRange
{
	Speed 44
	Height 16
	Obituary "%o saw %k's true face." 
	Damage (15)
	DamageType "MohophRange"
	Radius 12
	Scale 0.2
	Alpha 0.8
	Renderstyle Translucent
	PROJECTILE
	+NOEXTREMEDEATH
	+MTHRUSPECIES
	States
	{
		Spawn:
			MOPH A 35
		Stop
		Death:
			TNT1 A 0 A_Explode(15, 128, 0)
		Stop
	}
}

Actor MohophAttackRangeX : MohophAttackRange
{
	Speed 44
	Height 16
	Radius 12
	States
	{
		Spawn:
			MOPH A 45
		Stop
		Death:
			TNT1 A 0 A_Explode(16, 176, 0)
		Stop		
	}
}

Actor MarineMorph : PlayerPawn
{
	Mass 400
	Player.SoundClass "Marine"
	Player.MorphWeapon "MorphRiotgun"
	Species "Ghoul"
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		PLAY Z 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		PLAY Z 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		PLAY A 0 SetPlayerProperty(0,0,3)
		PLAY AB 5 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PLAY A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		PLAY CD 5 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PLAY A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Goto Spawn
	Missile:
		PLAY E 12 
		Goto Spawn
	Melee:
		PLAY F 6 bright
		Goto Missile
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		PLAY H 0 A_PlaySoundEx("MohophDie","Voice")
		PLAY HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY H 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY I 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY J 0 A_NoBlocking
		PLAY JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY J 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY K 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY L 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY M 10 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PLAY N 10 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PLAY N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim	
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphRiotgun : Weapon
{
	Radius 20
	Height 16
	Decal "BulletChip"
	Weapon.SlotNumber 1
	Weapon.KickBack 100
	Inventory.Icon "SHOTTY"
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.NOAUTOAIM
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		SHOT A 1
		Stop
	Ready:
		SHTG A 15
		SHTG A 1 A_WeaponReady
		Goto Ready+1
	Deselect: 
		SHTG A 1 A_Lower
		Loop
	Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		TNT1 A 0 A_Raise
		SHTG A 1 A_Raise
		Goto Select + 1
  Fire:
      SHTG E 0 A_GunFlash
	  SHTG E 0 A_FireBullets (5, 4, 7, 0, "BulletPuffShotgun")
	  SHTG E 0 A_PlayWeaponSound("weapons/shotgunNew")
      SHTG CDEFGHI 1 bright
	 // SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE", 20, -10, 36, 0, 0, 2, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE",cos(-pitch)*20,-10,36+(sin(-pitch)*20),cos(-pitch)*0,0,2,0,0,0)
      SHTG JKLM 1
	  //SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE", 20, -15, 42, 0, 0, 2, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE",cos(-pitch)*20,-15,42+(sin(-pitch)*20),cos(-pitch)*0,0,2,0,0,0)
	  SHTG NOPQ 1
	  //SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE", 20, -15, 42, 0, 0, 2, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE",cos(-pitch)*20,-15,42+(sin(-pitch)*20),cos(-pitch)*0,0,2,0,0,0)
	  SHTG RSTU 1
	  //SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE", 20, -15, 42, 0, 0, 2, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE",cos(-pitch)*20,-15,42+(sin(-pitch)*20),cos(-pitch)*0,0,2,0,0,0)
	  SHTG V 2
	  //SHTG V 0 A_SpawnItemEx ("shotguncasing", 36, -18, 34, 0, 6, 0, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("shotguncasing",cos(-pitch)*36,-18,34+(sin(-pitch)*36),cos(-pitch)*0,random(5, 8), random(0, 1),0,0,0)
	  SHTG V 2
	  //SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE", 20, -15, 42, 0, 0, 2, 0,0, 0) 
	  SHTG G 0 A_SpawnItemEx ("SHOTGUNSMOKE",cos(-pitch)*20,-15,42+(sin(-pitch)*20),cos(-pitch)*0,0,2,0,0,0)
	  SHTG UTSRQPONMLKJ 1
      SHTG A 1 A_ReFire
      Goto Ready
	Flash:
		TNT1 A 4 bright A_Light1
		TNT1 A 3 bright A_Light2
		TNT1 A 0 bright A_Light0
		Stop
	AltFire:
		SHTG A 0 A_JumpIfInventory("GrenadePower",35,"GrenadeMax")
		SHTG A 0 A_JumpIfInventory("GrenadePower",1,"Grenade")
		Goto Lower
	Lower:
		SHTG A 1 offset (0, 40)
		SHTG A 1 offset (0, 50)
		SHTG A 1 offset (0, 60)
		SHTG A 1 offset (0, 70)
		SHTG A 1 offset (0, 80)
		SHTG A 1 offset (0, 90)
		SHTG A 1 offset (0, 100)
		SHTG A 1 offset (0, 110)
		SHTG A 1 offset (0, 120)
		TNT1 A 3 A_PlayWeaponSound("Weapons/GrenadePin")
		Goto Grenade
	Grenade:
		TNT1 A 1 A_GiveInventory("GrenadePower",1)
		TNT1 A 0 A_JumpIfInventory("GrenadePower",35,"GrenadeMaxsound")
		TNT1 A 0 A_ReFire
		Goto Throw
	Throw:
		TNT1 A 0 ACS_ExecuteAlways(998, 0, 1)
		HNDG IJ 1 Offset (0, 40)
		HNDG A 0 A_PlayWeaponSound("Weapons/GrenadeThrow")
		HNDG A 0 A_JumpIfInventory("GrenadePower",35,"Throw7")
		HNDG A 0 A_JumpIfInventory("GrenadePower",30,"Throw6")
		HNDG A 0 A_JumpIfInventory("GrenadePower",25,"Throw5")
		HNDG A 0 A_JumpIfInventory("GrenadePower",20,"Throw4")
		HNDG A 0 A_JumpIfInventory("GrenadePower",15,"Throw3")
		HNDG A 0 A_JumpIfInventory("GrenadePower",10,"Throw2")
		HNDG A 1 A_JumpIfInventory("GrenadePower",5,"Throw1")	  
		HNDG K 2 A_FireCustomMissile("ThrowingGrenadex2", 0, 1, 0, 10)
		Goto Throwpt2
	Throw1:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade12", 0, 1, 0, 10)
		Goto Throwpt2
	Throw2:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade22", 0, 1, 0, 10)
		Goto Throwpt2
	Throw3: 
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade32", 0, 1, 0, 10)
		Goto Throwpt2
	Throw4:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade42", 0, 1, 0, 10)
		Goto Throwpt2
	Throw5:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade52", 0, 1, 0, 10)
		Goto Throwpt2
	Throw6:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade62", 0, 1, 0, 10)
		Goto Throwpt2
	Throw7:
		HNDG K 2 A_FireCustomMissile("ThrowingGrenade72", 0, 1, 0, 10)
		Goto Throwpt2
	Throwpt2:
		HNDG LMNOPQ 2
		TNT1 A 0 A_ClearReFire
		TNT1 A 0 A_TakeInventory("GrenadePower",500)
		Goto Return
	GrenadeMaxsound:
		TNT1 A 0 ACS_ExecuteAlways(998, 0, 0)
		TNT1 A 0 A_PlayWeaponSound("Weapons/GrenadeMax")
		Goto GrenadeMax
	GrenadeMax:
		TNT1 A 1 A_GiveInventory("GrenadePower",1)
		TNT1 A 0 A_JumpIfInventory("GrenadePower",140,"GrenadeSloops")
		TNT1 A 0 A_ReFire
		TNT1 A 0 A_PlaySoundEx("Player/Male/Grunt1","Voice")
		Goto Throw
	GrenadeSloops:
		TNT1 A 0 ACS_ExecuteAlways(998, 0, 1)
		TNT1 A 30 A_FireCustomMissile("ThrowingGrenadeOops2", 0, 1, 0, -10)
		TNT1 A 0 A_ClearRefire
		TNT1 A 0 A_TakeInventory("GrenadePower",500)
		Goto Return
	Return:
		SHTG A 1 offset (0, 120) ACS_ExecuteAlways(998, 0, 1)
		SHTG A 1 offset (0, 110)
		SHTG A 1 offset (0, 100)
		SHTG A 1 offset (0, 90)
		SHTG A 1 offset (0, 80)
		SHTG A 1 offset (0, 70)
		SHTG A 1 offset (0, 60)
		SHTG A 1 offset (0, 50)
		SHTG A 1 offset (0, 40)
		Goto Ready+1
	}
}

Actor ThrowingGrenadex2 : ThrowingGrenade
{
	States
	{
	Death:
		NKXP A 0 A_SpawnItemEx("GrenadeExplosion", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		NKXP A 1
		Stop
	}
}

Actor ThrowingGrenade12 : ThrowingGrenadex2
{
	Speed 24
}

Actor ThrowingGrenade22 : ThrowingGrenadex2
{
	Speed 29
}

Actor ThrowingGrenade32 : ThrowingGrenadex2
{
	Speed 34
}

Actor ThrowingGrenade42 : ThrowingGrenadex2
{
	Speed 39
}

Actor ThrowingGrenade52 : ThrowingGrenadex2
{
	Speed 44
}

Actor ThrowingGrenade62 : ThrowingGrenadex2
{
	Speed 49
}

Actor ThrowingGrenade72 : ThrowingGrenadex2
{
	Speed 54
}

Actor ThrowingGrenadeOops2
{
	Radius 7
	Height 5
	Speed 30
	Scale 0.38
	BounceCount 2
	BounceFactor 0.5
	ReactionTime 5
	Obituary "%o was blown to bits by %k."
	Damagetype "Grenade"
	PROJECTILE
	+DOOMBOUNCE
	+BOUNCEONACTORS
	- NOGRAVITY
	States
	{
	Spawn:
		HGRN A 0 
		HGRN A 0 A_PlaySound("Weapons/GrenadeExplode")
		Goto Death
	Death:
		NKXP A 0 A_SpawnItemEx("GrenadeExplosion", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		NKXP A 1
		Stop
	}
}


Actor HunterMorph : PlayerPawn
{
	Mass 400
	Player.SoundClass "Hunter"
	Player.ForwardMove 1.18
	Player.SideMove 1.0
	Player.ColorRange 112, 127
	Player.MorphWeapon "MorphBow"
	Species "Ghoul"
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		HUNT A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		HUNT A 3
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		HUNT A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		HUNT ABCD 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		Loop
	Missile:
		HUNT E 12 
		Goto Spawn
	Melee:
		HUNT F 6
		Goto Missile
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		HUNT H 0 A_PlaySoundEx("MohophDie","Voice")
		HUNT HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT H 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT I 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT J 0 A_NoBlocking
		HUNT JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT J 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT K 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT L 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT M 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		HUNT NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT N 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HUNT N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphBow : Weapon
{	
	+WEAPON.NOAUTOAIM
	decal "LightningDecal"
	Weapon.SlotNumber 1
	+NOALERT 
	+DONTBOB
	+INVENTORY.UNDROPPABLE
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL	
	inventory.icon "LBOW"
	States
	{
    Spawn: 
       BOWP A 400
       Stop 
    Ready: 
	   TNT1 A 0 A_PlaySoundEx("weapons/bowlswitch", "Weapon")
	   BOWA H 1 A_WeaponReady 
       Goto Ready+1
    Deselect: 
       BOWA H 1 A_Lower
	   Loop
    Select: 
	   TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
	   TNT1 A 0 A_Raise
       BOWA H 1 A_Raise
       Goto Select + 1
    Fire:   
	   TNT1 A 0 A_JumpIfNoAmmo("NoArrows")
	   TNT1 A 0 ACS_ExecuteAlways(998, 0, 0)
       BOWA HIJKL 3
	   BOWA L 2 A_PlaySoundEx ("weapons/bowdraw", "SoundSlot7")
	   TNT1 A 0 A_GiveInventory("LightningCheck",1)
	   TNT1 A 0 A_GunFlash
	   Goto Hold
	Hold:
	   BOWA M 1 bright 
	   TNT1 A 0 A_Refire
	   TNT1 A 0 A_GiveInventory("LightningCheck",1)
	   TNT1 A 0 A_StopSoundEx("SoundSlot7")
	   BOWA H 0 A_Light0
	   TNT1 A 0 A_PlayWeaponSound("weapons/LightningArrow")
	   TNT1 A 0 A_FireCustomMissile("LightningArrow", 0, 1, 8, 0)
	   TNT1 A 0 A_RailAttack(0, 9, 0, "none", "yellow", 0, 9999, "HunterRailPuff") 
	   TNT1 A 0 A_SpawnItem("HunterLightSpawner")
	   TNT1 A 0 ACS_ExecuteAlways(998, 0, 1)
       BOWA P 30
	   BOWA G 4 A_TakeInventory("LightningCheck",2)
	   Goto Ready+1
	Flash:
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",1,"SFlash")
	   YEL5 ABC 1 bright
	   YEL5 D 2 bright
	   TNT1 A 0 A_PlaySoundEx("weapons/lightfall","Weapon")
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 0) 
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 45) 
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 90) 
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 135) 
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 180)
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 225) 
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 270)
		TNT1 A 0 A_SpawnItemEx ("HunterLightningParticle2", 0, 0, 4, 0, 0, 0, 315) 
	   YEL5 EF 3 bright
	   YEL5 EF 3 bright 
	   YEL5 CBA 2 bright
	   Stop
	SFlash:
	   BOWL A 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   BOWL A 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   BOWL B 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   BOWL B 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   BOWL C 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   BOWL C 1 bright
	   TNT1 A 0 A_JumpIfInventory("LightningCheck",2,"Goaway")
	   loop
	Goaway:
	   TNT1 A 0
	   stop
	NoArrows:
	   BOWA H 28 A_PlayWeaponSound("weapons/arrowno")
	   Goto Ready+1
	   Altfire:
	   BOWA GFE 4
	   BOWA E 25 A_GunFlash
	   BOWA EFG 6
	   BOWA H 1 A_WeaponReady 
	   Goto Ready+1
	}	
}

Actor ArrowFire2X : ArrowFire
{ 
   Damage 0
} 

Actor HunterLightningParticle2 : HunterLightningParticle
{
	Damage (0)
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_ExecuteAlways(450, 0, angle, 12)
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT G 3 Bright
		TNT1 A 0 A_SpawnItemEx("HunterLightningSparkletMaggot", random(-1,1), random(-1,1), random(0,1), random(8,12), random(8,12), random(4,7), random(-180,180))
		EBLT H 1
		Goto Death
	Death:
		EBLT IJK 2
		Stop
	}
}

Actor CyborgMorph : PlayerPawn
{
	Mass 500
	Scale 0.92
	BloodType "BulletPuff"
	Player.SoundClass "Cyborg"
	Player.MorphWeapon "MorphCyborgPlasma"
	Player.ForwardMove 0.8
	Player.SideMove 0.8
	Player.ViewHeight 48
	Species "Ghoul"
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		ROB1 D 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		ROB1 D 15
		ROB1 D 0 A_JumpIf(momz!=0,"Spawn")
		Loop
		ROB1 D 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		ROB1 E 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		ROB1 EEBB 3 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		ROB1 B 0 A_SpawnItemEx ("CyborgStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		ROB1 CCDD 3 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		ROB1 B 0 A_SpawnItemEx ("CyborgStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Loop
	Missile:
		ROB1 G 18
		Goto Spawn
	Death:
	DeathAnim:
		ROB1 A 0 A_ChangeFlag("LOWGRAVITY",0)
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		ROB1 A 0 A_PlaySoundEx("MohophDie","Voice")
		ROB1 JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 J 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 K 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 L 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 M 5 A_NoBlocking
		ROB1 NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 N 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 OO 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 OO 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 O 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 PP 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 PP 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 P 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 QQ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 QQ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 Q 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 RR 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 RR 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		ROB1 R 6 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		ROB1 R 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphCyborgPlasma : Weapon
{
	Weapon.SlotNumber 1
	Inventory.Icon "CYBWEP"
	Scale 0.6
	+INVENTORY.UNDROPPABLE
	+WEAPON.NOAUTOAIM
	+DONTBLAST
	States
	{
	Spawn:
		TNT1 A 1
		Stop
	Ready:
		SABS A 15
		SABS A 1 A_WeaponReady
		Goto Ready+1
	Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		TNT1 A 0 A_Raise
		SABS A 1 A_Raise
		Goto Select + 1
	Deselect:
		SABS A 1 A_Lower
		Loop
	Fire:
		SABA A 1 SetPlayerProperty(0,0,3)
		SABA B 2 A_FireCustomMissile("CyborgPlasmaBall2",0,1,11,3)
		SABA C 1
		SABA D 1 
		SABS A 1 A_Refire
		Goto Ready+1
	AltFire:
		SABA A 1 SetPlayerProperty(0,0,3)
		SABA B 2 A_FireCustomMissile("CyborgPlasmaBall2",0,1,11,3)
		SABA C 1
		SABA D 1 
		SABS A 1 A_Refire
		Goto Ready+1
	}
}

Actor CyborgPlasmaBall2 : CyborgPlasmaBall
{
	Damage 0
}

Actor GhostBusterMorph : PlayerPawn
{
	Mass 400
	PainChance 0
	Player.SideMove 1.03
	Player.SoundClass "Peter"
	Player.MorphWeapon "MorphGhostBusterPlasma"
	Player.ColorRange 112, 127
	Species "Ghoul"
	+NOSKIN
	+GHOST
	+NOICEDEATH
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		PETE A 1
		Loop
		PETE A 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		PETE AB 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PETE A 0 A_SpawnItemEx("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		PETE CD 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PETE A 0 A_SpawnItemEx("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Loop
	Missile:
		PETE E 12
		PETE E 6
		Goto Spawn
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		PETE A 0 A_PlaySoundEx("MohophDie","Voice")
		PETE HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE H 7 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE I 7 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE J 0 A_NoBlocking
		PETE JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE J 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE K 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE L 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE M 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		PETE N 5 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		PETE N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphGhostBusterPlasma : GhostBusterPlasma
{
	Weapon.SlotNumber 1
	Weapon.AmmoType ""
	Inventory.Icon "GBGUN1"
	+WEAPON.NOAUTOAIM
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		TNT1 A 1
		Loop
	Ready:
		PACK A 0 A_PlaySound("Pack/HeatUp")
		PACK A 15
		PACK A 1 A_WeaponReady
		Goto Ready+2
	Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		TNT1 A 0 A_Raise
		TNT1 A 1 A_Raise
		Goto Select + 1
	Deselect:
		TNT1 A 1 A_Lower 
		Loop
	Fire:
		PACK B 1 
		PACK C 1
		PACK D 1
		Goto Hold
	Hold:
		PACK D 2 A_FireCustomMissile("GhostBusterBall2", 0, 1, 8, 3)
		PACK D 2 A_FireCustomMissile("GhostBusterBall2", 0, 0, 8, 3)
		PACK D 1 A_Refire
		PACK D 3 A_ClearReFire
		PACK CBA 1
		Goto Ready+2
	Altfire:
		PACK A 20 A_PlaySoundEx("GBUpgradeFail","Voice")
		Goto Ready+2
	}
}

Actor GhostBusterBall2 : GhostBusterBall
{
	Damage 0
}

Actor EngineerMorph : PlayerPawn
{
	Mass 400
	Player.SoundClass "Engin"
	Player.MorphWeapon "MorphNailGun"
	Player.ColorRange 112, 127
	Species "Ghoul"
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		GO99 A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		GO99 A 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		GO99 A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		GO99 AB 5 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		GO99 A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		GO99 CD 5 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		GO99 A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Goto Spawn
	Missile:
		GO99 E 12 
		Goto Spawn
	Melee:
		GO99 F 6 bright
		Goto Missile
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		GO99 A 0 A_PlaySoundEx("MohophDie","Voice")
		GO99 HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 H 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 I 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 J 0 A_NoBlocking
		GO99 JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 J 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 K 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 L 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 M 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		GO99 N 5 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		GO99 N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphNailGun : Weapon
{
	Weapon.SelectionOrder 100
	Weapon.SlotNumber 1
	Weapon.KickBack 100
	Inventory.Icon "NAILGG"
	Decal "BulletChip"
	+INVENTORY.UNDROPPABLE
	+WEAPON.NOAUTOAIM
	+WEAPON.DONTBOB
	States
	{
	Ready:
		LIBG A 15
		LIBG A 1 A_WeaponReady
		Goto Ready+1
	Deselect: 
		LIBG A 1 A_Lower
		Loop
	Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		TNT1 A 0 A_Raise
		LIBG A 1 A_Raise
		Goto Select + 1
	Fire:
		LIBG D 0 A_PlayWeaponSound("EngineerNail")
		LIBG A 1 A_FireCustomMissile("Nail3", random(-1,1), 0, 10, 2)
		LIBG E 1
		LIBG D 1
		LIBG C 2
		LIBG B 2
		LIBG A 2
		LIBG A 0 A_ReFire
		Goto Ready+1
	AltFire:
		LIBG D 0 A_PlayWeaponSound("EngineerNail")
		LIBG D 1 Offset(12,-16) A_FireCustomMissile("Nail4", 0, 0, 10, 2, 1, 8)
		LIBG E 1 Offset(8,-6)
		LIBG D 0 A_PlayWeaponSound("EngineerNail")
		LIBG D 1 Offset(4,-4) A_FireCustomMissile("Nail4", 0, 0, 10, 2, 1, 3)
		LIBG E 1 Offset(0,6)
		LIBG D 0 A_PlayWeaponSound("EngineerNail")
		LIBG D 1 Offset(4,16) A_FireCustomMissile("Nail4", 0, 0, 10, 2, 1, -3)
		LIBG E 1 Offset(8,36)
		LIBG D 0 A_PlayWeaponSound("EngineerNail")
		LIBG D 1 Offset(12,56) A_FireCustomMissile("Nail4", 0, 0, 10, 2, 1, -8)
		LIBG E 14 Offset(12,56)
		LIBG D 2 Offset(10,50)
		LIBG C 2 Offset(8,44)
		LIBG B 2 Offset(6,38)
		LIBG B 2 Offset(4,32) A_ReFire
		Goto Ready+1
	}
}

Actor Nail3 : Nail
{
	Damage 0
}

Actor Nail4 : Nail2
{
	Damage 0
}

Actor WitchMorph : PlayerPawn
{
	Health 100
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+QUICKTORETALIATE
	+NOTARGET
	Player.soundclass "WH"
	Player.MorphWeapon "MorphWitchLaser"
	Player.ColorRange 112, 127
	DamageFactor "FlaskT1", 0.5
	DamageFactor "FlaskT2", 0.5
	DamageFactor "Poison", 0.25
	DamageFactor "Drone", 0.0
	Species "Ghoul"
	Scale 0.8
	mass 400
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 SetPlayerProperty(0,0,3)
	    TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		WHUN B 2
	SpawnLoop:
		WHUN A 1 
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		WHUN BC 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PLAY A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		WHUN DE 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		PLAY A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Goto Spawn
	Missile:
		TNT1 A 0 A_JumpIfInventory("UsingGrenade", 1, "UsingNade")
		WHUN GGGGGGGGGGGG 1 A_JumpIfInventory("UsingGrenade", 1, "UsingNade")
		Goto Spawn
	Melee:
		WHUN F 6 BRIGHT
		Goto Missile
	UsingNade:
		WHUN H 7
		WHUN IJ 5
		Goto Spawn
	Death:
	DeathAnim:
		TNT1 A 0 A_GiveToTarget("KilledMarine", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("GhoulKillCount", 1)
		TNT1 A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		TNT1 A 0 A_GiveToTarget("KilledMohoph",1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)	
		TNT1 A 0 A_PlaySoundEx("MohophDie","Voice")
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN H 9 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		SANT AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN M 8 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 A 0 A_NoBlocking
		WHUN N 3 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN N 3 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN N 3 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		SANT AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN O 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		TNT1 AA 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		WHUN P 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		TNT1 N 0 A_SpawnItemEx("MorphSpawner")		
		TNT1 A 0 A_PlayerScream
		WHUN Q 9 A_NoBlocking
		WHUN R 8
		WHUN S 7
		WHUN T -1
		stop	
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim	
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphWitchLaser : Weapon
{
  Weapon.SlotNumber 1
  weapon.selectionorder 1500
  weapon.kickback 100
  weapon.ammotype ""
  inventory.icon "WITCHLAS"
  weapon.ammouse 0
  weapon.ammogive 0
  Weapon.Ammouse2 0
  +INVENTORY.UNDROPPABLE
  +WEAPON.NOAUTOAIM
  States
  {
	  Ready:
		HSTA A 1 A_WeaponReady
	  Loop
	  Deselect:
		HSTA A 1 A_Lower
		TNT1 AA 0 A_Lower
	  Loop
	  Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		HSTA A 1 A_Raise
		TNT1 AA 0 A_Raise
	  Goto Select + 1
	  Fire:
		HSTA A 3 A_GunFlash
		TNT1 A 0 A_PlayWeaponsound("WH/LaserFireNew")
		TNT1 A 0 A_FireCustomMissile("NewWitchLaserShot2", -1, 0, -6)
		HSTA B 4 Bright
		HSTA C 5 Bright
		HSTA D 4
		HSTA E 3
		HSTA A 5 A_Refire
	  Goto Ready
	  Altfire:
		HSTA A 3 A_GunFlash
		TNT1 A 0 A_PlayWeaponsound("WH/LaserFire")
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt2", 16, 0, 12)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt2", -16, 0, -12)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt2", 8, 0, 6)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt2", -8, 0, -6)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt2", 0, 1, 0)		
		HSTA B 4 Bright
		HSTA C 5 Bright
		HSTA D 4
		HSTA E 3
		HSTA A 10
	  Goto Ready
  }
}

Actor NewWitchLaserShot2 : NewWitchLaserShot
{
	Damage (0)	
	States
	{
		Spawn:
			TNT1 A 10
			TNT1 A 0 A_Stop
			CFX3 CD 5 Bright
			CFX3 EFG 3 Bright			
		Stop
		Death:
			CFX3 CD 5 Bright
			CFX3 EFG 3 Bright
		Stop
	}
}

Actor WitchLaserAlt2 : WitchLaserAlt
{
	Damage 0
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 ThrustThingZ(0, 8, 0, 1)
		SpawnLoop:
			CFX3 AAB 2 Bright A_SpawnItemEx("WitchLaserTrail2")
			TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
			CFX3 B 2 Bright A_SpawnItemEx("WitchLaserTrail2")
			loop
			Death:
			TNT1 A 0 A_SpawnItemEx("WitchLaserLand2",0,0,0,0,0,-1)
			stop
	}
}

Actor WitchLaserLand2 : WitchLaserLand
{
	Damage 0
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 ThrustThingZ(0, 8, 0, 1)
	SpawnLoop:
		CFX3 AAAABBBB 1 Bright A_JumpIf(waterlevel == 2, "Death")
		loop
		Death:
		TNT1 A 0 A_PlaySound("WH/LaserHit")
		TNT1 A 0 A_CustomMissile("WitchLaserSpike2", 0, 0, 0, CMF_TRACKOWNER)
		stop
	}
}

actor WitchLaserSpike2 : WitchLaserSpike
{
	Damage 0
	States
	{
	Spawn:
		CFX3 AB 4 Bright
		HOLL C 0 A_ChangeFlag("NOCLIP",0)
		TNT1 A 0 A_CountDown
		Loop
		Death:
		CFX3 CD 5 Bright
		TNT1 AAAAA 0 A_SpawnItemEx("LittleLaserSparkle2", 0, 0, 0, random(-16, 16), random(-16, 16), 0, random(0, 359))
		CFX3 EFG 3 Bright
		stop
	}
}

Actor LittleLaserSparkle2 : LittleLaserSparkle
{
	Damage 0
}	

Actor WarlockMorph : PlayerPawn
{
	Mass 400
	Player.ColorRange 112, 127
	Player.SoundClass "Mage"
	Player.MorphWeapon "MorphIceHands"
	Species "Ghoul"
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+NOSKIN
	States
	{
	Spawn:
		DAED A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		DAED A 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		DAED ABCD 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		Loop
	Missile:
		DAED E 8
		DAED F 8 bright
		Goto Spawn
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		MAGE A 0 A_PlaySoundEx("MohophDie","Body")
		MAGE HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED H 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED I 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED J 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED K 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE L 0 A_NoBlocking
		DAED L 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED M 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		MAGE NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		DAED N 6 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MAGE N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim	
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim	
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphIceHands : Weapon
{
	Weapon.SelectionOrder 2
	Weapon.SlotNumber 1
	Inventory.Icon "MHUDA0"
	+WEAPON.NOAUTOAIM
//	+WEAPON.DONTBOB
	+INVENTORY.UNDROPPABLE
	+NOALERT 
	States
	{
	Ready:
		CONE A 1 A_WeaponReady
		Loop
	Deselect:
		CONE A 1 A_Lower
		Loop
	Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
		TNT1 A 0 A_Raise
		CONE A 1 A_Raise
		Goto Select + 1
	Fire:
		CONE BCD 1
		goto Hold
	Hold:
		CONE EFGH 1 BRIGHT
		CONE E 0 A_FireCustomMissile ("IceShardsX", 0, 0, 0, 0, 0, 0) 
		CONE E 0 A_FireCustomMissile ("IceShardsX", 2, 0, 0, 0, 0, 0)
		CONE E 0 A_FireCustomMissile ("IceShardsX", -2, 0, 0, 0, 0, 0)
		CONE E 0 A_FireCustomMissile ("IceShardsX", 0, 0, 0, 0, 0, 2) 
		CONE E 0 A_FireCustomMissile ("IceShardsX", 0, 0, 0, 0, 0, -2)
		CONE E 0 A_PlaySound ("MageMissileF")
		CONE IJKLMNOPQRSTU 1 bright
		CONE VZ 1 
		CON2 ABCDEFGH 1
		CON2 I 1 a_refire
		CONE DCB 1
		Goto Ready
	AltFire:
		CONX ABC 1
		CONX DEF 1 BRIGHT
		TNT1 A 0 A_FireCustomMissile("MiniIceShardsX", 0, 0, 6)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)		
		CONX GHI 1 BRIGHT
		TNT1 A 0 A_FireCustomMissile("MiniIceShardsX", 0, 0, 10)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)			
	firego:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory("icestaffspazzitem", 1, "spazz")
		CONX J 1 BRIGHT 
		CONX IHGDEF 1 BRIGHT
		CONY C 1
		CONX C 1
		CONY B 1
		CONX B 1
		CONY A 1
		TNT1 A 0 a_giveinventory("icestaffspazzitem", 16)
		CONX A 1
		goto ready
	spazz:
		TNT1 A 0
		TNT1 A 0 a_takeinventory("icestaffspazzitem", 1)
		TNT1 A 0 a_giveinventory("icetimer", 1)
		TNT1 A 0 a_jumpifinventory("icestaffspazzitem", 1, "nigg")
		TNT1 A 0
		goto firego
	nigg:
		TNT1 A 0
		TNT1 A 0 a_jump(256, "spazz1", "spazz2", "spazz3", "spazz4", "spazz5", "spazz6", "spazz7", "spazz8")
	spazz1:
		CONX K 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire1")
		goto spazz
	spazz2:
		CONX L 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire2")
		goto spazz
	spazz3:
		CONX M 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire3")
		goto spazz
	spazz4:
		CONX N 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire4")
		goto spazz
	spazz5:
		CONX O 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire5")
		goto spazz
	spazz6:
		CONX P 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire6")
		goto spazz
	spazz7:
		CONX Q 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire7")
		goto spazz
	spazz8:
		CONX R 1 bright
		TNT1 A 0 a_jumpifinventory("icetimer", 0, "spazzfire8")
		goto spazz
	spazzfire1:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 7)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire2:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 13)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire3:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 10, 3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire4:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 10, -3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire5:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 7, 3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire6:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 13, -3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire7:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 13, 3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	spazzfire8:
		TNT1 A 0 bright
		TNT1 A 0 bright a_takeinventory("icetimer", 5)
		TNT1 A 0 bright A_FireCustomMissile("MiniIceShardsX", 0, 0, 7, -3)
		TNT1 A 0 A_PlaySoundEx("MageMissileF", 5)	
		goto spazz
	}
}

Actor IceShardsX : IceShards
{
	Damage (0)
}

Actor MiniIceShardsX : IceShardsX
{
	Speed 54
	Radius 2
	Height 3
	Scale 0.85
	Damage (0)
	Alpha 0.75
	RenderStyle Add
	States
	{
		Spawn:
			SHRD AB 2 bright
		Loop
		Death:
			TNT1 A 0 A_PlaySound("FrostTeeth")
			SHEX ABCDE 3 Bright
		Stop
	}
}

Actor PWalkerMorph : PlayerPawn
{
	Health 100
	Mass 400
	Player.ColorRange 112, 127
	Player.SoundClass "PW"
	Player.MaxHealth 100
	Player.MorphWeapon "MorphPlaneShotgun"
	Species "Ghoul"
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+NOSKIN
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		CORV A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		MNK1 A 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		MNK1 AB 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		CORV A 0 A_SpawnItemEx("MarineStomp",0,0,0,0,0,-20,0,0,0) 
		MNK1 CD 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		CORV A 0 A_SpawnItemEx("MarineStomp",0,0,0,0,0,-20,0,0,0) 
		Loop
	Missile:
		MNK1 E 6
		MNK1 F 6 bright
		Goto Spawn
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		CORV A 0 A_PlaySoundEx("MohophDie","Body")
		CORV HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 H 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 H 4 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 I 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 I 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV L 0 A_NoBlocking
		CORV LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 J 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 K 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		MNK1 L 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV N 0 A_SpawnItemEx("MorphSpawner")
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

Actor MorphPlaneShotgun : Weapon
{
  Weapon.SlotNumber 1
  weapon.selectionorder 1500
  weapon.kickback 100
  obituary "%o was splintered by %k's shotgun."
  decal "BulletChip"
  inventory.pickupmessage "You got the shotgun!"
  weapon.ammotype "Shell"
  inventory.icon "PSGGA0"
  weapon.ammouse 0
  weapon.ammogive 10
  Weapon.AmmoUse2 0
  Weapon.AmmoType2 ""
  +INVENTORY.UNDROPPABLE
  +WEAPON.ALT_AMMO_OPTIONAL
  +WEAPON.NOAUTOAIM
  states
  {
  Spawn:
    TNT1 A 400
    stop
  Ready:
    SHOG A 1 A_WeaponReady
    loop
  Deselect: 
    TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_Lower
    SHOG A 1 A_Lower
    loop
  Select:
    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
    TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_Raise
    SHOG A 1 A_Raise
    Goto Select+1
  Fire:
      SHOF A 2 Bright
	  SHTG E 0 A_GunFlash
	  SHTG A 0 A_GiveInventory("UsedAmmo", 1)
	  SHTG E 0 A_FireBullets (4.0, 2.8, 4, 0, "BulletPuffPlane")
	  TNT1 A 0 A_SpawnItem("PlaneLightSpawner")
	  SHTG E 0 A_PlayWeaponSound("PW/ShotFire")
      SHOF B 2 Bright
      SHOG BCD 2
      SHOG EFGHIJK 1
      SHOG L 1 A_PlaySoundEx("PW/ShotCock", 6)
      SHOG MNOPQ 1
      SHOG R 3
      SHOG STUVWXY 1
	  SHOG Z 1 A_Refire
      Goto Ready
	Flash:
	  TNT1 A 4 bright A_Light1
	  TNT1 A 3 bright A_Light2
	  TNT1 A 0 bright A_Light0
	  stop
	AltFire:
	  SHOG A 1
	  TNT1 A 0 A_JumpIfInventory("BladeReturn", 900, "Clean")
	  TNT1 A 0 A_JumpIfInventory("BladeReturn", 1, "Ready")
	  SHOG A 1
	Goto Ready
	  TNT1 A 0 A_GiveInventory("BladeReturn", 5)
	  SHOA ABCDEF 1
	  TNT1 A 0 A_PlaySoundEx("PW/Alt", 5)
	  TNT1 A 0 A_FireCustomMissile("PlaneBladeX",-9,0,8)
	  TNT1 A 0 A_FireCustomMissile("PlaneBladeX",0,0,8)
	  TNT1 A 0 A_FireCustomMissile("PlaneBladeX",9,0,8)
	  Continue:
	  SHOA GFEDCBA 1
	  SHOG A 2
	Goto Ready
	Clean:
	  TNT1 A 0 A_TakeInventory("BladeReturn", 999)
	Goto Ready
	}
}

Actor NormalMohoph : Inventory
{
	inventory.maxamount 1
}

Actor PlaneBladeX : PlaneBlade
{
	Damage (0)
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("PW/Spin")
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn", 999, "Death")
		SHFL ABCD 4
		/*
		TNT1 A 0 A_PlaySound("PW/Spin")
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn",999,"Death")
		SHFL AAAA 1 A_SpawnItemEx("BladeDamager",0,0,0,2,0,0)
		SHFL BBBB 1 A_SpawnItemEx("BladeDamager",0,0,0,2,0,0)
		SHFL CCCC 1 A_SpawnItemEx("BladeDamager",0,0,0,2,0,0)
		SHFL DDDD 1 A_SpawnItemEx("BladeDamager",0,0,0,2,0,0)
		*/
		TNT1 A 0 A_CustomMissile("ReturnPlaneBladeX",0,0,0,0)
	stop
	Death:
		TNT1 A 0 A_GiveToTarget("BladeReturn",300)
	stop	
	}
}

actor ReturnPlaneBladeX : PlaneBladeX
{
	radius 0
	height 0
	speed 28
	+DONTSPLASH
	+NOINTERACTION
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfCloser(60,"Death")
		SHFL CCCC 1
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn",999,"Death")
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfCloser(60,"Death")
		SHFL DDDD 1 
		TNT1 A 0 A_Countdown
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn",999,"Death")
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfCloser(60,"Death")
		TNT1 A 0 A_PlaySound("PW/Spin")
		SHFL AAAA 1
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn",999,"Death")
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_JumpIfCloser(60,"Death")
		SHFL BBBB 1
		TNT1 A 0 A_JumpIfInTargetInventory("BladeReturn",999,"Death")
		TNT1 A 0 A_CustomMissile("ReturnPlaneBladeX",0,0,0,0)
	stop
	}
}

Actor ProtectorMorph : PlayerPawn
{
	Health 125
	Mass 400
	Player.ColorRange 112, 127
	Player.SoundClass "PRT"
	Player.MaxHealth 100
	Player.MorphWeapon "MorphProtectorRifle"
	Species "Ghoul"
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+NOSKIN
	Scale 0.81
	States
	{
	Spawn:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		CORV A 0 SetPlayerProperty(0,0,3)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		HPRT A 1
		Loop
	See:
		TNT1 A 0 A_GiveInventory("HumanTeam", 1)
		TNT1 A 0 A_TakeInventory("NormalMohoph", 1)
		HPRT AB 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		TNT1 A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		HPRT CD 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		TNT1 A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		HPRT EF 4 A_SpawnItemEx("IcefiendTrail", random(-20, 20), random(-20, 20), random(0,50), 0, 0, 0)
		TNT1 A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Loop
	Missile:
		HPRT G 6
		HPRT H 6 BRIGHT
		Goto Spawn
	Death:
	DeathAnim:
		SJAS A 0 A_GiveToTarget("TotalKillCount", 1)
		SJAS A 0 A_GiveToTarget("GhoulKillCount", 1)
		SJAS A 0 ACS_ExecuteAlways(724, 0)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)	
		MOPH A 0 A_GiveToTarget("KilledMohoph",1)
		SJAS A 0 A_GiveToTarget("CheckAchievements", 1)	
		CORV A 0 A_PlaySoundEx("MohophDie","Body")
		CORV HH 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV HH 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT J 5 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV II 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV II 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT J 5 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV JJ 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV JJ 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT K 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV KK 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV KK 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT K 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV L 0 A_NoBlocking
		CORV LL 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV LL 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT L 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV MM 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV MM 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT L 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV NN 0 A_CustomMissile("ArchvileFirex3", 0,0,random(0,360), 2,0)
		CORV NN 0 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		HPRT M 4 A_CustomMissile("ArchvileFirex", 0,0,random(0,360), 2,0)
		CORV N 0 A_SpawnItemEx("MorphSpawner")
		HPRT N 6
		BLAN A -1
		Stop
    Death.MarineShotgun:
        SJAS A 0 A_GiveToTarget("MarineShotgunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarinePistol:
        SJAS A 0 A_GiveToTarget("MarinePistolKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineMachineGun:
        SJAS A 0 A_GiveToTarget("MarineMachineGunKill", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineGrenade:
        SJAS A 0 A_GiveToTarget("MarineGrenadeKill", 1)
        SJAS A 0 A_GiveToTarget("MarineGrenadeMulti", 1)
		TNT1 A 0 A_GiveToTarget("AmmoSatchel2", 1)
        Goto DeathAnim
    Death.MarineSuicideGrenade:
        SJAS A 0 A_GiveToTarget("MarineSuicideGrenadeKill", 1)
        Goto DeathAnim
    Death.HunterFireArrow:
        SJAS A 0 A_GiveToTarget("HunterFireArrowKill", 1)
        SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterIceArrow:
        SJAS A 0 A_GiveToTarget("HunterIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterLightningRail:
        SJAS A 0 A_GiveToTarget("HunterLightningRailKill", 1)
        SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.HunterFireMagic:
        SJAS A 0 A_GiveToTarget("HunterFireMagicKill", 1)
        Goto DeathAnim
    Death.HunterRegularMagic:
        SJAS A 0 A_GiveToTarget("HunterRegularMagicKill", 1)
        Goto DeathAnim
    Death.HunterIceSpike:
        SJAS A 0 A_GiveToTarget("HunterIceSpikeKill", 1)
        Goto DeathAnim
    Death.HunterLightningMagic:
        SJAS A 0 A_GiveToTarget("HunterLightningMagicKill", 1)
        Goto DeathAnim
    Death.HunterSuperFireArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperFireArrowKill", 1)
		SJAS A 0 A_GiveToTarget("HunterFireMulti", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperIceArrowTrail2:
        CHOK A 0 A_GiveToTarget("HunterSuperIceArrowKill", 1)
        Goto DeathAnim	
    Death.HunterSuperRegularArrow:
        SJAS A 0 A_GiveToTarget("HunterSuperRegularArrowKill", 1)
        Goto DeathAnim
    Death.HunterSuperLightningRail:
        SJAS A 0 A_GiveToTarget("HunterSuperLightningRailKill", 1)
		SJAS A 0 A_GiveToTarget("HunterLightningMulti", 1)
        Goto DeathAnim
    Death.CyborgPlasma:
        SJAS A 0 A_GiveToTarget("CyborgPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
    Death.CyborgCrapPlasma:
        SJAS A 0 A_GiveToTarget("CyborgCrapPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
        Goto DeathAnim
	Death.CyborgJetpackFire:
		TNT1 A 0 A_GiveToTarget("JetpackKill", 1)
		TNT1 A 0 A_GiveToTarget("CyborgFuel", 25)
		TNT1 A 0 A_GiveToTarget("CyborgTaunter", 1)
		Goto DeathAnim
    Death.GhostbusterProton:
        SJAS A 0 A_GiveToTarget("GhostbusterProtonKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterTrap:
        SJAS A 0 A_GiveToTarget("GhostbusterTrapKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterHorror:
		SJAS A 0 A_GiveToTarget("GhostbusterHorrorKill", 1)
	    SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
    Death.GhostbusterBlood:
        SJAS A 0 A_GiveToTarget("GhostbusterBloodKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterEcho:
        SJAS A 0 A_GiveToTarget("GhostbusterEchoKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterSoul:
        SJAS A 0 A_GiveToTarget("GhostbusterSoulKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterIceFall:
        SJAS A 0 A_GiveToTarget("GhostbusterIceFallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
    Death.GhostbusterDefilerBall:
        SJAS A 0 A_GiveToTarget("GhostbusterDefilerBallKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
        Goto DeathAnim
	Death.GhostbusterBoneCannon:
		SJAS A 0 A_GiveToTarget("GhostbusterBoneKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim
	Death.GhostbusterExpander:
		SJAS A 0 A_GiveToTarget("GhostbusterExpanderKill", 1)
		SJAS A 0 A_GiveToTarget("GBMohophUpgrade", 1)
		Goto DeathAnim		
    Death.EngineerNail:
        SJAS A 0 A_GiveToTarget("EngineerNailKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
    Death.Pulverizer:
        TNT1 A 0 A_GiveToTarget("EngineerPulvKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim
	Death.SawBlade:
        TNT1 A 0 A_GiveToTarget("EngineerSawKill", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
        Goto DeathAnim // BladeDeath
	Death.SentryShoot:
		SJAS A 0 A_GiveToTarget("SentryBulletKills", 1)
		TNT1 A 0 A_GiveToTarget("WrenchAmmo", 20)
		Goto DeathAnim
    Death.WarlockFireball:
        SJAS A 0 A_GiveToTarget("WarlockFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockBigFireball:
        SJAS A 0 A_GiveToTarget("WarlockBigFireballKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockIceShards:
        SJAS A 0 A_GiveToTarget("WarlockIceShardsKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockLightning:
        SJAS A 0 A_GiveToTarget("WarlockLightningKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.WarlockMagmaSmall:
        SJAS A 0 A_GiveToTarget("WarlockMagmaSmallKill", 1)
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
	Death.BoneShield:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim
	Death.WarlockTeleport:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
		Goto DeathAnim		
    Death.PurpleMagic:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim	
    Death.Maledict:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_GiveToTarget("PurpleMagicKill", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim
    Death.ShadowBlast:
		TNT1 A 0 A_GiveToTarget("GhoulSouls", 1)
		TNT1 A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim		
    Death.Maledict2:
		CHOK A 0 A_GiveToTarget("GhoulSouls", 1)
		CHOK A 0 A_SpawnItemEx("GhoulSoul", 0, 0, -4, 0, 0, random(4,6), SXF_ABSOLUTEMOMENTUM)
        Goto DeathAnim			
	Death.CyborgPulseMale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill1", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill2", 5)
		GoTo DeathAnim
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill3", 5)
		GoTo DeathAnim
		TNT1 AA 0 A_PlaySoundEx("MaleCyborgPulseKill4", 5)
	    GoTo DeathAnim
	Death.CyborgPulseFemale:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("fcybtaunt", 5)
		Goto DeathAnim
	Death.CyborgPulseOther:
		TNT1 A 0 A_GiveToTarget("CyborgPulseKill", 1)
		TNT1 A 0 A_PlaySoundEx("cyblolcopy", 5)
		GoTo DeathAnim	
	Death.PlaneShotgun:
		TNT1 A 0 A_GiveToTarget("PlaneShotKills", 1)
		Goto DeathAnim
	Death.PlaneVortex:
		TNT1 A 0 A_GiveToTarget("PlaneVortexKills", 1)
		Goto DeathAnim
	Death.FlaskT3:
		TNT1 A 0 A_GivetoTarget("Flask3HealBig", 1)
	Death.FlaskT1:
	Death.FlaskT2:
		TNT1 A 0 A_GiveToTarget("FlaskKill", 1)
		Goto DeathAnim
	Death.DeathDart:
		TNT1 A 0 A_GiveToTarget("DartKill", 1)
		Goto DeathAnim
	Death.HeartSeeker:
		TNT1 A 0 A_GiveToTarget("PelletKill", 1)
		Goto DeathAnim
	Death.ProtectorMissile:
		TNT1 A 0 A_GiveToTarget("ProtMissileKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorPlasma:
		TNT1 A 0 A_GiveToTarget("ProtPlasmaKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim
	Death.ProtectorLightning:
		TNT1 A 0 A_GiveToTarget("ProtLightningKill", 1)
		TNT1 A 0 A_GiveToTarget("ProtLightningMulti", 1)
		TNT1 A 0 A_GiveToTarget("ProtectorArmorShard", 1)
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim	
	Death.ProtectorDash:
		TNT1 A 0 A_GiveToTarget("UpgradeCount", 1)
		Goto DeathAnim		
	}
}

actor MorphProtectorRifle : Weapon
{
  Weapon.AmmoUse1 2
  Weapon.AmmoGive1 60
  Weapon.AmmoType1 "ShockCell"
  Weapon.AmmoType2 "ProtectorDashEnergy"
  inventory.icon "PROTSHK"
  weapon.selectionorder 400
  weapon.slotnumber 1
  Inventory.PickupMessage "You got the Shock Rifle"
  Attacksound ""
  +WEAPON.NOAUTOAIM
  States
  {
  Ready:
	LSSE O 0 A_PlayWeaponSound("Weapons/Shockidle")
    LSSE ONMLKJAI 3 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("ShockCell", 0, "Ready")
	TNT1 A 0 ACS_executeAlways(996, 0, 1)
    Loop
  Deselect:
    LSSE O 1 A_Lower
	TNT1 A 0 A_Lower
    Loop
  Select:
    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_DUMMY)
    LSSE O 1 A_Raise
	TNT1 A 0 A_Raise
    Goto Select+1
  Fire:
    LSSE A 1
	LSSE B 2
	LSSE B 0 A_PlaySound("Weapons/ShockFire")
	LSSE B 0 A_SpawnItemEx("GreenProjFlash")
	TNT1 A 0 A_GunFlash
//	TNT1 A 0 A_giveInventory("ProtectorDashEnergy", 5)
	LSSE C 2 Bright A_FireCustoMMISsile("GreenProjectileY", 0, 1, 10, 0, 0,0)
	LSSE C 0 A_SpawnItemEx("GreenProjFlash")
	TNT1 A 0 A_GunFlash
	LSSE D 2 
	LSSE FGHI 1
	Goto Ready
	Flash:
		TNT1 A 6
	Stop	
  Spawn:
    BGUN A -1
    Stop
  }
}

actor GreenProjectileY : GreenProjectile
{
  Damage 0
  States
  {
  Death:
    BIOB A 0 A_PlaySound("Weapons/ShockHit")
	BIOB A 0 A_SpawnItemEx("GreenProjFlash2")
	BIOB A 0 Bright A_Explode(0, 0, 0, 0)
    BIOB CFCFCF 3
	BIOB ED 5
    stop
  }
}

Actor TransMarine : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledMarine",1)
		Stop
	}
}

Actor TransHunter : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledHunter",1)
		Stop
	}
}

Actor TransCyborg : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledCyborg",1)
		Stop
	}
}

Actor TransGhostBuster : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledGhostbuster",1)
		Stop
	}
}

Actor TransEngineer : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledEngineer",1)
		Stop
	}
}

Actor TransWH : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledWitchHunter",1)
		Stop
	}
}

Actor TransWarlock : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("KilledWarlock",1)
		Stop
	}
}

Actor TransPW : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("killedplanewalker",1)
		Stop
	}
}

Actor TransPRT : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Pickup:
		TNT1 A 0 A_TakeInventory("KilledMarine",999)
		TNT1 A 0 A_TakeInventory("KilledHunter",999)
		TNT1 A 0 A_TakeInventory("KilledCyborg",999)
		TNT1 A 0 A_TakeInventory("KilledGhostbuster",999)
		TNT1 A 0 A_TakeInventory("KilledEngineer",999)
		TNT1 A 0 A_TakeInventory("KilledWitchHunter",999)
		TNT1 A 0 A_TakeInventory("KilledWarlock",999)
		TNT1 A 0 A_TakeInventory("killedplanewalker",999)
		TNT1 A 0 A_TakeInventory("killedprotector",999)
		TNT1 A 2
		Goto Give
	Give:
		TNT1 A 0 A_GiveInventory("killedprotector",1)
		Stop
	}
}

Actor MohophDamage : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(513, 0, 0)
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 0)
		Stop
	}
}

Actor MohophDamageText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 0)
		Stop
	}
}

Actor MohophgivenDamage : Inventory
{
	inventory.maxamount 1
}

Actor MohophDamage2 : PowerDamage
{
	powerup.duration 0x7FFFFFFF
	damagefactor "normal", 1.3
}

Actor MohophSpeed : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(513, 0, 1)
			//TNT1 A 0 ACS_ExecuteAlways(515, 0, 1)  WHAT THE FUCK FOR WAS THIS CALL USED???
		Stop
	}
}

Actor MohophSpeedText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 1)
		Stop
	}
}

Actor MohophGivenSpeed : Inventory
{
	inventory.maxamount 1
}

Actor MohophFlight : PowerFlight
{
	powerup.duration 0x7FFFFFFF
}

Actor MohophCyborgText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 2)
		Stop
	}
}

Actor MohophClone : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		use:
		pickup:
			TNT1 A 0 ACS_ExecuteAlways(513, 0, 4)
	}
}

Actor MohophGBText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 3)
		Stop
	}
}

Actor MohophRange : Inventory
{
	inventory.maxamount 1
}

Actor MohophWHText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 4)
		Stop
	}
}

Actor MohophProtect : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(513, 0, 2)
		Stop
	}
}

Actor MohophProtectText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 5)
		Stop
	}
}

Actor MohophgivenProtect : Inventory
{
	inventory.maxamount 1
}

Actor MohophProtect2 : PowerProtection
{
	powerup.duration 0x7FFFFFFF
	damagefactor "normal", 0.75
}

Actor MohophWarlockCheck : Inventory
{
	inventory.maxamount 1
}

Actor MohophWarlockText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 6)
		Stop
	}
}

Actor MohophTranslucent : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(513, 0, 3)
		Stop
	}
}

Actor MohophTranslucentText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 7)
		Stop
	}
}

Actor MohophDasher : Inventory
{
	inventory.maxamount 1
}

Actor MohophPRTText : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_ExecuteAlways(515, 0, 8)
		Stop
	}
}

Actor MohophJustMorphed : Inventory
{
	inventory.maxamount 1
}

Actor MohophNotReady : Inventory { Inventory.MaxAmount 1 }
Actor MohophHeal : CustomInventory
{
	inventory.maxamount 1
	+AUTOACTIVATE
	States
	{
		Use:
		Pickup:
			TNT1 A 0 ACS_NamedExecuteAlways("MohophHealer", 0, 0, 0, 0)
		Stop
	}
}