ACTOR WolfenPlayer : PlayerPawn
{
   Player.DisplayName "Blazkowicz"
   Player.StartItem "Luger", 1
   Player.StartItem "Knife", 1
   Player.StartItem "WolfenClass", 1
   //Player.StartItem "WolfenMovement", 1
   Player.StartItem "Clip", 50
   Player.Face "BJF"
   Player.JumpZ 9//Default is 8
   BloodColor "Red"
   Player.Soundclass "WolfenPlayer"
   DamageFactor "PoisonCloud", 1.75
   DamageFactor "TimonsAxe", 0.75
   DamageFactor "Mace", 1.1
   DamageFactor "DragonClaw", 1.1
   +NOSKIN
   -DONTBLAST
   -THRUSPECIES
   Species "Player"
   Player.ColorRange 96, 111
   States
  {
  Spawn:
    TNT1 A 0 A_TakeInventory("WolfCheckMoving",999)
    BJBL A 1 A_JumpIfInventory("WolfMoving", 1, "See")
    Loop
  See:
    BJBL AAAABBBBCCCCDDDD 1 A_GiveInventory("WolfCheckMoving")
    Loop
  Missile:
    BJBL E 12 
    Goto Spawn
  Melee:
    BJBL F 6 BRIGHT
    Goto Missile
  Pain:
	TNT1 A 0 A_JumpIfInventory("WolfExtraLife",1,"GoingToSalvate")
    BJBL G 4 
    BJBL G 4 A_Pain
    Goto Spawn
  GoingToSalvate:
	BJBL G 4 A_JumpIfHealthLower(20, "GoingTo")
	BJBL G 4 A_Pain
	Goto Spawn
  GoingTo:
	TNT1 A 0 ACS_ExecuteAlways(208)
	TNT1 A 0 A_GiveInventory("Medikit")
	TNT1 A 0 A_GiveInventory("Medikit")
	TNT1 A 0 A_GiveInventory("Medikit")
	TNT1 A 0 A_GiveInventory("Medikit")
	TNT1 A 0 A_GiveInventory("Clip",50)
	TNT1 A 0 A_GiveInventory("BlueArmor")
	TNT1 A 0 A_GiveInventory("Salvate")
	TNT1 A 0 A_GiveInventory("WolfLifeProtection")
	TNT1 A 0 A_PlayerScream
	BJBL G 4 A_TakeInventory("WolfExtraLife",1)
	BJBL G 4
	Goto Spawn
  XDeath:
  Death:
	BJBL G 8 A_PlayerScream
    BJBL H 8 A_NoBlocking
    BJBL I 8
    BJBL JKL 8
    BJBL M -1
    Stop
  Death.ZorchPistol:
  Death.Zorch:
	BJBL G 0 A_Stop
	TNT1 A 0 A_PlaySoundEx("chex/zorch","soundslot5",0,0)
	BJBL G 3 A_SpawnItem("ZorchEffectSmall")
    BJBL G 3 A_SetTranslucent(0.9,0)
	BJBL G 0 A_PlayerScream
    BJBL G 3 A_SetTranslucent(0.8,0)
    BJBL G 0 A_NoBlocking
    BJBL G 3 A_SetTranslucent(0.7,0)
    BJBL G 3 A_SetTranslucent(0.6,0)
    BJBL G 3 A_SetTranslucent(0.5,0)
    BJBL G 3 A_SetTranslucent(0.4,0)
    BJBL G 3 A_SetTranslucent(0.3,0)
    BJBL G 3 A_SetTranslucent(0.2,0)
    BJBL G 3 A_SetTranslucent(0.1,0)
	ACLO E 1 A_SetTranslucent(1,0)
    ACLO E -1
    stop
  CoOpModeOn:
    TNT1 A 0
    TNT1 A 0 A_ChangeFlag("THRUSPECIES",1)
    TNT1 A 0 A_ChangeFlag("DONTBLAST",1)
    BJBL A 1
	goto See
  Death.DukeDamage:
    TNT1 A 0 A_Jump(218,"Death")
	TNT1 A 0 A_GiveToTarget("DukeDMTaunt1",1)
	goto Death
  Death.DukeExplosive:
	TNT1 A 0 A_JumpIfHealthLower(-5,"DukeGibStart")
	goto Death.DukeDamage
  DukeGibStart:
	TNT1 A 0 A_UnsetSolid
	TNT1 A 0 A_PlaySound("duke/enemygib")
    TNT1 A 0 A_SpawnDebris("DukeGibs1")
    TNT1 A 0 A_SpawnDebris("DukeGibs2")
    TNT1 A 0 A_SpawnDebris("DukeGibs3")
    TNT1 A 0 A_SpawnDebris("DukeGibs4")
    TNT1 A 0 A_SpawnDebris("DukeGibs5")
    TNT1 A 0 A_SpawnDebris("DukeGibs6")
    TNT1 A 0 A_Jump(96,"XDeath")
	TNT1 A 0 A_GiveToTarget("DukeDMTaunt1",1)
	goto XDeath
  Death.DukeIce:
    TNT1 A 0 A_Jump(218,"Ice")
    TNT1 A 0 A_GiveToTarget("DukeDMTaunt1",1)
	goto Ice
  Ice:
  Death.HexenIce:
  Death.Ice:
    BJBL G 5 A_GenericFreezeDeath
    BJBL G 1 A_FreezeDeathChunks
    Wait
  }
}

