actor DuoFistC : BaseMM8BDMWep_CBM
{
dropitem "DuoFistUpgrade2Dropped"
Weapon.AmmoUse 1
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Obituary "$OB_DUOFIST"
Inventory.Pickupmessage "You got the Duo Fist!"
weapon.ammotype "BusterAmmo"
States
{
Spawn:
C_08 I 1
loop
Ready:
DUOL C 0 A_JumpIfInventory("Once",1,"Ready2")
DUOL C 0 ACS_ExecuteAlways(981,0,0)
DUOL C 0 A_GiveInventory("Once",1)
Goto Ready2
Ready2:
DUOL C 0 ACS_ExecuteAlways(998,0,706)
DUOL C 0 ACS_ExecuteAlways(998,0,706,1)
DUOL C 0 A_TakeInventory("WeaponCharge",999)
DUOL C 1 A_WeaponReady
Goto Ready2+3
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
DUOL C 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
DUOL C 1 A_Raise
Loop
Fire:
DUOL C 0 A_JumpIfNoAmmo("Hold")
DUOL C 0 A_PlaySoundEx("weapon/DuoShot1","Weapon")
DUOL C 0 A_GiveInventory("DuoMain1_CI",1)
DUOL C 0 A_TakeInventory("WeaponCharge",999)
DUOL G 1 A_TakeInventory("FistFlag",1)
Goto FistWait
FistWait:
DUOL G 1
DUOL G 0 A_GiveInventory("AdapterWaitCount",1)
DUOL G 0 A_JumpIfInventory("AdapterWaitCount",35,"FistFinish")
DUOL G 0 A_JumpIfInventory("FistFlag",1,"FistFinish")
loop
FistFinish:
DUOL G 0 A_PlayWeaponSound("weapon/adapterreturn")
DUOL G 0 A_TakeInventory("FistFlag",1)
DUOL G 0 A_JumpIfInventory("AdapterWaitCount",12,2)
DUOL D 4
DUOL G 0 A_TakeInventory("AdapterWaitCount",999)
DUOL DC 4
DUOL B 0 A_Refire
Goto Ready2+2
Fire2:
DUOL B 0 A_TakeInventory("WeaponCharge",999)
DUOL B 0 ACS_ExecuteAlways(998,0,706,1)
DUOL B 0 A_PlaySoundEx("weapon/DuoShot2","Weapon")
DUOL B 0 A_GiveInventory("DuoMain2_CI",1)
DUOL CD 1
DUOL G 16
DUOL DC 4
DUOL B 0 A_Refire
goto Ready2+2
Fire3:
DUOL B 0 A_TakeInventory("WeaponCharge",999)
DUOL B 0
DUOL B 0 ACS_ExecuteAlways(998,0,706,1)
DUOL B 0 A_PlaySoundEx("weapon/DuoShot3","Weapon")
DUOL B 0 A_GiveInventory("DuoMain3_CI",1)
DUOL EF 2
DUOL G 16
DUOL DC 4
DUOL B 0 A_Refire
goto Ready2+2

Hold:
DUOL C 0 A_JumpIfInventory("WeaponCharge",4,"Hold1")
DUOL C 1 A_GiveInventory("WeaponCharge",1)
DUOL C 0 A_Refire
Goto Ready2+2
Hold1:
DUOL D 0 A_JumpIfInventory("WeaponCharge",10,"Hold2")
DUOL D 1 A_GiveInventory("WeaponCharge",1)
DUOL D 0 A_Refire("Hold1")
Goto Ready2+2
Hold2:
DUOL B 0 A_JumpIfInventory("WeaponCharge",24,"Charge")
DUOL B 1 A_GiveInventory("WeaponCharge",1)
DUOL B 0 A_Refire("Hold2")
Goto Fire2
Charge:
DUOL B 0 A_PlaySoundEx("weapon/DuoShotCharge","Weapon")
Goto Charge1
Charge1:
DUOL B 0 A_JumpIfInventory("WeaponCharge",44,"Charge1a")
DUOL H 1 ACS_ExecuteAlways(998,0,102,5)
DUOL B 0 A_Refire(1)
Goto Fire2
DUOL B 0 A_GiveInventory("WeaponCharge",1)
DUOL B 1 ACS_ExecuteAlways(998,0,706,1)
DUOL H 0 A_Refire("Charge1")
Goto Fire2
Charge1a:
DUOL K 0 A_GiveInventory("WeaponCharge",1)
DUOL K 0 A_GunFlash
goto Charge2
Charge2:
DUOL K 1 ACS_ExecuteAlways(998,0,103,6)
DUOL I 0 A_Refire(1)
Goto Fire3
DUOL I 1 ACS_ExecuteAlways(998,0,104,7)
DUOL J 0 A_Refire(1)
Goto Fire3
DUOL J 1 ACS_ExecuteAlways(998,0,706,1)
DUOL K 0 A_JumpIfInventory("IsBot",1,"BotFire")
DUOL K 0 A_Refire("Charge2")
Goto Fire3
BotFire:
DUOL K 0 A_Jump(16,"Fire3")
DUOL K 0 A_Refire("Charge2")
Goto Fire3


Flash:
TNT1 A 5 A_PlaySoundEx("weapon/MM4Charge","Weapon")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",1,"Flash")
stop

Altfire:
DUOL M 0 A_JumpIf(z-floorz==0,"SlideSlide")
goto Ready2+2
SlideSlide:
DUOL N 0 A_GiveInventory("DuoBash",1)
DUOL N 0 A_PlaySoundEx("weapon/chargekick","Weapon")
DUOL N 0 ACS_ExecuteAlways(648,0,1)
DUOL N 0 SetPlayerProperty(0,1,0)
DUOL N 0 A_FireCustomMissile("DuoRam",0,0,0,0)
DUOL N 0 ThrustThingZ(0,0,1,0)
DUOL N 1 A_GiveInventory("CopySlidePickup",1)
DUOL N 0 ThrustThingZ(0,0,1,0)
DUOL NNNN 2
DUOL N 1
DUOL N 0 ACS_ExecuteAlways(648,0,0)
DUOL N 0 SetPlayerProperty(0,0,0)
DUOL M 5
DUOL M 14
DUOL M 0 A_TakeInventory("DuoBash",1)
DUOL M 1 A_Refire
goto Ready2+2

}
}




