//Dont complain
//He only seemed suiting enough here. Not worth making another folder for 1 class
//Same situation as Quint
actor RaThorC : VCBaseClass
{
Player.ScoreIcon "RATHMUGS"
player.startitem "BaseFlagPack", 1
player.startitem "NormalArmor"
player.soundclass "rathorc"
player.displayname "RaThor"
player.forwardmove 0.85, 0.85
player.sidemove 0.83, 0.83
player.jumpz 10
player.viewheight 60
player.startitem "DarkHammerBoss"
player.startitem "Base28Ammo", 28
player.startitem "BaseAltfireAmmo", 112
player.startitem "UltimateAttackItem5", 1
player.startitem "UltSoundWatcherSpawn5"
player.startitem "NoHealthBar"
States
{
Spawn:
RATH A 0
RATH B 1
RATH A 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+2

See:
RATH BBBBBCCCCCDDDDDEEEEE 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn

Jumping:
RATH I 1 A_JumpIf(z-floorz<=0, "Spawn")
wait

Animation2:
RATH V 4
RATH VV 1 A_JumpIfInventory("RaThorUser1Anim",1,"Animation2")
Goto Spawn+1

Animation3:
RATH LLLL 1 A_JumpIf(z-floorz>0, "JumpingA3")
Goto Spawn

JumpingA3:
RATH PPPP 1 A_JumpIf(z-floorz<=0, "Animation3")
goto Jumping

Animation4:
RATH MNMN 1 A_JumpIf(z-floorz>0, "JumpingA4")
Goto Spawn

JumpingA4:
RATH QRQR 1 A_JumpIf(z-floorz<=0, "Animation4")
goto Jumping

Animation5:
RATH OOOOOOOOOOOOOOOOO 1 A_JumpIf(z-floorz>0, "JumpingA5")
Goto Spawn

JumpingA5:
RATH SSSSSSSSSSSSSSSSS 1 A_JumpIf(z-floorz<=0, "Animation5")
goto Jumping

Animation6:
Missile:
RATH FFFFF 1 A_JumpIf(z-floorz>0, "JumpingMissile")
Missile2:
RATH GGGG 1 A_JumpIf(z-floorz>0, "JumpingMissile2")
RATH GG 1 A_JumpIfInventory("RaThorFireAnim",1,"Missile2")
Goto Spawn+1

JumpingMissile:
RATH JJJJJ 1 A_JumpIf(z-floorz<=0, "Missile")
JumpingMissile2:
RATH JJJJ 1 A_JumpIf(z-floorz<=0, "Missile2")
RATH JJ 1 A_JumpIfInventory("RaThorFireAnim",1,"JumpingMissile2")
Goto Jumping

UltAnim:
Animation1:
RATH TTTT 1 A_JumpIf(z-floorz>0, "JumpingA1")
RATH TT 1 A_JumpIfInventory("RaThorUltFlag",1,"UltAnim")
Goto Spawn+1

JumpingA1:
RATH KKKK 1 A_JumpIf(z-floorz<=0, "Animation1")
RATH KK 1 A_JumpIfInventory("RaThorUltFlag",1,"JumpingA1")
Goto Jumping

ClassTimeStop:
PLAY A 0 SetPlayerProperty(0,1,4)
PLAY A 0 ACS_Execute(528,0)
RATH AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Stop
PLAY A 0 SetPlayerProperty(0,0,4)
Goto pain+1
ClassPain:
RATH HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
Goto Spawn+1
WeaponGetM:
ClassDeath:
RATH H 0 A_StopSound(CHAN_WEAPON)
NOFX A 0 A_SpawnItemEx("FakeDeathFXSAR",0,0,32)
RATH Z 20 ACS_ExecuteAlways(999,0,0)
RATH Z 0 //A_PlayerScream
NOFX A 1 A_CheckPlayerDone
wait
ClassIceDeath:
RATH A 35
NOFX A 0 A_SpawnItemEx("FrozenDeathFX",0,0,16)
NOFX A 1 A_CheckPlayerDone
wait
}
}

