Actor WitchHunter : PlayerPawn
{
	Health 100
	Player.MaxHealth 100
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+QUICKTORETALIATE
	+NOTARGET
	LimitedToTeam 0
	Painchance 256
	Player.ForwardMove 0.96
	Player.SideMove 0.96
	Player.soundclass "WH"
	Player.displayname "WitchHunter"
	Player.startitem "Darts", 165
	Player.StartItem "WitchLaserAmmo", 10
	Player.startitem "HeartSeekerAmmo", 25
	Player.StartItem "HookAmmo", 4
	Player.startitem "FlaskT1", 3
	Player.startitem "FlaskT2", 3
	Player.startitem "FlaskT3", 3
	Player.startitem "DeathDart", 1
	Player.startitem "WitchLaser", 1
	Player.startitem "HeartSeeker", 1
	Player.StartItem "GrapplingHook", 1
	Player.StartItem "ReleaseHook", 1
	Player.startitem "ArrowSingle", 35
	Player.StartItem "ClassID", 6
	Player.StartItem "HumanTeam", 1
	Player.scoreicon "WHUNST"
	Player.ColorRange 152, 159
	DamageFactor "GhostbusterTrap", 0.0
	DamageFactor "SentryShoot", 0.0
	DamageFactor "HunterSuperIceArrowTrail2", 0.0
	DamageFactor "FlaskT1", 0.5
	DamageFactor "FlaskT2", 0.5
	DamageFactor "Poison", 0.25
	DamageFactor "Drone", 0.0
	DamageFactor "CreepStun", 3.0
	DamageFactor "Impale", 2.0
	DamageFactor "DimmedVision", 0.5
	DamageFactor "GhostbusterExpander", 0.0
	Species "Human"
	Scale 0.8
	mass 400
	States
	{
	Spawn:
		WHUN B 2
	SpawnLoop:
		WHUN A 1 
		Loop
	See:
		WHUN BC 4
		PLAY A 0 A_SpawnItemEx ("MarineStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		WHUN DE 4
		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
	Pain: 
		WHUN K 8 A_Pain
		Goto Spawn
	Pain.ChokeAttack:
		WHUN K 1
		TNT1 A 0 A_GiveToTarget("ChokePainHealer", 1)
		TNT1 A 0 A_GiveToTarget("VomitPoints", 2)
		WHUN K 7 A_Pain
		Goto Spawn
	Pain.CreeperHealBall:
		WHUN K 1
		TNT1 G 0 A_GiveToTarget("CreeperHealBallHealer", 1)
		WHUN K 7 A_Pain
		Goto Spawn
	Pain.Creepstun:
		TNT1 A 0 HealThing(1)
		TNT1 A 0 A_Pain
		WHUN K 18 ACS_ExecuteAlways(986,0)
		Goto Spawn
	Pain.CreeperHealBall:
		WHUN K 1
		WHUN K 1 A_GiveToTarget("CreeperHealBallHealer", 1)
		Goto Pain
	Pain.Impale:
		TNT1 A 0 ThrustThingZ(0,10,0,1)
		Goto Pain
	Pain.DimmedVision:
		TNT1 A 0 A_Pain
		TNT1 A 0 A_GiveInventory("VisionDimmer", 1)
		TNT1 A 0 A_GiveInventory("VisionDimEffect", 1) // ACS_ExecuteAlways(753, 0)
		TNT1 A 0 ACS_ExecuteAlways(754, 0)
		TNT1 A 0 HealThing(1)
		WHUN K 7
		Goto Spawn	
	Pain.MorgBat:
		TNT1 A 0 A_giveToTarget("MorgHeal", 3)
		Goto Pain		
	Death:
	DeathAnim:
		TNT1 A 0 A_GiveInventory("MustLetGo", 1)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("HumanKillCount", 1)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)
		TNT1 A 0 A_GiveInventory("GhoulAmmo", 1)
		WHUN L 9
		WHUN M 8 A_PlayerScream
		WHUN N 7 A_NoBlocking
		WHUN OPQRS 6
		WHUN T -1
		stop
	GibDeath:
	Death.ImpaleBite:
		TNT1 A 0 A_GiveInventory("MustLetGo", 1)
		TNT1 A 0 A_GiveToTarget("JitterskullPoints", 1)
		TNT1 A 0 A_GiveToTarget("VomitPoints", 10)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("HumanKillCount", 1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)
		TNT1 A 0 A_GiveToTarget("Crunched",1)
		TNT1 A 0 A_GiveInventory("GhoulAmmo", 1)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_PlaySound("gibbage/xsplat")
		TNT1 A 0 A_SkullPop("Custom_BloodySkullWH")
		TNT1 A 0 A_PlaySound("gibbage/playergib") 
		TNT1 A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
		TNT1 A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
		TNT1 A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
		TNT1 A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
		TNT1 A 0 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		WHUN K 1
		BLAN A -1
		Stop
	Death.CreeperHealBall:
		TNT1 A 0 A_GiveToTarget("CreeperHealBallHealer", 1)
		TNT1 A 0 A_GiveToTarget("CreepHealKill", 1)
		TNT1 A 0 A_GiveToTarget("HealBallsFired", 1)
		TNT1 A 0 A_GiveToTarget("CreeperMaxCharge", 1)
        Goto DeathAnim
	Death.CreeperMelee:
		TNT1 A 0 A_GiveInventory("MustLetGo", 1)
		TNT1 A 0 A_PlaySoundEx("creeperattack", "Body")
		TNT1 A 0 A_GiveToTarget("Creeperheal",1)
		TNT1 A 0 ACS_ExecuteAlways(997,0)
		TNT1 A 0 A_GiveToTarget("CreeperMeleeKill", 1)
		TNT1 A 0 A_GiveToTarget("HealBallsFired", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("HumanKillCount", 1)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter", 1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)
		TNT1 A 0 A_GiveToTarget("CreeperMaxCharge", 1)
		TNT1 A 0 A_GiveInventory("GhoulAmmo", 1)
//		TNT1 A 0 A_GiveToTarget("GhoulAmmo", 1)
		WHUN L 9 A_SpawnItemEx("SoulSprite", 0, 0, 0, 0, 0, 2)
		WHUN M 8 A_PlayerScream
		WHUN N 7 A_NoBlocking
		WHUN OPQRS 6
		WHUN T -1
		Stop
	Death.MarineSuicideGrenade:
		PLAY A 0
		Goto DoomXDeath
    Death.SjasScream:
        TNT1 A 0 A_GiveToTarget("SjasScreamKill", 1)
        TNT1 A 0 A_GiveToTarget("SjasMeleeMulti", 1)
		Goto DeathAnim
    Death.JitterMelee:
        TNT1 A 0 A_GiveToTarget("JitterMeleeKill", 1)
        TNT1 A 0 A_GiveToTarget("JitterMeleeMulti", 1)
        Goto GibDeath
    Death.CreepStun:
        TNT1 A 0 A_GiveToTarget("CreepStunKill", 1)
		TNT1 A 0 A_GiveToTarget("HealBallsFired", 1)
		TNT1 A 0 A_GiveToTarget("CreeperMaxCharge", 1)
        Goto DeathAnim
    Death.ChokeVomit:
        TNT1 A 0 A_GiveToTarget("ChokeVomitKill", 1)
        Goto DeathAnim
    Death.ChokeAttack:
        TNT1 A 0 A_GiveToTarget("ChokeAttackKill", 1)
		TNT1 A 0 A_GiveToTarget("ChokeDeathHealer", 1)
        Goto GibDeath
	Death.ChokeFeast:
		TNT1 A 0 A_GiveToTarget("ChokeFeasTKill", 1)
		Goto DeathAnim		
    Death.ChokeBloodBall:
		TNT1 A 0 A_GiveToTarget("VomitPoints", 15)
        TNT1 A 0 A_GiveToTarget("ChokeBloodBallKill", 1)
		TNT1 A 0 A_GiveToTarget("ChokeBloodBallMulti", 1)
        Goto DeathAnim
    Death.FrostbiteMelee:
        TNT1 A 0 A_GiveToTarget("FrostbiteMeleeKill", 1)
        Goto GibDeath
	Death.FrostbiteMortar:
		TNT1 A 0 A_GiveToTarget("FrostyMortarKill", 1)
		Goto DeathAnim
    Death.FrostbiteIceBreath:
		TNT1 A 0 A_GiveInventory("MustLetGo", 1)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_PlayerScream
		TNT1 A 0 A_GiveToTarget("FrostyBreathMulti", 1)
		TNT1 A 0 A_GiveToTarget("FrostbiteIceBreathKill", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("HumanKillCount", 1)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter", 1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)
		TNT1 A 0 A_GiveInventory("GhoulAmmo", 1)
		TNT1 A 0 A_SpawnItemEx("WHIceDeath", 0, 0, 0, 0, 0, 0)
		WHUN K 1
		BLAN A -1
		Stop
    Death.Impale:
        TNT1 A 0 A_GiveToTarget("ImpaleKill", 1)
		TNT1 A 0 A_GiveToTarget("DoubleImpaleKill", 1)
        Goto DeathAnim
    Death.IceFiendMelee:
		TNT1 A 0 A_GiveToTarget("NightmareMeleeKill", 1)
	Death.DimmedVision:
	DimVisionDeath:
		TNT1 A 0 A_JumpIfInventory("VisionDimmer", 1, 1)
		Goto FadeDeath
		TNT1 A 0 A_GiveToTarget("NightmareHealer", 1)
		TNT1 A 0 A_GiveToTarget("DimDurationEffect", 2)
		TNT1 A 0 A_GiveToTarget("InvisibleCounter", 0)
		TNT1 A 0 A_GiveToTarget("DimmedMeleeKill", 1)
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("IcefiendBackstab1", 5, 0, 1)
		Goto FadeDeath
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("IcefiendBackstab2", 5, 0, 1)
		Goto FadeDeath
		TNT1 A 0 A_Jump(192, 3)
		TNT1 AA 0 A_PlaySoundEx("IcefiendBackstab3", 5, 0, 1)
		Goto FadeDeath
		TNT1 AA 0 A_PlaySoundEx("IcefiendBackstab4", 5, 0, 1)
	    Goto FadeDeath
	Death.NightmareCleave:
		TNT1 A 0 A_GiveToTarget("CleaveKill", 1)
		TNT1 A 0 A_JumpIfInventory("VisionDimmer", 1, "DimVisionDeath")
	    Goto FadeDeath
	FadeDeath:
	    TNT1 A 0 A_GiveToTarget("InvisibleCounter", 8)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter", 1)
		TNT1 A 0 A_GiveToTarget("TotalKillCount", 1)
		TNT1 A 0 A_GiveToTarget("HumanKillCount", 1)
		TNT1 A 0 A_GiveToTarget("LowHPKill", 1)
		TNT1 A 0 A_GiveToTarget("CheckAchievements", 1)
		TNT1 A 0 A_GiveInventory("GhoulAmmo", 1)
		WHUN K 1
		TNT1 A 0 A_SpawnItemEx("FadeWitchhunter", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION)
		BLAN A -1
	Stop
	Death.Mohoph:
		PLAY A 0 A_GiveToTarget("TransWH",1)
		TNT1 A 0 A_GiveToTarget("MorphAmmo", 1)
		PLAY A 0 A_PlaySoundEx("MohophKill","Body")
		TNT1 A 0 A_giveToTarget("MohophRange", 1)
		TNT1 A 0 A_GiveToTarget("MohophKill", 1)
		TNT1 A 0 A_GiveToTarget("KilledWitchhunter2", 1)
		TNT1 A 0 A_GiveToTarget("MohophWHText", 1)
		TNT1 A 0 A_JumpIfInTargetInventory("MohophJustMorphed", 1, 2)
		TNT1 A 0 A_Jump(256, 2)
		TNT1 A 0 A_GiveToTarget("JustMorphedKill", 1)		
		TNT1 A 0 ACS_ExecuteAlways(514, 0, 4)
		PLAY A 0 ACS_ExecuteAlways(976,0)
		TNT1 A 0 A_JumpIfInTargetInventory("MohophWarlockCheck", 1, 1)
		Goto DeathAnim
		TNT1 A 0 A_GiveToTarget("MorphAmmo", 1)
		Goto DeathAnim
	Death.MorgMelee:
		TNT1 A 0 A_GiveToTarget("MorgBatAmmo", 2)
		TNT1 A 0 A_GiveToTarget("MorgMeleeKill", 1)
		TNT1 A 0 A_GiveToTarget("MorgMulti", 1)
		Goto DeathAnim
	Death.MorgBat:
		TNT1 A 0 A_GiveToTarget("MorgBatKill", 1)
		Goto DeathAnim			
	}
}

Actor UsingGrenade : Inventory
{
	inventory.maxamount 1
}

Actor WitchLaser : Weapon
{
  Weapon.SlotNumber 1
  weapon.selectionorder 25
  weapon.kickback 100
  obituary "%o was purified by %k's laser."
  inventory.pickupmessage "You got the wtf"
  weapon.ammotype ""
  inventory.icon "WITCHLAS"
  weapon.ammouse 0
  weapon.ammogive 0
  Weapon.Ammouse2 1
  Weapon.AmmoType2 "WitchLaserAmmo"
  +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_WH_LASER)
		HSTA A 1 A_Raise
		TNT1 AA 0 A_Raise
	  Goto Select+1
	  Fire:
		TNT1 A 0 A_GiveInventory("WHCondition", 1)
	    TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
		HSTA A 2
		HSTA B 3
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlayWeaponsound("WH/LaserFireNew")
		TNT1 A 0 A_FireCustomMissile("NewWitchLaserShot", -1, 0, -6)		
		HSTA C 4 Bright
		HSTA DEF 3
		HSTA A 5 A_Refire
	  Goto Ready
	  Altfire:
	    TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
		TNT1 A 0 A_JumpIfInventory("WitchLaserAmmo", 1, 1)
	  Goto Noammo
		TNT1 A 0 A_GiveInventory("WHCondition", 1)
		HSTA A 2
		HSTA B 3
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlayWeaponsound("WH/LaserFire")
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt", 16, 0, 12)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt", -16, 0, -12)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt", 8, 0, 6)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt", -8, 0, -6)
		TNT1 A 0 A_FireCustomMissile("WitchLaserAlt", 0, 1, 0)		
		HSTA C 4 Bright
		HSTA DEF 3
		HSTA A 10
	  Goto Ready
	  NoAmmo:
		HSTA A 1
	  Goto Ready
  }
}

