//*****************************
//EonWeapons Enhancement RC 5
//Doom 2 Weapon Replacement
//By Ru5tK1ng
//*****************************

#include "decorated/slot1&2.dec"
#include "decorated/slot3&4.dec"
#include "decorated/slot5&6.dec"
#include "decorated/slot7&8.dec"


//------------------------
//Player Class
//-----------------------

 ACTOR DoomerE : DoomPlayer Replaces DoomPlayer
  {
    Player.StartItem "PistolE"
    Player.StartItem "FistE"
    Player.WeaponSlot 2, "PistolE"
    Player.StartItem "Clip", 50
	
	//Define Slots
	Player.WeaponSlot 1, FistE, ChainsawE
	Player.WeaponSlot 2, PistolE
	Player.WeaponSlot 3, ShotgunE, SuperShotgunE
	Player.WeaponSlot 4, ChaingunE
	Player.WeaponSlot 5, GrenadeLE, RocketLauncherE
	Player.WeaponSlot 6, PlasmaRifleE
	Player.WeaponSlot 7, BFGE
	Player.WeaponSlot 8, LGunE, Railgun
	DamageFactor "Knockout", 5.0
	PainChance "ShockTherapy", 255
	States
	{
	  Pain.ShockTherapy:
	  PLAY G 4 A_PlaySound("lghit", 5, 126, 0)
	  PLAY G 4 A_Pain
	  Goto Spawn
	}
  }


//*****************
//Custom Ammo
//*****************

//-------------------
//Lightning Ammo
//------------------- 
//Ammo for Lightning Gun

 ACTOR LightningAmmo : Ammo 25018
  {
    //$Category Ammunition
	//$Sprite BOLTB0
	//$Title "Bolt Charge"
	Height 25
	Radius 20
	Inventory.PickupMessage "Picked up a bolt charge."
	Inventory.Amount 50
    Inventory.MaxAmount 300
    Inventory.Icon "BOLTA0"
    Ammo.BackpackAmount 50
    Ammo.BackpackMaxAmount 600
	States
	{
	 Spawn:
     BOLT B -1
     Stop
	}
  }


//-------------------
//GrenadeAmmo
//-------------------
 
 ACTOR GrenadeAmmo : Ammo 25020
  {
    //$Category Ammunition
	//$Sprite GRENB0
	//$Title "Grenades"
	Height 25
	Radius 20
	Inventory.PickupMessage "Picked up grenades."
	Inventory.Amount 5
	Inventory.MaxAmount 50
	Inventory.Icon "GRENA0"
	Ammo.BackpackAmount 5
	Ammo.BackpackMaxAmount 100
	States
	{
	 Spawn:
     GREN B -1
     Stop
	}
  }


//----------------
//RailAmmo
//----------------
 
 ACTOR RailAmmo : Ammo 25016
 {
   //$Category Ammunition
   //$Sprite RAILB0
   //$Title "Railgun Slugs"
   Height 25
   Radius 20
   Inventory.PickupMessage "Picked up slugs."
   Inventory.Amount 5
   Inventory.MaxAmount 50
   Inventory.Icon "RAILA0"
   Ammo.BackpackAmount 5
   Ammo.BackpackMaxAmount 100
   States
   {
    Spawn:
    RAIL B -1
    Stop
   }
 }
  

//---------------
//Cell Pack 50
//---------------

 ACTOR CellPack50 : Cell 25028
 {
   //$Category Ammunition
   //$Sprite CELBA0
   //$Title "Cell Pack 50"
   Height 25
   Radius 20
   Inventory.PickupMessage "Picked up cells."
   Inventory.Amount 50
   States
   {
    Spawn:
	CELB A -1
	Stop
   }
 }
 
 
//---------------
//Shell Pack 10
//---------------

 ACTOR ShellPack10 : Shell 25029
 {
   //$Category Ammunition
   //$Sprite SHLBA0
   //$Title "Shell Pack 10"
   Height 25
   Radius 20
   Inventory.PickupMessage "Picked up shells."
   Inventory.Amount 10
   States
   {
    Spawn:
	SHLB A -1
	Stop
   }
 }


//********************
//Item Modifications
//********************

//--------------
//Armor Bonus 5
//--------------

 ACTOR ArmorBonus5 : ArmorBonus 25022
  {
    //$Category Health and Armor
	//$Sprite BNS2D0
	//$Title "Armor Bonus +5"
	Armor.SaveAmount 5
	Inventory.PickupMessage "Picked up armor bonus x 5."
	Inventory.PickupSound "arm5"
	+INVENTORY.IGNORESKILL
	States
	{
	  Spawn:
	  BNS2 ABCDCB 6
	  Loop
	}
  }

 
