ACTOR HTeleportFog : TeleportFog replaces TeleportFog
{
  States
  {
  Raven:
    TNT1 A 3 A_SpawnItemEx ("TCentreStar", 0, 0, 0, 0, 0, 0, 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("TGlitter", random (32, -32), random (32, -32), -20, 0, 0, random (1, 4), 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    TNT1 A 3
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("TGlitter", random (32, -32), random (32, -32), -20, 0, 0, random (1, 4), 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    TNT1 A 3
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("TGlitter", random (32, -32), random (32, -32), -20, 0, 0, random (1, 4), 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    TNT1 A 3
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("TGlitter", random (32, -32), random (32, -32), -20, 0, 0, random (1, 4), 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    TNT1 A 3
    TNT1 AAAAAAAAAA 0 A_SpawnItemEx ("TGlitter", random (32, -32), random (32, -32), -20, 0, 0, random (1, 4), 0, SXF_TRANSFERTRANSLATION|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
    Stop
  }
}

ACTOR TCentreStar
{
  +NOINTERACTION
  RenderStyle Add
  Alpha 1
  States
  {
  Spawn:
     TELE ABCDEF 3 Bright
  Fade:
     TELE GH 3 Bright A_FadeOut (0.1)
     Loop
  }
}

ACTOR TGlitter
{
  +NOINTERACTION
  RenderStyle Add
  Alpha 1
  States
  {
  Spawn:
    TGLT FGHIJ 2 Bright A_FadeOut (0.075)
    Loop
  }
}

Actor HTeleportFogRed	: HTeleportFog { Translation "185:208=145:168", "177:184=249:245" }
Actor HTeleportFogGold	: HTeleportFog { Translation "185:208=111:136", "177:184=137:144" }
Actor HTeleportFogGreen	: HTeleportFog { Translation "185:208=209:224", "177:184=233:240" }
Actor HTeleportFogTan	: HTeleportFog { Translation "185:208=66:94",   "177:184=95:110" }

Actor HPTeleGlitter1 : TeleGlitter1 replaces TeleGlitter1 { +FORCEXYBILLBOARD +CLIENTSIDEONLY }
Actor HPTeleGlitter2 : TeleGlitter2 replaces TeleGlitter2 { +FORCEXYBILLBOARD +CLIENTSIDEONLY }
Actor TeleGlitter3 : HPTeleGlitter1 { Translation "151:165=119:133" }	// Gold
Actor TeleGlitter4 : HPTeleGlitter1 { Translation "151:165=210:228" } 	// Green
Actor TeleGlitter5 : HPTeleGlitter1 { Translation "151:151=169:169",	// Purple
	"152:152=170:170","154:154=171:171","155:155=172:172",
	"59:159=173:173","162:162=174:174","163:163=175:175",
	"164:164=176:176","165:165=176:176" } 
Actor TeleGlitter6 : HPTeleGlitter1 { Translation "151:165=20:34" }		// White

Actor TeleGlitterGenerator3 : TeleGlitterGenerator1 58
{
	//$Category Teleports
	//$Title Teleport Glitter (Gold)
	States
	{
	Spawn:
		TNT1 A 8 A_SpawnItemEx("TeleGlitter3", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		Loop
	}
}

Actor TeleGlitterGenerator4 : TeleGlitterGenerator1 59
{
	//$Category Teleports
	//$Title Teleport Glitter (Green)
	States
	{
	Spawn:
		TNT1 A 8 A_SpawnItemEx("TeleGlitter4", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		Loop
	}
}

Actor TeleGlitterGenerator5 : TeleGlitterGenerator1 60
{
	//$Category Teleports
	//$Title Teleport Glitter (Purple)
	States
	{
	Spawn:
		TNT1 A 8 A_SpawnItemEx("TeleGlitter5", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		Loop
	}
}

Actor TeleGlitterGenerator6 : TeleGlitterGenerator1 61
{
	//$Category Teleports
	//$Title Teleport Glitter (White)
	States
	{
	Spawn:
		TNT1 A 8 A_SpawnItemEx("TeleGlitter6", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		Loop
	}
}

Actor TeleGlitterGenerator7 : TeleGlitterGenerator1 62
{
	//$Category Teleports
	//$Title Teleport Glitter (All Colors)
	States
	{
	Spawn:
		TNT1 A 8 A_SpawnItemEx("TeleGlitter1", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		TNT1 A 8 A_SpawnItemEx("TeleGlitter2", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		TNT1 A 8 A_SpawnItemEx("TeleGlitter3", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		TNT1 A 8 A_SpawnItemEx("TeleGlitter4", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		TNT1 A 8 A_SpawnItemEx("TeleGlitter5", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		TNT1 A 8 A_SpawnItemEx("TeleGlitter6", random[TeleGlitter](0,31)-16, random[TeleGlitter](0,31)-16, 0, 0,0,0.25)
		Loop
	}
}

Actor RedStar : BaseStar2 { Translation "209:224=145:159" }
Actor RedSparkle : BaseStar { Translation "0:35=145:163" }
Actor RedSparkleAccel : BaseStarAccel { Translation "0:35=145:163" }
Actor RandomRedParticle : RandomSpawner
{
	DropItem "TeleGlitter1"
	DropItem "RedStar"
	DropItem "RedSparkle"
	DropItem "RedSparkleAccel"
}

Actor BlueStar : BaseStar2 { Translation "209:224=185:200" }
Actor BlueSparkle : BaseStar { Translation "0:35=185:199" }
Actor BlueSparkleAccel : BaseStarAccel { Translation "0:35=185:199" }
Actor CyanSparkle : BaseStar { Translation "0:35=192:208" }
Actor CyanSparkleAccel : BaseStarAccel { Translation "0:35=192:208" }
Actor RandomBlueParticle : RandomSpawner
{
	DropItem "TeleGlitter2"
	DropItem "BlueStar" 
	DropItem "TeleGlitter2"
	DropItem "BlueStar" 
	DropItem "BlueSparkle"
	DropItem "BlueSparkleAccel"
	DropItem "CyanSparkle"
	DropItem "CyanSparkleAccel"
}

Actor OrangeStar : BaseStar2 { Translation "209:224=112:127" }
Actor YellowSparkle : BaseStar { Translation "0:35=111:136" }
Actor YellowSparkleAccel : BaseStarAccel { Translation "0:35=111:136" }
Actor RandomGoldParticle : RandomSpawner
{
	DropItem "TeleGlitter3"
	DropItem "OrangeStar"
	DropItem "YellowSparkle"
	DropItem "YellowSparkleAccel"
}

Actor GreenStar : BaseStar2 {}
Actor GreenSparkle : BaseStar { Translation "0:35=209:224" }
Actor GreenSparkleAccel : BaseStarAccel { Translation "0:35=209:224" }
Actor RandomGreenParticle : RandomSpawner
{
	DropItem "TeleGlitter4"
	DropItem "GreenStar"
	DropItem "GreenSparkle"
	DropItem "GreenSparkleAccel"
}

Actor PurpleStar : BaseStar2 { Translation "209:224=169:176" }
Actor PurpleSparkle : BaseStar { Translation "0:35=169:176" }
Actor PurpleSparkleAccel : BaseStarAccel { Translation "0:35=169:176" }
Actor RandomPurpleParticle : RandomSpawner
{
	DropItem "TeleGlitter5"
	DropItem "PurpleStar"
	DropItem "PurpleSparkle"
	DropItem "PurpleSparkleAccel"
}

Actor WhiteStar : BaseStar2 { Translation "209:224=20:35" }
Actor WhiteSparkle : BaseStar {}
Actor WhiteSparkleAccel : BaseStarAccel {}
Actor RandomWhiteParticle : RandomSpawner
{
	DropItem "TeleGlitter6"
	DropItem "WhiteStar"
	DropItem "WhiteSparkle"
	DropItem "WhiteSparkleAccel"
}

Actor RandomParticle : RandomSpawner
{
	DropItem "RandomRedParticle"
	DropItem "RandomBlueParticle"
	DropItem "RandomGoldParticle"
	DropItem "RandomGreenParticle"
	DropItem "RandomPurpleParticle"
	DropItem "RandomWhiteParticle"
}

Actor RandomStarFountain : TeleGlitterGenerator1 63
{
	//$Category HPack_SpecialEffects
	//$Title Random Star Fountain
	States
	{
	Spawn:
		TNT1 A 0
	Init:
		TNT1 A 0 A_SetArg(3, Args[3] & 63)
		TNT1 A 0 A_JumpIf(Args[0] == 0, "DefaultArea")
		TNT1 A 0 A_JumpIf(Args[2] == 0, "DefaultHeight")
		TNT1 A 0 A_JumpIf(Args[3] == 0, "DefaultColor")
		Goto Active
	DefaultArea:
		TNT1 A 0 A_SetArg(0, 16)
		Goto Init
	DefaultHeight:
		TNT1 A 0 A_SetArg(2, 4)
		Goto Init
	DefaultColor:
		TNT1 A 0 A_SetArg(3, 63)
	Active:
		TNT1 A 5
	NoWait:
		TNT1 A 0 A_Jump(256, "Red", "Blue", "Gold", "Green", "Purple", "White")
		Goto Active
	Red:
		TNT1 A 0 A_JumpIf((Args[3] & 1) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomRedParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter1", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("RedStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("RedSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("RedSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	Blue:
		TNT1 A 0 A_JumpIf((Args[3] & 2) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomBlueParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter2", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("BlueStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("BlueSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("BlueSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	Gold:
		TNT1 A 0 A_JumpIf((Args[3] & 4) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomGoldParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter3", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("OrangeStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("YellowSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("YellowSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	Green:
		TNT1 A 0 A_JumpIf((Args[3] & 8) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomGreenParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter4", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("GreenStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("GreenSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("GreenSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	Purple:
		TNT1 A 0 A_JumpIf((Args[3] & 16) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomPurpleParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter5", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("PurpleStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("PurpleSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("PurpleSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	White:
		TNT1 A 0 A_JumpIf((Args[3] & 32) == 0, "NoWait")
		TNT1 A 0 A_SpawnItemEx ("RandomWhiteParticle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.5,5.0), Random(0, 360), SXF_CLIENTSIDE)
		TNT1 A 0 A_Jump(256, 1, 2, 3, 4)
		TNT1 A 1 A_SpawnItemEx ("TeleGlitter6", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0.25, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("WhiteStar", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, 0, Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("WhiteSparkle", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(1.0,4.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
		TNT1 A 1 A_SpawnItemEx ("WhiteSparkleAccel", random(-Args[0], Args[0]), 0, random(0, 2*Args[2]), 0, 0, FRandom(0.1, 2.0), Random(0, 360), SXF_CLIENTSIDE)
		Goto Active
	}

}


