actor RaThor_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_KE"
Dropitem "RaThorWepDroppedX"
weapon.ammouse 0
weapon.ammogive 28
Obituary "$OB_RATHOR1"
Inventory.Pickupmessage "Spaghetti in my shoes! Oh no!"
weapon.ammotype "WrathAmmo"
weapon.ammotype2 "AztecAmmo"
States
{
Spawn:
C_0K E 1
loop

Deselect:
RA_H A 0
goto DeselectSwap
Select:
RA_H A 0 A_GiveInventory("RaThorSpawnGraphic",1)
goto SelectSwap

Ready:
RA_H A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_RATHOR)
RA_H A 0 A_GunFlash("Flash.SoulAmmo",1)
goto Ready1
Ready1:
RA_H A 0 A_JumpIfInventory("WrathAmmo",28,"Ready2")
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed1")
RA_H A 2 A_WeaponReady(8)
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed1")
RA_H A 2 A_WeaponReady(8)
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed1")
RA_H A 0 A_GiveInventory("WrathAmmo",1)
loop
Ready2:
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed2")
RA_H A 2 A_WeaponReady
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed2")
RA_H A 2 A_WeaponReady
RA_H A 0 A_GiveInventory("WrathAmmo",1)
loop
ReadyPrimed1:
RA_H A 0 A_JumpIfInventory("WrathAmmo",28,"ReadyPrimed2")
RA_H AB 2 A_WeaponReady
RA_H A 0 A_GiveInventory("WrathAmmo",1)
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed1")
goto Ready1
ReadyPrimed2:
RA_H AB 2 A_WeaponReady
RA_H A 0 A_GiveInventory("WrathAmmo",1)
RA_H A 0 A_JumpIfInventory("ThorPrimedFlag",1,"ReadyPrimed2")
goto Ready2

Flash.SoulAmmo:
TNT1 AAA 4
TNT1 AA 4 A_RailWait
TNT1 AAA 4
TNT1 A 2 A_GiveInventory("RaThorSoulAmmo_P",1)
loop

Fire:
RA_H A 0 A_JumpIfInventory("RaThorHoldFlag",1,"SuplexMainfire")
RA_H H 1 offset(-10,40)A_GunFlash("Flash.SoulAmmo",1)
RA_H H 2 offset(-60,65)
RA_H H 1 offset(-30,51)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H E 0 A_GiveInventory("WrathAmmo",1)
RA_H E 1 offset(-10,44)A_GiveInventory("RaThor_Fire_P")
RA_H E 1 offset(20,36)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H C 1 offset(50,29)
RA_H C 1 offset(83,23)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H C 1 offset(116,18)
RA_H C 1 offset(152,14)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H C 1 offset(188,11)A_GunFlash("Flash.SoulAmmo",1)

TNT1 A 8 A_GiveInventory("WrathAmmo",1)
RA_H A 1 offset(18,88)A_GiveInventory("WrathAmmo",1)
RA_H A 1 offset(12,68)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H A 1 offset(7,52)
RA_H A 1 offset(3,40)A_JumpIfInventory("PlayerPropertyRage",1,1)
RA_H A 0
goto Ready1

AltFire:
RA_H A 0 A_JumpIfInventory("RaThorHoldFlag",1,"SuplexAltfire")
RA_H A 0 A_JumpIfInventory("WrathAmmo",28,"GrabbyStart")
Goto NoAmmo
NoAmmo:
RA_H A 4 A_GiveInventory("WrathAmmo",1)
goto Ready1

GrabbyStart:
RA_H A 0 A_GiveInventory("VivifyDelay4",1)
RA_H A 0 A_Refire(1)

RA_H A 0 A_TakeInventory("WrathAmmo",7)
RA_H A 0 A_TakeInventory("WrathAmmo",21,1)
RA_H I 2 A_GunFlash("Flash.SoulAmmo",1)
RA_H J 2 A_TakeInventory("SuplexID",999)
RA_H K 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
RA_H K 0 A_GiveInventory("RaThorDashCheck_P",1)
RA_H K 0 A_GiveInventory("ThorIsLungingF",1)
RA_H K 2 A_PlaySoundEx("DesDemo/CoyoteLeap","Weapon")
RA_H L 1 A_SpawnItemEx("RaThorGrabberCheck",8,0,-8,momx,momy,momz,0,8)
RA_H L 0 A_JumpIfInventory("SuplexID",1,"GrabbySuplex")
RA_H L 1 A_SpawnItemEx("RaThorGrabberCheck",8,0,-8,momx,momy,momz,0,8)
RA_H L 0 A_JumpIfInventory("SuplexID",1,"GrabbySuplex")
GrabbyLoop:
RA_H M 0 A_JumpIfInventory("SwoopSafeGuard",15,"GrabbyFail")
RA_H M 1 A_SpawnItemEx("RaThorGrabberCheck",8,0,-8,momx,momy,momz,0,8)
RA_H M 0 A_JumpIfInventory("SuplexID",1,"GrabbySuplex")
RA_H M 0 A_GiveInventory("SwoopSafeGuard",1)
loop
GrabbyFail:
RA_H N 2
RA_H J 0 A_GiveInventory("VivifyDelay5",1)
RA_H JI 1 A_TakeInventory("ThorIsLungingF",999)
TNT1 A 5
RA_H A 2 offset(12,68)A_GiveInventory("RaThorSuplexReset_P",1)
RA_H A 2 offset(7,52)A_TakeInventory("SwoopSafeGuard",999)
RA_H A 2 offset(3,40)
Goto Ready1

