/*
CREDITS:
Up - Black Legion Development (Tremulous)
Swing - ?
Hit - Running with Scissors (Postal)

C'mere, Get over here, Falcon Punch... do I really need to credit those? Come on.
Ice Punch - Mashup. One part by ID (Quake 2).
Charge - Blizzard (Starcraft 2)
Fart blast, Moo - ?
Be one with Yuri - Westwood(Red Alert 2:YR)
*/

ACTOR Punchokrator : Weapon
{
   Tag "Melee"
   Inventory.PickupSound "misc/w_pkup"
   Inventory.PickupMessage "You are the Punchokrator, and you have fists of steel! (1)"
   Obituary "%o was punched to dead. Special thanks to %k for doing the treatment."
   Weapon.UpSound "weapons/fistup1"
   Weapon.SelectionOrder 8
   Weapon.SlotNumber 1
   Weapon.Kickback 200
   AttackSound ""
   +NOALERT
   +WEAPON.CHEATNOTWEAPON
   +NOAUTOAIM
   States
   {
   Spawn:
      TNT1 A -1
      Loop
   Ready:
      FISR A 1 A_WeaponReady
      Loop
   Deselect:
      //TNT1 A 0 ACS_NamedTerminate("ComboControl")
   DANCING:
      TNT1 A 0 A_ZoomFactor(1)
      FISR A 1 A_Lower
      FISR A 0 A_Lower
      FISR A 0 A_Lower
      Loop
   Select:
      TNT1 A 0 ACS_ExecuteAlways(718,0,0)
	  TNT1 A 0 ACS_ExecuteAlways(719,0,0)
   ROBOGOPHER:
      TNT1 AAAAAAAAAAAAAA 0 A_Raise
      FISU EDCBA 1
      FISR A 1 A_Raise
      Loop
   Fire:
      FISU ABCDE 1
      TNT1 A 6
      TNT1 A 0 A_JumpIfInventory("FalconTrigger",1,"FPunch")
      TNT1 A 0 A_JumpIfInventory("UppercutTrigger",1,"Uppercut")
      TNT1 A 0 A_ReFire
	  Goto Hold
   Retirement:
      TNT1 A 3
      FISU EDCBA 1
      Goto Ready
   Hold:
      TNT1 A 0 A_JumpIfInventory("FalconTrigger",1,"FPunch")
      TNT1 A 0 A_JumpIfInventory("UppercutTrigger",1,"Uppercut")
      TNT1 A 0 A_JumpIfInventory("ComboMode",1,"Randomness1")
      TNT1 A 0 A_Jump(255,"Punch1","Punch2","Punch3","Punch4","Punch5","Punch6","Punch7","Punch8")
	  TNT1 A 1
      TNT1 A 0 A_ReFire
      TNT1 A 3
      FISU EDCBA 1
      Goto Ready
   Randomness1:
      TNT1 A 0 A_Jump(10,"FPunch","Uppercut")
	  Goto Hold+3
   Punch1:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS1 ABCD 1
      TNT1 A 0 A_CustomPunch(40,0,0,"FistPuff",95+random(5,-5))

      FIS1 EBA 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch2:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS2 ABCD 1
      TNT1 A 0 A_CustomPunch(40,0,0,"FistPuff",95+random(5,-5))

      FIS2 EBA 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch3:
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS3 ABCD 1
      TNT1 A 0 A_CustomPunch(45,0,0,"FistPuff",75+random(5,-5))

      FIS3 EFGHIJ 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch4:
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS4 ABCD 1
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_CustomPunch(40,0,0,"FistPuff",75+random(5,-5))

      FIS4 EFG 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch5:
      TNT1 A 0 A_Recoil(-1.5)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS5 ABCD 1
      TNT1 A 0 A_CustomPunch(45,0,0,"FistPuff",75+random(5,-5))

      FIS5 EFGH 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch6:
      TNT1 A 0 A_Recoil(-1.5)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS6 ABCDE 1
      TNT1 A 0 A_CustomPunch(40,0,0,"FistPuff",75+random(5,-5))

      FIS6 EFGH 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch7:
      TNT1 A 0 A_Recoil(-2)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS7 ABCDE 1
      TNT1 A 0 A_CustomPunch(45,0,0,"FistPuff",85+random(5,-5))

      FIS7 EFGH 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Punch8:
      TNT1 A 0 A_Recoil(-2)
      TNT1 A 0 A_PlayWeaponSound("weapons/fistattack")

      FIS8 ABCDE 1
      TNT1 A 0 A_CustomPunch(40,0,0,"FistPuff",85+random(5,-5))

      FIS8 EFGH 1
      TNT1 A 0 A_ReFire
      Goto Retirement
   Uppercut:
      TNT1 A 0 A_PlaySound("Weapons/ScorpionTaunt",5,1) //C'MERE\GET OVER HERE!
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_TakeInventory("UppercutTrigger",1)
      CMRH A 0 A_FireCustomMissile("GrabberShot",0,0,0,0,0,0)
      CMRH ABCDEFGH 1 A_FireCustomMissile("GrabberShot",frandom(-1,1),0,0,0,0,frandom(-1,1))
   UpperLoop:
      TNT1 A 10 A_JumpIfInventory("UppercutCounter",7,"UpperRelease")
	  TNT1 A 0 A_GiveInventory("UppercutCounter",1)
      TNT1 A 0 A_ReFire("UpperLoop")
   UpperRelease:
      TNT1 A 0 A_TakeInventory("UppercutCounter",7)
      TNT1 A 0 ThrustThingZ(0, 50+Random(15, 25), 0, 0)
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_Recoil(-3)
      TNT1 A 0 A_PlaySound("weapons/fistattack",CHAN_WEAPON)
      UPER E 0 A_FireCustomMissile("IcePunch",0,0,0,0)
      TNT1 A 0 A_PlaySound("Weapons/IcePunch",CHAN_WEAPON,1)
      UPER ABCD 1
      UPER E 3 //A_CustomPunch(500,0,0,"UppercutPuff",115+random(5,-5))
      UPER DCBA 1
      TNT1 A 4
      TNT1 A 0 A_ReFire
      Goto Retirement
   FPunch:
      TNT1 A 4 A_PlaySound("Weapons/FALCON",5,1) //FALCON!...
      TNT1 A 0 A_AlertMonsters
      FIS6 HGFEDCBA 1
      TNT1 A 14
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_TakeInventory("FalconTrigger",1)
      TNT1 A 2 A_PlaySound("Weapons/PAWNCH",5,1) //PUNCH!!
      FLCP A 1 A_ZoomFactor(0.98)
      FLCP B 1 A_ZoomFactor(0.97)
      FLCP C 1 A_ZoomFactor(0.95)
      TNT1 A 0 A_Quake(4,14,0,128,"none")
      TNT1 A 0 A_FireCustomMissile("KDRO_FalconFlames",8,0,36,0)
      TNT1 A 0 A_FireCustomMissile("FalconPawnch",0,0,10,0)
      TNT1 A 0 A_PlaySound("Weapons/KAPOOW",CHAN_WEAPON,1)
      FLCP D 1 A_ZoomFactor(0.6)
      FLCP E 1
      FLCP F 1 A_ZoomFactor(0.625)
      FLCP F 1 A_ZoomFactor(0.675)
      FLCP F 1 A_ZoomFactor(0.725)
      FLCP F 1 A_ZoomFactor(0.825)
      FLCP F 1 A_ZoomFactor(0.85)
      FLCP F 1 A_ZoomFactor(0.9)
      FLCP F 1 A_ZoomFactor(0.95)
      FLCP F 1 A_ZoomFactor(0.965)
      FLCP F 1 A_ZoomFactor(0.975)
      FLCP F 1 A_ZoomFactor(0.985)
      FLCP F 1 A_ZoomFactor(0.995)
      FLCP F 1 A_ZoomFactor(1)
      FLCP EDCBA 2
      TNT1 A 2
      Goto Retirement
   AltFire:
      FISU ABCDE 1
      TNT1 A 15
      TNT1 A 0 A_JumpIfInventory("ComboMode",1,"Randomness2") 
      TNT1 A 0 A_JumpIfInventory("DominationTrigger",1,"Domination")
      TNT1 A 0 A_PlaySoundEx("weapons/fistcharge","SoundSlot5")
      TNT1 A 75
      TNT1 A 0 A_JumpIfInventory("CowTrigger",1,"Cowplosion")
      Goto FartBomb
   Randomness2:
      TNT1 A 0 A_Jump(24,"Domination","CowplosionIntergo")
	  Goto AltFire+8
   CowplosionIntergo:
      TNT1 A 0 A_PlaySoundEx("weapons/fistcharge","SoundSlot5")
      TNT1 A 75
	  Goto Cowplosion
   FartBomb:
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_GunFlash
      TNT1 A 0 A_PlaySoundEx("weapons/fistcombustion","SoundSlot5",0,2)
      TNT1 A 0 ThrustThingZ(0, 80+Random(15, 35), 0, 0)
      TNT1 A 0 A_FireCustomMissile("Pierd",180,0,0,0)
      TNT1 A 20 Bright A_FireCustomMissile("GasExplode",0,0,0,0)
      TNT1 A 20
      FISU EDCBA 1
      Goto Ready
   Cowplosion:
      TNT1 A 0 A_TakeInventory("CowTrigger",1)
      TNT1 A 20 A_PlaySound("weapons/fistmoo",5)
      TNT1 A 0 A_AlertMonsters
      TNT1 A 45
      TNT1 A 0 A_GunFlash
      TNT1 A 0 ThrustThingZ(0, 150+Random(25, 45), 0, 0)
      TNT1 A 0 A_PlaySound("Weapons/MiniNukeBoom", 5)
      TNT1 A 0 A_PlaySound("Weapons/DeathheadExplode", 6)
      TNT1 A 1 A_SpawnItemEx("MiniNukeClear")
      TNT1 A 19 A_FireCustomMissile("MiniNuker",180,0,0,0)
      TNT1 A 20
      FISU EDCBA 1
      Goto Ready
   Domination:
      TNT1 A 0 A_TakeInventory("DominationTrigger",1)
      TNT1 A 15 A_PlaySound("weapons/fistcontrol",5)
      TNT1 A 0 A_AlertMonsters
	  TNT1 A 0 A_SpawnItemEx("DominationEffect")
      TNT1 A 0 //A_RadiusGive("BeWithYuri",1024,RGF_MONSTERS|RGF_CORPSES|RGF_NOMASTER,1)
	  TNT1 A 0 A_SpawnItem("DominationExploderThingyGiver")
      TNT1 A 90
      FISU EDCBA 1
	  Goto Ready
   Flash:
      TNT1 A 6 Bright A_Light2
      TNT1 A 3 Bright A_Light1
      TNT1 A 0 Bright A_Light0
      Stop
   }
}

