actor DuoFist : BaseMM8BDMWep
{
Weapon.AmmoUse 1
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Inventory.Pickupmessage "$PU_DUOFIST"
Obituary "$OB_DUOFIST"
Tag "$TAG_DUOFIST"
weapon.ammotype "BusterAmmo"
inventory.icon "NULLICON"
Dropitem ""
States
{
SpawnLoop:
DUOF A 1
stop
Ready:
DUOF B 0 A_JumpIfInventory("BusterGiven",1,"TakeBusters")
Goto Ready2
TakeBusters:
TNT1 Q 0 A_GiveInventory("TakeBuster", 1)
Goto Ready2
Ready2:
DUOF C 0 ACS_ExecuteAlways(998,0,101)
DUOF C 0 ACS_ExecuteAlways(991,0,101)
DUOF C 0 A_TakeInventory("WeaponCharge",999)
DUOF C 1 A_WeaponReady
Goto Ready2+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
DUOF C 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
DUOF C 1 A_Raise
Loop
Fire:
Altfire:
DUOF C 0 A_JumpIfNoAmmo("Hold")
DUOF C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
DUOF C 0 A_FireCustomMissile("DuoPunch",0,0,8,0)
DUOF C 0 A_TakeInventory("WeaponCharge",999)
DUOF G 1 A_TakeInventory("FistFlag",1)
Goto FistWait
FistWait:
DUOF G 1 
DUOF G 0 A_GiveInventory("AdapterWaitCount",1)
DUOF G 0 A_JumpIfInventory("AdapterWaitCount",20,"FistFinish")
DUOF G 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
loop
FistFinish:
DUOF G 0 A_PlayWeaponSound("weapon/adapterreturn")
DUOF G 0 A_TakeInventory("FistFlag",1)
DUOF G 0 A_JumpIfInventory("AdapterWaitCount", 8, 2) //Adds a slight delay if fired at very close range
DUOF D 4 
DUOF G 0 A_TakeInventory("AdapterWaitCount",999)
DUOF DC 4
DUOF B 0 A_Refire
Goto Ready2+2
Fire2:
DUOF B 0 A_TakeInventory("WeaponCharge",999)
DUOF CD 1
DUOF B 0 A_PlaySoundEx("weapon/minchrgshot","Weapon")
DUOF B 0 A_FireCustomMissile("MidFist",0,0,8,0)
DUOF B 0 ACS_ExecuteAlways(991,0,101)
DUOF G 20
DUOF DC 4
DUOF B 0 A_Refire
goto Ready2+2
Fire3:
DUOF B 0 A_TakeInventory("WeaponCharge",999)
DUOF B 0
DUOF B 0 ACS_ExecuteAlways(991,0,101)
DUOF B 0 A_PlaySoundEx("weapon/cfire","Weapon")
DUOF B 0 A_FireCustomMissile("GigaFist",0,0,8,0)
DUOF B 0 ACS_ExecuteAlways(991,0,101)
DUOF EF 1 
DUOF G 22
DUOF DC 4
DUOF B 0 A_Refire
goto Ready2+2
Hold:
DUOF B 0 A_JumpIfInventory("WeaponCharge",18,"Charge")
DUOF B 1 A_GiveInventory("WeaponCharge",1)
DUOF B 0 A_Refire
Goto Ready2+2
Charge:
DUOF B 0 A_JumpIfInventory("WeaponCharge",19,"Charge1")
DUOF B 0 A_PlaySoundEx("weapon/coilstart","Weapon")
Goto Charge1
Charge1:
DUOF B 0 A_JumpIfInventory("WeaponCharge",35,"Charge2Start")
DUOF H 1 ACS_ExecuteAlways(991,0,102)
DUOF H 0 A_Refire("Charge1.a")
Goto Fire2
Charge1.a:
DUOF B 1 ACS_ExecuteAlways(991,0,101)
DUOF B 0 A_GiveInventory("WeaponCharge",1)
DUOF H 0 A_Refire("Charge1")
Goto Fire2
Charge2Start:
DUOF K 0 A_GunFlash("Sound.BusterCharge", GFF_NOEXTCHANGE)
Goto Charge2
Charge2:
DUOF K 1 ACS_ExecuteAlways(991,0,103)
DUOF H 0 A_Refire("Charge2.a")
Goto Fire3
Charge2.a:
DUOF I 1 ACS_ExecuteAlways(991,0,104)
DUOF H 0 A_Refire("Charge2.b")
Goto Fire3
Charge2.b:
DUOF J 1 ACS_ExecuteAlways(991,0,101)
DUOF J 0 A_JumpIfInventory("WeaponCharge", 35, 3)
DUOF J 0 A_GiveInventory("WeaponCharge",1)
DUOF J 0 A_GunFlash
DUOF J 0 A_JumpIfInventory("IsBot", 1, "BotFire")
DUOF H 0 A_Refire("Charge2")
Goto Fire3
BotFire:
DUOF H 0 A_Jump(16, "Fire3")
DUOF H 0 A_Refire
Goto Fire3
}
}