//---------------
//Health Bonus 5
//---------------
 
 ACTOR HealthBonus5 : HealthBonus 25023
  {
    //$Category Health and Armor
	//$Sprite BNS1C0
	//$Title "Health Bonus +5"
	Inventory.Amount 5
	Inventory.PickupMessage "Picked up health bonus x 5."
	Inventory.PickupSound "heal5"
	+INVENTORY.IGNORESKILL
	States
	{
	  Spawn:
	  BNS1 ABCDCB 6
	  Loop
	}
  }


//-------------
//Medipack50
//-------------

 ACTOR Medipack50 : Health 25030
 {
   //$Category Health and Armor
   //$Sprite MEDPA0
   //$Title "Medipack 50"
   Inventory.Amount 50
   Inventory.PickupMessage "Picked up 50 health"
   States
   {
     Spawn:
	 MEDP A -1
	 Stop
   }
 }
 

//------------------
//Green Armor Giver
//------------------

 ACTOR GreenGiver : CustomInventory 25031
  {
    //$Category Health and Armor
	//$Sprite ARM1B0
	//$Title "Green Armor Stackable"
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Radius 20
	Height 16
	Inventory.PickupMessage "Picked up the green armor."
	Inventory.PickupSound "pickar"
	States
	{
	  Spawn:
	  ARM1 A 6
	  ARM1 B 7 Bright
	  Loop
	  
	  Pickup:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(544, 0)
	  Stop
	}
  }


//-------------
//Green Shard
//------------- 

 ACTOR GShard : CustomInventory
 {
   +INVENTORY.ALWAYSPICKUP
   +INVENTORY.QUIET
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   Inventory.MaxAmount 1
   States
   { 
     Use:
	 TNT1 A 0
	 Stop
   }
 }


//------------------
//Blue Armor Giver
//------------------

 ACTOR BlueGiver : CustomInventory 25032
  {
    //$Category Health and Armor
	//$Sprite ARM2D0
	//$Title "Blue Armor Stackable"
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Radius 20
	Height 16
	Inventory.PickupMessage "Picked up the blue armor."
	Inventory.PickupSound "pickar"
	States
	{
	  Spawn:
	  ARM2 C 6
	  ARM2 D 7 Bright
	  Loop
	  
	  Pickup:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(545, 0)
	  Stop
	}
  }


//--------------
//Blue Armor S
//--------------

 ACTOR BlueArmorS : BasicArmorPickup
  {
	Radius 20
	Height 16
	Inventory.Icon "ARM2A0"
	Inventory.PickupMessage "Picked up the blue armor."
	Inventory.PickupSound "pickar"
	Armor.SavePercent 50
	Armor.SaveAmount 100
	States
	{
	  Spawn:
	  ARM2 C 6
	  ARM2 D 7 Bright
	  Loop
	}
  }


//-------------
//Blue Shard
//------------- 

 ACTOR BShard : CustomInventory
 {
   +INVENTORY.ALWAYSPICKUP
   +INVENTORY.QUIET
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   Inventory.MaxAmount 1
   States
   { 
     Use:
	 TNT1 A 0
	 Stop
   }
 }

 
//-------------------
//Yellow Armor Giver
//-------------------

 ACTOR YellowGiver : CustomInventory 25024
  {
    //$Category Health and Armor
	//$Sprite ARM3B0
	//$Title "Yellow Armor Stackable"
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Radius 20
	Height 16
	Inventory.PickupMessage "Picked up the yellow armor."
	Inventory.PickupSound "pickar"
	States
	{
	  Spawn:
	  ARM3 A 6
	  ARM3 B 7 Bright
	  Loop
	  
	  Pickup:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(546, 0)
	  Stop
	}
  }

//--------------
//Yellow Armor
//--------------

 ACTOR YellowArmor : BasicArmorPickup
  {
	Radius 20
	Height 16
	Inventory.Icon "ARM3A0"
	Inventory.PickupMessage "Picked up the yellow armor."
	Inventory.PickupSound "pickar"
	Armor.SavePercent 66.667
	Armor.SaveAmount 100
	States
	{
	  Spawn:
	  ARM3 A 6
	  ARM3 B 7 Bright
	  Loop
	}
  }


//-------------
//Yellow Shard
//------------- 

 ACTOR YShard : CustomInventory
 {
   +INVENTORY.ALWAYSPICKUP
   +INVENTORY.QUIET
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   Inventory.MaxAmount 1
   States
   { 
     Use:
	 TNT1 A 0
	 Stop
   }
 }


