//===========================================================================
//
// Player
//
//===========================================================================
ACTOR PoliceOfficer : PlayerPawn
{
	Speed 1
	Health 100
	Radius 16
	Height 64
	Mass 100
	Player.ViewHeight 55
	PainChance 255
	Player.DisplayName "Cop"
	Player.CrouchSprite "HCOP"
	Player.StartItem "M16"
	Player.StartItem "Fist"
	Player.StartItem "NewClip", 100
	Player.StartItem "GreenArmor", 100
	Player.StartItem "NightVision", 1
	Player.StartItem "GasMask", 1
	Player.WeaponSlot 1, Fist
	Player.WeaponSlot 2, Revolver
	Player.WeaponSlot 3, Rifle
	Player.WeaponSlot 4, M16
	Player.WeaponSlot 5, NewRocketLauncher
	Player.WeaponSlot 6, HandGrenades	 
	Player.WeaponSlot 7, TE22
	
	Player.ColorRange 112, 127
	Player.Colorset 0, "Green",			0x70, 0x7F,  0x72
	Player.Colorset 1, "Gray",			0x60, 0x6F,  0x62
	Player.Colorset 2, "Brown",			0x40, 0x4F,  0x42
	Player.Colorset 3, "Red",			0x20, 0x2F,  0x22
	// Doom Legacy additions
	Player.Colorset 4, "Light Gray",	0x58, 0x67,  0x5A
	Player.Colorset 5, "Light Brown",	0x38, 0x47,  0x3A
	Player.Colorset 6, "Light Red",		0xB0, 0xBF,  0xB2
	Player.Colorset 7, "Light Blue",	0xC0, 0xCF,  0xC2

	States
	{
	Spawn:
		HCOP A -1
		Loop
	See:
		HCOP ABCD 4
		Loop
	Missile:
		HCOP E 12
		Goto Spawn
	Melee:
		HCOP F 6 BRIGHT
		Goto Missile
	Pain:
		HCOP A 4
		HCOP A 4 A_Pain
		Goto Spawn
	Death:
		HCOP H 0 
	Death1:
		HCOP H 10
		HCOP I 10 A_PlayerScream
		HCOP J 10 A_NoBlocking
		HCOP K -1
		Stop
	}
}

ACTOR Hoodlum : PlayerPawn
{
	Speed 1
	Health 100
	Radius 16
	Height 64
	Mass 100
	Player.ViewHeight 55
	PainChance 255
	Player.DisplayName "Thug"
	Player.CrouchSprite "ROC1"
	Player.StartItem "Revolver"
	Player.StartItem "Fist"
	Player.StartItem "HandGrenades"
	Player.StartItem "Grenades", 4
	Player.StartItem "NewClip", 200
	Player.StartItem "BlueArmor", 200
	Player.StartItem "Cocaine", 1
	Player.WeaponSlot 1, Fist
	Player.WeaponSlot 2, Revolver
	Player.WeaponSlot 3, Rifle
	Player.WeaponSlot 4, M16
	Player.WeaponSlot 5, NewRocketLauncher
	Player.WeaponSlot 6, HandGrenades	 
	Player.WeaponSlot 7, TE22
	
	Player.ColorRange 112, 127
	Player.Colorset 0, "Green",			0x70, 0x7F,  0x72
	Player.Colorset 1, "Gray",			0x60, 0x6F,  0x62
	Player.Colorset 2, "Brown",			0x40, 0x4F,  0x42
	Player.Colorset 3, "Red",			0x20, 0x2F,  0x22
	// Doom Legacy additions
	Player.Colorset 4, "Light Gray",	0x58, 0x67,  0x5A
	Player.Colorset 5, "Light Brown",	0x38, 0x47,  0x3A
	Player.Colorset 6, "Light Red",		0xB0, 0xBF,  0xB2
	Player.Colorset 7, "Light Blue",	0xC0, 0xCF,  0xC2

	States
	{
	Spawn:
		ROC1 A -1
		Loop
	See:
		ROC1 ABCD 4
		Loop
	Missile:
		ROC1 E 12
		Goto Spawn
	Melee:
		ROC1 F 6 BRIGHT
		Goto Missile
	Pain:
		ROC1 G 4
		ROC1 G 4 A_Pain
		Goto Spawn
	Death:
		HCOP I 0 
Death:
		ROC1 I 5
		ROC1 J 5 A_PlayerScream
		ROC1 K 5 A_NoBlocking
		ROC1 L 5
		ROC1 M 5
		ROC1 N 5
		ROC1 O 5
		ROC1 P 5
		ROC1 Q 5
		ROC1 R 5
		ROC1 S -1
		Stop
	}
}