actor DarkHammerBoss : VCBaseWeapon
{
Obituary "$OB_RATHOR1"
Weapon.AmmoUse 4
Weapon.AmmoUse2 3
Weapon.AmmoType2 "BaseAltfireAmmo"
States
{
Ready:
TNT1 A 0
Ready2:
BLLD A 0 A_JumpIfInventory("BaseAltfireAmmo",63,"Ready2.TF")
RTHH A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,4)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
RTHH A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,4)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
RTHH A 0 A_GiveInventory("BaseAltfireAmmo",2)
RTHH A 0 A_GiveInventory("Base28Ammo",1)
Goto Ready2
Ready2.TF:
RTHH A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,4)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) BLLD A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
RTHH A 1 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",0,4)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,56)) BLLD A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") TNT1 A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
RTHH A 0 A_GiveInventory("BaseAltfireAmmo",2)
RTHH A 0 A_GiveInventory("Base28Ammo",1)
Goto Ready2

NoAmmo:
RTHH A 2
RTHH A 0 A_GiveInventory("BaseAltfireAmmo",1)
RTHH A 0 A_GiveInventory("Base28Ammo",1)
Goto Ready2

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
RTHH H 0 A_StopSound(CHAN_WEAPON)
RTHH A 1 A_Lower
Loop
Select:
RTHH A 0
RTHH A 0 ACS_ExecuteAlways(991,0,970)
RTHH A 10 A_WeaponReady(14)
goto Ready

Fire:
TNT1 A 0 A_JumpIfInventory("Base28Ammo",14,"ChargingUpMain")
Goto FireUnCharged

ChargingUpMain:
RTHH B 0 A_PlaySoundEx("weapon/rathorcharge","Weapon",1)
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",3)
RTHH BC 1
M1ChargeLoop:
TNT1 A 0 A_JumpIfInventory("RaThorMainCharge",0,"M1ChargeFull")
TOAD A 0 A_GiveInventory("ToadChargeDamageGive")
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",4)
RTHH DC 1 A_GiveInventory("RaThorMainCharge",1)
RTHH A 0 A_Refire("M1ChargeLoop")
Goto FireUnCharged
M1ChargeFull:
RTHH E 0 A_GiveInventory("RightClickFlag",1)
M1ChargeFullLoop:
FREZ A 0 A_JumpIf(CallACS("VC_CheckBtn",4)==7,"FireSynth")
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",4)
RTHH EF 1
RTHH A 0 A_Refire("M1ChargeFullLoop")
Goto FireCharged

FireSynth:
TNT1 A 0 A_StopSound(CHAN_WEAPON)
TOAD A 0 A_GiveInventory("ToadChargeDamageTake")
TNT1 A 0 A_WeaponReady(14)
TNT1 A 0 A_ClearRefire
TNT1 A 0 A_TakeInventory("RightClickFlag",9)
TNT1 A 0 A_PlaySoundEx("weapon/rathorstorm","Body")
TNT1 A 0 A_PlaySoundEx("misc/wilybeam","Weapon")
TNT1 A 0 A_FireCustomMissile("RaThorRedSphere",0,0,0,8)
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",6)
RTHH LMM 1
FireSynthAnimLoop:
TNT1 A 0 A_PlaySoundEx("misc/wilybeam","Weapon")
TNT1 A 0 A_FireCustomMissile("RaThorRedSphere",frandom(-3,3),0,0,12,0,frandom(-1.5,1.5))
TNT1 A 0 A_GiveInventory("RaThorFireAnim",1)
RTHH O 1 Offset(3, 41)
RTHH O 1 Offset(6, 39) A_TakeInventory("RaThorMainCharge",1)
RTHH N 1 Offset(0, 36) A_TakeInventory("RaThorMainCharge",1)
RTHH NN 1 A_JumpIfInventory("RaThorMainCharge",2,"FireSynthAnimLoop")
TNT1 A 0 A_TakeInventory("RaThorMainCharge",999)
TNT1 A 0 A_TakeInventory("Base28Ammo",14,1)
RTHH I 2 A_WeaponReady(14)
RTHH IA 2
Goto Ready2

FireUncharged:
TNT1 A 0 A_StopSound(CHAN_WEAPON)
TOAD A 0 A_GiveInventory("ToadChargeDamageTake")
TNT1 A 0 A_WeaponReady(14)
TNT1 A 0 A_TakeInventory("RightClickFlag",9)
TNT1 A 0 A_PlaySoundEx("weapon/rathorelec","Weapon")
TNT1 A 0 A_PlaySoundEx("misc/wilylightning","Body")
TNT1 A 0 A_ClearRefire
TNT1 A 0 A_TakeInventory("RaThorMainCharge",999)
TNT1 A 0 A_FireCustomMissile("RaThorElectricity",0,1,1,8)
TNT1 A 0 A_FireCustomMissile("RaThorElectricity",-8,0,1,8)
TNT1 A 0 A_FireCustomMissile("RaThorElectricity",8,0,1,8)
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",6)
RTHH JK 1
FireUnchargedAnimLoop:
RTHH I 1 Offset(3, 41)
RTHH I 1 Offset(6, 39) A_GiveInventory("RaThorFireAnim",1)
RTHH I 1 Offset(0, 36)
TNT1 A 0 A_JumpIfInventory("CutterFlag",4,2)
TNT1 A 0 A_GiveInventory("CutterFlag",1)
loop
TNT1 A 0 A_TakeInventory("CutterFlag",999)
RTHH A 2 A_WeaponReady(14)
RTHH A 5
TNT1 A 0 A_JumpIfInventory("Base28Ammo",4,1)
goto Ready2
RTHH A 0 A_Refire("FireUncharged")
TNT1 A 0 A_ClearRefire
Goto Ready2

