actor Jupiter_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_VE"
dropitem "ElectricShockWep"
Weapon.AmmoUse 1
Weapon.AmmoGive 364
Obituary "$OB_JUPITERBEAM"
Inventory.Pickupmessage "Picked up a quake 3 lightning gun."
weapon.ammotype "Lit3Ammo"
+WEAPON.NOAUTOAIM
+WEAPON.ALT_USES_BOTH
States
{
Spawn:
C_0V E 1
loop

Deselect:
JUPH A 0
goto DeselectSwap
Select:
JUPH A 0
goto SelectSwap

Ready:
JUPH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_JUPITER)
JUPH A 0 A_GunFlash("Flash",1)
goto Ready1

Ready1:
JUPH A 0 A_JumpIfInventory("JupiterLaunching",1,4)
JUPH A 0 A_JumpIfInventory("JupiterHovering",1,"Ready2")
JUPH A 0 A_JumpIfInventory("JupiterLaunchCD",1,"Ready3")
JUPH A 0 A_JumpIfInventory("Lit3Ammo",130,"Ready4")
JUPH A 1 A_WeaponReady(8)
JUPH A 0//W
loop
Ready2:
JUPH A 0 A_JumpIfInventory("JupiterHovering",1,2)
JUPH A 0 A_JumpIfInventory("JupiterLaunchCD",1,"Ready3")
JUPH A 1 A_WeaponReady
JUPH A 0//X
loop
Ready3:
JUPH A 0 A_JumpIfInventory("JupiterLaunchCD",1,2)
JUPH A 0 A_JumpIfInventory("Lit3Ammo",130,"Ready4")
JUPH A 1 A_WeaponReady(8)
JUPH A 0//Y
loop
Ready4:
JUPH A 1 A_WeaponReady//Z
wait

Fire:
JUPH A 0 A_JumpIfInventory("JupiterHovering",1,"LaserWindup")
JUPH B 0 A_JumpIf(1,1)
JUPH B 3
JUPH B 1 A_GiveInventory("JupiterCharge",1+CallACS("core_checkrune",RUNE_RAGE))
JUPH B 0 A_Refire("FireH")
goto Fire1
FireH:
JUPH B 0 A_JumpIfInventory("JupiterCharge",24,"FireH2")
JUPH B 1 A_GiveInventory("JupiterCharge",1+CallACS("core_checkrune",RUNE_RAGE))
JUPH B 0 A_Refire("FireH")
goto Fire1
FireH2:
JUPH C 1 A_GiveInventory("JupiterCharge",1+CallACS("core_checkrune",RUNE_RAGE))//A_RailWait
JUPH C 0 A_Refire("FireH2")
goto Fire1
Fire1:
JUPH C 2 A_GiveInventory("Jupiter_Fire_P")
JUPH B 2 A_ClearReFire
JUPH A 3
Goto Ready1

LaserWindup:
JUPH B 0 A_JumpIf(1,1)
JUPH B 3 Offset(-14,39)
JUPH D 0 A_JumpIf(1,1)
JUPH D 4 A_WeaponReady(14)
JUPH D 0 A_Refire("LaserHold")
goto EndLaser
LaserHold:
JUPH D 0 A_JumpIfInventory("JupiterNeedsToLand",1,"EndLaser")
JUPH D 0 A_SpawnItemEX("JupiterFXWarper1",0,0,42,0,0,0,0,1)
JUPH D 1 A_GiveInventory("Jupiter_FireLaser_P1")
JUPH D 0 A_Refire(1)
goto EndLaser
JUPH D 0 A_JumpIfInventory("JupiterNeedsToLand",1,"EndLaser")
JUPH D 0 A_SpawnItemEX("JupiterFXWarper2",0,0,42,0,0,0,0,1)
JUPH D 1 A_GiveInventory("Jupiter_FireLaser_P2")
JUPH D 0 A_Refire(1)
goto EndLaser
JUPH D 0 A_JumpIfInventory("JupiterNeedsToLand",1,"EndLaser")
JUPH D 0 A_SpawnItemEX("JupiterFXWarper3",0,0,42,0,0,0,0,1)
JUPH D 1 A_GiveInventory("Jupiter_FireLaser_P3")
JUPH D 0 A_Refire("LaserHold")
goto EndLaser
EndLaser://EFG
JUPH B 2 Offset(-14,39)
JUPH A 1 A_WeaponReady(14)
Goto Ready1