Actor WitchLaserShot
{
	PROJECTILE
	Speed 64
	Radius 6
	Height 8
	Scale 0.9
	Renderstyle Add
	Alpha 0.85
	Damage (15)
	DamageType "WitchLaser"
	DeathSound "WH/LaserHit"
	+DONTREFLECT
	+DONTBLAST
	States
	{
		Spawn:
			CFX3 AABB 2 Bright A_SpawnItem("WitchLaserTrail")
		Loop
		Death:
			CFX3 CD 5 Bright A_Explode(5, 64, 0)
			CFX3 EFG 3 Bright
		Stop
	}
}

ACTOR WitchLaserTrail replaces MageWandSmoke
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  +CANNOTPUSH
  +NODAMAGETHRUST
  +CLIENTSIDEONLY
	Alpha 0.85
	Scale 0.9
	Renderstyle Add
	States
	{
		Spawn:
			NFX3 HIJK 2 Bright
		Stop
	}
}

Actor NewWitchLaserShot : MageWandMissile
{
	Speed 160
	Scale 0.9
	Radius 8
	Height 8
	Damage (15)
	Alpha 0.85
	Renderstyle Add
	MissileType "WitchLaserTrail"
	MissileHeight 8
	DamageType "WitchLaser"
	DeathSound "WH/LaserHit"
	Obituary "%o was purified by %k's laser."
	-RIPPER
	+CANNOTPUSH
	+BLOODLESSIMPACT
	+NODAMAGETHRUST
	+DONTREFLECT
	+DONTBLAST
	-SPAWNSOUNDSOURCE
	
	States
	{
		Spawn:
			TNT1 A 10
			TNT1 A 0 A_Stop
			CFX3 CD 5 Bright A_Explode(6, 64, 0)
			CFX3 EFG 3 Bright			
		Stop
		Death:
			CFX3 CD 5 Bright A_Explode(6, 64, 0)
			CFX3 EFG 3 Bright
		Stop
	}
}