FireCharged:
TNT1 A 0 A_StopSound(CHAN_WEAPON)
TOAD A 0 A_GiveInventory("ToadChargeDamageTake")
TNT1 A 0 A_WeaponReady(14)
TNT1 A 0 A_TakeInventory("RightClickFlag",9)
TNT1 A 0 A_PlaySoundEx("misc/wilylightning","Weapon")
TNT1 A 0 A_TakeInventory("Base28Ammo",14,1)
TNT1 A 0 A_TakeInventory("RaThorMainCharge",999)
TNT1 A 0 A_FireCustomMissile("RaThorDarkMatter",0,0,1,8)
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",5)

RTHH G 1 Offset(3, 41)
RTHH G 1 Offset(6, 39) A_ClearRefire
RTHH G 1 Offset(0, 36)

RTHH H 1 Offset(6, 44)
RTHH H 1 Offset(9, 42)
RTHH H 1 Offset(0, 39)

RTHH I 1 Offset(9, 48)
RTHH I 1 Offset(12, 46)
RTHH I 1 Offset(0, 43)

RTHH I 1 Offset(12, 52)
RTHH I 1 Offset(15, 50)
RTHH I 1 Offset(0, 47)

RTHH I 1 Offset(15, 56)
RTHH I 1 Offset(18, 54)
RTHH I 1 Offset(0, 51)

RTHH I 1 Offset(15, 44)
RTHH I 1 Offset(12, 42)
RTHH I 1 Offset(6, 39)
RTHH A 4 A_WeaponReady(14)
Goto Ready2

AltFire:
RATU A 0 A_JumpIfInventory("NoAltfire",1,"NoAmmo")

Altfire2:
TNT1 A 0 A_JumpIfInventory("BaseAltfireAmmo",3,1)
goto Altfire.Cooldown
TNT1 A 0 A_FireCustomMissile("RaThorDarkSubmission",0,1,1,8)
TNT1 A 0 A_PlaySoundEx("weapon/rathorlaser","Weapon")
RTHH S 1 Offset(3, 41)
RTHH T 1 Offset(6, 39) A_GiveInventory("RaThorFireAnim",1)
RTHH S 1 Offset(0, 36)
RTHH A 0 A_Refire("Altfire2")

Altfire.Cooldown:
TNT1 A 0 A_TakeInventory("CutterFlag",999)
RTHH A 2 A_WeaponReady(14)
RTHH A 10
Goto Ready2

User1:
RTHH P 1
TNT1 A 0 A_GiveInventory("RaThorUser1Start_CI",1)
RTHH Q 1 A_WeaponReady(14)
RTHH Q 1 Offset(-2, 0) A_SpawnItemEx("RaThorUser1Trail",0,0,0,0,0,0,0,1)
RTHH Q 1 Offset(2, 0)
RTHH Q 1 Offset(-2, 0)
RTHH Q 1 Offset(2, 0) A_SpawnItemEx("RaThorUser1Trail",0,0,0,0,0,0,0,1)
RTHH Q 1 Offset(-2, 0)
RTHH Q 1 Offset(2, 0)
RTHH Q 1 Offset(-2, 0) A_SpawnItemEx("RaThorUser1Trail",0,0,0,0,0,0,0,1)
RTHH Q 1 Offset(2, 0)
RTHH Q 1 Offset(-2, 0)
RTHH Q 1 Offset(2, 0) A_SpawnItemEx("RaThorUser1Trail",0,0,0,0,0,0,0,1)
RTHH Q 1 Offset(-2, 0)
RTHH R 1 Offset(2, 0)
RTHH Q 0 A_WeaponReady(WRF_NOFIRE)
TNT1 AA 3 A_SpawnItemEx("RaThorUser1Trail",0,0,0,0,0,0,0,1)
RTHH A 1 Offset(0,104)
RTHH A 1 Offset(0,80)
RTHH A 1 Offset(0,56)
TNT1 A 0 A_GiveInventory("RaThorUser1End_CI",1)
RTHH A 1 A_WeaponReady(14)
Goto Ready2