AltFire:
JUPH A 0 A_JumpIfInventory("JupiterHovering",1,"HoverEnd")
JUPH A 0 A_JumpIfInventory("Lit3Ammo",110,"AltFire2")
Goto Ready1
AltFire2:
JUPH A 0 A_JumpIf(1,1)
JUPH A 1 Offset(16,50)A_GiveInventory("Jupiter_Alt_P")
JUPH A 0 A_Refire("Launching")
goto LaunchEnd
Launching:
JUPH A 0 A_JumpIfInventory("JupiterNeedsToLand",1,"LaunchEnd")
JUPH A 0 A_JumpIfInventory("JupiterLaunching",31,"LaunchEnd")
//JUPH A 0 A_SpawnItemEx("JupiterBoosterFX_H15",0,0,0,0,0,0,0,1)
//JUPH A 0 A_SpawnItemEx("JupiterBoosterFX_H45",0,0,0,0,0,0,0,1)
JUPH A 1 Offset(16,50)A_GiveInventory("Jupiter_LiftoffHold_P")
JUPH A 0 A_Refire("Launching")
goto LaunchEnd
LaunchEnd:
JUPH A 0 A_GunFlash("Flash.HoverLift",1)
JUPH A 2 Offset(8,41)A_SetArg(4,0)
Goto Ready1
HoverEnd:
JUPH A 0
JUPH A 0 A_GiveInventory("JupiterNeedsToLand",1)
JUPH AA 2
Goto Ready1

Flash:
TNT1 A 0 //A_JumpIfInventory("JupiterHovering",1,"Flash.HoverLift")
TNT1 A 1 A_GiveInventory("JupiterAmmo_RC",1)
loop
Flash.HoverLift:
TNT1 A 0 A_JumpIf(momz<=0,"Flash.HoverStart")
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX_H15",0,0,0,0,0,0,0,1)
TNT1 A 1 A_GiveInventory("JupiterAmmoTake_P1")
loop
Flash.HoverStart:
TNT1 A 0 A_GiveInventory("Jupiter_FlashHoverStart_P")
goto Flash.Hover
Flash.Hover:
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX_H15",0,0,0,0,0,0,0,1)
TNT1 A 1 A_GiveInventory("Jupiter_FlashHover_P")
TNT1 A 0 A_JumpIfInventory("JupiterNeedsToLand",1,"Flash.LandStart")
TNT1 A 0 A_JumpIf(z-floorz<=8,"Flash.LandEnd")
TNT1 A 0 A_JumpIfNoAmmo("Flash.LandStart")//
loop
//TNT1 A 0 A_JumpIfInventory("Lit3Ammo",1,"Flash.Hover")
//goto Flash.LandStart



Flash.LandStart:
TNT1 A 0 A_GiveInventory("JupiterFlashReset_P")
goto Flash.Land
Flash.Land:
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandZ")
TNT1 A 1 A_GiveInventory("JupiterFlashReset_P")
loop
Flash.LandZ:
TNT1 A 1
TNT1 A 0 A_JumpIf(z-floorz==0,"Flash.LandEnd")
TNT1 A 0 A_JumpIf(momz==0,"Flash.LandEnd")
goto Flash.Land+2
Flash.LandEnd:
TNT1 A 0 A_GiveInventory("JupiterFlashReset_P")
goto Flash
}
}


actor Lit3Ammo : Ammo 
{
inventory.amount 1
inventory.maxamount 364
+INVENTORY.IGNORESKILL
}

actor JupiterHovering : OnceC {}
actor JupiterNeedsToLand : OnceC {}
actor JupiterLaunching : Inventory 
{
inventory.amount 1
inventory.maxamount 31
}
actor JupiterCharge : Inventory
{
inventory.amount 1
inventory.maxamount 24
}

actor PowerJupiterSpeed : PowerSpeed
{
powerup.duration 4
Speed 1.8
+POWERSPEED.NOTRAIL
}

actor JupiterLaunchCD : Powerup
{
powerup.duration -1
}

actor JupiterHoverSnd : Powerup
{
powerup.duration 5
}

actor JupiterLaserSndDelay : Powerup
{
powerup.duration 3
}