GrabbySuplex:
RA_H Q 0 A_GiveInventory("IsPerformingSuplex",1)
RA_H Q 0 A_GiveInventory("ThorIsGrabbingF",1)
RA_H Q 0 A_TakeInventory("ThorIsLungingF",999)
RA_H Q 0 A_GiveInventory("RaThorGrabHoldSlow",1)
RA_H Q 0 A_GiveInventory("CBM_Ratio8JumpPowerGiver",1)
RA_H Q 0 A_PlaySoundEx("KirbyNES/FoeGrab","Body")
RA_H Q 1 ACS_NamedExecuteAlways("cbm_ZangiefStartGrab",0,CallACS("cbm_ZangiefCountInv",2)+999)

RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",350,angle*256/360,70)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",345,angle*256/360,70)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",340,angle*256/360,70)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",335,angle*256/360,70)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",330,angle*256/360,70)==0,"SuplexEscape")

RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",330,angle*256/360,70)==0,"SuplexEscape")
SuplexHold:
RA_H Q 0 A_GiveInventory("RaThorHoldFlag",1)
RA_H Q 0 A_Jumpif(CallACS("cbm_ZangiefGrab",330,angle*256/360,70)==0,"SuplexEscape")
RA_H Q 1 A_WeaponReady(2)
RA_H Q 0 A_JumpIfInventory("RaThorHoldFlag",70,"SuplexRelease")
loop

SuplexRelease:
RA_H Q 0 A_GiveInventory("VivifyDelay8",1)
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",330,angle*256/360,68)==0,"SuplexEscape")
RA_H J 1 A_Jumpif(CallACS("cbm_ZangiefGrab",335,angle*256/360,66)==0,"SuplexEscape")
RA_H J 1 A_Jumpif(CallACS("cbm_ZangiefGrab",340,angle*256/360,64)==0,"SuplexEscape")
RA_H I 1 A_Jumpif(CallACS("cbm_ZangiefGrab",345,angle*256/360,62)==0,"SuplexEscape")
RA_H I 1 A_Jumpif(CallACS("cbm_ZangiefGrab",350,angle*256/360,60)==0,"SuplexEscape")
RA_H I 0 ACS_NamedExecuteAlways("cbm_ZangiefSetThrow",0,CallACS("cbm_ZangiefCountInv",2)+999,-2,-36)
goto SuplexEnd
SuplexEscape:
RA_H N 0 A_GiveInventory("VivifyDelay8",1)
//RA_H N 0 ACS_NamedExecuteAlways("cbm_ZangiefGiver",0,0,CallACS("cbm_ZangiefCountInv",2)+999)//Disable invun on grabbed player
RA_H N 2 A_FireCustomMissile("RaThorAtomicEscape",0,0,0,0)
goto SuplexEnd
SuplexMainfire:
RA_H G 0 A_GiveInventory("VivifyDelay10",1)
RA_H G 0 A_Refire(1)
RA_H G 1 offset(-2,62)A_Jumpif(CallACS("cbm_ZangiefGrab",310,angle*256/360,78)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",290,angle*256/360,86)==0,"SuplexEscape")
RA_H G 1 offset(2,42)A_Jumpif(CallACS("cbm_ZangiefGrab",270,angle*256/360,94)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",285,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(-3,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(3,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(-4,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(4,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(-5,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(5,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(-6,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(6,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 offset(-8,22)A_Jumpif(CallACS("cbm_ZangiefGrab",300,angle*256/360+128,100)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",280,angle*256/360+128,105)==0,"SuplexEscape")
RA_H G 1 offset(8,22)A_Jumpif(CallACS("cbm_ZangiefGrab",280,angle*256/360,110)==0,"SuplexEscape")
RA_H G 1 A_Jumpif(CallACS("cbm_ZangiefGrab",310,angle*256/360,150)==0,"SuplexEscape")