Actor WitchLaserTrail2 : WitchLaserTrail
{
	Scale 0.75
}

Actor WitchLaserAlt
{
	PROJECTILE
	obituary "%o was purged by %k's laser."
	Damage (15)
	damagetype "WitchLaser"
	Height 5
	Radius 5
	Speed 36
	scale 0.75
	RenderStyle Add
	Alpha 0.85
	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("WitchLaserLand",0,0,0,0,0,-1)
		stop
	}
}

Actor WitchLaserLand
{
	PROJECTILE
	-NOGRAVITY
	obituary "%o was purged by %k's laser."
	Speed 10
	Height 5
	radius 5
	scale 0.75
	damage (9)
	RenderStyle Add
	Alpha 0.85
	damagetype "WitchLaser"
	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("WitchLaserSpike", 0, 0, 0, CMF_TRACKOWNER)
		stop
	}
}

actor WitchLaserSpike
{
	Speed 0
	PROJECTILE
	+NOCLIP
	damagefactor "Jitterskull", 0.0
//	damagefactor "SjasScream", 0.0
	Damage (9)
	radius 5
	height 5
	scale 0.75
	RenderStyle Add
	Alpha 0.85
	damagetype "WitchLaser"
	Obituary "%o touched %k's purge line."
	-NOGRAVITY
//	+DONTBLAST
	+THRUGHOST
	deathsound "WH/LaserHit"
	reactiontime 8
	States
	{
	Spawn:
		CFX3 AB 4 Bright
		HOLL C 0 A_ChangeFlag("NOCLIP",0)
		TNT1 A 0 A_CountDown
		Loop
		Death:
		CFX3 CD 5 Bright A_Explode(4, 72, 0)
		TNT1 AAAAA 0 A_SpawnItemEx("LittleLaserSparkle", 0, 0, 0, random(-16, 16), random(-16, 16), 0, random(0, 359))
		CFX3 EFG 3 Bright
		stop
	}
}