Actor DominationExploderThingyGiver
{
	DamageType "Domination"
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_Explode(1,1024,0)
		TNT1 A 1
		Stop
	}
}

ACTOR FalconTrigger : DatTrigger {}
ACTOR UppercutTrigger : DatTrigger {}
ACTOR CowTrigger : DatTrigger {}
ACTOR DominationTrigger : DatTrigger {}

ACTOR UppercutCounter : CustomInventory
{
	Inventory.MaxAmount 9
}

ACTOR FistPuff : PunchPuff
{ 
   SeeSound ""
   States
   {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Crash:
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Melee:
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    stop
   }
}

ACTOR UppercutPuff : PunchPuff
{ 
   SeeSound ""
   States
   {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_PlaySound("Weapons/SatchelHit")
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Crash:
    TNT1 A 0 A_PlaySound("Weapons/SatchelHit")
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    PUFF AABBCCDD 1 A_FadeOut(0.1)
    stop
  Melee:
    TNT1 A 0 A_PlaySound("Weapons/SatchelHit")
    TNT1 A 1 A_PlaySoundEx("weapons/fisthit","Auto")
    stop
   }
}

ACTOR IcePunch
{
  Radius 1
  Height 1
  Speed 20
  Damage 0
  DamageType Ice
  Projectile
  +RIPPER
  +FORCERADIUSDMG
  Obituary "%o came over here and %k served %h with a cold touch."
  States
  {
  Spawn:
    TNT1 A 0
    KWBD A 0 A_SpawnItemEx("IcicleSpawnerMist", 0, 0, 20, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleSpawnerShockwave", 0, 0, 15, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleAurora1", 0, 0, 20, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleAurora2", 0, 0, 20, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleAurora3", 0, 0, 20, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleSpawnerSnow", 0, 0, 20, 0, 0, 0, 0, 128, 0)
    KWBD A 0 A_SpawnItemEx("IcicleCloud", 0, 0, 20, 0, 0, 0, 0, 128, 0)

    KWBD A 0 A_SpawnItemEx("IcicleWhitePulse", 0, 0, 20, 0, 0, 0, 0, 128, 0) //Required for light to work
    TNT1 A 0 A_Blast(BF_DONTWARN|BF_AFFECTBOSSES, 255, 192, 55, "BlastEffect", None)
    TNT1 A 0 A_Explode(1300,192,0)
    KWBD AAAAABBBBBCCCCCDDDDDEEEEEFFFFF 2 bright A_FadeOut
    Stop
  }
}

//Alt-Fire
ACTOR GasExplode
{
	Radius 1
	Height 1
	Speed 1
	Damage 0
	Obituary "%k farted in so-called %o's general direction."
	PROJECTILE
	+NOGRAVITY
	+EXTREMEDEATH
	+FORCERADIUSDMG
	DamageType Nope
	States
	{
	Spawn:	
	 TNT1 A 0
   	 TNT1 A 0 A_Blast(BF_AFFECTBOSSES, 255, 768, 20)
	 TNT1 A 1 A_Explode(1300,1024,0,1)
	 Stop
	}
}

ACTOR Pierd
{
	Speed 10
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	States
	{
	Spawn:	
	 TNT1 A 1
	 TNT1 A 0 Radius_Quake(99999,100,0,100,0)
	 TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("GasCloud",random(1,3),random(1,3),13+random(1,2),0.1*random(27,172),0.1*random(47,172),0.1*random(-7,7),random(0,359))
	 TNT1 AAAAAAAA 1 A_SpawnItemEx("GasCloud",random(1,3),random(1,3),13+random(1,2),0.1*random(9,15),0.1*random(9,15),0.1*random(-5,5),random(0,359))
	 TNT1 AAA 2 A_SpawnItemEx("GasCloud",random(1,3),random(1,3),13+random(1,2),0.1*random(9,15),0.1*random(9,15),0.1*random(-3,3),random(0,359))
	 Stop
	}
}

ACTOR GasCloud
{
	Alpha 0.2
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	Renderstyle Normal
	States
	{
	Spawn:
	GASC A 0
	GASC A 0 A_FadeOut(0.001)
	GASC AB 2
	GASC A 0 A_Jump(255,"StateC","StateD","StateE","StateF")
	Stop
	StateC:
	GASC C 40
	GASC C 1 A_FadeOut(0.02)
	Wait
	StateD:
	GASC D 40
	GASC D 1 A_FadeOut(0.02)
	Wait
	StateE:
	GASC E 40
	GASC E 1 A_FadeOut(0.02)
	Wait
	StateF:
	GASC F 40
	GASC F 1 A_FadeOut(0.02)
	Wait
	}
}

ACTOR MiniNuker
{
	+NOGRAVITY
	+NOINTERACTION
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 2
	TNT1 AAAAAAAA 2 A_SpawnItemEx("Cowploder",0,0,20,frandom(12,6),frandom(12,6),frandom(5,15),frandom(0,359),SXF_TRANSFERPOINTERS,0)
	Stop
	}
}