RA_H O 0 ACS_NamedExecuteAlways("cbm_ZangiefSetThrow",0,CallACS("cbm_ZangiefCountInv",2)+999,64,48)
RA_H O 0 A_SpawnItemEx("RaThorAtomicThrowSnd",100,0,100)
RA_H O 2 A_FireCustomMissile("RaThorAtomicThrow",0,0,0,0)
RA_H P 1 A_TakeInventory("ThorIsGrabbingF",999)
RA_H P 1 offset(-12,62)
TNT1 A 5
goto SuplexEnd
SuplexAltfire:
RA_H G 0 A_GiveInventory("VivifyDelay6",1)
RA_H G 0 A_Refire(1)
RA_H Q 1 offset(0,12)A_Jumpif(CallACS("cbm_ZangiefGrab",325,angle*256/360,80)==0,"SuplexEscape")
RA_H Q 0 A_ChangeVelocity(14*cos(pitch),0,4*-sin(pitch),3)
RA_H Q 0 ThrustThingZ(0,25,0,1)
RA_H Q 1 offset(0,-12)A_Jumpif(CallACS("cbm_ZangiefGrab",320,angle*256/360,90)==0,"SuplexEscape")
SuplexAltLoop:
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",315,angle*256/360,100)==0,"SuplexEscape")//110
RA_H Q 0 ThrustThingZ(0,2,1,1)
RA_H Q 0 A_CheckFloor("SuplexAltSlam")
loop
SuplexAltSlam:
RA_H Q 0 A_GiveInventory("VivifyDelay5",1)
RA_H Q 0 A_WeaponReady(14)
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",330,angle*256/360,95)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",345,angle*256/360,90)==0,"SuplexEscape")
RA_H Q 1 A_Jumpif(CallACS("cbm_ZangiefGrab",359,angle*256/360,80)==0,"SuplexEscape")
RA_H N 0 ACS_NamedExecuteAlways("cbm_ZangiefSetThrow",0,CallACS("cbm_ZangiefCountInv",2)+999,8,-800)
RA_H N 2 A_FireCustomMissile("RaThorAtomicSlam",0,0,0,0)
RA_H N 0 A_TakeInventory("WrathAmmo",7)
goto SuplexEnd
SuplexEnd:
TNT1 A 0 A_TakeInventory("IsPerformingSuplex",999)
TNT1 A 0 A_TakeInventory("ThorIsGrabbingF",999)
TNT1 A 0 A_TakeInventory("RaThorGrabHoldSlow")
TNT1 A 0 A_TakeInventory("CBM_Ratio8JumpPower")
TNT1 A 5
TNT1 A 0 A_WeaponReady(14)
RA_H A 2 offset(12,68)A_GiveInventory("RaThorSuplexReset_P",1)
RA_H A 2 offset(7,52)
RA_H A 2 offset(3,40)
Goto Ready1
}
}

actor WrathAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor AztecAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor ThorSoulAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 4
+INVENTORY.IGNORESKILL
}

actor RaThorGrabHoldSlow : PowerSpeed
{
powerup.duration 0x7FFFFFFC
Speed 0.25
+POWERSPEED.NOTRAIL
+INVENTORY.ALWAYSPICKUP
}


actor RaThorSpawnGraphic : PowerUp
{
Powerup.Duration 59
}

actor RaThorHoldFlag : Inventory
{
inventory.amount 1
inventory.maxamount 70
}

actor ThorIsLungingF : OnceC{}
actor ThorIsGrabbingF : OnceC{}
actor ThorPrimedFlag : OnceC{}
actor CanHarvestSouls : OnceC{}


actor ThorPrimeItem : BasicClassItem
{
inventory.icon "RATHRICO"
inventory.pickupmessage "whomst"
Tag "RaThor Soul Prime"
states
{
Spawn:
RA_H [ 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("VivifyDelay9",1,"No")
TNT1 A 0 A_JumpIfInventory("ThorPrimedFlag",1,"Use3")
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",1,"Use2")
fail
Use2:
TNT1 A 0 A_GiveInventory("ThorPrimedFlag",1)
TNT1 A 0 A_GiveInventory("VivifyDelay9",1)
TNT1 A 0 A_PlaySoundEx("item/RaThorUse",7)//SoundSlot7
fail
Use3:
TNT1 A 0 A_TakeInventory("ThorPrimedFlag",1)
TNT1 A 0 A_GiveInventory("VivifyDelay9",1)
TNT1 A 0 A_PlaySoundEx("item/RaThorUse",7)//SoundSlot7
fail
}
}

actor RaThor_Fire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/RaThorPew","Weapon")
TNT1 A 0 A_JumpIfInventory("ThorPrimedFlag",1,"PrimeFire")
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",4,"SoulFire4")
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",3,"SoulFire3")
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",2,"SoulFire2")
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",1,"SoulFire1")
SoulFire0:
TNT1 A 0 A_FireCustomMissile("ThorHellDisc",0,1,8,0)
stop
SoulFire1:
TNT1 A 0 A_FireCustomMissile("ThorHellVortex",0,1,8,0)
stop
SoulFire2:
TNT1 A 0 A_PlaySoundEx("weapon/RaThorSwayin","Body")
TNT1 A 0 A_FireCustomMissile("ThorSwayShot",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ThorSwayShot2",0,0,8,0)
stop
SoulFire3:
TNT1 A 0 A_PlaySoundEx("weapon/RaThorSparky","Body")
TNT1 A 0 A_FireCustomMissile("ThorElectroOrb",15,0,15,0)
TNT1 A 0 A_FireCustomMissile("ThorElectroOrb",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("ThorElectroOrb",-15,0,-15,0)
stop
SoulFire4:
TNT1 A 0 A_FireCustomMissile("ThorElectroGlobe",0,0,8,0)
stop
PrimeFire:
TNT1 A 0 A_TakeInventory("VivifyDelay9",9)
TNT1 A 0 A_TakeInventory("ThorPrimedFlag",999)
TNT1 A 0 A_TakeInventory("ThorSoulAmmo",1)
TNT1 A 0 A_GiveInventory("WrathAmmo",1)
TNT1 A 0 //A_PlaySoundEx("weapon/RaThorPewX","Weapon")
TNT1 A 0 A_FireCustomMissile("ThorSpiritBomb",0,0,8,0)
stop
}
}



actor RaThorDashCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Grounded")
goto Aired
Aired:
TNT1 A 0 A_ChangeVelocity(40*cos(pitch),0,((pitch>=15&&pitch<=89)*8+8)*-sin(pitch),3)
TNT1 A 0 ThrustThingZ(0,(pitch<=15||pitch>=270)*(28-(pitch<=15)*pitch),0,1)
stop
Grounded:
TNT1 A 0 A_ChangeVelocity(40*cos(pitch)+4,0,12*-sin(pitch),3)
TNT1 A 0 ThrustThingZ(0,28,0,1)
stop
}
}