UltimateAttack:
TNT1 A 0 ACS_NamedExecuteAlways("VC_UltimateText",0,123)
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
TNT1 A 0 A_TakeInventory("LongUltimateAmmo",9999)
TNT1 A 0 A_TakeInventory("UltAttackFlag",9999)
TNT1 A 0 A_GiveInventory("RaThorUltFlag",1)
CUTA A 0 A_PlaySoundEx("classes/ultimateactivation","Auto")
TNT1 A 0 A_SpawnItemEx("RaThorRaMoonUlt",0,0,300)
TNT1 A 0 A_SpawnItemEx("RaThorAura")
TNT1 A 0 A_GiveInventory("RaThorUltCooldown")
RTHH U 79
RTHH U 1 Offset(-1,0)
RTHH U 1 Offset(1,0)
RTHH U 1 Offset(-2,0)
RTHH U 1 Offset(2,0)
RTHH U 1 Offset(-3,0)
RTHH U 1 Offset(3,0)
RTHH A 0 A_Quake(1,63,0,800)
RTHH A 0 A_GiveInventory("RaMoonUltSpawner")
RTHH A 0 A_TakeInventory("RaThorUltFlag",9)
RTHH V 1 Offset(-4,0)
RTHH V 1 Offset(4,0)
RTHH V 1 Offset(-3,0)
RTHH V 1 Offset(3,0)
RTHH V 1 Offset(-2,0)
RTHH V 1 Offset(2,0)
RTHH V 1 Offset(-1,0)
RTHH V 1 Offset(1,0)
RTHH V 1 Offset(0,48)
RTHH V 1 Offset(0,64)
RTHH V 1 Offset(0,80)
RTHH V 1 Offset(0,96)
RTHH V 1 Offset(0,112)
RTHH V 1 Offset(0,128)
TNT1 A 2
RTHH A 1 Offset(0,104)
RTHH A 1 Offset(0,92)
RTHH A 1 Offset(0,80)
RTHH A 1 Offset(0,68)
RTHH A 1 Offset(0,56)
RTHH A 1 Offset(0,44)
Goto Ready2

Flash:
TNT1 A 1 A_JumpIfInventory("ThorQuakeFlag",1,"Flash.Quake")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
loop

Flash.Quake:
TNT1 A 35 A_SpawnItemEx("ThorQuakeWatcher")
goto Flash
}
}

Actor RaThorFireAnim : Powerup{Powerup.Duration 7}
Actor RaThorUser1Anim : Powerup{Powerup.Duration 7}
Actor RaThorUltFlag : VCOnce{}

actor RaThorMainCharge : Inventory
{
	inventory.amount 1
	inventory.maxamount 56
	+INVENTORY.IGNORESKILL
}

Actor RaThorElectricity
{
PROJECTILE
DamageType "RaThor"
Obituary "$OB_RATHOR2"
Radius 18
Height 18
Damage (7) //5
Speed 45
Scale 2.5
//+RIPPER
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
Spawn_L:
RMSP ABCD 1
Loop
Death:
RMSP ABCDA 1 A_SetScale(ScaleX-0.2,ScaleY-0.2)
stop
}
}

Actor RaThorRedSphere : RaThorElectricity
{
Obituary "$OB_RATHOR3"
Radius 10
Height 10
Damage (4)
Speed 57
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
Spawn_L:
RMSH ABCD 1
Loop
Death:
RMSH ABCDA 1 A_SetScale(ScaleX-0.2,ScaleY-0.2)
stop
}
}