//------------------
//Red Armor Giver
//------------------

 ACTOR RedGiver : CustomInventory 25025
  {
    //$Category Health and Armor
	//$Sprite ARM4B0
	//$Title "Red Armor Stackable"
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Radius 20
	Height 16
	Inventory.PickupMessage "Picked up the red armor."
	Inventory.PickupSound "pickar"
	States
	{
	  Spawn:
	  ARM4 A 6
	  ARM4 B 7 Bright
	  Loop
	  
	  Pickup:
	  TNT1 A 0
	  TNT1 A 0 ACS_ExecuteAlways(547, 0)
	  Stop
	}
  }


//--------------
//Red Armor
//--------------

 ACTOR RedArmor : BasicArmorPickup
  {
	//$Category Health and Armor
	//$Sprite ARM4B0
	//$Title "Red Armor"
	Radius 20
	Height 16
	Inventory.Icon "ARM4A0"
	Inventory.PickupMessage "Picked up the red armor."
	Inventory.PickupSound "pickar"
	Armor.SavePercent 83.335
	Armor.SaveAmount 100
	States
	{
	  Spawn:
	  ARM4 A 6
	  ARM4 B 7 Bright
	  Loop
	}
  }


//-------------
//Red Shard
//------------- 

 ACTOR RShard : CustomInventory
 {
   +INVENTORY.ALWAYSPICKUP
   +INVENTORY.QUIET
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   Inventory.MaxAmount 1
   States
   { 
     Use:
	 TNT1 A 0
	 Stop
   }
 }


//------------------
//Yellow MegaSphere
//------------------

 ACTOR YellowMegaSphere : Megasphere 25026
 {
  //$Category Powerups
  //$Sprite YEGAA0
  //$Title "Yellow Megasphere"
  Inventory.PickupMessage "Yellow MegaSphere!"
  States
  {
     Spawn:
	 YEGA ABCD 6 Bright
	 Loop
	 
	 Pickup:
	 TNT1 A 0 ACS_Execute(537, 0, 1)
	 TNT1 A 0 A_GiveInventory("MegasphereHealth", 1)
	 Stop
  }
 }


//----------------
//Red MegaSphere
//----------------

 ACTOR RedMegaSphere : Megasphere 25027
 {
  //$Category Powerups
  //$Sprite REGAA0
  //$Title "Red Megasphere"
  Inventory.PickupMessage "Red MegaSphere!"
  States
  {
     Spawn:
	 REGA ABCD 6 Bright
	 Loop
	 
	 Pickup:
	 TNT1 A 0 ACS_Execute(537, 0, 2)
	 TNT1 A 0 A_GiveInventory("MegasphereHealth", 1)
	 Stop
  }
 }
 

//-------------
//Nerf Gun
//------------- 

 ACTOR NerfGun : CustomInventory
 {
   +INVENTORY.ALWAYSPICKUP
   +INVENTORY.QUIET
   +INVENTORY.UNDROPPABLE
   -INVENTORY.INVBAR
   Inventory.MaxAmount 1
   States
   { 
     Use:
	 TNT1 A 0
	 Stop
   }
 }


//*******************
//Team Color Stuff
//*******************

 ACTOR RedTeamRing : Inventory
 {
  Inventory.Amount 1
  Inventory.Maxamount 1
 }
 

 ACTOR BlueTeamRing : Inventory
 {
  Inventory.Amount 1
  Inventory.Maxamount 1
 }
 
 
//-------------------
//Red Plasma Ball
//-------------------
 
 ACTOR RedPlasma : PlasmaBall
  {
    Translation "241:241=184:184", "193:199=170:179", "202:202=178:178", "205:205=180:180", "200:201=184:185"
  }


//-------------------
//Blue Plasma Ball
//-------------------

 ACTOR BluePlasma : PlasmaBall
 {
   Translation "193:199=196:203", "202:202=203:203", "205:205=204:204"
 }


//-----------------
//Red Rocket
//-----------------

 ACTOR RedRocket : RocketE
 {
   States
   {
    Spawn:
	MISR A 1 Bright
	Loop
   }
 }


//-----------------
//Blue Rocket
//-----------------

 ACTOR BlueRocket : RocketE
 {
   States
   {
    Spawn:
	MISB A 1 Bright
	Loop
   }
 }


//--------------
//Red Grenade
//--------------

 ACTOR RedGrenade : GrenadeE
 {
   States
   {
     Spawn:
	 RGRN A 1 Bright
	 Loop
   }
 }


//--------------
//Blue Grenade
//--------------

 ACTOR BlueGrenade : GrenadeE
 {
   States
   {
     Spawn:
	 BGRN A 1 Bright
	 Loop
   }
 }