actor RaThorSuplexReset_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("SuplexID",999)
TNT1 A 0 A_TakeInventory("ZangiefAngle",255)
TNT1 A 0 A_TakeInventory("SwoopSafeGuard",999)
TNT1 A 0 A_TakeInventory("RaThorHoldFlag",999)

TNT1 A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,CallACS("core_getmaxhealth")/10)
stop
}
}

actor RaThorSoulAmmo_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("AztecAmmo",1)
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",4,2)
TNT1 A 0 A_JumpIfInventory("AztecAmmo",28,"Pickup2")
TNT1 A 0
stop
Pickup2:
TNT1 A 0 A_PlaySound("item/RaThorSoul",3,1.0)
TNT1 A 0 A_GiveInventory("ThorSoulAmmo",1)
TNT1 A 0 A_TakeInventory("AztecAmmo",999)
stop
}
}

actor ThorSoul : CustomInventory //this drops on death like scoreball
{
inventory.amount 1
inventory.maxamount 0
inventory.pickupmessage "Picked up a Soul!"
+FLOATBOB
+NOGRAVITY
ReactionTime 115
scale 2.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("core_copytranslation")
RA_H XYZXYZ 3 A_SpawnItemEx("ThorSoulFX",0,0,8,random(-5,5),random(-5,5),random(-5,5),random(0,359),1)
RA_H X 0 A_Stop
goto SpawnL
SpawnL:
RA_H XYZ 3 A_SpawnItemEx("ThorSoulFX",0,0,8,random(-5,5),random(-5,5),random(-5,5),random(0,359),1)
RA_H X 0 A_CountDown
loop
Death:
RA_H XXYYZZ 1 A_Fadeout(0.125)
stop

Pickup:
TNT1 A 0 A_JumpIfInventory("CanHarvestSouls",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("RaThor_W",1,"Thor")
fail
Thor:
TNT1 A 0 A_PlaySound("item/RaThorSoul",3,1.0)
TNT1 A 0 A_JumpIfInventory("ThorSoulAmmo",4,"ThorAmmo")
TNT1 A 0 A_GiveInventory("ThorSoulAmmo",1)
stop
ThorAmmo:
TNT1 A 0 A_GiveInventory("AztecAmmo",28)
stop
TheSnatch:
TNT1 A 0 A_GiveInventory("SnatchItems_P2",1)
stop
}
}

actor ThorSoulFX : BasicClientSide
{
renderstyle translucent
reactiontime 1
scale 1.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetScale(frandom(1.25,1.5))
TNT1 A 0 A_Jump(256,1,2,3)
Spawn:
X_8C EFG 2
X_8C E 0 A_SetScale(ScaleX-frandom(0.05,0.15))
X_8C E 0 A_Fadeout(0.4)
loop
}
}


actor PowerRaThorHit : PowerUp
{
Powerup.Duration -10
+INVENTORY.ALWAYSPICKUP
}
actor RaThorHitFlag : Inventory{}

actor RaThorHitItem : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PowerRaThorHit",1,3)
TNT1 A 0 A_GiveInventory("RaThorHitFlag",1)
TNT1 A 0 A_SpawnItemEx("RaThorHitWatcher")
TNT1 A 0 A_GiveInventory("PowerRaThorHit",1)
stop
}
}
actor RaThorHitWatcher : BasicWatcher
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("PowerRaThorHit",1,"Spawn")
TNT1 A 0 A_TakeFromTarget("RaThorHitFlag",999)
stop
}
}

actor ThorHellDisc : ProjSpawnFuncActor
{
PROJECTILE
damagetype "RaThor_Shot1"
Obituary "$OB_RATHOR1"
+SKYEXPLODE
+EXPLODEONWATER
+FORCEXYBILLBOARD
+BRIGHT
reactiontime 6
damage (50)
Radius 15
Height 8
speed 55
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3,4)
RTHZ DCBA 2 A_CountDown
goto Spawn+2
Death:
TNT1 A 0 A_Explode(100,64,0,0,24)
RTHY ABCDEFG 1
stop
}
}

