ACTOR ShieldPoint : ArmorBonus
{
	Armor.SavePercent 100.0	// absorbs 100 % damage
	Armor.SaveAmount 1
	Armor.MaxSaveAmount 99999	// real maximum value is determined by the item the player has equipped
}

// shield pickup that creates random shield values
ACTOR RandomShieldPickup : PickupBase
{
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_isBDPickupItem", 1)	// mark thing as BorderDoom pickup item
			TNT1 A 0 A_SetUserVar("user_pickupType", ItemType_Shield)	// set pickup type to shield
			TNT1 A 0 ACS_NamedExecuteAlways("CreateRandomShieldData")
			TNT1 A 0 A_SetSpecial(ACS_ExecuteAlways,901,0,0,0,0)
			goto Waiting
		Waiting:
			ARM1 A -1
			stop
		// called by script. makes the pickup "useable" for a short amount of time so it can be picked up.
		IsUseable:
			ARM1 A 0 A_ChangeFlag("USESPECIAL", TRUE)
			ARM1 A 7
			ARM1 A 0 A_ChangeFlag("USESPECIAL", FALSE)
			goto Waiting
	}
}

// shield pickup that uses pre-existing/pre-set values
ACTOR FixedShieldPickup : RandomShieldPickup
{
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_isBDPickupItem", 1)	// mark thing as BorderDoom pickup item
			TNT1 A 0 A_SetUserVar("user_pickupType", ItemType_Shield)	// set pickup type to shield
			TNT1 A 0 A_SetSpecial(ACS_ExecuteAlways,901,0,0,0,0)
			ARM1 A -1
			stop
	}
}


///////////////////////////////////////////////////////////

// replace every Doom armor bonus with this spawner. this reduces the amount of armor boni in the maps.



// removes all armor boni from all maps
ACTOR BDArmorBonus : ArmorBonus replaces ArmorBonus
{
	-COUNTITEM	// otherwise they are counted even if taken out of the game

	States
	{
		Spawn:
			BON2 A 0
			stop
	}
}
