actor JudgementRushWep_NormalBar : NormalBar { args 205, 194 }
actor JudgementRushWep_ScriptBar : ScriptBar {}

actor JudgementRushWep : BaseMM8BDMWep
{
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_JUDGEMENTRUSH"
Obituary "$OB_JUDGEMENTRUSH"
Tag "$TAG_JUDGEMENTRUSH"
weapon.ammotype "JudgementRushAmmo"
inventory.icon "JGRSICO"
States
{
SpawnLoop:
JGRS X -1
loop
Ready:
JGRS A 0 ACS_NamedExecuteWithResult("core_weaponcolor",CLR_JUDGEMENTRUSH)
JGRS A 0 A_JumpIfInventory("JudgementRushCooldownFlag",1,"ReadyCooldown")
JGRS A 1 A_WeaponReady
Goto Ready+1
ReadyCooldown:
JGRS A 1 A_WeaponReady(WRF_NOFIRE)
Goto Ready+1
Deselect:
JGRS A 0
goto DeselectSwap
Select:
JGRS A 0
goto SelectSwap
Fire:
JGRS A 0 A_TakeInventory("JudgementRushProtection",999)
JGRS A 0 A_TakeInventory("JudgementRushTimer",999)
JGRS A 0 A_TakeInventory("JudgementRushReady",999)
JGRS A 0 A_TakeInventory("JudgementRushMarked",999)
JGRS A 0 A_JumpIfInventory("JudgementRushCooldownFlag",1,"ReadyCooldown")
JGRS A 0 A_JumpIfNoAmmo("NoAmmo")
JGRS A 0 A_GiveInventory("JudgementRushSeekFlag",105)
JGRS A 0 A_TakeInventory("JudgementRushAmmo",1,TIF_NOTAKEINFINITE)
JGRS B 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC1,TCLR_PROTO_CHARGE1)
JGRS B 3 A_SpawnItemEx("JudgementRushSeeker",0,0,28)
JGRS C 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC2,TCLR_CHARGE1)
JGRS C 3
JGRS C 0 A_Refire
Goto Fire1
Hold:
JGRS H 0 A_JumpIfInventory("JudgementRushCooldownFlag",1,"ReadyCooldown")
JGRS H 0 A_JumpIfInventory("JudgementRushSeekFlag",1,"Charge")
goto Fire1
Charge:
JGRS H 0 A_JumpIfInventory("WeaponCharge",6,"Charge3")
JGRS H 0 A_JumpIfInventory("WeaponCharge",3,"Charge2")
JGRS H 0 A_JumpIfInventory("WeaponCharge",1,"Charge1")
JGRS H 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC1,TCLR_PROTO_CHARGE1)
Charge1:
JGRS H 0 A_JumpIfInventory("WeaponCharge",6,"Charge3")
JGRS H 0 A_JumpIfInventory("WeaponCharge",3,"Charge2")
JGRS H 1 A_TakeInventory("JudgementRushSeekFlag",1)
JGRS H 0 A_GiveInventory("WeaponCharge",1)
JGRS H 0 A_Refire
Goto Fire1
Charge2:
JGRS C 0 A_JumpIfInventory("WeaponCharge",4,"Charge2a")
JGRS C 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC2,TCLR_CHARGE1)
Charge2a:
JGRS C 0 A_JumpIfInventory("WeaponCharge",6,"Charge3")
JGRS C 1 A_TakeInventory("JudgementRushSeekFlag",1)
JGRS C 0 A_GiveInventory("WeaponCharge",1)
JGRS C 0 A_Refire
Goto Fire1
Charge3:
JGRS H 0 A_JumpIfInventory("IsBot", 1, "BotCharge")
JGRS H 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC1,TCLR_PROTO_CHARGE1)
JGRS H 0 A_TakeInventory("WeaponCharge",999)
goto Charge1
BotCharge:
JGRS H 0 A_Jump(64, "BotCharge2")
Goto Charge3+1
BotCharge2:
JGRS H 0 A_JumpIfInventory("JudgementRushMarked",1, "Fire1")
Goto Charge3+1
Fire1:
JGRS A 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSH,TCLR_NONE)
JGRS A 0 A_GiveInventory("JudgementRushReady",1)
JGRS A 0 A_TakeInventory("WeaponCharge", 999)
JGRS A 0 A_TakeInventory("JudgementRushSeekFlag", 999)
JGRS A 0 A_JumpIfInventory("JudgementRushAmmo",3,"Fire2")
goto NoFire
Fire2:
JGRS J 1
JGRS I 0 A_JumpIfInventory("JudgementRushMarked",1,"Fire3")
goto NoFire
Fire3:
JGRS A 0 A_TakeInventory("JudgementRushAmmo",3,TIF_NOTAKEINFINITE)
// [Trill] These previously used ACS_NamedExecuteAlways, ACS_NamedExecuteWithResult
// should always be used to reduce 1-tic edge cases from the former's queuing behavior.
JGRS A 0 ACS_NamedExecuteWithResult("core_flyplayer",0,1,1)
JGRS A 0 ACS_NamedExecuteWithResult("core_freezeplayer",0,1)
JGRS A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEON)
JGRS A 0 A_GiveInventory("JudgementRushReady",1)
JGRS A 0 A_PlaySoundEx("weapons/judgementrushstart","Weapon")
JGRS A 0 A_GiveInventory("JudgementRushProtection",1)
JGRS A 0 //A_ChangeVelocity(-4, 0, 0, CVF_RELATIVE|CVF_REPLACE)
JGRS DE 2
JGRS A 0 A_GiveInventory("JudgementRushReady",1)
FireLoop:
JGRS E 1 //A_ChangeVelocity(60*cos(pitch), 0, 60*sin(-pitch), CVF_RELATIVE|CVF_REPLACE)
JGRS E 0 A_GiveInventory("JudgementRushTimer",1)
JGRS E 0 A_JumpIfInventory("JudgementRushTimer",0,"FireEnd")
JGRS E 0 A_JumpIfInventory("JudgementRushReady",5,"FireEnd")
JGRS E 0 A_SpawnItemEx("JudgementRush", 40, 0, 32, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM)
JGRS E 0 A_SpawnItemEx("JudgementRush1", 0, 0, 32, momx/4, momy/4, momz/4, 0, SXF_ABSOLUTEMOMENTUM)
JGRS E 0 A_JumpIfInventory("JudgementRushMarked",1,"FireLoop")
goto FireEnd
FireEnd:
JGRS A 0 A_TakeInventory("JudgementRushTimer",999)
JGRS A 0 A_TakeInventory("JudgementRushReady",999)
JGRS A 0 A_TakeInventory("JudgementRushMarked",999)
JGRS A 0 A_TakeInventory("JudgementRushSeekFlag",999)
JGRS E 0 A_SpawnItemEx("JudgementRush2", 40, 0, 32, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM)
JGRS E 1
JGRS A 0 A_PlaySoundEx("weapons/judgementrushend","Weapon")
JGRS FFGG 1 A_SpawnItemEx("JudgementRush2", 40, 0, 32, momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM)
JGRS A 0 A_Stop
JGRS A 0 A_TakeInventory("JudgementRushProtection",999)
TNT1 A 6
JGRS A 0 ACS_NamedExecuteWithResult("core_flyplayer",0,0,1)
JGRS A 0 ACS_NamedExecuteWithResult("core_freezeplayer",0,0)
JGRS A 0 ACS_NamedExecuteWithResult("core_unsolidplayer",0,USP_TOGGLEOFF_DAMAGE,ACS_NamedExecuteWithResult("core_getmaxhealth")/10)
TNT1 A 2
JGRS JIA 2
JGRS A 0 A_GiveInventory("JudgementRushCooldownFlag",1)
JGRS A 0 A_SpawnItemEx("JudgementRushCooldowner")
JGRS A 1 A_ClearRefire
Goto Ready+1