actor ThorHellVortex : ThorHellDisc
{
damagetype "RaThor_Shot2"
reactiontime 7
damage (50)
Height 14
speed 60
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3,4)
RTHZ E 1
goto SpawnL+2
RTHZ F 1
goto SpawnL+5
RTHZ G 1
goto SpawnL+8
RTHZ H 1
goto SpawnL+11
SpawnL:
RTHZ E 0 A_CountDown
RTHZ EE 1 A_SpawnItemEx("ThorHellVortexFX",0,0,0,0,0,0,0,1)
RTHZ F 0 A_CountDown
RTHZ FF 1 A_SpawnItemEx("ThorHellVortexFX",0,0,0,0,0,0,0,1)
RTHZ G 0 A_CountDown
RTHZ GG 1 A_SpawnItemEx("ThorHellVortexFX",0,0,0,0,0,0,0,1)
RTHZ H 0 A_CountDown
RTHZ HH 1 A_SpawnItemEx("ThorHellVortexFX",0,0,0,0,0,0,0,1)
loop
Death:
TNT1 A 0 //A_PlaySoundEx("","Weapon")
TNT1 A 0 A_SetScale(2.0)
TNT1 A 0 A_Explode(130,96,0,0,32)
RTHY HIJKLM 1
stop
}
}

actor ThorHellVortexFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
states
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3)
RTHY NOP 2 A_FadeTo(0.2,0.15,1)
goto SpawnFrame+2
}
}

actor ThorSwayShot : ProjSpawnFuncActor
{
PROJECTILE
//SeeSound "weapon/RaThorSway"
damagetype "RaThor_Shot3"
Obituary "$OB_RATHOR2"
+SKYEXPLODE
+EXPLODEONWATER
+FORCEXYBILLBOARD
+BRIGHT
Accuracy 1
ReactionTime 1
damage (90)
Radius 15
Height 15
speed 50
scale 3.0
States
{
Spawn:
TNT1 A 0
TNT1 A 1
RTHY QQ 1 A_Changevelocity(0,-3*Accuracy,0,1)
RTHZ I 2 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHZ J 0 A_Changevelocity(0,18*Accuracy,0,1)
goto Spawn1
Spawn1:
RTHZ J 2 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHY Q 2 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHZ I 2
RTHZ JJ 1 A_Changevelocity(0,-6*Accuracy,0,1)
RTHY Q 0 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHY QQ 1 A_Changevelocity(0,-6*Accuracy,0,1)
RTHZ IJ 2 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHY Q 2
RTHZ II 1 A_Changevelocity(0,6*Accuracy,0,1)
RTHZ J 0 A_SpawnItemEx("ThorSwayFX",0,0,0,0,0,0,0,1)
RTHZ JJ 1 A_Changevelocity(0,6*Accuracy,0,1)
RTHZ J 0 A_CountDown
loop
Death:
//TNT1 A 1
RTHZ KLM 2
stop
}
}

actor ThorSwayShot2 : ThorSwayShot
{
Accuracy -1
}

actor ThorSwayFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
scale 3.0
States
{
SpawnFrame:
TNT1 A 1
RTHZ KLM 2
stop
}
}

actor ThorElectroOrb : ProjSpawnFuncActor
{
PROJECTILE
damagetype "RaThor_Shot4"
Obituary "$OB_RATHOR3"
+SKYEXPLODE
+EXPLODEONWATER
+THRUGHOST
+FORCEXYBILLBOARD
+BRIGHT
reactiontime 2
damage (80)
Radius 15
Height 15
speed 60
scale 2.5
States
{
Spawn:
TNT1 A 0
RTHY R 2 A_SpawnItemEx("ThorElectroOrbFX",0,0,0,0,0,0,0,1)
RTHZ NOP 2 A_SpawnItemEx("ThorElectroOrbFX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_Countdown
loop
Death:
RTHY R 1 A_SetScale(ScaleX-0.2)
RTHZ NOP 1 A_SetScale(ScaleX-0.2)
RTHY R 1 A_SetScale(ScaleX-0.2)
RTHZ NOP 1 A_SetScale(ScaleX-0.2)
RTHY R 1 A_SetScale(ScaleX-0.2)
RTHZ NOP 1 A_SetScale(ScaleX-0.2)
stop
}
}

actor ThorElectroOrbFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
renderstyle add
scale 2.0
states
{
SpawnFrame:
RTHY R 1 A_SetScale(ScaleX-0.2)
RTHZ NOP 1 A_SetScale(ScaleX-0.2)
RTHY R 0 A_Fadeout(0.5)
loop
}
}

actor ThorElectroGlobe : ProjSpawnFuncActor
{
PROJECTILE
SeeSound "weapon/RaThorSparky"
damagetype "RaThor_Shot5"
Obituary "$OB_RATHOR3"
+SKYEXPLODE
+EXPLODEONWATER
+THRUACTORS
+FORCEXYBILLBOARD
+BRIGHT
reactiontime 3
Radius 16
Height 24
speed 40
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeBit",0,0,0,sqrt(momx*momx+momy*momy),6,momz,0)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeBit",0,0,0,sqrt(momx*momx+momy*momy),-6,momz,0)
RTHZ QQ 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX2",0,0,0,0,0,0,0,1)
RTHZ RR 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX3",0,0,0,0,0,0,0,1)
RTHZ SS 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX4",0,0,0,0,0,0,0,1)
RTHZ TT 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX5",0,0,0,0,0,0,0,1)
RTHZ UU 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX6",0,0,0,0,0,0,0,1)
RTHZ VV 1 A_Explode(20,64,0,0,64)
TNT1 A 0 A_SpawnItemEx("ThorElectroGlobeFX1",0,0,0,0,0,0,0,1)
TNT1 A 0 A_Countdown
TNT1 A 0 A_PlaySoundEx("weapon/RaThorSparky",2)
loop
Death:
RTHZ QRSTUV 1 A_SetScale(ScaleX-0.4)
stop
}
}

