// Reflection

ACTOR PowerIDMReflection : PowerReflection
{
	Inventory.Icon "LFSSA1"
}

ACTOR ReflectSphereReflection : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
	Powerup.Type "IDMReflection"
	Powerup.Duration -30
	Powerup.Colormap 2.0, 1.0, 0.0
}

ACTOR ReflectSphere : CustomInventory
{
    +FLOAT
    +FLOATBOB
	+COUNTITEM
	+NOGRAVITY
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	-INVENTORY.INVBAR
    Inventory.PickupSound "misc/impkup"
	Inventory.Pickupmessage "Reflection!"
	Inventory.PickupAnnouncerEntry "reflection"
	Inventory.RespawnTics 3150
    Inventory.MaxAmount 0
	States
	{
	Spawn:
	  LFSS ABCDCB 6 Bright
      Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("PickupProtection")
		TNT1 A 0 A_Print("\n\n\n\n\nReflection!\n\n\n\nReflects enemy damage back to the attacker!",4)
		TNT1 A 0 A_GiveInventory("ReflectSphereReflection")
		Stop
	}
}

Damagetype "Reflection"
{
	Factor 1.0
	ReplaceFactor
	NoArmor
}