actor DuoPunch
{
PROJECTILE
+SKYEXPLODE
PROJECTILE
Damage (25)
Speed 32
Radius 10
Height 10
scale 2.5
damagetype "DuoFist1"
Obituary "$OB_DUOFIST"
States
{
Spawn:
GIGF A 0
GIGF A 0 A_GiveInventory("CutterFlag", 10)
Spawn2: 
GIGF A 0
GIGF A 1 A_SpawnItemEx("DuoPunchWire")
GIGF A 0 A_TakeInventory("CutterFlag", 1)
GIGF A 0 A_JumpIfInventory("Cutterflag", 2, "Spawn2")
GIGF A 0
Goto Spawn3
Spawn3:
GIGF AA 1
GIGF A 0 A_TakeInventory("CutterFlag", 999) 
Goto Death
Death:
TNT1 A 1 A_CustomMissile("DuoPunchReturn",0,0,0,0)
stop
}
}

Actor DuoPunchReturn
{
radius 0
height 0
speed 40
damage (0)
scale 2.5
+DONTBLAST
+RIPPER
PROJECTILE
+SKYEXPLODE
+NOINTERACTION
states
{
Spawn:
GIGF J 0
GIGF J 0 A_FaceTarget
GIGF J 0 A_CustomMissile("DuoPunchWire",0,0,0,0)
GIGF JJJJ 1 A_JumpIfCloser(60,"Return")
TNT1 A 0 A_CustomMissile("DuoPunchReturn",0,0,0,0)
stop
Return:
GIGF A 0 A_GiveToTarget("FistFlag",1)
stop
}
}



Actor DuoPunchWire : DuoPunch
{
Damage (0)
+NOCLIP
//+CLIENTSIDEONLY
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0 A_SpawnItemEx("DuoPunchWireFX")
TNT1 A 0 A_JumpIfCloser(64, "Death")
TNT1 A 0 A_CustomMissile("DuoPunchWire", 0, 0, 0, 0)
stop
Death:
TNT1 A 0 
stop
}
}

Actor DuoPunchWireFX 
{
+NOINTERACTION
//+CLIENTSIDEONLY
Scale 2.5
States
{
Spawn:
TNT1 A 1
TNT1 A 0 A_JumpIfCloser(32, "Death")
GIGF B 2 
stop
Death:
TNT1 A 0
stop
}
}



actor MidFist
{
PROJECTILE
+SKYEXPLODE
+BRIGHT
Scale 2.5
damagetype "DuoFist2"
Obituary "$OB_DUOFIST"
Damage (35)
Speed 26
Radius 16
Height 10
States
{
Spawn:
GIGF CD 1
Loop
Death:
GIGF F 0 
GIGF F 0 A_Recoil(5)
GIGF CD 1 A_FadeOut
Goto Death+2
}
}

actor GigaFist
{
PROJECTILE
+SKYEXPLODE
+BRIGHT
RenderStyle "Translucent"
Alpha 0.98
scale 2.5
damagetype "DuoFist3"
Obituary "$OB_DUOFIST"
Speed 26
Radius 20
Height 10
Damage (70)
States
{
Spawn:
GIGF F 2
GIGF F 1 A_SpawnItemEx("GigaFistFX",64,0,0,momx/7,momy/7,momz/7,0,SXF_ABSOLUTEMOMENTUM)
GIGF G 2
loop
Death:
GIGF F 0 
GIGF F 0 A_Recoil(5)
GIGF F 1 A_FadeOut
Goto Death+2
}
}

Actor GigaFistFX 
{
+NOINTERACTION
+CLIENTSIDEONLY
+BRIGHT
Scale 2.5
States
{
Spawn:
TNT1 A 1
GIGF H 3
GIGF I 5
Goto Death
Death:
GIGF I 1 A_FadeOut(0.5)
Loop
}
}