actor ThorElectroGlobeBit : ThorElectroOrb
{
damagetype "RaThor_Shot5"
Obituary "$OB_RATHOR3"
-THRUGHOST
Damage (60)
reactiontime 1
}

actor ThorElectroGlobeFX1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
renderstyle add
Mass 1
scale 2.5
states
{
SpawnFrame:
TNT1 A 0
Spawn2:
RTHZ Q 0 A_Fadeout(0.125)
RTHZ Q 1 A_SetScale(ScaleX-0.15)
RTHZ R 0 A_Fadeout(0.125)
RTHZ R 1 A_SetScale(ScaleX-0.15)
RTHZ S 0 A_Fadeout(0.125)
RTHZ S 1 A_SetScale(ScaleX-0.15)
RTHZ T 0 A_Fadeout(0.125)
RTHZ T 1 A_SetScale(ScaleX-0.15)
RTHZ U 0 A_Fadeout(0.125)
RTHZ U 1 A_SetScale(ScaleX-0.15)
RTHZ V 0 A_Fadeout(0.125)
RTHZ V 1 A_SetScale(ScaleX-0.15)
loop
}
}
actor ThorElectroGlobeFX2 : ThorElectroGlobeFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+2
}
}
actor ThorElectroGlobeFX3 : ThorElectroGlobeFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+4
}
}
actor ThorElectroGlobeFX4 : ThorElectroGlobeFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+6
}
}
actor ThorElectroGlobeFX5 : ThorElectroGlobeFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+8
}
}
actor ThorElectroGlobeFX6 : ThorElectroGlobeFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+10
}
}


actor ThorSpiritBombBlocker : BasicShieldHitbox
{
+INVULNERABLE
species "DumbRaThorBlocker"
painchance 0
Radius 76
Height 108
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Warp(2,0,0,-54,0,24)
TNT1 A 0 A_CheckFlag("NOGRAVITY","Spawn",2)
stop
}
}

actor RaThor_SpiritProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "RaThor_Spirit", 0.0
}

actor ThorSpiritBomb : ProjSpawnFuncActor
{
PROJECTILE
SeeSound "weapon/RaThorPewX"
damagetype "RaThor_Spirit"
Obituary "$OB_RATHOR4"
-SOLID
-MISSILE
+DONTREFLECT
+SKYEXPLODE
+EXPLODEONWATER
+THRUACTORS
+FORCEXYBILLBOARD
+BRIGHT
+THRUSPECIES
species "DumbRaThorBlocker"
ReactionTime 1
damage (0)
Radius 10
Height 10
speed 10
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(sqrt(momx*momx + momy*momy + momz*momz)<7,"SpawnFix")
TNT1 A 0 A_SpawnItemEx("ThorSpiritBombBlocker",0,0,0,0,0,0,0,SXF_SETMASTER)
TNT1 A 0 A_ChangeFlag("MISSILE",1)
TNT1 A 0 A_GiveInventory("ReSyncPickup")
Spawn2:
RTHZ W 0 A_SpawnItemEx("ThorSpiritBombFX1",0,0,0,0,0,0,0,1)
RTHZ WXXWYY 1 A_Explode(20,96,0,0,96)
RTHZ W 0 A_SpawnItemEx("ThorSpiritBombFX2",0,0,0,0,0,0,0,1)
RTHZ WZZWXX 1 A_Explode(20,96,0,0,96)
RTHZ W 0 A_SpawnItemEx("ThorSpiritBombFX3",0,0,0,0,0,0,0,1)
RTHZ WYYWZZ 1 A_Explode(20,96,0,0,96)
RTHZ W 0 A_SetPitch(pitch+1)
loop
SpawnFix:
TNT1 A 1
TNT1 A 1 A_CountDown
wait
Death:
TNT1 A 0 A_ChangeFlag("MISSILE",1)
TNT1 A 0 A_PlaySound("weapon/RaThorPewZ",2)
TNT1 A 0 A_SetDamageType("RaThor_Shot1")
TNT1 A 0 A_Explode(60+(pitch>1)*50+(pitch>3)*50,156,0,0,56)
TNT1 A 3 A_SpawnItemEx("ThorShockWaveSpawner",0,0,0,0,0,0,0,1)
stop
}
}