actor Boolean : Inventory
{
    Inventory.MaxAmount 1
    +UNDROPPABLE
	-INVBAR
}

ACTOR WolfenAmmoCrate : CustomInventory
{
  +INVENTORY.INVBAR
  +INVENTORY.UNDROPPABLE
  Inventory.maxamount 1
  Inventory.Icon "BJAMMCRT"
  Inventory.UseSound "wolfen/ammocrate"
  States
  {
  Spawn:
    ACLO E 5
    Stop
  Use:
	TNT1 A 0 A_SetBlend("white",0.1,1)
    TNT1 A 0 A_GiveInventory("Clip", 400)
    Stop
  }
}

actor WolfMoving: Boolean {}
actor WolfenMovement : Boolean {}
actor WolfenClass : Boolean {}

actor WolfCheckMoving: CustomInventory
{
States
{
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfMoving",1,"DoNothing")
	TNT1 A 0 A_JumpIfInventory("WolfenMovement",1,"DoStuff")
  DoNothing:
    TNT1 A 0
    stop
  DoStuff:
    TNT1 A 0 ACS_ExecuteAlways(274)
    stop
  }
}

ACTOR BlankPuff
{
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 1
    Stop
  }
}

ACTOR BlankPuff2 : BlankPuff { DamageType "Pistol" }

ACTOR WolfExtraLife : Inventory//CustomInventory
{
  Inventory.Icon WOLFLIFE
  Inventory.Amount 1
  Inventory.MaxAmount 9
  +INVBAR
  +HUBPOWER
  +UNDROPPABLE
  -INTERHUBSTRIP/*
  States
  {
  Use:
	TNT1 A 1 A_Print("You cannot use this here.")
	fail
  }*/
}

actor WolfLifeProtection : PowerProtection
{
damagefactor "normal", 0.25
damagefactor "Pistol", 0.25
damagefactor "ZorchPistol", 0.25
damagefactor "TimonsAxe", 0.25
damagefactor "zorch", 0.25
damagefactor "fire", 0.25
damagefactor "ice", 0.25
damagefactor "slime", 0.25
damagefactor "bfg", 0.25
damagefactor "bfgspray", 0.25
damagefactor "disintegrate", 0.25
damagefactor "electric", 0.25
DamageFactor "BFG", 0.25
DamageFactor "BFGSpray", 0.25
DamageFactor "Poison", 0.25
DamageFactor "PoisonCloud", 0.25
DamageFactor "Mace", 0.25
DamageFactor "DragonClaw", 0.25
DamageFactor "WolfenFlamethrower", 0.25
DamageFactor "DukeDamage", 0.25
DamageFactor "DukeExplosive", 0.25
DamageFactor "MightyBoot", 0.25
DamageFactor "DukeIce", 0.25
powerup.color Grey 0.1
}