actor DuoPunchLefty : DuoPunch
{
Translation "199:199=95:95", "202:202=89:89"
ReactionTime 1
Damage (20)//25
//Speed 32
//Radius 10
//Height 10
States
{
Spawn:
GIGL A 0
GIGL A 0
Spawn2: 
GIGL A 0
GIGL AAAAAAAAAA 1 A_SpawnItemEx("DuoPunchWireLefty",0,0,0,0,0,0,0,1)

GIGL A 0
Goto Spawn3
Spawn3:
GIGL A 1
GIGL A 1 A_CountDown
wait
Return:
TNT1 A 0 A_GiveToTarget("FistFlag",1)
stop
Death2:
TNT1 A 0 A_GiveToTarget("FistFlag",1)
stop
Death:
TNT1 A 0 A_SpawnItemEx("DuoPunchLeftyReturn",0,0,0,0,0,0,0,1)
stop
}
}

actor DuoPunchLeftyB : DuoPunchLefty{translation "202:202=205:205", "199:199=74:74"}
actor DuoPunchLeftyR : DuoPunchLefty{translation "202:202=171:171", "199:199=41:41"}
actor DuoPunchLeftyO : DuoPunchLefty{translation "202:202=104:104", "199:199=128:128"}
actor DuoPunchLeftyP : DuoPunchLefty{translation "202:202=229:229", "199:199=232:232"}