AltFire:
JGRS A 0 A_TakeInventory("JudgementRushProtection",999)
JGRS A 0 A_TakeInventory("JudgementRushTimer",999)
JGRS A 0 A_TakeInventory("JudgementRushReady",999)
JGRS A 0 A_TakeInventory("JudgementRushMarked",999)
JGRS A 0 A_JumpIfInventory("JudgementRushCooldownFlag",1,"ReadyCooldown")
JGRS A 0 A_JumpIfNoAmmo("NoAmmo")
JGRS A 0 A_GiveInventory("JudgementRushSeekFlag",105)
JGRS A 0 A_TakeInventory("JudgementRushAmmo",1,TIF_NOTAKEINFINITE)
JGRS B 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC1,TCLR_PROTO_CHARGE1)
JGRS B 3 A_SpawnItemEx("JudgementRushSeeker",0,0,28)
JGRS C 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSHC2,TCLR_CHARGE1)
JGRS C 3
Goto Fire1
NoAmmo:
JGRS A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
NoFire:
JGRS A 0 ACS_NamedExecuteWithResult("core_chargecolor",CLR_JUDGEMENTRUSH,TCLR_NONE)
JGRS A 0 A_TakeInventory("JudgementRushProtection",999)
JGRS A 0 A_TakeInventory("JudgementRushTimer",999)
JGRS A 0 A_TakeInventory("JudgementRushReady",999)
JGRS A 0 A_TakeInventory("JudgementRushMarked",999)
JGRS A 0 A_TakeInventory("JudgementRushSeekFlag",999)
JGRS A 0 ACS_NamedExecuteAlways("core_noammo",0)
JGRS JIA 2
JGRS A 1 A_ClearRefire
Goto Ready+1
}
}

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