Actor LittleLaserSparkle
{
	PROJECTILE
	obituary "%o touched %k's purge line."
	Damage (2)
	damagetype "WitchLaser"
	Height 5
	Radius 5
	Speed 24
	scale 0.75
	RenderStyle Add
	Alpha 0.85
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 ThrustThingZ(0, 8, 0, 1)
		CFX3 HIJ 2 Bright
		TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
		CFX3 K 2 Bright
		Death:
		  TNT1 A 1
		stop
	}
}

Actor Darts : Ammo
{
	inventory.amount 5
	inventory.maxamount 200
	inventory.icon "DARTA2A8"
	+IGNORESKILL
}

Actor WitchLaserAmmo : Ammo
{
	inventory.amount 1
	inventory.maxamount 20
	inventory.icon "CFX3A0"
	+IGNORESKILL
}

Actor FlaskT1 : Ammo
{
	inventory.amount 1
	inventory.maxamount 5
	inventory.icon "THRWF0"
	+IGNORESKILL
}

Actor FlaskT2 : Ammo
{
	inventory.amount 1
	inventory.maxamount 5
	inventory.icon "FLASA0"
	+IGNORESKILL
}

Actor FlaskT3 : Ammo
{
	inventory.amount 1
	inventory.maxamount 5
	inventory.icon "DTHRF0"
	+IGNORESKILL
}

Actor HeartSeekerAmmo : Ammo
{
	inventory.amount 1
	inventory.maxamount 40
	inventory.icon "AFX2A0"
	+IGNORESKILL
}

Actor HookAmmo : Ammo
{
	inventory.amount 1
	inventory.maxamount 8
	inventory.icon "OCLWA6A4"
	+IGNORESKILL
}