actor Jupiter_Fire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("JupiterCharge",24,"Pickup2")
goto Pickup1
Pickup1:
TNT1 A 0 A_PlaySound("weapon/jupitershot1","Weapon",0.625)
TNT1 A 0 A_FireCustomMissile("JupiterSparkSlow",0,0,8)
goto End
Pickup2:
TNT1 A 0 A_PlaySoundEx("weapon/jupitershot2","Weapon")
TNT1 A 0 A_FireCustomMissile("JupiterSpark",3,0,8)
TNT1 A 0 A_FireCustomMissile("JupiterSpark",-3,0,8)
TNT1 A 0 A_FireCustomMissile("JupiterSparkSlow",-11,0,8)
TNT1 A 0 A_FireCustomMissile("JupiterSparkSlow",11,0,8)
goto End
End:
TNT1 A 0 A_TakeInventory("JupiterCharge")
stop
}
}


actor Jupiter_FireLaser_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("Jupiter_W",1,"Firin")
stop
Firin:
TNT1 A 0 A_FireCustomMissile("JupiterElecBeam1",0,0,0)
TNT1 A 0 A_FireCustomMissile("JupiterFakeBeam1",0,0,0)
goto End
End:
TNT1 A 0 A_FireCustomMissile("JupiterBigLaserDamager",0,0,0,0)
TNT1 A 0 A_JumpIfInventory("JupiterLaserSndDelay",1,3)
TNT1 A 0 A_PlaySound("weapon/jupiterlaser",1,0.5)
TNT1 A 0 A_GiveInventory("JupiterLaserSndDelay",1)
TNT1 A 0
stop
}
}
actor Jupiter_FireLaser_P2 : Jupiter_FireLaser_P1
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("Jupiter_W",1,"Firin")
stop
Firin:
TNT1 A 0 A_FireCustomMissile("JupiterElecBeam2",0,0,0)
TNT1 A 0 A_FireCustomMissile("JupiterFakeBeam2",0,0,0)
goto End
}
}
actor Jupiter_FireLaser_P3 : Jupiter_FireLaser_P1
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("Jupiter_W",1,"Firin")
stop
Firin:
TNT1 A 0 A_FireCustomMissile("JupiterElecBeam3",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("JupiterFakeBeam3",0,0,0)
goto End
}
}

actor JupiterAmmo_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("JupiterLaunching",1,"No")
TNT1 A 0 A_JumpIfInventory("JupiterHovering",1,"No")
TNT1 A 0 A_GiveInventory("Lit3Ammo",2+CallACS("core_checkrune",RUNE_RAGE)*2)
stop
No:
TNT1 A 0
stop
}
}

actor Jupiter_LiftoffHold_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX_H15",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX_H45",0,0,0,0,0,0,0,1)
TNT1 A 0 A_ChangeVelocity(1.8,0,0,CVF_RELATIVE)
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),3)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 ThrustThingZ(0,80-args[4],0,0)// +(-sin(pitch)*30) for boost aiming,probably doesn't need it
TNT1 A 0 A_SetArg(4,args[4]+2)
TNT1 A 0 A_GiveInventory("JupiterLaunching",1)
TNT1 A 0 A_TakeInventory("Lit3Ammo",1)
TNT1 A 0 A_TakeInventory("Lit3Ammo",2,1)
stop
}
}

actor Jupiter_FlashHover_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("PowerJupiterSpeed",1)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,"Sound")
TNT1 A 0 A_JumpIf(momz<0,"Hover")
goto Sound
Hover:
TNT1 A 0 ThrustThingZ(0,3,1,0)
goto Sound
Sound:
TNT1 A 0 A_JumpIfInventory("JupiterHoverSnd",1,"AmmoTake")
TNT1 A 0 A_PlaySoundEx("weapon/jupiterhover","Body")
TNT1 A 0 A_GiveInventory("JupiterHoverSnd",1)
goto AmmoTake
AmmoTake:
TNT1 A 0 A_TakeInventory("Lit3Ammo",1)
stop
}
}

actor JupiterAmmoTake_P1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("Lit3Ammo",1)
stop
}
}


