
//==============================================================================
//=========================== Corvette's Sidhe Wrath ===========================
//==============================================================================


Actor ClassicSidheWrath : Weapon
{
	-AMMO_OPTIONAL
	-ALT_AMMO_OPTIONAL
	Weapon.SelectionOrder 7
	Inventory.RestrictedTo "Corvette"
	Inventory.ForbiddenTo "BrutalCorvus"
	Inventory.PickupMessage "Your fallen allies call out to you"
	Inventory.PickupSound "Misc/W_PkUp"
	Weapon.YAdjust 15
	Weapon.AmmoType1 "ClassicPhoenixRodAmmo"
	Weapon.AmmoType2 "ClassicPhoenixRodAmmo"
	Weapon.AmmoGive 0
	Weapon.AmmoUse1 20
	Weapon.AmmoUse2 30
	Weapon.KickBack 0
	ConversationID 196
	Weapon.SisterWeapon "None"
	Weapon.Slotnumber 8
	AttackSound "SLSPHIT"
	
	States
	{
		Spawn:
			SLSP A -1
			Loop
		Ready:
			TNT1 A 0 A_SetCrosshair (14)
			SLSP BBBCCCDDDEEE 1
			{
				A_WeaponReady;
				
				If (CountInv("Action1") == 1)
				{
					return state("Kicking");
				}
				If (CountInv("PowerClassicLevel2") == 1)
				{
					return state("PoweredReady");
				}
				Else
				{
					return state("");
				}
			}
			Loop
		PoweredReady:
			TNT1 A 0 A_Light(-8)
			SLSP BBBCCCDDDEEE 1
			{
				A_WeaponReady;
				
				If (CountInv("Action1") == 1)
				{
					return state("Kicking");
				}
				Else
				{
					return state("");
				}
			}
			TNT1 A 0 A_Light(0)
			Goto Ready
		Deselect:
			SLSP B 0 A_StopSoundEx("SoundSlot7")
			TNT1 A 0 A_light(0)
			SLSP B 1 A_Lower
			Loop
		Select:
			SLSP B 1 A_Raise
			Loop
			Fire:
			TNT1 A 0 A_StopSound(50)
			TNT1 A 0 A_JumpIfInventory("PowerClassicLevel2",1,"PoweredFire")
			TNT1 A 0 A_PlayWeaponSound("SLSPLOOP")
			SLSP F 9 A_WeaponOffset(0,39)
			SLSP G 9 Bright A_WeaponOffset(0,41)
			TNT1 A 0 A_light(-2) 
			SLSP F 7 A_QuakeEx (1,1,1,7,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			TNT1 A 0 A_WeaponOffset(0,43)
			SLSP G 7 Bright A_QuakeEx (1,1,1,7,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			TNT1 A 0 A_WeaponOffset(0,46)
			TNT1 A 0 A_light(-6)
			SLSP F 5 A_QuakeEx (2,2,2,5,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			SLSP G 5 Bright A_QuakeEx (1,1,1,7,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			TNT1 A 0 A_WeaponOffset(0,39)
			TNT1 A 0 A_light(-8)
			SLSP F 3 A_QuakeEx (3,3,3,3,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			SLSP G 3 Bright A_QuakeEx (3,3,3,3,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			TNT1 A 0 A_WeaponOffset(0,36)
			TNT1 A 0 A_light(-10)
			SLSP F 1 A_QuakeEx (4,4,4,1,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			SLSP G 1 Bright A_QuakeEx (4,4,4,3,0,64,"world/quake",QF_SCALEDOWN,0,0,0,64)
			TNT1 A 0 A_light(-12)
			SLSP F 0 A_PlayWeaponSound("SCREAM2")
			TNT1 A 0 A_FireCustomMissile("SpiritBomb",0,True)
			TNT1 A 0 A_light(0)
			TNT1 A 0 A_Recoil(3 * GetCVAR("SteadyHand"))
			TNT1 A 0 A_WeaponOffset(0,32)
			SLSP HIHIHIHIHIHI 2 Bright
			SLSP JK 2
			Goto Ready
		PoweredFire:
			SLSP MLKJIH 2
		PoweredFireLoop:
			TNT1 A 0 A_StopSound(50)
			TNT1 A 0 A_JumpIfNoAmmo("Ready")
			TNT1 A 0 A_StartSound("ETHPORT1",50,CHANF_NOPAUSE|CHANF_LOOPING)
			SLSP F 2 Bright
			SLSP G 1 Bright
			{
				A_TakeInventory("ClassicPhoenixRodAmmo",1);
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP GG 1 Bright
			{
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP G 1 Bright
			{
				A_TakeInventory("ClassicPhoenixRodAmmo",1);
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP GG 1 Bright
			{
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP G 1 Bright
			{
				A_TakeInventory("ClassicPhoenixRodAmmo",1);
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP GG 1 Bright
			{
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP G 1 Bright
			{
				A_TakeInventory("ClassicPhoenixRodAmmo",1);
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP GG 1 Bright
			{
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP G 1 Bright
			{
				A_TakeInventory("ClassicPhoenixRodAmmo",1);
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			SLSP GG 1 Bright
			{
				
				If (GetCVAR("NoScalingPlz"))
				{
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("PoweredSpooker",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
				Else
				{
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
					A_FireCustomMissile("SidheWrathMissile",frandom(10,-10),False,0,0,0,frandom(10,-10));
				}
			}
			TNT1 A 0 A_Refire("PoweredFireLoop")
			TNT1 A 0 A_StopSound(50)
			TNT1 A 0 A_light(0)
			SLSP HIJKLM 2 Bright
			Goto Ready
		AltFire:
			TNT1 A 0 A_JumpIf(CallACS("ExpressSkills")==1, "SuperAttack")
			TNT1 A 0 A_JumpIfInventory("Level",9,"SuperAttack")
			TNT1 A 0 ACS_NamedExecuteAlways("NeedLevelAttack",0,9)
			goto ready	
		SuperAttack:
			TNT1 A 0 A_JumpIfInventory("PowerClassicLevel2",1,"PoweredAltFireCheck")
			TNT1 A 0 A_StopSound(50)
			TNT1 A 0 A_PlayWeaponSound("SLSPLOOP")
			SLSP F 9 
			SLSP G 9 Bright 
			TNT1 A 0 A_light(-2)
			TNT1 A 0 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			SLSP F 7 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 7 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-6)
			TNT1 A 0 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			SLSP F 5 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 5 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-8)
			TNT1 A 0 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			SLSP F 3 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 3 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-10)
			TNT1 A 0 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			SLSP F 1 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 1 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-12)
			TNT1 A 0 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			SLSP F 0 A_PlayWeaponSound("SCREAM2")
			TNT1 A 0 A_FireCustomMissile("GhostspawnerPortal",1)
			TNT1 A 0 A_light(0)
			TNT1 A 0 A_Recoil(3 * GetCVAR("SteadyHand"))
			SLSP HIHIHIHIHIHI 2 Bright
			SLSP JK 2
			Goto Ready
		PoweredAltFireCheck:
			TNT1 A 0 A_JumpIf(CallACS("ExpressSkills")==1, "PoweredAltFire")
			TNT1 A 0 A_JumpIfInventory("Level",17,"PoweredAltFire")
			TNT1 A 0 ACS_NamedExecuteAlways("NeedLevelAttack",0,17)
			Goto Ready
		PoweredAltFire:
			TNT1 A 0 A_JumpIfNoAmmo("Reload")
			TNT1 A 0 A_StopSound(50)
			//TNT1 A 0 A_PlayWeaponSound("SLSPLOOP")
			TNT1 A 0 A_StartSound("SLSPLOOP",50,CHANF_NOPAUSE)
			SLSP F 9 
			SLSP G 9 Bright 
			TNT1 A 0 A_light(-2)
			SLSP F 7 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 7 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-6)
			SLSP F 5 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 5 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-8)
			SLSP F 3 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 3 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-10)
			SLSP F 1 A_SetPitch(pitch+(0.5 * GetCVAR("SteadyHand")))
			SLSP G 1 Bright A_SetPitch(pitch-(0.5 * GetCVAR("SteadyHand")))
			TNT1 A 0 A_light(-12)
			//SLSP F 0 A_PlayWeaponSound("SCREAM2")
			TNT1 A 0 A_StartSound("SCREAM2",50,CHANF_NOPAUSE)
			TNT1 A 0 A_FireCustomMissile("MooBoyPortal",1)
			TNT1 A 0 A_light(0)
			TNT1 A 0 A_Recoil(3 * GetCVAR("SteadyHand"))
			SLSP HIHIHIHIHIHI 2 Bright
			SLSP JK 2
			Goto Ready
		Kicking:
			TNT1 A 0 A_StopSound(50)
			SLSP B 1 Offset(0,42)
			SLSP C 1 Offset(0,52)
			SLSP D 1 Offset(0,62)
			SLSP E 1 Offset(0,72)
			SLSP B 1 Offset(0,82)
			TNT1 A 0 A_StopSound(50)
			TNT1 A 0 A_PlaySound("WHOP")
			CKCK ABCD 1 Offset(0,32)
			//TNT1 A 0 A_CustomPunch(random(20,40)+(CallACS("StrengthCalculator")/4),1,0,"BrutalKickPuff", 104)
			TNT1 A 0 A_FireCustomMissile("BootOfFury",0,0,0,0)
			TNT1 A 0 A_Recoil(-6)
			CKCK E 3
			TNT1 A 0 A_Recoil(3)
			CKCK DCB 1
			CKCK AA 1 A_WeaponReady(WRF_NOSECONDARY)
			TNT1 AAA 1 A_WeaponReady(WRF_NOSECONDARY)
			SLSP B 1 Offset(0,82)
			SLSP C 1 Offset(0,72)
			SLSP D 1 Offset(0,62)
			SLSP E 1 Offset(0,52)
			SLSP D 1 Offset(0,42)
			SLSP C 0 Offset(0,32)
			TNT1 A 0 A_JumpIfInventory("Action1",1,"Kicking")
			Goto Ready
	}
}