Actor RaThorDarkMatter : RaThorElectricity
{
DamageType "RaThorDarkMatter"
Obituary "$OB_RATHOR5"
Radius 10
Height 10
scale 4.0
Damage (0)
Speed 13
+RIPPER
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 0 A_PlaySoundEx("weapon/rathordarkmatter","Body",1)
Spawn_L:
RMBB A 0 A_Quake(3,6,0,150)
RMBB A 0 A_SpawnItemEx("RaThorDarkMatterTrail",0,0,0,random(-24,-6),random(-14,14),random(-14,14))
RMBB A 1 A_Explode(8,96,0,0,96)
RMBB B 0 A_SpawnItemEx("RaThorDarkMatterTrail",0,0,0,random(-24,-6),random(-14,14),random(-14,14))
RMBB B 1 A_Explode(8,96,0,0,96)
RMBB C 0 A_SpawnItemEx("RaThorDarkMatterTrail",0,0,0,random(-24,-6),random(-14,14),random(-14,14))
RMBB C 1 A_Explode(8,96,0,0,96)
RMBB F 0 A_SpawnItemEx("RaThorDarkMatterTrail",0,0,0,random(-24,-6),random(-14,14),random(-14,14))
RMBB F 1 A_Explode(8,96,0,0,96)
RMBB G 0 A_SpawnItemEx("RaThorDarkMatterTrail",0,0,0,random(-24,-6),random(-14,14),random(-14,14))
RMBB G 1 A_Explode(8,96,0,0,96)
Loop
Death:
RMBB D 0 A_PlaySoundEx("weapon/rathordarkexplode","Body")
RMBB D 0 A_Quake(5,6,0,256)
RMBB DDDEEE 1 A_SetScale(ScaleX+0.4,ScaleY+0.4)
stop
}
}

actor RaThorDarkMatterTrail : NoiseCrushTrail1
{
renderstyle "add"
scale 3.5
alpha 0.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 1
loopit:
RMBB A 1 A_Fadeout(0.05)
RMBB A 0 A_SetScale(scaleX - 0.35, scaleY - 0.35)
RMBB B 1 A_Fadeout(0.05)
RMBB B 0 A_SetScale(scaleX - 0.35, scaleY - 0.35)
RMBB C 1 A_Fadeout(0.05)
RMBB C 0 A_SetScale(scaleX - 0.35, scaleY - 0.35)
RMBB F 1 A_Fadeout(0.05)
RMBB F 0 A_SetScale(scaleX - 0.35, scaleY - 0.35)
RMBB G 1 A_Fadeout(0.05)
RMBB G 0 A_SetScale(scaleX - 0.35, scaleY - 0.35)
loop
}
}

Actor RaThorDarkMatterProtect : PowerProtection
{
	Powerup.Duration 5
	DamageFactor "RaThorDarkMatter", 0.0
}

Actor RaThorDarkSubmission
{
PROJECTILE
DamageType "RaThorDarkSubmission"
Obituary "$OB_RATHOR6"
Radius 26
Height 12
Damage (2)
Speed 100
Scale 2.5
+RIPPER
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
Spawn_L:
RADK AABBAABB 1 A_SpawnItemEx("RaThorDarkSubmissionTrail",0,0,0,0,0,0,0,1)
stop
}
}

Actor RaThorDarkSubmissionTrail : BaseDecorativeActor
{
States
{
Spawn:
TNT1 A 0
TNT1 A 2
RADK ABAB 1 A_FadeOut(0.2)
stop
}
}

Actor RaThorDarkSubmissionProtect : PowerProtection
{
	Powerup.Duration 4
	DamageFactor "RaThorDarkSubmission", 0.0
}

Actor RaThorAltInflict : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RaThorAltAfterBurn")
Stop
}
}

actor RaThorAltAfterBurn
{
PROJECTILE
//speed 10000
//speed 1000
speed 500
//speed 100
Height 0
Radius 0
+NOCLIP
+NOINTERACTION
scale 2.5
RenderStyle "Translucent"
Alpha 0.3
ReactionTime 5
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_TransferPointer(AAPTR_TARGET,AAPTR_DEFAULT,AAPTR_TARGET,AAPTR_MASTER) //put target's target in this thing's master
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT, AAPTR_DEFAULT, AAPTR_TARGET) //put target in tracert
TNT1 A 1 A_GiveInventory("RaThorAltAfterBurnFunc",1) //Dont ask me why this works
TNT1 A 0 ACS_NamedExecuteWithResult("SyncTargetToTID",CallACS("Core_GetTarget"))
goto Spawn2+1
Spawn2:
RMSH AAABBBAAABB 1 A_GiveInventory("RaThorAltAfterBurnFunc",1)
RMSH AAABBBAAA 1 A_GiveInventory("RaThorAltAfterBurnFunc",1)
TNT1 A 0 A_GiveInventory("RaThorAltAfterBurnFunc",1)
TNT1 A 0 A_SpawnItemEx("RaThorAltAfterBurnSplode",0,0,0,0,0,0,0,1024)
TNT1 A 1
TNT1 A 0 A_CountDown
loop
Death:
TNT1 AA 1 A_TakeFromTarget("RaThorAfterburnVision",999)
stop
}
}