Actor DeathDart : Weapon
{
  Weapon.SlotNumber 3
  weapon.selectionorder 10
  weapon.kickback 100
  obituary "%o watched as %k bullseyed %h."
  decal "BulletChip"
  inventory.pickupmessage "You got the wtf2"
  weapon.ammotype ""
  inventory.icon "WITCHDAR"
  weapon.ammouse 1
  Weapon.AmmoType "Darts"
  weapon.ammogive 5
  Weapon.AmmoUse2 1
  Weapon.AmmoType2 "FlaskT2"
  +INVENTORY.UNDROPPABLE
  +WEAPON.ALT_AMMO_OPTIONAL
  +WEAPON.NOAUTOAIM
  States
  {
	  Ready:
		DDAR A 1 A_WeaponReady
	  Loop
	  Deselect:
		DDAR A 1 A_Lower
		TNT1 AA 0 A_Lower
	  Loop
	  Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_WH_DART)
		DDAR A 1 A_Raise
		TNT1 AA 0 A_Raise
	  Goto Select+1
	  Fire:
	    TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
	    DDAR A 1 A_GunFlash
		TNT1 A 0 A_PlayWeaponSound("WH/DartFire")
		TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, -10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 0, 10)
		DDAR B 3 Bright
		TNT1 A 0 A_Refire
		DDAR A 5
	  Goto Ready
	  Hold:
	    TNT1 A 0 A_GunFlash
	    TNT1 A 0 A_PlayWeaponSound("WH/DartFire")
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, -10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 0, 10)
		DDAR E 2 Bright
		TNT1 A 0 A_JumpIfNoAmmo("Release")
		TNT1 A 0 A_JumpIf(1 == ACS_ExecuteWithResult(975, 0), "Release")
		DDAR C 2 Bright
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlayWeaponSound("WH/DartFire")
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, -10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 0, 10)
		DDAR A 2 Bright
		TNT1 A 0 A_JumpIfNoAmmo("Release")
		TNT1 A 0 A_JumpIf(1 == ACS_ExecuteWithResult(975, 0), "Release")
		DDAR B 2 Bright
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlayWeaponSound("WH/DartFire")
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, -10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 0, 10)
		DDAR F 2 Bright
		TNT1 A 0 A_JumpIfNoAmmo("Release")
		TNT1 A 0 A_JumpIf(1 == ACS_ExecuteWithResult(975, 0), "Release")
		DDAR D 2 Bright
		TNT1 A 0 A_GunFlash
		TNT1 A 0 A_PlayWeaponSound("WH/DartFire")
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, -10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 10)
		TNT1 A 0 A_FireCustomMissile("DeathDarts", 0, 1, 0, 10)
		DDAR A 2 Bright
		TNT1 A 0 A_Refire
		DDAR A 1
	  Release:
		DDAR A 4
	  Goto Ready
	  Altfire:
		DDAR A 1 A_GiveInventory("UsingGrenade", 1)
	    TNT1 A 0 A_JumpIfInventory("FlaskT2", 1, 2)
		TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
	  Goto Ready
	    TNT1 A 0 A_GiveInventory("WHCondition", 1)
		DDAR A 1 A_GiveInventory("UsingGrenade", 1)
		DDAR A 1 Offset(2, 34)
		DDAR A 1 Offset(4, 36)
		DDAR A 1 Offset(7, 39)
		DDAR A 1 Offset(10, 44)
		DDAR A 1 Offset(13, 47)
		DDAR A 1 Offset(16, 52)
		TNT1 A 0 A_PlayWeaponSound("WH/Throw")
		TNT1 A 0 A_FireCustomMissile("FlaskType2")
		TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
		DDAR A 1 Offset(10, 48)
		DDAR A 1 Offset(4, 42)
		DDAR A 2
	  Goto Ready
  }
}

Actor DeathDarts
{
	PROJECTILE
	Speed 40
	Height 7
	Radius 5
	Damage (6)
	Damagetype "DeathDart"
	
	States
	{
		Spawn:
			DART A 24
			DART A 1 A_ChangeFlag("NOGRAVITY", 0)
		SpawnLoop:
			DART A 1
		Loop
		Xdeath:
			TNT1 A 1
		Stop
		Crash:
		Death:
		    TNT1 A 0 A_PlaySound("WH/DartHitWall")
		    TNT1 A 1
		Stop
	}
}

Actor FlaskType2
{
	PROJECTILE
	Damage (0)
	DamageType "FlaskT2"
	DeathSound "WH/FDeath"
	Radius 6
	Height 8
	Speed 24
	+RIPPER
	+BLOODLESSIMPACT
	+NOBLOOD
	Scale 0.8
	
	States
	{
		Spawn:
			PSBG A 10
		Death:
			TNT1 A 0 A_Stop
			TNT1 A 0 A_Scream
			PSBG BC 6
			TNT1 AAAAAAAA 0 A_CustomMissile("WHPoisonCloud", 8, 0, random(0, 360), CMF_TRACKOWNER | CMF_AIMDIRECTION, random(-90, 90))
			TNT1 A 1
		Stop
	}
}

Actor WHPoisonCloudExplosion {
	PROJECTILE
	Height 1
	Radius 1
	+THRUACTORS
	+NODAMAGETHRUST
	+FOILINVUL
	Speed 0
	Damage 0
	DamageType "FlaskT2"
	Obituary "%o was poisoned by %k's concoctions."
	PoisonDamage 15, 3
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 1 A_Explode(2, 64, 0, 0, 64)
		Stop
	}
}

