actor HyperStormHWep : BaseMM8BDMWep
{
dropitem "HyperStormHWepCDropped"
Weapon.AmmoUse 2
Weapon.AmmoGive 56
Weapon.SlotNumber 4
inventory.pickupmessage "$PU_HYPERSTORMBLASTER"
Obituary "$OB_HYPERSTORMBLASTER"
Tag "$TAG_HYPERSTORMBLASTER"
weapon.ammotype "HyperStormHCopyAmmo"
inventory.icon "XTR0WI_U"
+WEAPON.NOAUTOAIM
States
{
Spawn:
XWI0 U 1
loop
Ready:
XH0U A 0 ACS_ExecuteAlways(998,0,DYE_HYPERSTORMBLASTER)
XH0U A 1 A_WeaponReady
Goto Ready+1
Deselect:
XH0U AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
XH0U A 1 A_Lower
Loop
Select:
XH0U AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
XH0U A 1 A_Raise
Loop

Fire:
XH0U A 0 A_JumpIfNoAmmo("NoAmmo")
XH0U A 0 A_GunFlash
goto Hold
Hold:
XH0U A 0 A_JumpIfNoAmmo("NoAmmo")
XH0U A 0 A_JumpIfInventory("WeaponCharge",25,"Charge2")
XH0U A 0 A_JumpIfInventory("WeaponCharge",15,"Charge")
XH0U AAA 0 A_FireCustomMissile("HSHSucker2",random(-17,17),0,random(-10,10),random(-10,10),0,random(-10,10))
XH0U A 0 A_FireCustomMissile("HyperStormBlaster_Puller_H3",0,0)
XH0U A 1 A_GiveInventory("WeaponCharge_RC",1)
XH0U A 0 A_Refire("Hold")
Goto Fire1
Charge:
XH0U B 0 A_JumpIfInventory("WeaponCharge",25,"Charge2")
XH0U BB 0 A_FireCustomMissile("HSHSucker2",random(-17,17),0,random(-10,10),random(-10,10),0,random(-10,10))
XH0U B 0 A_FireCustomMissile("HyperStormBlaster_Puller_H2",0,0)
XH0U B 1 A_GiveInventory("WeaponCharge_RC",1)
XH0U B 0 A_Refire("Charge.a")
Goto Fire2
Charge.a:
XH0U B 1
XH0U B 0 A_Refire("Charge")
Goto Fire2
Charge2:
XH0U C 0 A_FireCustomMissile("HSHSucker2",random(-17,17),0,random(-10,10),random(-10,10),0,random(-10,10))
XH0U C 0 A_FireCustomMissile("HyperStormBlaster_Puller_H1",0,0)
XH0U C 1
XH0U C 0 A_Refire("Charge2.a")
Goto Fire3
Charge2.a:
XH0U C 1 A_JumpIfInventory("IsBot",1,"BotCharge")
XH0U C 0 A_Refire("Charge2")
Goto Fire3
BotCharge:
XH0U C 0 A_Jump(32,"Fire3")
XH0U C 0 A_Refire("Charge2")
Goto Fire3

Flash:
TNT1 A 24 A_PlaySound("weapon/HSHSuckBlow",1,1.0)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",1,"Flash")
stop

Altfire:
Fire1:
XH0U C 0 A_TakeInventory("WeaponCharge",999)
XH0U C 0 A_ChangeVelocity(-Cos(pitch)*5, 0, sin(pitch)*4,1)
XH0U C 0 A_PlaySoundEx("weapon/GrenadeShot","Weapon")
XH0U C 0 A_FireCustomMissile("HSHBulletX",0,1,8,0)
XH0U CC 0 A_FireCustomMissile("HSHBulletX",random(-3,3),0,8,0,0,random(-3,3))
XH0U ABCB 2
XH0U A 10
Goto Ready+1
Fire2:
XH0U B 0 A_TakeInventory("WeaponCharge",999)
XH0U B 0 A_PlaySoundEx("weapon/GrenadeShot","Weapon")
XH0U B 0 A_JumpIfInventory("HyperStormHCopyAmmo",4, "Fire2r")
Goto Fire1
Fire2r:
XH0U C 0 A_ChangeVelocity(-Cos(pitch)*9, 0, sin(pitch)*7,1)
XH0U C 0 A_TakeInventory("HyperStormHCopyAmmo",4,1)
XH0U C 0 A_FireCustomMissile("HSHBulletX",0,0,8,0)
XH0U CCCCC 0 A_FireCustomMissile("HSHBulletX",random(-5,5),0,8,0,0,random(-4,4))
XH0U BA 4
XH0U A 14
Goto Ready+1
Fire3:
XH0U C 0 A_TakeInventory("WeaponCharge",999)
XH0U C 0 A_PlaySoundEx("weapon/GrenadeShot","Weapon")
XH0U C 0 A_JumpIfInventory("HyperStormHCopyAmmo",8,"Fire3r")
XH0U C 0 A_JumpIfInventory("HyperStormHCopyAmmo",4,"Fire2r")
Goto Fire1
Fire3r:
XH0U C 0 A_ChangeVelocity(-Cos(pitch)*14, 0, sin(pitch)*11,1)
XH0U C 0 A_TakeInventory("HyperStormHCopyAmmo",8,1)
XH0U C 0 A_FireCustomMissile("HSHBulletX",0,0,8,0)
XH0U CCCCCCCCCCCC 0 A_FireCustomMissile("HSHBulletX",random(-7,7),0,8,0,0,random(-5,5))
XH0U BA 6
XH0U A 16
Goto Ready+1
NoAmmo:
XH0U A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor HyperStormHCopyAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 56
+INVENTORY.IGNORESKILL
}

actor HSHBulletX
{
PROJECTILE
DamageType "HyperStormBlaster"
Obituary "$OB_HYPERSTORMBLASTER"
+FORCEXYBILLBOARD
+BRIGHT
Damage (5)
Radius 8
Height 8
speed 45
scale 2.0
States
{
Spawn:
BASB A -1
loop
}
}

actor HyperStormBlaster_Puller_H1 : BasicHelper
{
+NOBLOCKMAP
Accuracy -1
States
{
Spawn:
TNT1 A 0
TNT1 A 3 ACS_ExecuteWithResult(C_JAX_SUCKRECODE,625,11,Accuracy,-1)
stop
}
}
actor HyperStormBlaster_Puller_H2 : HyperStormH_Puller_H1
{
Accuracy -2
}
actor HyperStormBlaster_Puller_H3 : HyperStormH_Puller_H1
{
Accuracy -3
}