actor Jupiter_Alt_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("NoJumpCancel",1)
TNT1 A 0 A_GiveInventory("JupiterHovering",1)
TNT1 A 0 A_GiveInventory("JupiterLaunching",1)
TNT1 A 0 A_TakeInventory("JupiterNeedsToLand")
TNT1 A 0 A_PlaySoundEx("weapon/jupiterBoost","SoundSlot7")
TNT1 A 0 A_TakeInventory("Lit3Ammo",50,1)
TNT1 A 0 A_FireCustomMissile("JupiterShockWave",0,0)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 ThrustThingZ(0,80,0,0)
TNT1 A 0
stop
}
}


actor Jupiter_FlashHoverStart_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("Lit3Ammo",1)
TNT1 A 0 A_TakeInventory("Lit3Ammo",1)
TNT1 A 0 A_TakeInventory("NoJumpCancel")
TNT1 A 0 A_TakeInventory("JupiterLaunching")
stop
}
}

actor JupiterFlashReset_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("JupiterNeedsToLand",1)
TNT1 A 0 A_GiveInventory("JupiterLaunchCD",1)
TNT1 A 0 A_TakeInventory("NoJumpCancel")
TNT1 A 0 A_TakeInventory("JupiterLaunching")
TNT1 A 0 A_TakeInventory("JupiterHovering")
TNT1 A 0 A_TakeInventory("PowerJupiterSpeed")
stop
}
}

actor Jupiter_BeamProtect : PowerProtection
{
Powerup.Duration 4
damagefactor "Jupiter_Beam", 0.0
}



actor JupiterElecBeam1 : ProjSpawnFuncActor
{
PROJECTILE
+THRUACTORS
+DONTBLAST
+DONTREFLECT
+PAINLESS
RenderStyle None
damage (0)
Radius 8
Height 8
speed 30
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterBeamFX1",0,0,0,momx,momy,momz,0,1+8+32)//8192 SXF_MULTIPLYSPEED
stop
Death:
TNT1 A 1 A_SpawnItemEx("JupiterBeamPuff",0,0,0,0,0,0,0,1+32)
stop
}
}
actor JupiterElecBeam2 : JupiterElecBeam1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterBeamFX2",0,0,0,momx,momy,momz,0,1+8+32)
stop
}
}
actor JupiterElecBeam3 : JupiterElecBeam1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterBeamFX3",0,0,0,momx,momy,momz,0,1+8+32)
stop
}
}


actor JupiterFakeBeam1
{
PROJECTILE
+CLIENTSIDEONLY
+THRUACTORS
+DONTBLAST
+DONTREFLECT
+PAINLESS
RenderStyle None
damage (0)
Radius 8
Height 8
speed 30
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterFakeBeamFX1",0,0,0,momx,momy,momz,0,1+8+32)
stop
Death:
TNT1 A 1 A_SpawnItemEx("JupiterBeamPuff",0,0,0,0,0,0,0,1+32)
stop
}
}
actor JupiterFakeBeam2 : JupiterFakeBeam1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterFakeBeamFX2",0,0,0,momx,momy,momz,0,1+8+32)
stop
}
}
actor JupiterFakeBeam3 : JupiterFakeBeam1
{
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 0 A_SpawnItemEx("JupiterFakeBeamFX3",0,0,0,momx,momy,momz,0,1+8+32)
stop
}
}


actor JupiterBeamFX1
{
PROJECTILE
+CLIENTSIDEONLY
+THRUACTORS
+DONTBLAST
+DONTREFLECT
+FORCEXYBILLBOARD
+BRIGHT
+PAINLESS
damage (0)
Radius 8
Height 8
speed 30
scale 1.5
Args 14
states
{
Spawn:
JUPH S 0
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")//If owner, don't spawn
JUPH S 0 //A_GiveInventory("MM8BDMProjSpawnFuncClient")
JUPH S 0 A_CountDownArg(0)
JUPH S 0 A_SpawnItemEx("JupiterBeamFX1",0,0,0,momx,momy,momz,0,1+8+32+SXF_TRANSFERSPECIAL)//32768
JUPH S 1 A_Stop
stop
DeathFake:
TNT1 A 0
stop
Death:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")
Death1:
JUPH S 0 A_JumpIf(Args[0]<0,2)
JUPH S 1 A_SpawnItemEx("JupiterBeamPuffNoise",0,0,0,0,0,0,0,1+32)
stop
TNT1 A 0 A_SetScale(2.5)
JUPH R 1
stop
}
}