actor Salvate : ArtiTeleport
{
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
}

ACTOR Knife : Weapon
{
  Weapon.Kickback 0
  Weapon.SelectionOrder 2200
  Weapon.SlotNumber 0
  Inventory.PickUpSound "wolfen/knifeget"
  Inventory.PickupMessage "You got a Knife! Wait, shouldn't you start with this?"
  Obituary "%k shanked %o with a knife."
  +WEAPON.MELEEWEAPON
  +DONTBOB
  +NOALERT
  +INVENTORY.UNDROPPABLE
  Weapon.YAdjust 16
  States
  {
  Spawn:
	WKNP A -1
	stop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
    TNT1 A 0 A_JumpIfInventory("GotWeapon0",1,"Ready2")
	WKNF F 1 A_WeaponReady
	goto Ready+1
  Ready2:
    WKNF A 1 A_WeaponReady
	loop
  Deselect:
    TNT1 A 0 A_JumpIfInventory("GotWeapon0",1,"Deselect2")
	WKNF F 1 A_Lower
	loop
  Deselect2:
	WKNF A 1 A_Lower
	loop
  Select:
    TNT1 A 0 A_JumpIfInventory("GotWeapon0",1,"Select2")
	WKNF F 1 A_Raise
	loop
  Select2:
	WKNF A 1 A_Raise
	loop
  Fire:
    TNT1 A 0 A_JumpIfInventory("GotWeapon0",1,"Fire2")
	WKNF GH 3
	WKNF I 3 A_CustomPunch(7,1,0,"BlankPuff2",64)
	WKNF I 0 A_PlayWeaponSound ("wolfen/knife2")
	WKNF H 3
	goto Ready
  Fire2:
	WKNF BCD 3 A_CustomPunch(6,1,0,"BlankPuff2",64)
	WKNF D 0 A_PlayWeaponSound ("wolfen/knife")
	WKNF E 3
	goto Ready
    }
}

ACTOR WolfenBullet : FastProjectile
{
   Damage (Random(1,3)*7)
   Radius 1
   Height 1
   Speed 300
   Projectile
   Renderstyle "Normal"
   Species "Player"
   +BLOODSPLATTER
   +THRUGHOST
   +THRUSPECIES
   +NOTIMEFREEZE
   Alpha 1.0
   States
   {
   Spawn:
     TNT1 A 1
     loop
   Death:
     TNT1 A 1
     stop
   }
}

ACTOR WolfenBullet2 : FastProjectile
{
   Damage (Random(1,3)*7)
   Radius 1
   Height 1
   Speed 300
   Projectile
   Renderstyle "Normal"
   Species "Player"
   DamageType "Pistol"
   +BLOODSPLATTER
   +THRUSPECIES
   +NOTIMEFREEZE
   Alpha 1.0
   States
   {
   Spawn:
     TNT1 A 1
     loop
   Death:
     TNT1 A 1
     stop
   }
}