actor JudgementRushSeekFlag : Inventory
{
inventory.amount 1
inventory.maxamount 105
}

actor JudgementRushSeeker : BasicProjectile
{
+DONTBLAST
+DONTREFLECT
+THRUACTORS
+SEEKERMISSILE
+SCREENSEEKER
-MISSILE
var int user_p;
var int user_h;
speed 0
damage(0)
Translation "192:192=205:205", "198:198=194:194"
States
{
Spawn:
TNT1 A 0
SpawnLoop:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"NoLoop")
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
TNT1 A 0 A_Warp(AAPTR_TARGET, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 1 A_SeekerMissile(2, 85, SMF_LOOK|SMF_PRECISE, 256, 4)
TNT1 A 0 A_JumpIf(CallACS("core_targetexists",0)==0,"GoAway")
TNT1 A 0 A_JumpIfTargetInLOS("MakeGash", 0, JLOSF_PROJECTILE|JLOSF_DEADNOJUMP)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushSeekFlag",1,"SpawnLoop")
NoLoop:
TNT1 A 0 //A_Warp(AAPTR_TARGET, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
stop
/*
TNT1 A 0 A_JumpIf(CallACS("core_targetexists",0)==0,"GoAway")
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",5,"LoopEnd")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",3,"LoopDrag")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushMarked",1,"NoLoop")
goto GoAway
LoopEnd:
TNT1 A 0 A_Warp(AAPTR_TARGET, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushTimer",1,"GoAway")
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_dragtarget",0,0)
stop
LoopDrag:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",5,"LoopEnd")
TNT1 A 0 A_Warp(AAPTR_TARGET, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_dragtarget",0,0)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushMarked",1,"NoLoop")
goto LoopEnd
*/
MakeGash:
TNT1 A 0 A_GiveInventory("JudgementRushSeekFunc",1)
TNT1 A 1 A_Warp(AAPTR_TARGET, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 0 A_JumpIf(CallACS("core_targetexists",0)==0,"GoAway")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushSeekFlag",1,"SpawnLoop")
goto NoLoop
GoAway:
TNT1 A 0
stop
}
}

actor JudgementRushSeekFunc : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"NoSpawn")
TNT1 A 0 A_JumpIf(CallACS("judgerush_teamcheck",0)==2,"NoSpawn")
TNT1 A 0 A_GiveInventory("CountChildrenFunc",1)
TNT1 A 0 A_JumpIfInventory("ChildCount",1,"TracerComp")
goto PickupSpawn
TracerComp:
TNT1 A 0 A_GiveToChildren("JudgementRushChangeMark",1)
stop
PickupSpawn:
TNT1 A 0 A_JumpIf(IsPointerEqual(AAPTR_TRACER,AAPTR_NULL)==TRUE,"NoSpawn")
TNT1 A 0 A_JumpIf(IsPointerEqual(AAPTR_TRACER,AAPTR_TARGET)==TRUE,"NoSpawn")
TNT1 A 0 A_SpawnItemEx("JudgementRushGash",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0,CallACS("core_NewUniqueTID"))
TNT1 A 0 ACS_NamedExecuteWithResult("core_setTIDsPointerToThis",CallACS("core_CurrentUniqueTID"),AAPTR_MASTER)
TNT1 A 0 ACS_NamedExecuteWithResult("core_ClearUniqueTID",0)
stop
NoSpawn:
TNT1 A 0
stop
}
}