actor JupiterBeamFX2 : JupiterBeamFX1
{
states
{
Spawn:
JUPH T 0
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")
JUPH T 0 A_CountDownArg(0)
JUPH T 0 A_SpawnItemEx("JupiterBeamFX2",0,0,0,momx,momy,momz,0,1+8+32+32768)
JUPH T 1 A_Stop
stop
Death:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")
Death1:
JUPH T 0 A_JumpIf(Args[0]<0,2)
JUPH T 1 A_SpawnItemEx("JupiterBeamPuff",0,0,0,0,0,0,0,1+32)
stop
Death2:
TNT1 A 0
TNT1 A 0 A_SetScale(2.5)
JUPH Q 1
stop
}
}

actor JupiterBeamFX3 : JupiterBeamFX1
{
states
{
Spawn:
JUPH U 0
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")
JUPH U 0 A_CountDownArg(0)
JUPH U 0 A_SpawnItemEx("JupiterBeamFX3",0,0,0,momx,momy,momz,0,1+8+32+32768)
JUPH U 1 A_Stop
stop
Death:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsPointerClient",2)==1,"DeathFake")
Death1:
JUPH U 0 A_JumpIf(Args[0]<0,2)
JUPH U 1 A_SpawnItemEx("JupiterBeamPuff",0,0,0,0,0,0,0,1+32)
stop
Death2:
TNT1 A 0 A_SetScale(2.5)
TNT1 A 0 A_Jump(256,1,2)
JUPH Q 1
stop
JUPH R 1
stop
}
}

actor JupiterFakeBeamFX1 : JupiterBeamFX1
{
states
{
Spawn:
JUPH S 0
JUPH S 0 A_CountDownArg(0)
JUPH S 0 A_SpawnItemEx("JupiterFakeBeamFX1",0,0,0,momx,momy,momz,0,1+8+32+32768)
JUPH S 1 A_Stop
stop
Death:
JUPH S 0 A_JumpIf(Args[0]<0,2)
JUPH S 1 A_SpawnItemEx("JupiterBeamPuff",0,0,0,0,0,0,0,1+32)
stop
TNT1 A 0 A_SetScale(2.5)
JUPH R 1
stop
}
}

actor JupiterFakeBeamFX2 : JupiterBeamFX2
{
states
{
Spawn:
JUPH T 0
JUPH T 0 A_CountDownArg(0)
JUPH T 0 A_SpawnItemEx("JupiterBeamFX2",0,0,0,momx,momy,momz,0,1+8+32+32768)
JUPH T 1 A_Stop
stop
Death:
goto Death1
}
}

actor JupiterFakeBeamFX3 : JupiterBeamFX3
{
states
{
Spawn:
JUPH U 0
JUPH U 0 A_CountDownArg(0)
JUPH U 0 A_SpawnItemEx("JupiterBeamFX3",0,0,0,momx,momy,momz,0,1+8+32+32768)
JUPH U 1 A_Stop
stop
Death:
goto Death1
}
}


actor JupiterBeamPuff : BasicGraphicEffect
{
states
{
SpawnFrame:
TNT1 A 0
TNT1 AAAA 0 A_SpawnItemEx("JupiterBeamSparkFX",0,0,0,15,0,random(-15,15),random(0,359),1)
stop
}
}
actor JupiterBeamPuffNoise : JupiterBeamPuff
{
states
{
SpawnFrame:
TNT1 A 0
TNT1 AAAA 0 A_SpawnItemEx("JupiterBeamSparkFX",0,0,0,15,0,random(-15,15),random(0,359),1)
TNT1 A 10 A_PlaySound("weapon/jupiterlaser",1,0.5)
stop
}
}

actor JupiterBeamSparkFX : BasicGraphicEffectM
{
-NOGRAVITY
+DOOMBOUNCE
+THRUACTORS
+FORCEXYBILLBOARD
+BRIGHT
states
{
SpawnFrame:
JUPH O 0
JUPH OOOOO 1 bright A_SetScale(scalex - 0.5,scaley - 0.5)
stop
}
}