ACTOR Biker : PlayerPawn
{
	Speed 1
	Health 100
	Radius 16
	Height 64
	Mass 100
	Player.ViewHeight 55
	PainChance 255
	Player.DisplayName "Biker"
	Player.CrouchSprite "ROC2"
	Player.StartItem "Rifle"
	Player.StartItem "Fist"
	Player.StartItem "Shell", 50
	Player.StartItem "Morphine", 1
	Player.WeaponSlot 1, Fist
	Player.WeaponSlot 2, Revolver
	Player.WeaponSlot 3, Rifle
	Player.WeaponSlot 4, M16
	Player.WeaponSlot 5, NewRocketLauncher
	Player.WeaponSlot 6, HandGrenades	 
	Player.WeaponSlot 7, TE22
	
	Player.ColorRange 112, 127
	Player.Colorset 0, "Green",			0x70, 0x7F,  0x72
	Player.Colorset 1, "Gray",			0x60, 0x6F,  0x62
	Player.Colorset 2, "Brown",			0x40, 0x4F,  0x42
	Player.Colorset 3, "Red",			0x20, 0x2F,  0x22
	// Doom Legacy additions
	Player.Colorset 4, "Light Gray",	0x58, 0x67,  0x5A
	Player.Colorset 5, "Light Brown",	0x38, 0x47,  0x3A
	Player.Colorset 6, "Light Red",		0xB0, 0xBF,  0xB2
	Player.Colorset 7, "Light Blue",	0xC0, 0xCF,  0xC2

	States
	{
	Spawn:
		ROC2 A -1
		Loop
	See:
		ROC2 ABCD 4
		Loop
	Missile:
		ROC2 E 12
		Goto Spawn
	Melee:
		ROC2 FGH 12 BRIGHT
		Goto Missile
	Pain:
		ROC2 A 4
		ROC2 B 4 A_Pain
		Goto Spawn
	Death:
		ROC2 I 0 
Death:
		ROC2 I 5
		ROC2 J 5 A_PlayerScream
		ROC2 K 5 A_NoBlocking
		ROC2 L 5
		ROC2 M 5
		ROC2 N 5
		ROC2 O -1
		Stop
	}
}


// NewClip --------------------------------------------------------------------