actor DuoPunchLeftyReturn : DuoPunchLefty
{
+NOINTERACTION
+SEEKERMISSILE
ReactionTime 35
damage (0)
Speed 60
States
{
Spawn:
GIGL J 0
GIGL J 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)//Target >> Tracer
GIGL J 0 A_FaceTarget
goto Spawn2
Spawn2:
GIGL J 0 A_JumpIfCloser(60,"Return")
GIGL JJ 0 A_SeekerMissile(90,90,SMF_PRECISE)
GIGL JJJJ 1 A_JumpIfCloser(60,"Return")
GIGL J 0 A_CountDown
GIGL J 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death2")
loop

}
}

Actor DuoPunchWireLefty : DuoPunchLeftyReturn
{
Translation "199:199=95:95", "202:202=89:89"
+NOCLIP
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(0,0,2)
TNT1 A 0 A_FaceTarget
goto Spawn2
Spawn2:
TNT1 A 0 A_JumpIfCloser(64,"Death")
TNT1 AA 0 A_SeekerMissile(90,90,SMF_PRECISE)
TNT1 A 1 A_SpawnItemEx("DuoPunchWireLeftyFX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
loop
Return:
Death2:
Death:
TNT1 A 0 
stop
}
}

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


//Translation "195:195=194:194", "204:204=192:192", "199:199=95:95", "202:202=89:89"
actor MidFistLefty : MidFist
{
Translation "195:195=194:194", "204:204=192:192"
Damage (33)//35
//Speed 26
Radius 16
Height 16//10
States
{
Spawn:
GIGL CD 1
Loop
Death:
GIGL F 0 
GIGL F 0 A_Recoil(5)
GIGL CD 1 A_FadeOut
Goto Death+2
}
}

actor MidFistLeftyB : MidFistLefty{translation "204:204=205:205", "195:195=74:74"}
actor MidFistLeftyR : MidFistLefty{translation "204:204=171:171", "195:195=41:41"}
actor MidFistLeftyO : MidFistLefty{translation "204:204=104:104", "195:195=128:128"}
actor MidFistLeftyP : MidFistLefty{translation "204:204=229:229", "195:195=232:232"}


actor GigaFistLefty : GigaFist
{
Translation "195:195=194:194", "204:204=192:192"
//Speed 26
Radius 24//20
Height 20//10
Damage (61)//70
States
{
Spawn:
GIGL F 2
GIGL F 1 A_SpawnItemEx("GigaFistFXLefty",64,0,0,momx/7,momy/7,momz/7,0,9)
GIGL G 2
loop
Death:
GIGL F 0 
GIGL F 0 A_Recoil(5)
GIGL F 1 A_FadeOut
Goto Death+2
}
}

actor GigaFistLeftyB : GigaFistLefty{translation "204:204=205:205", "195:195=74:74"}
actor GigaFistLeftyR : GigaFistLefty{translation "204:204=171:171", "195:195=41:41"}
actor GigaFistLeftyO : GigaFistLefty{translation "204:204=104:104", "195:195=128:128"}
actor GigaFistLeftyP : GigaFistLefty{translation "204:204=229:229", "195:195=232:232"}

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

actor DuoRam
{
PROJECTILE
+DONTBLAST
+DONTREFLECT
+NOEXPLODEFLOOR
+THRUGHOST
Radius 16
Height 25
scale 2.5
damage (25)
damagetype "DuoRam"
Obituary "$OB_DUORAM"
speed 40
ReactionTime 10
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)
Spawn2:
TNT1 A 1 A_Fire
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 1
stop
}
}



actor DuoMain1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("DuoPunchLefty",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("DuoPunchLeftyB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("DuoPunchLeftyR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("DuoPunchLeftyO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("DuoPunchLeftyP",0,0,-8,0)
goto Done
}
}

actor DuoMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("MidFistLefty",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("MidFistLeftyB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("MidFistLeftyR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("MidFistLeftyO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("MidFistLeftyP",0,0,-8,0)
goto Done
}
}

actor DuoMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("GigaFistLefty",0,0,-8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("GigaFistLeftyB",0,0,-8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("GigaFistLeftyR",0,0,-8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("GigaFistLeftyO",0,0,-8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("GigaFistLeftyP",0,0,-8,0)
goto Done
}
}