actor ThorSpiritBombFX1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
reactiontime 1
renderstyle add
scale 2.0
states
{
SpawnFrame:
TNT1 A 0
Spawn2:
TNT1 A 0 A_Fadeout(0.15)
RTHZ W 1 A_SetScale(ScaleX-0.1)
RTHZ X 1
RTHZ X 1 A_SetScale(ScaleX-0.1)
RTHZ W 1
RTHZ Y 1 A_SetScale(ScaleX-0.1)
RTHZ Y 1
TNT1 A 0 A_Fadeout(0.15)
RTHZ W 1 A_SetScale(ScaleX-0.1)
RTHZ Z 1
RTHZ Z 1 A_SetScale(ScaleX-0.1)
RTHZ W 1
RTHZ X 1 A_SetScale(ScaleX-0.1)
RTHZ X 1
TNT1 A 0 A_Fadeout(0.15)
RTHZ W 1 A_SetScale(ScaleX-0.1)
RTHZ Y 1
RTHZ Y 1 A_SetScale(ScaleX-0.1)
RTHZ W 1
RTHZ Z 1 A_SetScale(ScaleX-0.1)
RTHZ Z 1
loop
}
}
actor ThorSpiritBombFX2 : ThorSpiritBombFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+7
}
}
actor ThorSpiritBombFX3 : ThorSpiritBombFX1
{
states
{
SpawnFrame:
TNT1 A 0
goto Spawn2+14
}
}

actor ThorShockWaveSpawner : BasicExplosion
{
damagetype "RaThor_Shot1"
Obituary "$OB_RATHOR4"
RenderStyle None
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,15,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,30,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,45,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,75,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,90,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,105,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,135,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,150,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,165,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,195,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,210,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,225,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,240,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,255,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,270,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,285,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,300,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,315,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,330,1)
TNT1 A 0 A_SpawnItemEx("ThorShockWave",0,0,0,30,0,0,345,1)
TNT1 A 2
stop
}
}

actor RaThor_WaveProtect : PowerProtection
{
Powerup.Duration 6
DamageFactor "RaThor_Wave", 0.2
}

actor ThorShockWave : ProjSpawnFuncActor
{
PROJECTILE
damagetype "RaThor_Wave"
Obituary "$OB_RATHOR4X"
+FLOORHUGGER
+THRUACTORS
+FORCEXYBILLBOARD
+BRIGHT
+THRUSPECIES
species "DumbRaThorBlocker"
Damage (90)
Radius 32
Height 32
Speed 30
Scale 2.0
States
{
Spawn:
RTHY S 0
RTHY S 1
RTHY S 12 A_ChangeFlag("THRUACTORS",0)
RTHY S 1 A_FadeOut(0.25)
wait
Death:
TNT1 A 1
stop
}
}

actor RaThorGrabberCheck
{
//+NOINTERACTION
+MISSILE
+NOBLOCKMAP
+NOGRAVITY
+NOEXPLODEFLOOR
+DONTBLAST
+DONTREFLECT
+HITTRACER
+THRUGHOST
+THRUSPECIES
species "DumbRaThorBlocker"
height 64
radius 64
renderstyle none
states
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Crash:
TNT1 A 0 A_JumpIfInTargetInventory("NoSourcePushFlag",1,"DeathF")
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"DeathI")
TNT1 A 0 A_JumpIfInventory("IsPerformingSuplex",1,"DeathJ",8)
TNT1 A 0 A_JumpIfInventory("NoPushFlag",1,"DeathP",8)
//TNT1 A 0 A_JumpIf(CallACS("cbm_istracerplayer")==1,"GiveSuplexT")
TNT1 A 1 A_JumpIf(CallACS("cbm_istracerenemy")==1,"GiveSuplex")
stop
GiveSuplexT:
TNT1 A 0 A_JumpIfInTargetInventory("NoSourcePushFlag",1,"DeathF")
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"DeathI")
TNT1 A 0 A_JumpIfInventory("IsPerformingSuplex",1,"DeathJ",8)
TNT1 A 0 A_JumpIfInventory("NoPushFlag",1,"DeathP",8)
TNT1 A 0 A_GiveToTarget("IsPerformingSuplex",1)
TNT1 A 4 A_GiveToTarget("SuplexID",(CallACS("core_getptrtid",8)-1000)+1)
stop
GiveSuplex:
TNT1 A 0 A_JumpIfInTargetInventory("NoSourcePushFlag",1,"DeathF")
TNT1 A 0 A_JumpIfInTargetInventory("SuplexID",1,"DeathI")
TNT1 A 0 A_JumpIfInventory("IsPerformingSuplex",1,"DeathJ",8)
TNT1 A 0 A_JumpIfInventory("NoPushFlag",1,"DeathP",8)
TNT1 A 0 A_GiveToTarget("IsPerformingSuplex",1)
TNT1 A 0 A_GiveToTarget("SuplexID",(CallACS("core_getptrtid",8)-1000)+1)
TNT1 A 1 //A_GiveInventory("",1,8)
Carry:
TNT1 A 0 //A_GiveInventory("",1,8)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"DeathD")
TNT1 A 1 //A_GiveToTarget("",1)
TNT1 A 1 A_JumpIfInTargetInventory("ThorIsGrabbingF",1,"Carry")
StopCarry:
TNT1 A 1 //A_TakeFromTarget("",9)
stop


DeathF:
TNT1 A 1 //A_LOG("FAILED, OWNER IS TOO FISHY")
stop
DeathD:
TNT1 A 1 //A_LOG("OWNER IS DEAD!")
stop
DeathI:
TNT1 A 1 //A_LOG("FAILED, OWNER HAS ID")
stop
DeathJ:
TNT1 A 1 //A_LOG("FAILED, CAN'T GRAB SOMEONE GRABBING!")
stop
DeathP:
TNT1 A 1 //A_LOG("FAILED, NOPUSHFLAG!")
stop
Death:
TNT1 A 1
stop
}
}