Actor WHPoisonCloud {
	DamageType "FlaskT2"
	Obituary "%o was poisoned by %k's concoctions."
	Height 2
	Radius 1
	ReactionTime 17
	PROJECTILE
	Speed 8
	BounceType Hexen
	BounceCount 6
	Renderstyle Translucent
	+CANBOUNCEWATER
	+THRUACTORS
	+NOBLOCKMAP
	+NODAMAGETHRUST
	+FOILINVUL
	States {
		Spawn:
			PSBG D 7
			PSBG D 4 A_Stop
			TNT1 A 0 A_SetTranslucent(0.8)
		SpawnLoop:
			TNT1 A 0 A_JumpIfInTargetInventory("GhoulAmmo", 1, "Death")
			PSBG EEE 2 A_CustomMissile("WHPoisonCloudExplosion", 0, 0, 0, CMF_TRACKOWNER | CMF_AIMDIRECTION)
			TNT1 A 0 A_JumpIfInTargetInventory("GhoulAmmo", 1, "Death")
			PSBG FFF 2 A_CustomMissile("WHPoisonCloudExplosion", 0, 0, 0, CMF_TRACKOWNER | CMF_AIMDIRECTION)
			TNT1 A 0 A_JumpIfInTargetInventory("GhoulAmmo", 1, "Death")
			PSBG GGG 2 A_CustomMissile("WHPoisonCloudExplosion", 0, 0, 0, CMF_TRACKOWNER | CMF_AIMDIRECTION)
			TNT1 A 0 A_JumpIfInTargetInventory("GhoulAmmo", 1, "Death")
			PSBG HHH 2 A_CustomMissile("WHPoisonCloudExplosion", 0, 0, 0, CMF_TRACKOWNER | CMF_AIMDIRECTION)
			TNT1 A 0 A_JumpIfInTargetInventory("GhoulAmmo", 1, "Death")
			PSBG III 2 A_CustomMissile("WHPoisonCloudExplosion", 0, 0, 0, CMF_TRACKOWNER | CMF_AIMDIRECTION)
			TNT1 A 0 A_CountDown
		Loop
		Death:
			PSBG HG 7
			PSBG FD 6
		Stop
	}
}

Actor HeartSeeker : Weapon
{
  Weapon.SlotNumber 2
  weapon.selectionorder 15
  weapon.kickback 10
  obituary "%o's heart was found by %k."
  decal "BulletChip"
  inventory.pickupmessage "You got the wtf2"
  weapon.ammotype ""
  inventory.icon "WITCHHS"
  weapon.ammouse 1
  Weapon.AmmoType "HeartSeekerAmmo"
  weapon.ammogive 5
  Weapon.AmmoUse2 1
  Weapon.AmmoType2 "FlaskT1"
  +INVENTORY.UNDROPPABLE
  +WEAPON.ALT_AMMO_OPTIONAL
  +WEAPON.NOAUTOAIM
  States
  {
	  Ready:
		WSON A 1 A_WeaponReady
	  Loop
	  Deselect:
		WSON A 1 A_Lower
		TNT1 AA 0 A_Lower
	  Loop
	  Select:
	    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_WH_HEART)
		WSON A 1 A_Raise
		TNT1 AA 0 A_Raise
	  Goto Select+1
	  Fire:
	    TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
		WSON A 3 A_GunFlash
		TNT1 A 0 A_PlayWeaponsound("WH/ShotgunFire")
        TNT1 A 0 A_FireCustomMissile("HeartSeekerPellet",random(-30,30)/10.0,1,0,1,0,0)
        TNT1 AAAA 0 A_FireCustomMissile("HeartSeekerPellet",random(-60,60)/10.0,0,0,1,0,random(-10,10)/10.0)
        TNT1 AAAA 0 A_FireCustomMissile("HeartSeekerPellet",random(-350,350)/100.0,0,0,1,0,random(-250,250)/100.0)
		TNT1 AAAAAAAAA 0 A_FireCustomMissile("HeartseekerSmoke",random(-100,100)/10.0,0,0,1,0,random(-80,80)/10.0)
		TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
		WSON B 2 Bright
		WSON CD 1 Bright
		WSON E 3
		WSON XF 2
		WSON YG 2
		WSON HZA 2
		WSON A 4 A_Refire
	  Goto Ready
	  Altfire:
		WSON A 1 A_GiveInventory("UsingGrenade", 1)
	    TNT1 A 0 A_JumpIfInventory("FlaskT1", 1, 2)
		TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
	  Goto Ready
	    TNT1 A 0 A_GiveInventory("WHCondition", 1)
		WSON A 1 A_GiveInventory("UsingGrenade", 1)
		WSON A 1 Offset(2, 34)
		WSON A 1 Offset(4, 36)
		WSON A 1 Offset(7, 39)
		WSON A 1 Offset(10, 44)
		WSON A 1 Offset(13, 47)
		WSON A 2 Offset(16, 52)
		TNT1 A 0 A_PlayWeaponSound("WH/Throw")
		TNT1 A 0 A_FireCustomMissile("FlaskType1", 0, 1, 0, 16)
		TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
		WSON A 1 Offset(10, 48)
		WSON A 1 Offset(4, 42)
		WSON A 2
	  Goto Ready
  }
}