actor JudgementRushChangeMark : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"PickupNo")
TNT1 A 0 A_TransferPointer(AAPTR_MASTER,AAPTR_DEFAULT,AAPTR_TRACER,AAPTR_TRACER)
TNT1 A 0 A_JumpIf(CallACS("judgerush_comparetargets",0)==1,"PickupYes")
stop
PickupYes:
TNT1 A 0 A_TakeInventory("PharaohCharge",999)
TNT1 A 0 A_TakeInventory("CutterFlag",999)
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_newtarget",0,0)
TNT1 A 0 A_Warp(AAPTR_TRACER, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
stop
PickupNo:
TNT1 A 0
stop
}
}

actor JudgementRushDiffTags : Once {}

actor JudgementRushGash : BasicProjectile
{
+DONTBLAST
+DONTREFLECT
+THRUACTORS
-MISSILE
+SEEKERMISSILE
+LOOKALLAROUND
speed 0
damage(0)
Translation "192:192=205:205", "198:198=194:194"
args 9 //slowdown speed
var int user_oldtarget;
States
{
Spawn:
TNT1 A 0
// [Trill] The line below probably doesn't cause any issues, but it's just not a good idea.
TNT1 A 0 //A_GiveInventory("MM8BDMProjSpawnFuncClient",1)
TNT1 A 0 A_TransferPointer(AAPTR_MASTER,AAPTR_DEFAULT,AAPTR_TRACER,AAPTR_TRACER)
TNT1 A 0 A_TransferPointer(AAPTR_MASTER,AAPTR_DEFAULT,AAPTR_TARGET,AAPTR_TARGET)
TNT1 A 0 A_SetUserVar("user_oldtarget",CallACS("core_gettracer",0))
TNT1 A 0 A_Warp(AAPTR_TRACER, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
TNT1 A 1 A_GiveToTarget("JudgementRushMarked",1)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushSeekFlag",1,"SpawnLoop")
goto SpawnEnd
SpawnLoop:
JGRG A 0 A_JumpIfInventory("CutterFlag",1,"Frame1")
JGRG A 0 A_Warp(AAPTR_TRACER, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
JGRG A 0 A_PlaySoundEx("weapons/mmk/mirrorbusteractivate", "Voice") //("weapons/judgementrushgash", "Voice")
goto Frame1
Frame1:
JGRG A 0 A_JumpIfInventory("CutterFlag",3,"Frame2")
JGRG A 0 A_GiveInventory("CutterFlag",1)
goto LoopFrame
Frame2:
JGRG B 0 A_JumpIfInventory("CutterFlag",5,"Frame3")
JGRG B 0 A_GiveInventory("CutterFlag",1)
JGRG B 0 A_GiveInventory("PharaohCharge",6)
goto LoopFrame
Frame3:
JGRG C 0 A_JumpIfInventory("PharaohCharge",2,"Frame4")
goto LoopFrame
Frame4:
JGRG D 0 A_JumpIfInventory("PharaohCharge",4,"Frame5")
goto LoopFrame
Frame5:
JGRG E 0 A_JumpIfInventory("PharaohCharge",6,"Frame6")
goto LoopFrame
Frame6:
JGRG C 0 A_TakeInventory("PharaohCharge",999)
goto LoopFrame
LoopFrame:
"####" "#" 1 A_GiveInventory("JudgementRushGashMove",1) //A_Warp(AAPTR_TRACER, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
"####" "#" 0 ACS_NamedExecuteAlways("judgerush_getheight",0,0)
"####" "#" 0 A_GiveInventory("PharaohCharge",1)
"####" "#" 0 A_GiveInventory("JudgementRushGashFunc",1)
"####" "#" 0 A_JumpIfInventory("JudgementRushNoGash",1,"GoAway")
"####" "#" 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"SpawnLoop")
"####" "#" 0 A_JumpIfInTargetInventory("JudgementRushSeekFlag",1,"SpawnLoop")
goto SpawnEnd
SpawnEnd:
"####" "#" 1
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"SpawnLoop")
// [Trill] Desync fix
TNT1 A 35 A_JumpIf(true, "GoAway")
GoAway:
TNT1 A 0 A_TakeFromTarget("JudgementRushMarked",1)
TNT1 A 0 A_SpawnItemEx("JudgementRushGashFade",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS|SXF_TRANSFERTRANSLATION)
stop
}
}