ACTOR Cowploder
{
	Radius 6
	Height 4
	ReactionTime 70
	PROJECTILE
	-NOGRAVITY
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 0 A_Jump(128,2)
	TNT1 A 0 A_Countdown
	TNT1 A 1
	Loop
	Death:
	TNT1 A 0 A_SpawnItemEx("MiniNuke",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
	Stop
	}
}

//FALCON PAWWWWNNNCHH!!!!!!

ACTOR FalconPawnch
{
  Radius 1
  Height 1
  Speed 20
  Damage 0
  Projectile
  +RIPPER
  +FORCERADIUSDMG
  Obituary "%k showed %o his moves."
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Blast(BF_AFFECTBOSSES, 255, 128, 55, "BlastEffect", None)
    TNT1 AAAAAAAAAA 1 A_Explode(1500,192,0)
    Stop
  }
}

/* ----------------------------------------------------------------------------
 *
 * Neutral B, or in human jargon, FALCON PAWWWWNNNCHH!!!!!! effects by
 * Christopher "KeksDose" D. for Russian Overkill!
 *
 * Particle graphics drawn and effect written by myself, yup. Reuse as you wish,
 * just don't let me see them on Realm667 and credit me somewhere,
 * somehow, I dunno.
 *
 * Eagle sprites drawn by Neoworm. Thank you for making Falcon's signature move
 * look like Falcon's signature move.
 *
 * ------------------------------------------------------------------------- */