actor RaThorAltAfterBurnFunc : CustomInventory
{
states
{
Pickup:
REMI B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",1)==0,"Exit")
REMI B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",1)==0,"Exit")
TNT1 A 0 A_Warp(AAPTR_TRACER,0,0,ACS_NamedExecuteWithResult("TracerHeightGet")/2,0,0)
TNT1 A 0 A_GiveInventory("RaThorAfterburnVision",1,AAPTR_TRACER)
stop
Exit:
TNT1 A 0 Thing_Remove(0)
stop
}
}

actor RaThorAfterburnVision : PowerUp
{
    Powerup.Color "Red", 0.7
    Powerup.Duration 45
	//+ADDITIVETIME
}

actor RaThorAltAfterBurnSplode
{
PROJECTILE
DamageType "WaveBurner"
Obituary "$OB_RATHOR6"
Height 0
Radius 0
+NOCLIP
+NOINTERACTION
//+SERVERSIDEONLY
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_DEFAULT, AAPTR_DEFAULT) //target is master
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8) 
TNT1 A 1 A_Explode(6,128,0,0,32)
stop
}
}

Actor RaThorUser1Start_CI : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/tengudash","Weapon")
TNT1 A 0 A_PlaySoundEx("weapon/chargekick","Auto")
TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",63,1)
HAZH D 0 A_TakeInventory("UnSolid",1)
HAZH D 0 A_ChangeFlag("SOLID",0)
TNT1 A 0 A_ChangeVelocity(41,0,4,3)
TNT1 A 0 A_SpawnItemEx("RaThorUser1HitboxWatcher")
BLLD A 0 ACS_NamedExecuteWithResult("VC_SetState",2)
stop
}
}
Actor RaThorUser1End_CI : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("Resolidifier")
stop
}
}

Actor RaThorUser1HitboxWatcher : BasicHelper
{
ReactionTime 17
States
{
Spawn:
TNT1 A 0
Spawn_L:
TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_GiveInventory("RaThorUser1Func",1,AAPTR_TARGET)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 0
Stop
}
}

Actor RaThorUser1Func : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RaThorUser1Hitbox")
TNT1 A 0 A_GiveInventory("RaThorUser1Anim",1)
stop
}
}

Actor RaThorUser1Trail : BaseDecorativeActor
{
RenderStyle translucent
Alpha 0.5
States
{
Spawn:
RATH V 1 A_FadeOut(0.05) //Change frame later
Loop
}
}

Actor RaThorUser1Hitbox : BasicExplosion
{
species "DustManType"
+THRUSPECIES
Obituary "$OB_RATHOR7"
DamageType "RaThorLunge"
ReactionTime 1
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(27,32,0,0,32)
TNT1 A 0 A_CountDown
Loop
Death:
TNT1 A 0
Stop
}
}

Actor RaThorLungeProtect : PowerProtection
{
	Powerup.Duration -1
	DamageFactor "RaThorLunge", 0.0
}

Actor RaThorUltAOE : BasicExplosion
{
Obituary "$OB_RATHOR8"
DamageType "RaThorUlt"
ReactionTime 1
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(30,800,0,0,800)
TNT1 A 0 A_CountDown
Loop
Death:
TNT1 A 0
Stop
}
}

Actor RaThorUltInflict : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_GiveInventory("RaThorUltReverse",1)
TNT1 A 0 A_GiveInventory("RaThorUltDuration",1)
TNT1 A 0 A_GiveInventory("RaThorUltBlind",1)
TNT1 A 0 A_GiveInventory("RaThorUltDoTEffect",1)
TNT1 A 0 A_GiveInventory("NoAltfire",1)
TNT1 A 0 A_GiveInventory("NoThirdFire10s")
stop
}
}

Actor RaThorUltBlind : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ACS_NamedExecuteAlways("VC_RaThorUltBlind",0)
Stop
}
}

Actor RaThorUltDoTEffect : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RaThorUltAfterBurn")
Stop
}
}

