//==================================
// Wings Of Ascension
//==================================

Actor WingsOfAscension : CustomInventory 
{
+COUNTITEM
+FLOATBOB
+NOTIMEFREEZE
+INVENTORY.INVBAR
+INVENTORY.PICKUPFLASH
Inventory.RespawnTics 4230
Inventory.Icon "ARTISOAX"
Inventory.Amount 1
Inventory.MaxAmount 1
Inventory.PickupSound "WingsOfAscension/Pickup"
Inventory.UseSound "WingsOfAscension/Use"
Inventory.PickupMessage "You found the Wings Of Ascension, AIRTIME!"
Tag "Wings Of Ascension"
States
	{
	Spawn:
		WOAX ABCB 5 BRIGHT A_SpawnItemEx("AscensionSpark",random(-12,12),random(-12,12),random(2,16),frandom(-0.4,0.4),frandom(-0.4,0.4),frandom(0,2),0,0,64)
		Loop
	Use:
        TNT1 A 0
	    TNT1 A 1 A_GiveInventory("AscensionFlight",1)
    Stop  	
	}
}

Actor AscensionFlight : PowerupGiver
{
    Powerup.Type Flight
    Powerup.Duration -60
    +AUTOACTIVATE
    +ALWAYSPICKUP
}

Actor AscensionSpark
{
  +NOINTERACTION
  +NOTIMEFREEZE
  +CLIENTSIDEONLY
  Renderstyle Add
  var int user_delay;
  States
  {
  Spawn:
	TNT1 A 0 A_SetScale(frandom(0.3,0.6))
	TNT1 A 0 A_SetUserVar(user_delay,random(2,4))
	SPX7 ABCDEF 1 A_SetTics(user_delay)
	Stop
	}
}