Actor KDRO_BaseParticle
{
	+NoInteraction
	+ForceXYBillboard
	+CLIENTSIDEONLY
	RenderStyle Normal
	Alpha 0.99
	States
	{
		Spawn:				// Initialization goes here.
			TNT1 A 0
			Goto FadeIn
		FadeIn:				// Optional fading in.
			TNT1 A 0
			Goto Idle
		Idle:				// Fly around.
			TNT1 A 0
			Goto FadeOut
		FadeOut:			// Dissipate.
			TNT1 A 0
			Stop
	}
}

Actor KDRO_BaseParticleMultiple : KDRO_BaseParticle
{
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
			Goto Spawn
		SpriteA:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteB:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteC:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		SpriteD:
			TNT1 A 0 A_Jump(255, "FadeIn")
			Goto Normal
		FadeIn:				// Optional fading in.
			TNT1 A 0
			Goto Idle
		Idle:				// Fly around.
			TNT1 A 0
			Goto FadeOut
		FadeOut:			// Dissipate.
			TNT1 A 0
			Stop
	}
}

Actor KDRO_BaseEmitter
{
	Var Int User_SpawnCount;
	
	+NoInteraction
	+CLIENTSIDEONLY
	States
	{
		Spawn:				// Initialize particle counter.
			TNT1 AA 0 A_SetUserVar("User_SpawnCount", 10)
			Goto Emit
		Emit:				// Emit particles.
			TNT1 A 0 A_Jump(0xFF, "Count") // You MUST use A_Jump.
			Goto Count
		Count:				// Emit until SpawnCount <= 0.
			TNT1 A 0 A_SetUserVar("User_SpawnCount", User_SpawnCount - 1)
			TNT1 A 0 A_JumpIf(User_SpawnCount <= 0, "NULL")
			TNT1 A 0 A_Jump(0xFF, "Emit")
			Goto Emit
	}
}