ACTOR Luger : Weapon
{
  Weapon.SelectionOrder 1900
  Weapon.SlotNumber 1
  Inventory.PickUpSound "wolfen/knifeget"
  Obituary "%k put a hole in %o with the Luger."
  Inventory.PickupMessage "You got the Luger Pistol!"
  DamageType "Pistol"
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  +WEAPON.WIMPY_WEAPON
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  Weapon.YAdjust 16
  States
  {
  Spawn:
	WPSP A -1
	Loop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
	WPST A 1 A_WeaponReady
	goto Ready+1
  Deselect:
	WPST A 1 A_Lower
	Loop
  Select:
	WPST A 1 A_Raise
	Loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
	WPST B 3
	WPST A 0 A_PlayWeaponSound("wolfen/pistol")
	WPST C 3 BRIGHT A_FireBullets(0,0,1,7,"BlankPuff2")
	WPST DE 4
	Goto Ready
  CoopFire:
	WPST B 3
	WPST A 0 A_PlayWeaponSound("wolfen/pistol")
	WPST C 3 BRIGHT A_FireCustomMissile("WolfenBullet2",0,0,0,1)
	WPST DE 4
	Goto Ready
  }
}
 
ACTOR "Machine Gun" : Weapon
{
  Weapon.SelectionOrder 1300
  Weapon.SlotNumber 2
  Inventory.PickUpSound "wolfen/mgunget"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 6
  Weapon.AmmoType "Clip"
  +THRUGHOST
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  Inventory.PickupMessage "You got the Machine Gun!"
  Obituary "%k shot %o to pieces with the Machine Gun."
  Weapon.YAdjust 16
  States
  {
  Spawn:
	WMGP A -1
	Loop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
	WMGN A 1 A_WeaponReady
	goto Ready+1
  Deselect:
	WMGN A 1 A_Lower
	Loop
  Select:
	WMGN A 1 A_Raise
	Loop
  Fire:
	WMGN AB 2
  Hold:
	TNT1 A 0 A_JumpIfInventory("SPModeOn",1,"SPFire")
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
	TNT1 A 0 A_PlayWeaponSound("wolfen/machinegun")
	WMGN C 3 BRIGHT A_FireBullets(0,0,-1,6,"BlankPuff")
	WMGN D 3
	TNT1 A 0 A_Refire
	WMGN E 3 A_ClearRefire
	Goto Ready
  SPFire:
	TNT1 A 0 A_PlayWeaponSound("wolfen/machinegun")
	WMGN C 3 BRIGHT A_FireBullets(0,0,-1,7,"BlankPuff")
	WMGN D 3
	TNT1 A 0 A_Refire
	WMGN E 3 A_ClearRefire
	Goto Ready
  CoopFire:
	TNT1 A 0 A_PlayWeaponSound("wolfen/machinegun")
	WMGN C 3 BRIGHT A_FireCustomMissile("WolfenBullet",0,1,0,1)
	WMGN D 3
	TNT1 A 0 A_Refire
	WMGN E 3 A_ClearRefire
	Goto Ready
	}
} 

ACTOR "  Chaingun  " : Weapon
{
  Weapon.SelectionOrder 1700
  Weapon.SlotNumber 4
  Inventory.PickUpSound "wolfen/weaponget"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 6
  Weapon.AmmoType "Clip"
  +THRUGHOST
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  Inventory.PickupMessage "You got the Chaingun!"
  Obituary "%k drilled %o with the Chaingun."
  Weapon.YAdjust 16
  States
  {
  Spawn:
	WCHP A -1
	Loop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
	WCHN A 1 A_WeaponReady
	goto Ready+1
  Deselect:
	WCHN A 1 A_Lower
	Loop
  Select:
	WCHN A 1 A_Raise
	Loop
  Fire:
	WCHN AB 2
  Hold:
	TNT1 A 0 A_JumpIfInventory("SPModeOn",1,"SPFire")
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN C 3 BRIGHT A_FireBullets(2,2,-1,5,"BlankPuff")
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN D 3 BRIGHT A_FireBullets(2,2,-1,5,"BlankPuff")
	TNT1 A 0 A_ReFire
	WCHN E 2 A_ClearRefire
	Goto Ready
  SPFire:
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN C 3 BRIGHT A_FireBullets(0,0,-1,7,"BlankPuff")
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN D 3 BRIGHT A_FireBullets(0,0,-1,7,"BlankPuff")
	TNT1 A 0 A_ReFire
	WCHN E 2 A_ClearRefire
	Goto Ready
  CoopFire:
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN C 3 BRIGHT A_FireCustomMissile("WolfenBullet",0,1,0,1)
	WCHN A 0 A_PlayWeaponSound("wolfen/chaingun")
	WCHN D 3 BRIGHT A_FireCustomMissile("WolfenBullet",0,1,0,1)
	TNT1 A 0 A_ReFire
	WCHN E 2 A_ClearRefire
	Goto Ready
  }
}