actor HeartseekerSmoke
{
	vspeed 3
	renderstyle translucent
	scale 0.65
	alpha 0.65
	PROJECTILE
	Speed 12
	Damage 0
	+RIPPER
	+BLOODLESSIMPACT
	+CLIENTSIDEONLY
	+NOGRAVITY
	States
	{
		spawn:
		SMKE ABCDEFGHHH 1 A_ScaleVelocity(0.95)
		stop
	}
}

Actor FlaskType1
{
	PROJECTILE
	Damage (0)
	DamageType "FlaskT1"
	SeeSound "WH/FBounce"
	DeathSound "FireStaffH"
	Radius 6
	Height 8
	Speed 22
	+DOOMBOUNCE
//	+BOUNCEONACTORS
	-NOGRAVITY
	Scale 0.85
	bouncecount 3
	bouncefactor 0.5
	
	States
	{
		Spawn:
			THRW ABCDEF 3
		Loop
		Death:
		    TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
			XPL1 ABC 5 Bright A_Explode(48, 96, 0)
			XPL1 DEF 3 Bright
		Stop
	}
}

Actor HeartSeekerPellet
{
	PROJECTILE
	Speed 54
	Damage (random(7, 8))
	DamageType "HeartSeeker"
	DeathSound "weapons/plasmax"
	Height 6
	Radius 4
	Scale 0.8
	
	States
	{
		Spawn:
			AFX2 ABC 2 Bright
		Loop
		Death:
			TNT1 A 0 A_Scream
			TNT1 A 0 A_SpawnItem("HeartseekerPuff")
			AFX2 DEFGH 3 Bright
		Stop
	}
}

Actor HeartSeekerPuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.75
  +CLIENTSIDEONLY
  VSpeed 1
  States
  {
   Spawn:
    EVAP ABCDEFGHHH 2 Bright A_FadeOut(0.08)
	Stop
  }
}

Actor GrapplingHook : Weapon
{
  obituary "%o was drilled by %k's hook."
  radius 20
  height 16
  Weapon.SlotNumber 4
  inventory.pickupmessage "You got the Hooker!"
  weapon.selectionorder 100
  Weapon.AmmoType "HookAmmo"
  Weapon.AmmoUse 1
  Weapon.AmmoType2 "FlaskT3"
  Weapon.AmmoUse2 1
  weapon.kickback 100
  +INVENTORY.UNDROPPABLE
  inventory.icon "WITCHHK"
  +WEAPON.NOAUTOAIM
  +WEAPON.ALT_AMMO_OPTIONAL
  +WEAPON.NOAUTOFIRE
  states
  {
  Spawn:
    TNT1 A 1
    stop
  Ready:
    HOKW A 1 A_WeaponReady
    Loop
  Deselect: 
    HOKW A 1 A_Lower
	TNT1 AA 0 A_Lower
    loop
  Select:
    TNT1 A 0 ACS_ExecuteAlways(700, 0, WM_WH_HOOK)
    HOKW A 1 A_Raise
	TNT1 AA 0 A_Raise
    Goto Select+1
  Fire:
    TNT1 A 0 A_TakeInventory("UsingGrenade", 5)
	HOKW A 1
	TNT1 A 0 A_JumpIfInventory("Hooked", 1, "AlreadyHooked")
    HOKW A 2
	TNT1 A 0 A_PlayWeaponSound("WH/HookFire")
	TNT1 A 0 A_FireCustomMissile("HookShot")
	TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
	HOKW B 3 Bright
	HOKW C 4
	HOKW D 5
	HOKW A 8
    goto Ready
  AltFire:
	HOKW A 1 A_GiveInventory("UsingGrenade", 1)
	TNT1 A 0 A_JumpIfInventory("FlaskT3", 1, 2)
	TNT1 A 0 A_TakeInventory("UsingGrenade", 1)
	Goto Ready
	TNT1 A 0 A_GiveInventory("WHCondition", 1)
	HOKW A 1 A_GiveInventory("UsingGrenade", 1)
	HOKW A 1 Offset(2, 34)
	HOKW A 1 Offset(4, 36)
	HOKW A 1 Offset(7, 39)
	HOKW A 1 Offset(10, 44)
	HOKW A 1 Offset(13, 47)
	HOKW A 1 Offset(16, 52)
	TNT1 A 0 A_PlayWeaponSound("WH/Throw")
	TNT1 A 0 A_FireCustomMissile("FlaskType3")
	TNT1 A 0 A_GiveInventory("UsedAmmo", 1)
	HOKW A 1 Offset(10, 48)
	HOKW A 1 Offset(4, 42)
	HOKW A 2 A_TakeInventory("UsingGrenade", 1)
  Goto Ready
  AlreadyHooked:
	HOKW A 5
	Goto Ready
  }
}