ACTOR NewClip : Ammo replaces Clip
{
	Inventory.PickupMessage "Clip"
	Inventory.Amount 10
	Inventory.MaxAmount 400
	Ammo.BackpackAmount 10
	Ammo.BackpackMaxAmount 800
	Inventory.Icon "CLIPA0"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

// Clip box ----------------------------------------------------------------

ACTOR NewClipBox : NewClip replaces Clipbox
{
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.Amount 50
	States
	{
	Spawn:
		AMMO A -1
		Stop
	}
}

// --------------------------------------------------------------------------
//
// Revolver 
//
// --------------------------------------------------------------------------

ACTOR Revolver : DoomWeapon replaces Pistol
{
	Weapon.SelectionOrder 1900
	Decal "BulletChip"
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "NewClip"
	Obituary "%o was shot by %k's revolver."
	+WEAPON.WIMPY_WEAPON
	Inventory.Pickupmessage "Revolver"
	Tag "Revolver"
	Decal "BulletChip"
	States
	{
	Ready:
		PISG A 1 A_WeaponReady
		Loop
	Deselect:
		PISG A 1 A_Lower
		Loop
	Select:
		PISG A 1 A_Raise
		Loop
	Fire:
		PISG A 4
		PISF A 6 Bright A_FirePistol
		PISG CB 8
		PISG A 8 A_ReFire
		Goto Ready
 	Spawn:
		PISP A -1
		Stop
	}
}

// --------------------------------------------------------------------------
//
// TE-22 
//
// --------------------------------------------------------------------------

ACTOR TE22 : DoomWeapon replaces PlasmaRifle
{
	Weapon.SelectionOrder 100
	Weapon.AmmoUse 1
	Weapon.AmmoGive 100
	Weapon.AmmoType "Cell"
	Inventory.PickupMessage "M60"
	Obituary "%o was zippered by %k's M60" 
	Tag "M60"
	Decal "BulletChip"
	States
	{
	Ready:
		PLSG A 1 A_WeaponReady
		Loop
	Deselect:
		PLSG A 1 A_Lower
		Loop
	Select:
		PLSG A 1 A_Raise
		Loop
	Fire:
		PLSF AB 1 Bright A_PlayWeaponSound("weapons/plasmaf")
		PLSF AB 1 Bright A_FireBullets(5,1,1,15) 
		PLSF B 1 Bright A_Recoil(1) 
		PLSF B 1 Bright A_ReFire
		Goto Ready
	Spawn:
		PLAS A -1
		Stop
	}
}

ACTOR ChainsawDec replaces Chainsaw
{
	Radius 16
	Height 16
	ProjectilePassHeight -16
	+SOLID
	States
	{
	Spawn:
		CSAW A -1 
		Stop
	}
}

// --------------------------------------------------------------------------
//
// HuntingRifle
//
// --------------------------------------------------------------------------

ACTOR Rifle : DoomWeapon replaces Shotgun
{
	Weapon.SelectionOrder 1300
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell"
	Inventory.PickupMessage "$GOTSHOTGUN"
	Obituary "%o was sniped by %k's rifle."
	Tag "Hunting Rifle"
	Decal "BulletChip"
	States
	{
	Ready:
		SHTG A 1 A_WeaponReady
		Loop
	Deselect:
		SHTG A 1 A_Lower
		Loop
	Select:
		SHTG A 1 A_Raise
		Loop
       Fire:
          SHTG A 3
	      SHTF A 4 Bright A_FireBullets(0,0,2,8)
          SHTF B 3 Bright A_PlaySound("shotguy/attack")
          SHTG BC 5 A_Recoil(1)
          SHTG D 4
          SHTG CB 5
          SHTG A 3
          SHTG A 7 A_ReFire
          Goto Ready
	Spawn:
		SHOT A -1
		Stop
	}
}	

// --------------------------------------------------------------------------
//
// M-16
//
// --------------------------------------------------------------------------

ACTOR M16 : DoomWeapon replaces Chaingun
{
	Weapon.SelectionOrder 700
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "NewClip"
	Inventory.PickupMessage "$GOTCHAINGUN"
	Obituary "%o was gunned down by %k's M-16."
	Tag "M-16"
	Decal "BulletChip"
	States
	{
	Ready:
		CHGG A 1 A_WeaponReady
		Loop
	Deselect:
		CHGG A 1 A_Lower
		Loop
	Select:
		CHGG A 1 A_Raise
		Loop
	Fire:
		CHGG AB 4 A_FireCGun
		CHGG B 0 A_ReFire
		Goto Ready
	Flash:
		CHGF A 5 Bright A_Recoil(0.5)
		Goto LightDone
		CHGF B 5 Bright 
		Goto LightDone
	Spawn:
		MGUN A -1
		Stop
	}
}

// --------------------------------------------------------------------------
//
// Rocket launcher
//
// --------------------------------------------------------------------------

ACTOR NewRocketLauncher : DoomWeapon replaces RocketLauncher
{
	Weapon.SelectionOrder 2500
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "RocketAmmo"
	+WEAPON.NOAUTOFIRE
	Inventory.PickupMessage "$GOTLAUNCHER"
	Tag "Rocket Launcher"
	Decal "Scorch"
	States
	{
	Ready:
		MISG A 1 A_WeaponReady
		Loop
	Deselect:
		MISG A 1 A_Lower
		Loop
	Select:
		MISG A 1 A_Raise
		Loop
	Fire:
		MISG B 8 A_GunFlash
		MISG B 6 A_FireCustomMissile("NewRocket",0,1,0,2)
		MISG B 6 A_Recoil(5)
		MISG B 0 A_ReFire
		Goto Ready
	Flash:
		MISF A 3 Bright A_Light1
		MISF B 4 Bright
		MISF CD 4 Bright A_Light2
		Goto LightDone
	Spawn:
		LAUN A -1
		Stop
	}
}

ACTOR NewRocket
{
	Radius 11
	Height 8
	Speed 20
	Damage 20
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	+ROCKETTRAIL
	SeeSound "weapons/rocklf"
	DeathSound "weapons/nrocket"
	Obituary "$OB_MPROCKET"
	Decal "Scorch"
	States
	{
	Spawn:
		MISL A 1 Bright
		Loop
	Death:
		RPGX B 2 Bright A_Explode
		RPGX C 2 Bright
		RPGX D 2 Bright
		RPGX E 2 bright 
		RPGX F 2 bright
		RPGX G 2 bright 
		RPGX H 2 bright
		RPGX I 2 bright
		RPGX J 2 bright
		RPGX K 2 bright
		RPGX L 2 bright
		RPGX M 2 bright
		RPGX N 2 bright
		RPGX O 2 bright
		RPGX P 2 bright
		RPGX Q 2 bright
		RPGX R 2 bright
		RPGX S 2 bright
		RPGX T 2 bright
		RPGX U 2 bright
		RPGX V 2 bright
		Stop
	}
}

ACTOR Box replaces SpiderMastermind
{
	Radius 16
	Height 48
	+SOLID
	States
	{
	Spawn:
		COL4 A -1 
		Stop
	}
}

// --------------------------------------------------------------------------
//
// Grenade Launcher
//
// --------------------------------------------------------------------------

ACTOR ZombieGrenade replaces Grenade
{
    Radius 4
	Height 4
	Projectile
	Speed 30
    Damage 5
    Gravity 1
    -NOGRAVITY
    -BLOODSPLATTER
	-EXTREMEDEATH
	+DEHEXPLOSION
	+DOOMBOUNCE
	BounceFactor 0.5
	//+BOUNCEONACTORS
    Health 5
	Obituary "%o ate %k's grenade."
	DeathSound "weapons/nrocket"
	BounceSound "weapons/grbnce"
	DamageType Grenade
	Decal "Scorch"
	States
	{
	Spawn:
		GRNS AB 2 Bright 
		Loop
	Death:
		RPGX B 2 Bright A_Explode
		RPGX C 2 Bright
		RPGX D 2 Bright
		RPGX E 2 bright 
		RPGX F 2 bright
		RPGX G 2 bright 
		RPGX H 2 bright
		RPGX I 2 bright
		RPGX J 2 bright
		RPGX K 2 bright
		RPGX L 2 bright
		RPGX M 2 bright
		RPGX N 2 bright
		RPGX O 2 bright
		RPGX P 2 bright
		RPGX Q 2 bright
		RPGX R 2 bright
		RPGX S 2 bright
		RPGX T 2 bright
		RPGX U 2 bright
		RPGX V 2 bright
		Stop
	Grenade:
		GRNS A 1000 A_Die
		Wait
	Detonate:
		RPGX B 2 BRIGHT A_Scream
		RPGX C 2 bright A_Detonate
		RPGX D 2 bright
		RPGX E 2 bright 
		RPGX F 2 bright
		RPGX G 2 bright 
		RPGX H 2 bright
		RPGX I 2 bright
		RPGX J 2 bright
		RPGX K 2 bright
		RPGX L 2 bright
		RPGX M 2 bright
		RPGX N 2 bright
		RPGX O 2 bright
		RPGX P 2 bright
		RPGX Q 2 bright
		RPGX R 2 bright
		RPGX S 2 bright
		RPGX T 2 bright
		RPGX U 2 bright
		RPGX V 2 bright
		Stop
	Mushroom:
		RPGX B 2 bright A_Mushroom
		Goto Death+1
	}
}

ACTOR HandGrenades : Weapon 25018
{
   Weapon.SelectionOrder 2500
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "Grenade"
   Weapon.AmmoType "Grenades"
   Weapon.AmmoGive 2
   Weapon.AmmoUse 1
   Weapon.Kickback 0
   Tag "Grenades"
   +WEAPON.NOAUTOFIRE
   + NOALERT
   Decal "Scorch"
   States
   {
   Spawn:
      GRNS A -1
      Loop
   Ready:
      PUNG A 1 A_WeaponReady
      Loop
   Deselect:
      PUNG A 1 A_Lower
      Loop
   Select:
      PUNG A 1 A_Raise
      Loop
   Fire:
      THRW AAA 1
      THRW A 1
      THRW AABBCC 1
      THRW C 0 A_FireCustomMissile("ZombieGrenade", random(-3,3), 1, 0, 10, 0, 0)
      THRW C 8 
      THRW CCC 1
      THRW C 8
      THRW CCDDEE 1
      PUNG A 4
      PUNG A 4 A_ReFire
      Goto Ready
   }
}

// GRENADES ------------------------------------------------------------------

ACTOR Grenades : Ammo 25019
{
	Inventory.PickupMessage "Grenades"
	Inventory.Amount 2	
	Inventory.MaxAmount 50
	Inventory.Icon "GRNSA0"
	States
	{
	Spawn:
		GRNS A -1
		Stop
	}
}

// Rocket box --------------------------------------------------------------

ACTOR RocketBox2 : RocketAmmo
{
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Amount 5
	States
	{
	Spawn:
		BROK A -1
		Stop
	}
}

// Inventory Shit

ACTOR NightVision : PowerupGiver replaces Infrared
{
	-COUNTITEM
	-INVENTORY.AUTOACTIVATE
	-INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 10
	Powerup.Type LightAmp
	Inventory.Icon "DKNV"
	Inventory.PickupMessage "N-V Goggles"
	Tag "N-V Goggles"
	States
	{
	Spawn:
		DKNV A 6 Bright
		DKNV A 6
		Loop
	}
}


ACTOR GasMask : PowerupGiver replaces RadSuit
{
	-INVENTORY.AUTOACTIVATE
	-INVENTORY.ALWAYSPICKUP
	-COUNTITEM
	Inventory.MaxAmount 10
	Inventory.PickupMessage "Gas Mask"
	Inventory.Icon "SUIT"
	Powerup.Type IronFeet
	Tag "Gas Mask"
	States
	{
	Spawn:
		SUIT A -1 Bright
		Stop
	}
}	


ACTOR Adrenaline : PowerupGiver 5556
{
	-COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	-INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 10
	Inventory.PickupMessage "Adrenaline"
	Inventory.Icon "BERZ"
	Tag "Adrenaline"
	Inventory.PickupSound "misc/p_pkup"
	Powerup.Type Strength
	States
	{
	Spawn:
		BERZ A -1
		Stop
	}
}
	
ACTOR Cocaine : PowerupGiver 5555
{
	-COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	-INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 10
	Inventory.PickupMessage "Cocaine"
	Tag "Cocaine"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.Icon "COCA"
	Powerup.Type Speed
	Powerup.Duration -45
	States
	{
	Spawn:
		COCA A -1
		Stop
	}
}

ACTOR SurgicalKit : HealthPickup 5557
{
	+FLOORCLIP
	+INVENTORY.INVBAR
	Health -100
	Inventory.MaxAmount 5
	Tag "Surgical Kit"
	Inventory.Icon "I_FULL"
	Inventory.PickupMessage "Surgical Kit"
	States
	{
	Spawn:
		FULL AB 35
		Loop
	}
}

ACTOR Morphine : PowerupGiver 5558
{
	-COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	-INVENTORY.AUTOACTIVATE
	+DONTBLAST
	+DONTMORPH
	+DONTRIP
	+DONTSQUASH
	+NOPAIN
	+NORADIUSDMG
	+NOTELEOTHER
	Inventory.MaxAmount 10
	Inventory.PickupMessage "Morphine"
	Tag "Morphine"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.Icon "MORP"
	Powerup.Type Protection
	Powerup.Colormap 1.0, 1.0, 1.0
	Powerup.Duration -60
	States
	{
	Spawn:
		MORP A -1
		Stop
	}
}

ACTOR ZombieGuts : PowerupGiver 5559
{
	-COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	-INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 10
	Inventory.PickupMessage "Zombie Entrails"
	Tag "Zombie Entrails"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.Icon "ENTR"
	Powerup.Type Frightener
	Powerup.Duration -10
	Powerup.Colormap 1.0, 0.0, 0.0, 0.0, 0.0, 0.0
	States
	{
	Spawn:
		ENTR A -1
		Stop
	}
}

ACTOR Radio1 : Candelabra 5560
{
	Radius 16
	Height 40
	+SOLID
	States
	{
	Spawn:
		RAD1 A 10 A_Look
		Loop
	See:
		RAD1 A 0 A_PlaySound("misc/radio1")
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		Loop
	}
}

ACTOR Radio2 : Candelabra 5561
{
	Radius 16
	Height 40
	+SOLID
	States
	{
	Spawn:
		RAD1 A 10 A_Look
		Loop
	See:
		RAD1 A 0 A_PlaySound("misc/radio2")
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		Loop
	}
}

ACTOR Radio3 : Candelabra 5562
{
	Radius 16
	Height 40
	+SOLID
	States
	{
	Spawn:
		RAD1 A 10 A_Look
		Loop
	See:
		RAD1 A 0 A_PlaySound("misc/radio3")
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		Loop
	}
}

ACTOR Radio4 : Candelabra 5563
{
	Radius 16
	Height 40
	+SOLID
	States
	{
	Spawn:
		RAD1 A 10 A_Look
		Loop
	See:
		RAD1 A 0 A_PlaySound("misc/radio4")
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		Loop
	}
}

ACTOR Radio5 : Candelabra 5564
{
	Radius 16
	Height 40
	+SOLID
	States
	{
	Spawn:
		RAD1 A 10 A_Look
		Loop
	See:
		RAD1 A 0 A_PlaySound("misc/radio5")
		RAD1 A 500
		RAD1 A 500
	    RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		RAD1 A 500
		Loop
	}
}