actor RaThorUltAfterBurn : RaThorAltAfterBurn
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_TransferPointer(AAPTR_TARGET,AAPTR_DEFAULT,AAPTR_TARGET,AAPTR_MASTER) //put target's target in this thing's master
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT, AAPTR_DEFAULT, AAPTR_TARGET) //put target in tracert
TNT1 A 1 A_GiveInventory("RaThorUltAfterBurnFunc",1) //Dont ask me why this works
TNT1 A 0 ACS_NamedExecuteWithResult("SyncTargetToTID",CallACS("Core_GetTarget"))
goto Spawn2+1
Spawn2:
RMBB AABBCCDDAABB 1 A_GiveInventory("RaThorUltAfterBurnFunc",1)
RMBB CCDDAABBCCDD 1 A_GiveInventory("RaThorUltAfterBurnFunc",1)
TNT1 A 0 A_GiveInventory("RaThorUltAfterBurnFunc",1)
TNT1 A 0 A_SpawnItemEx("RaThorUltAfterBurnSplode",0,0,0,0,0,0,0,1024)
TNT1 A 1
TNT1 A 1 A_JumpIfInventory("RaThorUltDuration",1,"Spawn2",AAPTR_TRACER) TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",1) == 0, "Death")
TNT1 A 1 A_JumpIfInventory("RaThorUltDuration",1,"Spawn2",AAPTR_TRACER) TNT1 A 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",1) == 0, "Death")
Death:
TNT1 AA 1 A_TakeFromTarget("RaThorAfterburnVision",999)
stop
}
}

actor RaThorUltAfterBurnFunc : CustomInventory
{
states
{
Pickup:
REMI B 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",1)==0,"Exit")
TNT1 A 0 A_Warp(AAPTR_TRACER,0,0,ACS_NamedExecuteWithResult("TracerHeightGet")/2,0,0)
stop
Exit:
TNT1 A 0 Thing_Remove(0)
stop
}
}

actor RaThorUltAfterBurnSplode : RaThorAltAfterBurnSplode
{
Obituary "$OB_RATHOR8"
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_DEFAULT, AAPTR_DEFAULT) //target is master
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8) 
TNT1 A 1 A_Explode(2,128,0,0,32)
stop
}
}

Actor RaThorUltDuration : Powerup{Powerup.Duration -10} //Just in case?
Actor RaThorUltReverse : PowerSpeed{Powerup.Duration -10 +POWERSPEED.NOTRAIL Speed -1.0}

actor RaThorRaMoonUlt : DocMetalImage
{
var int user_timer;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
RAMR A 0 A_SetUserVar("user_z",300)
TNT1 A 3 A_SetUserVar("user_z",300)
TNT1 A 0 A_Jump(256,"Spawn2")
goto Spawn2
Spawn2:
RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR A 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
RAMR A 0 A_SetUserVar("user_z",user_z-18)
RAMR A 0 A_JumpIf(user_timer >= 10, "RaMoonReady")
RAMR A 0 A_SetUserVar("user_timer",user_timer+1)
loop
RaMoonReady:
TNT1 A 0 A_PlaySoundEx("misc/ERPossess","Body")
RaMoonReadyWait:
RAMR A 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR A 0 A_JumpIf(user_timer >= 75, "RaMoonReadyReal")
RAMR A 0 A_SetUserVar("user_timer",user_timer+1)
loop
RaMoonReadyReal:
RAMR B 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR B 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR C 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR C 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR F 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR F 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_PlaySoundEx("misc/chat_yell","Body")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")

RaMoonDone:
RAMR G 0 A_JumpIf(Alpha <= 0, "Death")
RAMR G 1 A_Warp(AAPTR_TARGET,0,0,user_z,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)RAMR A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death") RAMR G 0 A_FadeOut(0.06)
Loop
Death:
TNT1 A 0
stop
}
}

actor RaMoonUltSpawner : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RaMoonUltFX",0,0,160)
TNT1 A 0 A_FireCustomMissile("RaThorUltAOE",0,0,0,0)
stop
}
}

actor RaMoonUltFX : BasicClientSide
{
Translation "4:4=160:160"
scale 0.1
alpha 0.7
+NOGRAVITY
+DONTBLAST
renderstyle add
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
RFLW A 1
RFLW BBBBBBBBBBBBBBBBBB 2 A_SetScale(scalex+0.2,scaley+0.2)
stop
}
}

actor RaThorUltCooldown : UltBuildCooldownGiver
{
Powerup.Duration 480
}

actor RaThorWallRush_CI : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("NewWallSlam",1,"PickupNo")
TNT1 A 0 A_GiveInventory("NoNewWallSlam",1)
TNT1 A 0 A_GiveInventory("NewWallSlam",1)
TNT1 A 0 A_GiveInventory("WallSlamRealTimer",1)
TNT1 A 0 A_SpawnItemEX("RaThorWallRushChecker")
stop
PickupNo:
TNT1 A 0
stop
}
}

actor RaThorWallRushChecker : BaseWallRushChecker
{
}