Actor " Rocket Launcher " : Weapon
{
  Weapon.SelectionOrder 2500
  Weapon.SlotNumber 5
  Inventory.PickUpSound "wolfen/rocketget"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 2
  Weapon.AmmoType "RocketAmmo"
  //+AMMO_OPTIONAL
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  Inventory.PickupMessage "You got the Rocket Launcher!"
  Weapon.YAdjust 16
  States
  {
  Spawn:
    WRLP A -1
    Stop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
    WRCK A 1 A_WeaponReady
    goto Ready+1
  Deselect:
    WRCK A 1 A_Lower
    Loop
  Select:
    WRCK A 1 A_Raise
    Loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
    WRCK B 4 BRIGHT A_FireCustomMissile("WolfRocket")
    WRCK CDCA 4
	WRCK A 0 A_Refire
    Goto Ready
  CoopFire:
    WRCK B 4 BRIGHT A_FireCustomMissile("WolfRocket2")
    WRCK CDCA 4
	WRCK A 0 A_Refire
    Goto Ready
  }
}

ACTOR WolfRocket
{
  Scale 0.75
  Radius 8
  Height 6
  Speed 30
  Damage 15
  Projectile
  +RIPPER
  +FORCERADIUSDMG
  +NOEXTREMEDEATH
  SeeSound "wolfen/missilefire"
  DeathSound "wolfen/missilexplod"
  Obituary "%k tore through %o with the Rocket Launcher."
  States
  {
  Spawn:
    WMSL A 3 A_SpawnItem("WolfRocketSmoke")
    Loop
  Death:
    BAL3 C 8 Bright A_Explode(128,32,0)
    BAL3 D 6 Bright
    BAL3 E 4 Bright
    Stop
  }
}

ACTOR WolfRocket2 : WolfRocket { +THRUSPECIES Species "Player" }

ACTOR WolfRocketSmoke
{
  Radius 1
  Height 1
  Speed 0
  Renderstyle Translucent
  Alpha 0.5
  +NOGRAVITY
  -SOLID
  +NOCLIP
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 2
    RTRL ABCD 4
	stop
  }
}

Actor " Flamethrower " : Weapon
{
  Weapon.SelectionOrder 1900
  Weapon.SlotNumber 6
  Inventory.PickUpSound "wolfen/flameget"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  //+AMMO_OPTIONAL
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  Inventory.PickupMessage "You got the Flamethrower!"
  Weapon.YAdjust 16
  States
  {
  Spawn:
    WFLP A -1
    Stop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
    WFLM A 1 A_WeaponReady
    goto Ready+1
  Deselect:
    WFLM A 1 A_Lower
    Loop
  Select:
    WFLM A 1 A_Raise
    Loop
  Fire:
    WFLM B 5
  Hold:
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
    WFLM A 0 A_FireCustomMissile("WolfenFire")
    WFLM C 2 BRIGHT
	WFLM B 3 BRIGHT
    WFLM A 0 A_FireCustomMissile("WolfenFire")
    WFLM D 2 BRIGHT
	WFLM B 3 BRIGHT
	TNT1 A 0 A_Refire
	WFLM B 3 A_ClearRefire
    Goto Ready
  CoopFire:
    WFLM A 0 A_FireCustomMissile("WolfenFire2")
    WFLM C 2 BRIGHT
	WFLM B 3 BRIGHT
    WFLM A 0 A_FireCustomMissile("WolfenFire2")
    WFLM D 2 BRIGHT
	WFLM B 3 BRIGHT
	TNT1 A 0 A_Refire
	WFLM B 3 A_ClearRefire
    Goto Ready
  }
}