actor JupiterBigLaserDamager
{
PROJECTILE
Obituary "$OB_JUPITERBEAM"
DamageType "Jupiter_Beam"
+THRUACTORS
+THRUGHOST
+DONTBLAST
+DONTREFLECT
+SERVERSIDEONLY
renderstyle none
damage (0)
Radius 8
Height 8
speed 30
Args 16
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_CountDownArg(0)
TNT1 A 0 A_SpawnItemEx("JupiterBigLaserDamager",0,0,0,momx,momy,momz,0,8+32+32768)
TNT1 A 0 A_Stop
TNT1 A 1 A_Explode(20*(CallACS("core_checkrune",RUNE_RAGE,2)+1)*(CallACS("core_checkrune",RUNE_SPREAD,2)*2+1),28,0,0,28)
stop
Death:
TNT1 A 1 A_SpawnItemEX("ElectrifyEffect")
stop
}
}



actor JupiterFXWarper : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
states
{
SpawnFrame:
TNT1 A 0
JUPH VVWWVVWW 1 A_Warp(AAPTR_TARGET,0,0,42,0,72)
stop
}
}
actor JupiterFXWarper1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
states
{
SpawnFrame:
JUPH V 0
JUPH V 1
stop
}
}
actor JupiterFXWarper2 : JupiterFXWarper1
{
states
{
SpawnFrame:
JUPH W 0
JUPH W 1
stop
}
}
actor JupiterFXWarper3 : JupiterFXWarper1
{
states
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
JUPH V 1
stop
JUPH W 1
stop
}
}

actor JupiterBoosterFX_H15 : BasicGraphicEffect//BasicHelper
{
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX2",-18,-4,36,0,0,-15,0,1)
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX2",-18,4,36,0,0,-15,0,1)
TNT1 A 1
stop
}
}
actor JupiterBoosterFX_H45 : BasicGraphicEffect
{
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX",-18,-4,36,0,0,-45,0,1)
TNT1 A 0 A_SpawnItemEx("JupiterBoosterFX",-18,4,36,0,0,-45,0,1)
TNT1 A 1
stop
}
}

actor JupiterBoosterFX : BasicGraphicEffectM
{
-NOGRAVITY
+THRUACTORS
+BRIGHT
States
{
SpawnFrame:
TNT1 A 0
Show:
NMFX ABCD 1
stop
}
}
actor JupiterBoosterFX2 : JupiterBoosterFX
{
States
{
SpawnFrame:
TNT1 A 0
TNT1 AA 1 A_JumpIf(CallACS("cbm_IsPointerClient",2)!=1, "Show")
TNT1 A 1 
stop
}
}

actor PainJupiter_PushHit : Basic_PainFling_H{Args 20,0,2}
actor DeathJupiter_PushHit : Basic_DeathFling_H{Args 31,24,0}

actor JupiterShockWave : BasicExplosion
{
damagetype "Jupiter_Push"
obituary "$OB_JUPITERJET"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(90,256,0,0,32)
TNT1 A 0 A_SpawnItemEx("JupiterShockWaveFX_H",0,0,-20,0,0,0,random(0,15),1)
TNT1 A 3
stop
}
}

actor JupiterShockWaveFX_H : BasicClientSide
{
Args 23
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("JupiterShockWaveFX",0,0,0,10,0,0,15*Args[0],1)
TNT1 A 0 A_CountdownArg(0)
loop
Death:
TNT1 A 0
stop
}
}

actor JupiterShockWaveFX
{
PROJECTILE
+DONTBLAST
+THRUACTORS
+CLIENTSIDEONLY
Damage (0)
Radius 2
Height 2
Speed 30
Scale 2.0
States
{
Spawn:
JUPH X 0
JUPH X 1 A_FadeOut(0.06)
wait
}
}

actor JupiterSpark : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Jupiter_Shot"
Obituary "$OB_JUPITERSHOCK"
+FORCEXYBILLBOARD
+BRIGHT
damage (70)
radius 14
height 14
speed 40
scale 2.5
states
{
Spawn:
JUPH O 0
JUPH OPOP 4
stop
Death:
TNT1 A 0 A_SpawnItemEX("ElectrifyEffect")
stop
}
}
actor JupiterSparkSlow : JupiterSpark{speed 32}


actor Jupiter_W_NormalBar : NormalBar {Args 229,130}
actor Jupiter_W_ScriptBar : ScriptBar {}