Actor RaThorWallBonk : BasicClientSide
{
ReactionTime 18
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
GREE AAAABBBBCCCCDDDDEEEEFFFF 1 A_FadeOut(0.05)
Death:
TNT1 A 0
Stop
}
}

Actor RaThorWallRushRealChecker
{
PROJECTILE
+NOTARGETSWITCH
+NOEXPLODEFLOOR
Scale 2.5
+DONTBLAST
+DONTREFLECT
+MTHRUSPECIES //+THRUSPECIES
//Species "Megaman"
Decal WallCrack
Radius 8
Height 8
Speed 20
states
{
Spawn:
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 1 //A_GiveToTarget("RaThorDashFlagX")
stop
Death:
TNT1 A 0 A_GiveInventory("RaThorWallRush_P",1,AAPTR_TARGET)
stop
}
}

actor ConcreteSlamChecker : BasicExplosion
{
damagetype "ConcreteSlamCheck"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(1,62,0,0,62)
stop
}
}

actor RaThorWallRush_P : Powerup{Powerup.Duration 35}

actor NoNewWallSlam : PowerUp
{
	Powerup.Duration 6
}

Actor WallSlamRealTimer : Powerup
{
	Powerup.Duration -1
}

actor NewWallSlam : PowerUp
{
	Powerup.Duration 3
}

actor WallSlamTrailPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 //A_JumpIf(z-floorz==0,"Pickup_NoHurtActor")
TNT1 A 0 A_JumpIfInventory("RaThorWallRush_P",1,"Nope")
//TNT1 A 0 A_SpawnItemEx("ConcreteSlamChecker",0,0,0,12)
TNT1 A 0 A_SpawnItemEx("RaThorWallRushRealChecker",0,0,0,12,0,0,0)
TNT1 A 0 A_SpawnItemEx("RaThorWallRushRealChecker",0,0,0,12,0,0,angle+90)
TNT1 A 0 A_SpawnItemEx("RaThorWallRushRealChecker",0,0,0,12,0,0,angle+180)
TNT1 A 0 A_SpawnItemEx("RaThorWallRushRealChecker",0,0,0,12,0,0,angle+270)
TNT1 A 0 A_GiveInventory("RaThorSpeedThing",1)
stop
Pickup_NoHurtActor:
TNT1 AAAA 0 A_TakeInventory("WallSlamRealTimer",999)
TNT1 AAAA 0 A_TakeInventory("WallSlamTimer",999)
TNT1 AAAA 0 A_TakeInventory("RaThorWallRush_P",999)
stop
Nope:
TNT1 A 0
stop
}
}


Actor RaThorSpeedThing : PowerSpeed{Powerup.Duration 35 -POWERSPEED.NOTRAIL Speed 1.00}

actor WallSlamTimer : PowerUp
{
	Powerup.Duration 35
}

actor ThorQuakeWatcher
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
Renderstyle none
reactiontime 35
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Quake(7,3,0,64)
TNT1 A 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 0
stop
}
}

actor ThorQuakeFlag : Powerup
{
Powerup.Duration 28
}

actor ThorHealingSound : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/sarheal", "Body")
stop
}
}

actor ThorRedDeathFX
{
Translation  "192:192=177:177", "198:198=189:189"
PROJECTILE
+NOINTERACTION
+NOCLIP
+SEEKERMISSILE
+BRIGHT
reactiontime 10
speed 25
Damage (0)
height 10
radius 10
var int user_scalemultiply;
Scale 0.1
States 
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TransferPointer(2,0,2,2)
TNT1 A 0 A_RearrangePointers(0,0,2)
TNT1 A 0 A_SetUserVar("user_scalemultiply",random(1,25))
TNT1 A 0 A_SetScale(scalex*user_scalemultiply,scaley*user_scalemultiply)
ACDX D 12
ACDX D 0 A_FaceTarget
loopit:
TNT1 A 0 A_SeekerMissile(90, 90, SMF_PRECISE, 256)
ACDX D 1 A_JumpIfCloser(64, "Death")
TNT1 A 0 A_SeekerMissile(90, 90, SMF_PRECISE, 256)
TNT1 A 0 A_JumpIfCloser(64, "Death")
ACDX D 1 A_FadeOut(0.05)
loop
Death:
TNT1 A 0
stop
}
}

actor RaThorAura : DocMetalImage
{
reactiontime 7
States
{
Spawn:
TNT1 AA 0 
RMBB HHIIJJKKLLMM 2 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
TNT1 A 0 A_Countdown
goto Spawn+2
}
}