// Reflection

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

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

ACTOR ReflectSphere : CustomInventory 10080
{
    +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
	Tag "Reflection Sphere"
    //$Category Powerups
	States
	{
	Spawn:
	  LFSS ABCDCB 6 Bright
      Loop
	Pickup:
	  TNT1 A 0 A_JumpIfInventory("PowerRageInvulnerable",1,"NoProt")
	  TNT1 A 0 A_GiveInventory("PickupProtection")
    NoProt:
	  TNT1 A 0 A_Print("\n\n\n\n\n\nReflection!\n\n\n\n200 Health!\nEnemy damage is reflected back!",4)
	  TNT1 A 0 Healthing(200,200)
	  TNT1 A 0 A_GiveInventory("ReflectSphereReflection")
	  Stop
	}
}

Damagetype "Reflection"
{
	Factor 1.0
	ReplaceFactor
	NoArmor
}