Actor KDRO_FalconFalcon : KDRO_BaseParticle
{
	Alpha 0.99
	RenderStyle Add
	Scale 1.5
	States
	{
		Spawn:
			PHOX A 7 Bright
		FadeOut:
			PHOX A 1 Bright A_ScaleVelocity(0.95)
			PHOX A 0 A_FadeOut(0.07)
			Loop
	}
}

Actor KDRO_FalconGlow : KDRO_BaseParticleMultiple
{
	Alpha 0.4
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB")
		SpriteA:
			FALC M 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FALC R 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.5, 0.6))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.02)
			"####" "#" 0 A_ScaleVelocity(FRandom(0.97, 0.99))
			"####" "#" 0 //A_SetScale(ScaleX + FRandom(0.02, 0.04))
			Loop
	}
}

Actor KDRO_FalconFlame : KDRO_BaseParticleMultiple
{
	Alpha 0.6
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD",
								 "SpriteE", "SpriteF", "SpriteG", "SpriteH")
		SpriteA:
			FALC A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FALC B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FALC C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			FALC D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		SpriteE:
			FALC E 0 A_Jump(255, "FadeIn")
			Goto SpriteE
		SpriteF:
			FALC F 0 A_Jump(255, "FadeIn")
			Goto SpriteF
		SpriteG:
			FALC G 0 A_Jump(255, "FadeIn")
			Goto SpriteG
		SpriteH:
			FALC H 0 A_Jump(255, "FadeIn")
			Goto SpriteH
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.5, 0.55))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(190, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.035)
			"####" "#" 0 A_ScaleVelocity(FRandom(1.01, 1.03))
			"####" "#" 0 //A_SetScale(ScaleX - FRandom(0.01, 0.03))
			Loop
	}
}

Actor KDRO_FalconSmoke : KDRO_BaseParticleMultiple
{
	Alpha 0.0
	RenderStyle Translucent
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
		SpriteA:
			FALC N 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FALC O 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FALC P 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			FALC Q 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		FadeIn:
			"####" "#" 0 //A_SetScale(FRandom(0.6, 0.7))
			Goto RealFadeIn
		RealFadeIn:
			"####" "#" 1 A_FadeIn(FRandom(0.02, 0.05))
			"####" "#" 0 A_JumpIf(Alpha >= 0.5, "Idle")
			Loop
		Idle:
			"####" "#" 4 A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 A_FadeOut(0.01)
			/* "####" "#" 0 A_ChangeVelocity(VelX * FRandom(0.97, 0.99),
										  VelY * FRandom(0.97, 0.99),
										  VelZ + FRandom(0.02, 0.06),
										  CVF_REPLACE) */
			"####" "#" 0 A_ScaleVelocity(0.96)
			"####" "#" 0 //A_SetScale(ScaleX + FRandom(0.015, 0.025))
			Loop
	}
}