actor JudgementRushGashMove : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"Pickup1") //4,Pickup1
goto PickupWarp
Pickup1:
TNT1 A 0 A_JumpIfCloser(96,"PickupNo")
goto PickupDrag
PickupWarp:
TNT1 A 0 A_Warp(AAPTR_TRACER, 0, 0, 28, 0, WARPF_INTERPOLATE|WARPF_NOCHECKPOSITION)
stop
PickupDrag:
TNT1 A 0 ACS_NamedExecuteWithResult("core_lookatptr", AAPTR_TRACER)
TNT1 A 0 A_ChangeVelocity(cos(-pitch)*args[0],0,sin(-pitch)*args[0],CVF_RELATIVE|CVF_REPLACE)
stop
PickupNo:
TNT1 A 0 A_Stop
stop
}
}

actor JudgementRushGashFunc : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIf(CallACS("core_targetexists",0)==0,"PickupGoAway")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",5,"PickupEnd")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",4,"PickupProx")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",3,"PickupGood")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",2,"PickupMark")
TNT1 A 0 A_JumpIf(CallACS("judgerush_outtasight",0)==1,"PickupGoAway")
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushReady",1,"PickupGood")
TNT1 A 0 A_JumpIf(CallACS("core_targetexists",1)==0,"PickupGoAway")
stop
PickupEnd:
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushTimer",1,"PickupNo")
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_lookatme",0,0)
stop
PickupProx:
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_lookatme",0,0)
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushTimer",5,"PickupProx2")
stop
PickupProx2:
TNT1 A 0 A_JumpIfCloser(96,"PickupStop")
stop
PickupGood:
TNT1 A 0 //ACS_NamedExecuteAlways("judgerush_dragtarget",0,0)
stop
PickupMark:
TNT1 A 0 A_GiveToTarget("JudgementRushReady",1)
TNT1 A 0 A_JumpIf(CallACS("judgerush_outtasight",0)==1,"PickupGoAway")
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_dragtarget",0,0)
PickupLook:
TNT1 A 0 ACS_NamedExecuteAlways("judgerush_lookatme",0,0)
stop
PickupStop:
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
TNT1 A 0 A_GiveToTarget("JudgementRushReady",1)
goto PickupLook
PickupNo:
TNT1 A 0
stop
PickupGoAway:
TNT1 A 0 A_GiveInventory("JudgementRushNoGash",1)
stop
}
}