Actor WolfenFire
{
  Radius 12
  Height 8
  Speed 25
  Damage (random(10,50)) // Typical Plasma Rifle damage is 5-40
  Projectile
  +RANDOMIZE
  +BRIGHT
  DamageType "WolfenFlamethrower"
  SeeSound "wolfen/flamethrower"
  Obituary "%k scorched %o with the Flamethrower."
  States
  {
  Spawn:
    BAL3 AB 6 bright
    loop
  Death:
    BAL3 CDE 6 bright
    stop
  }
}

Actor WolfenFire2 : WolfenFire { +THRUSPECIES Species "Player" }

Actor "Spear of Destiny" : Weapon
{
  Weapon.SelectionOrder 2900
  Weapon.SlotNumber 7
  Inventory.PickUpSound "wolfen/spearget"
  Weapon.AmmoUse 40
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  +DONTBOB
  +INVENTORY.UNDROPPABLE
  +WEAPON.NOAUTOFIRE
  Obituary "%k cleansed %o from this world with the Spear of Destiny." 
  Inventory.PickupMessage "You got the Spear of Destiny!"
  States
  {
  Spawn:
    WSPR E -1
    Stop
  Ready:
	TNT1 A 0 SetPlayerProperty(0,1,2)
    WSPR A 1 A_WeaponReady
    goto Ready+1
  Deselect:
    WSPR A 1 A_Lower
    Loop
  Select:
    WSPR A 1 A_Raise
    Loop
  Fire:
	TNT1 A 0 A_JumpIfInventory("SPModeOn",1,"SPFire")
	TNT1 A 0 A_JumpIfInventory("CoopModeOn",1,"CoopFire")
    WSPR B 20 A_PlayWeaponSound("wolfen/spearready")
	WSPR C 10 BRIGHT
	WSPR C 0 A_PlayWeaponSound("wolfen/spearfire")
	WSPR D 10 BRIGHT A_FireCustomMissile("SpearBoltDM",0,1,0,0)
	WSPR C 10 BRIGHT
	WSPR B 10
	WSPR A 5 A_Refire
	goto Ready
  SPFire:
    WSPR B 20 A_PlayWeaponSound("wolfen/spearready")
	WSPR C 10 BRIGHT
	WSPR C 0 A_PlayWeaponSound("wolfen/spearfire")
	WSPR D 10 BRIGHT A_FireCustomMissile("SpearBolt",0,1,0,0)
	WSPR C 10 BRIGHT
	WSPR B 10
	WSPR A 5 A_Refire
	goto Ready
  CoopFire:
    WSPR B 20 A_PlayWeaponSound("wolfen/spearready")
	WSPR C 10 BRIGHT
	WSPR C 0 A_PlayWeaponSound("wolfen/spearfire")
	WSPR D 10 BRIGHT A_FireCustomMissile("SpearBolt2",0,1,0,0)
	WSPR C 10 BRIGHT
	WSPR B 10
	WSPR A 5 A_Refire
	goto Ready
  }
}

ACTOR SpearBolt
{
   Speed 15
   Height 2
   Radius 4
   Mass 9
   Damage 55
   SeeSound ""
   DeathSound "wolfen/spearexplode1"
   Obituary "%k cleansed %o from this world with the Spear of Destiny." 
   PROJECTILE
   +DONTREFLECT
  DamageType "BFG"
   Scale 0.80
   RENDERSTYLE ADD
   States
   {
   Spawn:
      SPB1 ABABABAB 3 BRIGHT A_SpawnItemEx("SpearShotTrail",0,0,0)
      Goto Death
   Death:
	  SPX1 A 0 A_Stop
      SPX1 AAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("SpearShotMini",0,0,random(-180,180),2,random(-25,25))
      SPX1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("SpearShotMini2",0,0,random(-180,180),2,random(-25,25))
	  SPX1 A 0 A_Scream
      SPX1 A 4 BRIGHT A_Explode(120,240,0)
      SPX1 BCDEF 4 BRIGHT
      Stop
   }
}