Actor HookShot
{
	Speed 60
	Height 4
	Radius 4
	PROJECTILE
	DamageType "Hook"
	Damage (16)
	Scale 1.1
	+RIPPER
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 Thing_ChangeTID(0, 1800)
		SpawnLoop:
			OCLW A 1
		Loop
		Death:
			TNT1 A 0 A_GiveToTarget("Hooked", 1)
		    TNT1 A 0 A_PlaySound("WH/HookHit")
			TNT1 A 0 ACS_ExecuteAlways(510, 0)
		DeathLoop:
			TNT1 A 0 A_JumpIfInTargetInventory("Iterating", 3500, "Vanish")
			TNT1 A 0 A_JumpIfInTargetInventory("MustLetGo", 1, "Vanish")
			OCLW A 1
		Loop
		Vanish:
			OCLW A 1
		Stop
	}
}

Actor HookTrail
{
	Speed 0
	Height 4
	Radius 4
	Damage (0)
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	
	States
	{
		Spawn:
			TEND A 2
		Stop
		Death:
			TEND A 2
		Stop
	}
}

Actor Hooked : Inventory
{
	inventory.maxamount 1
}

Actor MustLetGo : Inventory
{
	inventory.maxamount 1
}

Actor ReleaseHook : CustomInventory
{
	inventory.maxamount 1
	inventory.icon "RELHOOK"
	+invbar
	+inventory.undroppable
	
	States
	{
		Use:
			TNT1 A 0 A_JumpIfInventory("Hooked", 1, 1)
		Fail
			TNT1 A 0 A_TakeInventory("Hooked", 1)
			TNT1 A 0 A_giveInventory("MustLetGo", 1)
			TNT1 A 0 ACS_ExecuteAlways(512, 0)
		Fail
	}
}

Actor Iterating : Inventory
{
	inventory.maxamount 5000
	+IGNORESKILL
}

Actor FlaskType3
{
	PROJECTILE
	Speed 32
	Damage 1
	DamageType "FlaskT3"
	DeathSound "WH/FDeath"
	Radius 6
	Height 6
	Scale 1.1
	-NOGRAVITY
	
	States
	{
		Spawn:
			DTHR ABCDEF 3
		Loop
		Death:
			DTHR G 15
			TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
			TNT1 A 0 A_SpawnItemEx("FlaskExplosion")
			TNT1 AAAAAAA 0 A_SpawnItemEx("FlaskSoul1", 0, 0, 0, random(-10, 10), random(-10, 10), random(0, 16), random(0, 359))
			TNT1 A 0 A_Scream
			TNT1 A 0 A_Jump(128, "Death2")
			DTHR GGGGGGGGG 3 A_CustomMissile("FlaskSoul2", random(4, 8), random(-9, 9), random(0, 359), CMF_TRACKOWNER | CMF_AIMDIRECTION)
		Stop
		Death2:
			DTHR HHHHHHHHH 3 A_CustomMissile("FlaskSoul2", random(4, 8), random(-9, 9), random(0, 359), CMF_TRACKOWNER | CMF_AIMDIRECTION)
		Stop
	}
}

Actor FlaskSoul1
{
	Scale 0.6
	Alpha 0.8
	Vspeed 6
	Renderstyle Add
	-SOLID
	-TELESTOMP
	+NOINTERACTION
	+CLIENTSIDEONLY
	
	States
	{
		Spawn:
			DSOL AAAAAAAAAA 4 A_FadeOut(0.075)
		Stop
	}
}

Actor FlaskExplosion
{
	Alpha 0.8
	Renderstyle Add
	-SOLID
	-TELESTOMP
	+NOINTERACTION
	+CLIENTSIDEONLY
	
	States
	{
		Spawn:
			TNT1 AAA 0 A_PlaySoundEx("WH/Curse", CHAN_BODY)
			DSOL ABC 3 Bright
			TNT1 A 0 A_FadeOut(0.1)
			DSOL D 5 Bright ThrustThingZ(0, 6, 0, 1)
			TNT1 A 0 A_FadeOut(0.1)
			DSOL E 5 Bright ThrustThingZ(0, 6, 0, 1)
			TNT1 A 0 A_FadeOut(0.1)
			DSOL F 5 Bright ThrustThingZ(0, 6, 0, 1)
			TNT1 A 0 A_FadeOut(0.1)
			DSOL G 5 Bright ThrustThingZ(0, 6, 0, 1)
		Stop
	}
}

Actor FlaskSoul2
{
	PROJECTILE
	Damage (15)
	DamageType "FlaskT3"
	Scale 0.8
	Alpha 0.8
	Renderstyle Add
	Radius 7
	Height 12
	Speed 32
	
	States
	{
		Spawn:
			DSOL H 4 A_FadeOut(0.1)
		Loop
		Death:
			TNT1 A 0 A_Explode(24, 72, 0)
			TNT1 A 0 A_PlaySound("GhoulSoulSpawn")
			DSOL H 1 A_SpawnItemEx("FlaskSoul1")
		Stop
	}
}

Actor Flask3Heal : Stimpack
{
	inventory.amount 5
	inventory.maxamount 150
}

Actor Flask3HealBig : Stimpack
{
	inventory.amount 10
	inventory.maxamount 150
}