Actor KDRO_FalconEmber : KDRO_BaseParticleMultiple
{
	Alpha 0.99
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC")
		SpriteA:
			FALC J 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			FALC K 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			FALC L 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(0.07, 0.15))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_Weave(FRandom(0.9, 1.0), FRandom(0.9, 1.0),
										FRandom(70, 90), FRandom(70, 90))
			"####" "#" 0 //A_JumpIf(ScaleX <= 0.0, "NULL")
			"####" "#" 0 A_ChangeVelocity(VelX * FRandom(0.93, 0.99),
										  VelY * FRandom(0.93, 0.99),
										  VelZ - FRandom(0.1, 0.2),
										  CVF_REPLACE)
			"####" "#" 0 A_FadeOut(FRandom(0.003, 0.0015))
			Loop
	}
}

Actor KDRO_FalconFlare : KDRO_BaseParticle
{
	RenderStyle Add
	Scale 0.9
	States
	{
		Spawn:
			FALC I 1 Bright A_FadeOut(0.19)
			Loop
	}
}

Actor KDRO_FalconFlames : KDRO_BaseEmitter //FALCON GLORY!
{
	Speed 20
	+CLIENTSIDEONLY
	States
	{
		Spawn:
			TNT1 AA 0 A_SetUserVar("User_SpawnCount", 15)
			//TNT1 A 0 A_ChangeVelocity(20, 0, 0, CVF_RELATIVE)
			TNT1 A 0 A_SpawnItemEx("KDRO_FalconFalcon", 0, 0, 0,
									velx,vely,velz,0,SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERPITCH,0)
			Goto Emit
		Emit:
			TNT1 AAAAAA 0 A_SpawnItemEx("KDRO_FalconFlame", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-4.5, -8.8), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 AA 0 A_SpawnItemEx("KDRO_FalconSmoke", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(1.5, -2.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 AAAAAA 0 A_SpawnItemEx("KDRO_FalconGlow", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-1.5, -3.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 AAAAAAA 0 A_SpawnItemEx("KDRO_FalconEmber", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-2.0, -13.0), FRandom(-6.0, 6.0),
									FRandom(1.0, 8.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 AA 0 A_SpawnItemEx("KDRO_FalconFlare", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									0, 0, 0, 0, SXF_CLIENTSIDE)
			TNT1 A 1
			TNT1 A 0 A_Jump(0xFF, "Count")
			Goto Count
	}
}

Actor KDRO_FalconSparks : KDRO_BaseEmitter
{
	States
	{
		Spawn:
			TNT1 AA 0 A_SetUserVar("User_SpawnCount", 80)
			Goto Emit
		Emit:
			TNT1 A 0 A_SpawnItemEx("KDRO_FalconEmber", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(5.0, 20.0), 0,
									FRandom(1.0, 11.0), Random(0, 359),
									SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_Jump(0xFF, "Count")
			Goto Count
	}
}

//BE ONE... WITH YURI!

ACTOR DominationEffect
{
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	ReactionTime 3
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("MindSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("MindFlameSpawner",0,0,0,0)
	TNT1 A 6 A_Countdown
	Loop
	Death:
	Stop
	}
}

ACTOR MindFlameSpawner
{
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	ReactionTime 115
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 0 A_Countdown
	TNT1 A 0 A_SpawnItemEx("MindFlame",random(320,-320),random(320,-320),random(180,-180),frandom(0.1,0.3),frandom(0.1,0.3),frandom(0.1,0.3),0)
	Loop
	Death:
	Stop
	}
}

ACTOR MindSmokeSpawner
{
	+NOGRAVITY
	+CLIENTSIDEONLY
	+NOINTERACTION
	ReactionTime 60
	States
	{
	Spawn:
	TNT1 A 9
	Looplo:
	TNT1 A 0 A_Countdown
	TNT1 A 0 A_SpawnItemEx("MindSmoke",random(320,-320),random(320,-320),random(180,-180),frandom(0.1,0.3),frandom(0.1,0.3),frandom(0.1,0.3),0)
	Loop
	Death:
	Stop
	}
}

Actor MindFlame : KDRO_BaseParticleMultiple
{
	Alpha 0.7
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD",
								 "SpriteE", "SpriteF", "SpriteG", "SpriteH")
		SpriteA:
			YFLM A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			YFLM B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			YFLM C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			YFLM D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		SpriteE:
			YFLM E 0 A_Jump(255, "FadeIn")
			Goto SpriteE
		SpriteF:
			YFLM F 0 A_Jump(255, "FadeIn")
			Goto SpriteF
		SpriteG:
			YFLM G 0 A_Jump(255, "FadeIn")
			Goto SpriteG
		SpriteH:
			YFLM H 0 A_Jump(255, "FadeIn")
			Goto SpriteH
		FadeIn:
			"####" "#" 0 Bright //A_SetScale(FRandom(1.6, 1.65))
			Goto Idle
		Idle:
			"####" "#" 2 Bright A_Jump(190, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 Bright A_FadeOut(0.025)
			"####" "#" 0 A_ScaleVelocity(FRandom(1.01, 1.03))
			"####" "#" 0 //A_SetScale(ScaleX - FRandom(0.01, 0.03))
			Loop
	}
}

Actor MindSmoke : KDRO_BaseParticleMultiple
{
	Alpha 0.0
	RenderStyle Add
	States
	{
		Spawn:
			TNT1 AA 0 A_Jump(255, "SpriteA", "SpriteB", "SpriteC", "SpriteD")
		SpriteA:
			YSMO A 0 A_Jump(255, "FadeIn")
			Goto SpriteA
		SpriteB:
			YSMO B 0 A_Jump(255, "FadeIn")
			Goto SpriteB
		SpriteC:
			YSMO C 0 A_Jump(255, "FadeIn")
			Goto SpriteC
		SpriteD:
			YSMO D 0 A_Jump(255, "FadeIn")
			Goto SpriteD
		FadeIn:
			"####" "#" 0 //A_SetScale(FRandom(1.7, 1.8))
			Goto RealFadeIn
		RealFadeIn:
			"####" "#" 1 A_FadeIn(FRandom(0.02, 0.05))
			"####" "#" 0 A_JumpIf(Alpha >= 0.7, "Idle")
			Loop
		Idle:
			"####" "#" 4 A_Jump(200, "FadeOut")
			Loop
		FadeOut:
			"####" "#" 1 A_FadeOut(0.01)
			/* "####" "#" 0 A_ChangeVelocity(VelX * FRandom(0.97, 0.99),
										  VelY * FRandom(0.97, 0.99),
										  VelZ + FRandom(0.02, 0.06),
										  CVF_REPLACE) */
			"####" "#" 0 A_ScaleVelocity(0.96)
			"####" "#" 0 //A_SetScale(ScaleX + FRandom(0.015, 0.025))
			Loop
	}
}

Actor BeWithYuri : CustomInventory
{
Inventory.MaxAmount 0
+Inventory.AutoActivate
States
{
Spawn:
TNT1 A 1
Fail
Use:
TNT1 A 0
TNT1 A 0 A_ChangeFlag("FRIENDLY",1)
Stop
}
}

//Ice Punch Stuff
//SNOW & HIT CLOUD


ACTOR IcicleSnow
{
  Radius 0
  Height 0
  PROJECTILE
  +BOUNCEONWALLS
  +BOUNCEONCEILINGS
  +BOUNCEONACTORS
  +ALLOWBOUNCEONACTORS
  +CLIENTSIDEONLY
  -NOGRAVITY
  Renderstyle Add
  Scale 0.01
  Gravity 0.035
  States
  {
  Spawn:
  TNT1 A 0
  SNOW A 1 A_ChangeVelocity (frandom(-0.2, 0.2), frandom(-0.2, 0.2), frandom(-0.035,-0.015), 0)
  Loop
  Death:
  SNOW A 90
  SNOW A 1 A_FadeOut(0.01)
  Wait
  }
}

ACTOR IcicleCloud
{
  +NOGRAVITY
  +NOINTERACTION
  +CLIENTSIDEONLY
  Renderstyle Add
  Scale 0.75
  States
  {
  Spawn:
  TNT1 A 0
  CLDH A 1 A_FadeOut(0.015)
  Loop
  }
}


ACTOR IcicleBase
{
  +NOGRAVITY
  +NOINTERACTION
  +CLIENTSIDEONLY
  Renderstyle Add
  Alpha 0.99
  States
  {
  Spawn:
  Stop
  }
}

//EFFECTS


ACTOR IcicleMist : IcicleBase
{
  Alpha 0.25
  Scale 0.65
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 A_Jump(255,"Spawn1","Spawn2","Spawn3","Spawn4")
  Spawn1:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  TNT1 A 0 A_FadeOut(0.003)
  NSMK A 1
  Loop
  Spawn2:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  TNT1 A 0 A_FadeOut(0.003)
  NSMK B 1
  Loop
  Spawn3:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  TNT1 A 0 A_FadeOut(0.003)
  NSMK C 1
  Loop
  Spawn4:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  TNT1 A 0 A_FadeOut(0.003)
  NSMK D 1
  Loop
  }
}

ACTOR IcicleWave : IcicleBase
{
  Alpha 0.25
  Scale 1
  DamageType Ice
  +FORCERADIUSDMG
  +BLOODLESSIMPACT
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 A_Jump(255,"Spawn1","Spawn2","Spawn3","Spawn4")
  Spawn1:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.5, 0.5), frandom(-0.5, 0.5), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  //TNT1 A 0 A_Explode(1,128)
  TNT1 A 0 A_FadeOut(0.005)
  NSMK A 1
  Loop
  Spawn2:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  //TNT1 A 0 A_Explode(1,128)
  TNT1 A 0 A_FadeOut(0.005)
  NSMK B 1
  Loop
  Spawn3:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  //TNT1 A 0 A_Explode(1,128)
  TNT1 A 0 A_FadeOut(0.005)
  NSMK C 1
  Loop
  Spawn4:
  TNT1 A 0 A_ChangeVelocity (frandom(-0.1, 0.1), frandom(-0.1, 0.1), frandom(-0.1, 0.1), 0)
  TNT1 A 0 //A_SetScale(ScaleX +0.01+random(+0.02,-0.01), ScaleY +0.01+random(+0.02,-0.01))
  //TNT1 A 0 A_Explode(1,128)
  TNT1 A 0 A_FadeOut(0.005)
  NSMK D 1
  Loop
  }
}