actor RaThorAtomicThrowSnd : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteWithResult("core_setpointer",AAPTR_TRACER,CallACS("cbm_ZangiefCountInv",2,2)+999)
TNT1 A 0 A_PlaySoundEx("weapon/RaThorThrow","Weapon")
TNT1 AAAAAAAAAAAAAAA 1 A_Warp(8,0,0,28,0,24)
TNT1 A 10
stop
}
}

actor RaThorAtomicThrow : BasicImplosion
{
Obituary "$OB_RATHOR5"
damagetype "RaThor_Toss"
+NOCLIP
+NOTARGETSWITCH
Mass 170
States
{
Spawn:
TNT1 A 0
TNT1 A 0 Thing_Move(0,CallACS("cbm_ZangiefCountInv",2,2)+999,1)
TNT1 A 4 A_Explode(Mass,15,0,1,15)
stop
}
}
actor RaThorAtomicSlam : RaThorAtomicThrow
{
Obituary "$OB_RATHOR6"
damagetype "RaThor_BuryFreeze"
Mass 60
}
actor RaThorAtomicEscape : RaThorAtomicThrow
{
Obituary "$OB_RATHOR7"
damagetype "RaThor_Shot1"
Mass 140
}

actor RaThorSlamFloorChecker
{
var int user_Z;
PROJECTILE
+DONTREFLECT
+DONTBLAST
renderstyle none
damage (0)
radius 16
height 4
states
{
Spawn:
TNT1 A 0
TNT1 A 0 //A_SetUserVar("user_Z",Z)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
TNT1 AAAAAA 1 A_Warp(2,0,0,-2,0,8)
stop
Death:
TNT1 A 0 //A_LogInt(user_Z-Z)
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death2")
TNT1 A 0 A_SpawnItemEx("GroundDirt_Thor")
TNT1 A 0 //A_TakeFromTarget("",9999)
TNT1 A 0 //A_GiveToTarget("",1)
TNT1 A 5
stop
Death2:
TNT1 A 0
stop
}
}

actor GroundDirt_ThorRockFX : BasicGraphicEffectM
{
Translation "192:192=217:217", "198:198=231:231"
-NOGRAVITY
+THRUACTORS
+NOPAIN
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+BOUNCEONFLOORS
+FORCEXYBILLBOARD
WALLBOUNCEFACTOR 0.8
BOUNCEFACTOR 0.35
BounceCount 4
scale 1.0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SetScale(frandom(0.75,1.25))
TNT1 A 0 A_Jump(256,1,2,3)
Spawn1:
X_5C Q 1
wait
Spawn2:
X_5C R 1
wait
Spawn3:
X_5C A 1
wait
Death:
TNT1 A 0 A_SetGravity(0.0)
TMFX BCD 1
stop
}
}

actor RaThorGroundBurstHastenGiver : PowerApropGiver {}
actor RaThorGroundBurstHasten : Powerup//PowerSpeed
{
powerup.duration 6
//Speed 1.825
//+POWERSPEED.NOTRAIL
}

actor GroundDirt_Thor : BasicHelper
{
reactiontime 44
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PlayerPropertyGroundedOn")
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("GroundDirt_ThorRockFX",random(0,10),0,8,random(3,18),0,random(3,16),random(0,359))
TNT1 A 0 A_PlaySound("weapon/RaThorSlam",5,0.75)
TNT1 A 0 A_PlaySound("weapon/RaThorSlam",4,0.75)
TNT1 A 1 A_GiveToTarget("GroundDirt_Thor_P")
TNT1 A 0 A_TakeFromTarget("EternalPainFlag",1)
Spawn2:
TNT1 A 0 A_JumpIfInTargetInventory("EternalPainFlag",1,"DeathEarly")
TNT1 A 1 A_GiveToTarget("GroundDirt_Thor_P")
TNT1 A 0 A_CountDown
loop
DeathEarly:
TNT1 A 0 A_GiveToTarget("RaThorGroundBurstHastenGiver",1)
Death:
TNT1 A 1 A_GiveToTarget("PlayerPropertyGroundedOff")
stop
}
}

actor GroundDirt_Thor_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("DashingStraitjacket_F",1)
TNT1 A 0 A_SpawnItemEx("GroundDirt_ThorFX")
stop
}
}
actor GroundDirt_ThorFX : BasicClientSide
{
Translation "192:192=217:217", "198:198=231:231"
States
{
Spawn:
MRFA F 0
MRFA F 1
stop
}
}

actor RaThorWepDroppedX : BasicHelper
{
Translation "192:192=4:4","198:198=57:57"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEX("ThorSoul",0,0,0,random(-4,4),random(-4,4),frandom(2,3),random(0,359),1)
TNT1 A 1 A_SpawnItemEx("BassUpgrade",0,0,0,momx,momy,momz,0,8)
stop
}
}

actor RaThor_W_NormalBar : NormalBar {Args 248,3}
actor RaThor_W_SecondBar : SecondBar {Args 4,57}
actor RaThor_W_ScriptBar : ScriptBar {}