actor JudgementRushGashFade : BasicGraphicEffect
{
Translation "192:192=205:205", "198:198=194:194"
States
{
SpawnFrame:
TNT1 A 0
JGRG FGFG 2
stop
}
}

actor JudgementRushMarked : Once {}
actor JudgementRushNoGash : Once {}

actor JudgementRushReady : Inventory
{
inventory.amount 1
inventory.maxamount 5
}

actor JudgementRushTimer : Inventory
{
inventory.amount 1
inventory.maxamount 175
}

actor JudgementRushProtection : PowerProtection 
{
powerup.duration 0x7FFFFFFD
damagefactor "DrowningTag", 0.0
damagefactor "SlimeTag", 0.0
damagefactor "FallingTag", 0.0
damagefactor "ExitTag", 0.0
damagefactor "Slime", 0.0
damagefactor "Fire", 0.0
damagefactor "Falling", 0.0
damagefactor "Exit", 0.0
damagefactor "Ice", 0.0
damagefactor "Massacre", 0.0
damagefactor "Spiney", 0.0
damagefactor "CRUSH", 1.0
damagefactor "TELEFRAG", 1.0
damagefactor "JudgementRush", 1.0
//damagefactor "NORMAL", 0.0
}

actor JudgementRush : BasicExplosion
{
Translation "208:211=205:205", "48:50=205:205", "4:4=205:205", "212:212=194:194"
damagetype "JudgementRush"
Obituary "$OB_JUDGEMENTRUSH"
States
{
Spawn:
TNT1 A 0
SCLA HI 1 //A_Explode(CallACS("burst_cbm_damage",25),64,0,0,80)
SCLA J 0 //A_Explode(CallACS("burst_cbm_damage",25),64,0,0,80)
SCLA J 1 A_ScaleVelocity(0.5)
SCLA J 1 A_FadeOut(0.5)
stop
Death:
TNT1 A 0
stop
}
}
actor JudgementRush1 : JudgementRush
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(CallACS("burst_cbm_damage",25),64,0,0,80)
stop
Death:
TNT1 A 0
stop
}
}

actor JudgementRush2 : JudgementRush
{
States
{
Spawn:
TNT1 A 0
SCLA HI 1 A_Explode(CallACS("burst_cbm_damage",45),64,0,0,80)
SCLA J 0 A_Explode(CallACS("burst_cbm_damage",45),64,0,0,80)
SCLA J 1 A_ScaleVelocity(0.5)
SCLA J 0 A_Explode(CallACS("burst_cbm_damage",45),64,0,0,80)
SCLA J 1 A_FadeOut(0.5)
stop
Death:
TNT1 A 0
stop
}
}

actor JudgementRushFX : BasicGraphicEffect
{
Translation "212:212=205:205", "105:105=194:194"
States
{
SpawnFrame:
TNT1 A 0
SCLA KL 2
stop
}
}

actor JudgementRushCooldownFlag : Once {}
actor JudgementRushCooldowner : BasicCooldowner
{
reactiontime 35
States
{
Spawn:
TNT1 A 0
Spawn2:
TNT1 A 1 A_GiveInventory("JudgementRushCooldownerFunc",1)
loop
Death:
TNT1 A 0 A_TakeFromTarget("JudgementRushCooldownFlag",1)
stop
}
}
actor JudgementRushCooldownerFunc : BasicCooldownerFunc
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("JudgementRushCooldownFlag",1,"PickupBasic")
goto PickupRemove
}
}

actor JudgementRushIFrames : PowerProtection
{
    powerup.duration 10
    damagefactor "JudgementRush", 0.0
}