ACTOR SpearBoltDM : SpearBolt
{
Obituary "%k cleansed %o from this world with the Spear of Destiny." 
States
   {
	Death:
	  SPX1 A 0 A_Stop
      SPX1 AAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("SpearShotMiniDM",0,0,random(-180,180),2,random(-25,25))
      SPX1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("SpearShotMini2DM",0,0,random(-180,180),2,random(-25,25))
	  SPX1 A 0 A_Scream
      SPX1 A 4 BRIGHT A_Explode(120,198,0)
      SPX1 BCDEF 4 BRIGHT
      Stop
   }
}

ACTOR SpearBolt2 : SpearBolt { +THRUSPECIES Species "Player" }

ACTOR SpearShotMini
{
   Radius 10
   Height 16
   Speed 10
   Damage 4
   Scale 0.75
   Obituary "%k cleansed %o from this world with the Spear of Destiny." 
   PROJECTILE
   +RIPPER
   +DOOMBOUNCE
   +NODAMAGETHRUST
   +SKYEXPLODE
   +CANBOUNCEWATER
   +DONTREFLECT
  DamageType "BFG"
   SeeSound "wolfen/spearbounce"
   DeathSound "wolfen/spearexplode2"
   States
   {
   Spawn:
      SPB3 ABABABABABABABABABAB 5 BRIGHT A_SpawnItemEx("SpearShotTrail2",0,0,1)
	  TNT1 A 0 A_Jump(128,"Spawn")
      goto Death
   Death:
	  TNT1 A 0 A_Scream
	  SPX3 C 1 A_Explode(64,64,0)
      SPX3 C 1
      SPX3 C 4 BRIGHT
	  SPX3 D 6 BRIGHT
      Stop
   }
}

ACTOR SpearShotMiniDM : SpearShotMini
{
Damage 3
+STRIFEDAMAGE
   States
   {
   Spawn:
      SPB3 ABABABABABABABABABAB 5 BRIGHT A_SpawnItemEx("SpearShotTrail2",0,0,1)
	  TNT1 A 0 A_Jump(96,"Spawn")
      goto Death
   Death:
	  TNT1 A 0 A_Scream
	  SPX3 C 1 A_Explode(32,64,0)
      SPX3 C 1
      SPX3 C 4 BRIGHT
	  SPX3 D 6 BRIGHT
      Stop
	}
}

ACTOR SpearShotMini2
{
   Radius 3
   Height 4
   Speed 10
   Damage 4
   Obituary "%k cleansed %o from this world with the Spear of Destiny." 
   PROJECTILE
   +RIPPER
   +STRIFEDAMAGE
   +DOOMBOUNCE
   +NODAMAGETHRUST
   +SKYEXPLODE
   +CANBOUNCEWATER
   +DONTREFLECT
  DamageType "BFG"
   SeeSound "wolfen/spearbounce"
   DeathSound "wolfen/spearexplode2"
   States
   {
   Spawn:
      SPB2 ABABABABABABABABABAB 5 BRIGHT A_SpawnItemEx("SpearShotTrail2",0,0,1)
	  TNT1 A 0 A_Jump(128,"Spawn")
      goto Death
   Death:
	  TNT1 A 0 A_Scream
	  SPX2 AA 2 A_Explode(64,64,0)
      SPX2 BCDE 4 BRIGHT
      Stop
   }
}