ACTOR IcicleAurora1 : IcicleBase
{
  Scale 0.5
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 //A_SetScale(ScaleX +0.05, ScaleY +0.05)
  TNT1 A 0 A_FadeOut(0.08)
  ICIC L 1 Bright
  Loop
  }
}

ACTOR IcicleAurora2 : IcicleBase
{
  Scale 0.75
  Alpha 0.9
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 //A_SetScale(ScaleX +0.06, ScaleY +0.06)
  TNT1 A 0 A_FadeOut(0.08)
  ICIC L 1 Bright
  Loop
  }
}

ACTOR IcicleAurora3 : IcicleBase
{
  Scale 0.9
  Alpha 0.7
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 //A_SetScale(ScaleX +0.07, ScaleY +0.07)
  TNT1 A 0 A_FadeOut(0.08)
  ICIC L 1 Bright
  Loop
  }
}


//HIT SPAWNERS


ACTOR IcicleSpawnerMist : IcicleBase
{
  ReactionTime 10
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 A_Countdown
  TNT1 A 0 A_SpawnItemEx("IcicleMist",random(-65,65),random(-65,65),random(-35,35),0,0,0,0,128,0)
  Loop
  Death:
  TNT1 AAAAA 1 A_SpawnItemEx("IcicleMist",random(-65,65),random(-65,65),random(-35,35),0,0,0,0,128,0)
  Stop
  }
}

ACTOR IcicleSpawnerShockwave : IcicleBase
{
  ReactionTime 135
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 A_Countdown
  TNT1 A 0 A_SpawnItemEx("IcicleWave",random(3,-3),random(3,-3),random(3,-3),random(6,5),random(0.8,-0.8),random(1.8,-1.8),frandom(0,359),128,0)
  Loop
  Death:
  TNT1 A 1
  Stop
  }
}

ACTOR IcicleSpawnerSnow : IcicleBase
{
  ReactionTime 30
  States
  {
  Spawn:
  TNT1 A 0
  TNT1 A 0 A_Countdown
  TNT1 A 0 A_SpawnItemEx("IcicleSnow",random(-95,95),random(-95,95),random(-30,30),0,0,0,0,128,0)
  Loop
  Death:
  TNT1 AAAAAAAAAAA 2 A_SpawnItemEx("IcicleSnow",random(-95,95),random(-95,95),random(-30,30),0,0,0,0,128,0)
  Stop
  }
}


//LIGHT ACTORS


ACTOR IcicleWhitePulse : IcicleBase
{
	+NOTIMEFREEZE
	States
	{
	Spawn:
	TNT1 A 11
	Stop
	}
}
