//Health and Bonus

// Health Bonus -------------------------------------------------------------

Actor NewHealthBonus: HealthBonus Replaces HealthBonus
{
	+COUNTITEM
	+FLOORCLIP
	+DONTGIB
	+INVENTORY.ALWAYSPICKUP
	Inventory.Amount 2
	Inventory.MaxAmount 9999
	Inventory.PickupMessage "$GOTHTHBONUS"
	Inventory.PickUpSound "items/healthbonus"
	Health.LowMessage 25, "Find a UAC-Medikit quickly."
	Scale 0.8
	States
	{
	Spawn:
		HBON ABCDDCBA 3
		Loop
		}
}

// Armor and Bonus

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

Actor MarineHelmet: ArmorBonus Replaces ArmorBonus
{
	Radius 20
	Height 16
	Inventory.Pickupmessage "You picked a UAC-Armor Shard."
	Armor.Savepercent 33.335
	Armor.Saveamount 2
	Armor.Maxsaveamount 9999
	+COUNTITEM
	+FLOORCLIP
	+DONTGIB
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickUpSound "items/armorbonus"
	States
	{
	Spawn:
	HELM ABCD 5 
	Loop
	}
}

ACTOR GrenadeSpawner : RandomSpawner replaces ArmorBonus
{
	DropItem "MarineHelmet"	256 8
	DropItem "GrenadeAmmo" 	256 2
}

//Armor

// UAC-Security Marine Armor --------------------------------------------------------------

Actor SecurityArmor: BasicArmorPickup Replaces GreenArmor
{
	Game Doom
	Scale 0.8
	Radius 20
	Height 16
	+FLOORCLIP
    +DONTGIB
	Inventory.Pickupmessage "Picked up the UAC-Security Marine Armor."
	Inventory.Icon "SARMA0"
	Armor.SavePercent 35
	Armor.SaveAmount 100
    Inventory.PickupSound "items/green_armor"
	States
	{
	Spawn:
		SARM A -1 BRIGHT
		Loop
	}
}
// UAC-Combat Marine Armor --------------------------------------------------------------
Actor CombatArmor : BasicArmorPickup Replaces BlueArmor
{
  Game Doom
  Scale 0.6
  Inventory.Pickupmessage "Picked up the UAC-Combat Marine Armor."
  Inventory.PickupSound "items/red_armor"
  Inventory.Icon "CARMA0"
  Armor.SavePercent 55
  Armor.Saveamount 200
  +DONTGIB
  +FLOORCLIP
  States
  {
	Spawn:
	CARM A -1 BRIGHT
    Loop
  }
}

//Health And Spheres

//SoulSphere
ACTOR LifeSphere: CustomInventory Replaces SoulSphere
{
Inventory.PickupMessage "Greater Supercharge!"
Inventory.PickupSound "items/newsphere_pick"
+FLOATBOB
-FLOAT
+DONTGIB
-INVENTORY.ALWAYSPICKUP
Scale 0.9
States
{
Spawn:
     GCHR ABCDEFGFEDCB 3 Bright
     Loop

	Pickup: 
		TNT1 A 0 A_GiveInventory("LifeSphereHealth", 1)	
		Stop
	}
}

ACTOR LifeSphereHealth: Health	
{
	Inventory.Amount 100
	Inventory.MaxAmount 200
	+INVENTORY.ALWAYSPICKUP
}

//MegaSphere
ACTOR NewMegaSphere: CustomInventory Replaces Megasphere
{
	+FLOATBOB
	-FLOAT
    +DONTGIB
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickupMessage "Greater Megasphere!"
	Inventory.PickupSound "items/greatsphere_pick"
	States
	{
	Spawn:
		MEGG AABBCCDD 2 BRIGHT
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("CombatArmor", 1)
		TNT1 A 0 A_GiveInventory("LifeSphereHealth", 2)
		Stop
	}
}

//Medikits
ACTOR NewStimpack: Health Replaces Stimpack
{
	Game Doom
	Inventory.Amount 15
	Scale 1.15
	Inventory.PickupMessage "Picked up a UAC-Stimpack."
	Inventory.PickupSound "items/stimpack_pick"
	Health.LowMessage 25, "Find a UAC-Medikit quickly."
	States
	{
	Spawn:
		STIM A -1
		Loop
	}
}

ACTOR NewMedikit: Health Replaces Medikit
{
	Game Doom
	Inventory.Amount 30
	Scale 1.00
	Inventory.PickupMessage "Picked up a UAC-Field Medikit."
	Inventory.PickupSound "items/medikit_pick"
	Health.LowMessage 25, "You're safe, for now."
	States
	{
	Spawn:
		MEDI A -1
		Loop	
	}
}

ACTOR NewBerserk : CustomInventory Replaces Berserk
{
	Game Doom
    Scale 1.00
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickupMessage "UAC-Berserk Kit!"
	Inventory.PickupSound "items/berserk_pick"
	States
	{
	Spawn:
		BERK A -1
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("BerserkStrength")
		TNT1 A 0 A_GiveInventory("QuarterDamage")
		TNT1 A 0 HealThing(100, 0)
		TNT1 A 20
		Stop
	}
}

ACTOR BerserkStrength: PowerStrength
{
}

Actor NewBerserkSphere: CustomInventory
{
  Game Doom
  +COUNTITEM
  +FLOATBOB
  -FLOAT
  +DONTGIB
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupMessage "Berserk Supercharge!"
  Inventory.PickupSound "items/berserksphere_pick"
  States
  {
  Spawn:
    BERS ABCDCB 3 Bright
    Loop
  Pickup:
	TNT1 A 0 A_GiveInventory("BerserkStrength")
	TNT1 A 0 A_GiveInventory("QuarterDamage")
	TNT1 A 0 A_GiveInventory("LifeSphereHealth")
    Stop
  }
}

ACTOR QuarterDamage : PowerupGiver
{
	+COUNTITEM
	+NOGRAVITY
	+DONTGIB
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
	Powerup.Type "QuarterDamage"
	Powerup.Duration -120
	Inventory.PickupMessage ""
	Inventory.PickupSound ""
	DamageFactor "Normal", 0.25
	States
	{
	Spawn:
		TNT1 A 1 Bright
		Loop
	}
}

ACTOR PowerQuarterDamage : PowerProtection
{
	DamageFactor "Normal", 0.25
	+NORADIUSDMG
}

Actor RandomBerserk: RandomSpawner replaces Berserk
{
	DropItem "NewBerserk"
	DropItem "NewBerserkSphere"
}