ACTOR SpearShotMini2DM : SpearShotMini2
{
Damage 3
+STRIFEDAMAGE
   States
   {
   Spawn:
      SPB2 ABABABABABABABABABAB 5 BRIGHT A_SpawnItemEx("SpearShotTrail2",0,0,1)
	  TNT1 A 0 A_Jump(96,"Spawn")
      goto Death
   Death:
	  TNT1 A 0 A_Scream
	  SPX2 AA 2 A_Explode(32,64,0)
      SPX2 BCDE 4 BRIGHT
      Stop
	}
}

ACTOR SpearShotTrail 
{
   Speed 1
   Scale 0.8
   Damage 0
   PROJECTILE
   -SOLID
   +NOCLIP
   +NOINTERACTION
   +CLIENTSIDEONLY
   States
   {
   Spawn:
      TNT1 A 2
      SPTR ABCD 2 Bright
      Stop   
   }
}

ACTOR SpearShotTrail2 : SpearShotTrail
{
   Scale 0.3
   +CLIENTSIDEONLY
}

Actor WolfensteinChickenLeg : Stimpack
{
  Inventory.PickupMessage "Ate up a chicken leg for 10 Health."
  Inventory.PickupSound "wolfen/chicken"
  Scale 0.75
  States
  {
  Spawn:
    CHKL A -1
	stop
  }
}

Actor DrinkableGibs : CustomInventory replaces Gibs
{
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    POL5 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	POL5 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	POL5 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	TNT1 A 1
	stop
  }
}

Actor DrinkableBrainStem : CustomInventory replaces BrainStem
{
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    BRS1 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	BRS1 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	BRS1 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	TNT1 A 1
	stop
  }
}

Actor DrinkableColonGibs : CustomInventory replaces ColonGibs
{
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    POB1 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	POB1 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	POB1 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	TNT1 A 1
	stop
  }
}

Actor DrinkableSmallBloodPool : CustomInventory replaces SmallBloodPool
{
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    POB2 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	POB2 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	POB2 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	TNT1 A 1
	stop
  }
}

Actor DrinkableHeartColumn : CustomInventory replaces HeartColumn
{
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  Radius 16
  Height 40
  +SOLID
  +DROPPED
  States
  {
  Spawn:
    COL5 AB 14
    loop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	COL5 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	COL5 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	COL2 A 1
	COL2 A 1 A_SpawnItemEx("ShortGreenColumn",38,0,-1)
	COL2 A -1
	stop
  }
}

Actor XOnAStick
{
  Radius 16
  Height 64
  +SOLID
  States
  {
  Spawn:
    GPOL A -1
    Stop
  }
}

Actor DrinkableHeadOnAStick : CustomInventory replaces HeadOnAStick
{
  Radius 16
  Height 64
  +SOLID
  +DROPPED
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    POL4 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	POL4 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	POL4 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	POL4 A 1
	POL4 A 1 A_SpawnItemEx("XOnAStick",38,0,-1)
	GPOL A -1
	stop
  }
}

Actor DrinkableHeadsOnAStick : CustomInventory replaces HeadsOnAStick
{
  Radius 16
  Height 64
  +SOLID
  +DROPPED
  Inventory.PickupMessage "Drank up for 1 Health."
  Inventory.PickupSound "wolfen/slurpie"
  States
  {
  Spawn:
    POL2 A -1
    stop
  Pickup:
    TNT1 A 0 A_JumpIfInventory("WolfenClass",1,"WolfenCheck")
	POL2 A 1
	fail
  WolfenCheck:
    TNT1 A 0 A_JumpIfHealthLower(21,"DrinkUp")
	POL2 A 1
	fail
  DrinkUp:
    TNT1 A 0 A_GiveInventory("HealthBonus",1)
	POL2 A 1
	POL2 A 1 A_SpawnItemEx("XOnAStick",38,0,-1)
	GPOL A -1
	stop
  }
}