actor Duo_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_8I"
dropitem "DuoFistUpgrade"
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_DUOFIST"
Inventory.Pickupmessage "You got the Duo Fist?"
weapon.ammotype "HereComesAGiantFistAmmo"
weapon.ammotype2 "GrandeurBashAmmo"
States
{
Spawn:
C_08 I 1
loop

Deselect:
DUOL C 0 A_TakeInventory("HereComesAGiantFistAmmo")
goto DeselectSwap
Select:
DUOL C 0 A_TakeInventory("HereComesAGiantFistAmmo")
goto SelectSwap

Ready:
DUOL C 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_DUOC)
Goto Ready2
Ready2:
DUOL C 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_DUOC,TCLR_NONE)
DUOL C 0 A_TakeInventory("HereComesAGiantFistAmmo")
Ready3:
DUOL C 1 A_GiveInventory("Duo_Ready_P")
wait

Fire:
DUOL C 0 A_PlaySoundEx("weapon/DuoShot1","Weapon")
DUOL C 0 A_FireCustomMissile("DuoPunchLefty",0,0,-8,0)
DUOL C 0 A_TakeInventory("HereComesAGiantFistAmmo")
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
*/
DUOL GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG 1 A_JumpIfInventory("FistFlag",1,"FistFinish")
FistFinish:
DUOL D 0 A_PlaySound("weapon/adapterreturn",1)
DUOL D 0 A_TakeInventory("FistFlag",1)
//DUOL D 0 A_JumpIfInventory("AdapterWaitCount",8,2)
//DUOL D 4
//DUOL G 0 A_TakeInventory("AdapterWaitCount",999)
DUOL DC 4
DUOL B 0 A_Refire("ChargeStart")
Goto Ready3
Fire2:
DUOL C 0 A_TakeInventory("HereComesAGiantFistAmmo")
DUOL C 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_DUOC,TCLR_NONE)
DUOL C 0 A_PlaySoundEx("weapon/DuoShot2","Weapon")
DUOL C 0 A_FireCustomMissile("MidFistLefty",0,0,-8,0)
DUOL CD 1
DUOL G 16
DUOL DC 4
DUOL B 0 A_Refire("ChargeStart")
goto Ready3
Fire3:
DUOL E 0 A_TakeInventory("HereComesAGiantFistAmmo")
DUOL E 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_DUOC,TCLR_NONE)
DUOL E 0 A_PlaySoundEx("weapon/DuoShot3","Weapon")
DUOL E 0 A_FireCustomMissile("GigaFistLefty",0,0,-8,0)
DUOL EF 2
DUOL G 16
DUOL DC 4
DUOL B 0 A_Refire("ChargeStart")
goto Ready3

Flash.Charge:
TNT1 A 1 A_GiveInventory("HereComesAGiantFistAmmo",1+CallACS("core_checkrune",RUNE_RAGE,0))
TNT1 A 0 A_JumpIfInventory("HereComesAGiantFistAmmo",1,"Flash.Charge")
stop
Flash.Charge2:
TNT1 A 8 A_PlaySoundEx("weapon/MM4Charge","Weapon")
TNT1 A 0 A_JumpIfInventory("HereComesAGiantFistAmmo",1,"Flash.Charge2")
stop

ChargeStart:
DUOL C 0 A_GunFlash("Flash.Charge",1)
Charge0:
DUOL C 1 A_JumpIfInventory("HereComesAGiantFistAmmo",4,"Charge1")
DUOL C 0 A_Refire("Charge0")
Goto Ready2+1
Charge1:
DUOL D 1 A_JumpIfInventory("HereComesAGiantFistAmmo",10,"Charge2")
DUOL D 0 A_Refire("Charge1")
Goto Ready2+1
Charge2:
DUOL B 1 A_JumpIfInventory("HereComesAGiantFistAmmo",26,"Charge3_Snd")
DUOL B 0 A_Refire("Charge2")
Goto Fire2

BotCharge3:
DUOL K 0 A_Jump(64,"Fire2")
DUOL K 0 A_Refire("Charge3")
Goto Fire2
Charge3_Snd:
DUOL H 0 A_PlaySoundEx("weapon/DuoShotCharge","Weapon")
DUOL H 0 A_JumpIfInventory("IsBot",1,"BotCharge3")
Charge3:
DUOL H 0 A_JumpIfInventory("HereComesAGiantFistAmmo",64,"Charge4_Snd")
DUOL H 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_DUOCHARGE1,TCLR_CHARGE1)//5
DUOL B 0 A_Refire(1)
Goto Fire2
DUOL B 0 A_JumpIfInventory("HereComesAGiantFistAmmo",64,"Charge4_Snd")
DUOL B 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_DUOC,TCLR_NONE)
DUOL H 0 A_Refire("Charge3")
Goto Fire2

Charge4_Snd:
//DUOL K 0 A_GiveInventory("HereComesAGiantFistAmmo",64)
DUOL K 0 A_GunFlash("Flash.Charge2",1)
Charge4:
DUOL K 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_DUOCHARGE2,TCLR_CHARGE2)//6
DUOL I 0 A_Refire(1)
Goto Fire3
DUOL I 1 ACS_NamedExecuteWithResult("core_chargecolor",CLR_DUOCHARGE3,TCLR_CHARGE3)//7
DUOL J 0 A_Refire(1)
Goto Fire3
DUOL J 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_DUOC,TCLR_NONE)
DUOL K 0 A_JumpIfInventory("IsBot",1,"BotCharge4")
DUOL K 0 A_Refire("Charge4")
Goto Fire3
BotCharge4:
DUOL K 0 A_Jump(16,"Fire3")
DUOL K 0 A_Refire("Charge4")
Goto Fire3


Altfire:
DUOL M 0 A_JumpIfInventory("AirFraudAchieved",1,"Ready3")
DUOL M 0 A_JumpIfInventory("GrandeurBashAmmo",20,"SlideSlide")
//DUOL M 0 A_JumpIf(z-floorz==0,"SlideSlide")
goto Ready3
SlideSlide:
DUOL O 0 A_GiveInventory("SlideVivifyFlag",1)
DUOL O 0 A_Refire(1)
DUOL O 0 A_GiveInventory("DuoSlideThrust_P")
DUOL O 0 A_GiveInventory("DuoSlideCheck_P")
DUOL OP 1
DUOL Q 8
DUOL Q 0 A_ChangeVelocity(momx,momy,momz*0.75,2)
DUOL Q 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)

DUOL RSTU 4
DUOL C 2 A_TakeInventory("SlideVivifyFlag",1)
DUOL C 0 A_Refire("Altfire")
goto Ready3

DUOL N 0 A_GiveInventory("SlideVivifyFlag",1)
DUOL N 0 A_Refire(1)
DUOL N 0 A_GiveInventory("DuoSlideThrust_P")
DUOL N 1 A_GiveInventory("DuoSlideCheck_P")
DUOL NNNN 2
DUOL N 1
DUOL N 0 A_ChangeVelocity(momx,momy,momz*0.75,2)

//DUOL N 0 A_TakeInventory("CBM_DisableJumpPower")
DUOL N 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
DUOL M 5
DUOL M 14
DUOL M 0 A_TakeInventory("SlideVivifyFlag",1)
DUOL M 1 A_Refire("Altfire")
goto Ready3

}
}

actor HereComesAGiantFistAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 64
+INVENTORY.IGNORESKILL
}
actor GrandeurBashAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 60
+INVENTORY.IGNORESKILL
}

actor Duo_Ready_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("GrandeurBashAmmo",20,2)
TNT1 A 0 A_WeaponReady(WRF_NOSECONDARY)
stop//goto Ammo
TNT1 A 0 A_WeaponReady
stop//goto Ammo
Ammo:
TNT1 A 0 A_GiveInventory("GrandeurBashAmmo",1)
stop
}
}

actor DuoSlideDelay : Powerup
{
Powerup.Duration 54//70//-2
+INVENTORY.ALWAYSPICKUP
}
actor DuoHasSlid_F : Inventory{}

actor DuoSlideRestore_H : BasicWatcher
{
+SERVERSIDEONLY
States
{
Spawn:
TNT1 A 1
TNT1 A 5
Spawn2:
TNT1 A 0 A_JumpIfInTargetInventory("DuoSlideDelay",1,2)
TNT1 A 0 A_GiveToTarget("GrandeurBashAmmo",1+CallACS("core_checkrune",RUNE_RAGE,2))
TNT1 A 5
TNT1 A 0 A_JumpIfInTargetInventory("GrandeurBashAmmo",0,"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInTargetInventory("DuoHasSlid_F",1,"Spawn2")
goto Death
Death:
TNT1 A 1 A_TakeFromTarget("DuoHasSlid_F",99)
stop
}
}

actor DuoSlideCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("DuoSlideDelay",1)
TNT1 A 0 A_JumpIfInventory("DuoHasSlid_F",1,3)
TNT1 A 0 A_GiveInventory("DuoHasSlid_F",1)
TNT1 A 0 A_SpawnItemEx("DuoSlideRestore_H",0,0,24)
TNT1 A 0 A_JumpIfInventory("GrandeurBashAmmo",20,1)
stop
TNT1 A 0 A_TakeInventory("GrandeurBashAmmo",15,1)
TNT1 A 0 A_TakeInventory("GrandeurBashAmmo",5)
stop
}
}

actor DuoSlideThrust_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("AirFraudAchieved",1)

TNT1 A 0 A_PlaySoundEx("weapon/chargekick","Weapon")
//TNT1 A 0 A_GiveInventory("CBM_DisableJumpPowerGiver",1)
TNT1 A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)

TNT1 A 0 A_SpawnItemEx("DuoRam")//A_FireCustomMissile("DuoRamOLD",0,0,0,0)
TNT1 A 0 //ThrustThingZ(0,0,1,0)

TNT1 A 0 A_GiveInventory("BasicSlideDashFX_P")
TNT1 A 0 A_ChangeVelocity(cos(pitch)*28+12,0,-sin(pitch)*28,3)
stop

PickupOld:
TNT1 A 0 A_JumpIfInventory("GrandeurBashAmmo",20,"Thrust")
TNT1 A 0 ThrustThingZ(0,0,1,0)
TNT1 A 0 A_Recoil(-16)
stop
Thrust:
TNT1 A 0 ThrustThingZ(0,0,1,0)
TNT1 A 0 A_Recoil(-32)
stop
}
}

actor DuoPunchLefty : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Duo_Fist1"
Obituary "$OB_DUOFIST"
+SKYEXPLODE
+EXPLODEONWATER
//+DONTREFLECT
ReactionTime 1
Damage (190)//250
Radius 10
Height 10
Speed 32
scale 2.5
States
{
Spawn:
GIGL B 0
GIGL B 0 ACS_NamedExecuteWithResult("core_drawhookshot",CallACS("core_gettarget"),32,-8,DHS_MAXDIST+1024)
GIGL B 2
GIGL BBBBB 2 A_SpawnItemEx("ThunderClawPegHelper")
goto Death

Return:
TNT1 A 0 A_GiveToTarget("FistFlag",1)
stop
Death:
TNT1 A 0 A_SpawnItemEx("ThunderClawPegHelper")
TNT1 A 0 A_SpawnItemEx("DuoPunchLeftyReturn",0,0,0,0,0,0,0,1)
stop
}
}

actor DuoPunchLeftyReturn : DuoPunchLefty
{
+NOINTERACTION
+SEEKERMISSILE
ReactionTime 35
damage (0)
Speed 45//60
States
{
Spawn:
GIGL E 0
GIGL E 0 ACS_NamedExecuteWithResult("core_drawhookshot",CallACS("core_gettarget"),32,-8,DHS_MAXDIST+1024)
GIGL E 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_TARGET)//Target >> Tracer
GIGL E 0 A_FaceTarget
goto Spawn2
Spawn2:
GIGL E 0 A_JumpIfCloser(60,"Return")
GIGL EE 0 A_SeekerMissile(90,90,SMF_PRECISE)
GIGL EEEE 1 A_JumpIfCloser(60,"Return")
GIGL E 0 A_CountDown
GIGL E 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Return")
loop
}
}

Actor DuoPunchLeftyFX : BasicGraphicEffect
{
+NOTIMEFREEZE
States
{
SpawnFrame:
GIGL C 0
GIGL C 1
stop
}
}
Actor DuoPunchLeftyReturnFX : DuoPunchLeftyFX{}


actor MidFistLefty : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Duo_Fist2"
Obituary "$OB_DUOFIST"
+SKYEXPLODE
+EXPLODEONWATER
+BRIGHT
Damage (300)//350
Radius 16
Height 16//10
Speed 26
Scale 2.5
States
{
Spawn:
GIGL GH 1
Loop
Death:
GIGL G 0 
GIGL G 0 A_Recoil(5)
GIGL GH 1 A_FadeOut
Goto Death+2
}
}

actor GigaFistLefty : ProjSpawnFuncActor
{
PROJECTILE
damagetype "Duo_Fist3"
Obituary "$OB_DUOFIST"
+SKYEXPLODE
+EXPLODEONWATER
+BRIGHT
RenderStyle "Translucent"
Alpha 0.98
Damage (550)//700
Radius 24//20
Height 20//10
Speed 26
scale 2.5
States
{
Spawn:
GIGL J 2
GIGL J 1 A_SpawnItemEx("GigaFistFXLefty",64,0,0,momx/7,momy/7,momz/7,0,1+8)
GIGL L 2
loop
Death:
GIGL J 0 
GIGL J 0 A_Recoil(5)
GIGL J 1 A_FadeOut
wait
}
}

Actor GigaFistFXLefty : BasicGraphicEffect
{
+BRIGHT
States
{
SpawnFrame:
TNT1 A 1
GIGL M 3
GIGL N 5
GIGL N 1 A_FadeOut(0.5)
wait
}
}

actor DuoRam_OLD
{
PROJECTILE
damagetype "Duo_Ram"
Obituary "$OB_DUORAM"
+DONTBLAST
+DONTREFLECT
+DONTSPLASH
+THRUGHOST

//+BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+CANBOUNCEWATER
+NOEXPLODEFLOOR
BounceFactor 1.0
WallBounceFactor 1.0
BounceCount 0

ReactionTime 10
damage (240)
Radius 16
Height 25
speed 0
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Warp(2,24,0,16,0,72)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 1
stop
}
}


actor PainDuo_RamHit : Basic_PainFling_H{Args 32,28,0}
actor DeathDuo_RamHit : Basic_DeathFling_H{Args 36,56,0}

actor DuoRam : BasicExplosion
{
var int user_PierceRipper;
damagetype "Duo_Ram"
Obituary "$OB_DUORAM"
ReactionTime 10
RenderStyle None
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("DuoRamTrailFX_P",1)
SpawnL:
TNT1 A 0 A_Warp(2,16,0,28,angle,WARPF_ABSOLUTEANGLE|WARPF_NOCHECKPOSITION)//2+8
TNT1 A 1 A_Explode(240+CallACS("core_checkrune",RUNE_SPREAD,2)*480,64,0,0,64)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 1
stop
}
}

actor DuoRamTrailFX_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("DuoRamTrailFX_H",0,0,0,0,0,0,0,1)
stop
}
}
actor DuoRamTrailFX : BasicGraphicEffect
{
renderstyle translucent
alpha 0.875
states
{
Spawn:
TNT1 A 0
DUO7 K 1
DUO7 K 1 A_FadeOut(0.125)
wait
}
}
actor DuoRamTrailFX2 : DuoRamTrailFX{alpha 0.4375}

actor DuoRamTrailFX_H : BasicGraphicEffect
{
RenderStyle None
reactiontime 10
states
{
Spawn:
TNT1 A 0
TNT1 AA 1 A_JumpIf(CallACS("cbm_IsPointerClient",2)!=1, "SpawnL")
stop
SpawnL:
TNT1 A 0 A_Warp(2,0,0,0,angle,2+8)
TNT1 A 1 A_SpawnItemEx("DuoRamTrailFX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
TNT1 A 0 A_Warp(2,0,0,0,angle,2+8)
TNT1 A 1 A_SpawnItemEx("DuoRamTrailFX2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_CountDown
loop
}
}




actor Duo_W2 : BaseMM8BDMWep_CBM
{
tag "$TAGC_8I2"
dropitem "DuoFistUpgrade"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_DUOMETEOR"
Inventory.Pickupmessage "You got the Duo Meteor!"
weapon.ammotype "DuoGetReadyAmmo"
weapon.ammotype2 "GrandeurBashAmmo"
+WEAPON.CHEATNOTWEAPON
States
{
Spawn:
C_08 I 1
loop

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

Ready:
TNT1 A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_DUOC,1,CBM_TCLR_DEFAULT)
goto FireX
Ready2:
TNT1 A 1 A_WeaponReady
wait

Fire:
TNT1 A 1
goto Ready2

FireX:
TNT1 A 0 A_GiveInventory("DuoMeteor",1)
TNT1 A 0 A_GiveInventory("CBM_BeatBoostRemoveCheck_P")
TNT1 A 0 A_TakeInventory("GrandeurBashAmmo",20)
TNT1 A 0 A_GiveInventory("DuoSlideCheck_P")

TNT1 A 0 A_Stop
TNT1 A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
TNT1 A 0 A_PlaySoundEx("weapon/pcharge","Weapon")
goto FireRise
FireRise:
TNT1 A 1 A_GiveInventory("DuoMeteor_RiseUp_P",1)
TNT1 A 0 A_JumpIfInventory("DuoGetReadyAmmo",0,"BallStart")
loop

BallStart:
TNT1 A 0 A_GiveInventory("DuoSlideDelay",1)
TNT1 A 0 A_TakeInventory("DuoMeteorTimer")
TNT1 A 0 A_GiveInventory("DuoMeteorGo",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_pickupdisableplayer",0,true)
TNT1 A 0 ACS_NamedExecuteWithResult("core_invulnerableplayer",0,1)
goto BallIdle
BallIdle:
TNT1 A 0 A_GiveInventory("DuoMeteorGo",1)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 1 ThrustThingZ(0,0,0,0)
TNT1 A 0 A_JumpIfInventory("DuoMeteorGo",5,"Ball")
loop

Ball:
TNT1 A 0 A_GiveInventory("DuoSlideDelay",1)
TNT1 A 0 A_TakeInventory("DuoMeteorTimer")
TNT1 A 0 A_SetArg(3,angle*100000)
TNT1 A 0 A_SetArg(4,pitch*100000)
goto Ball2
Ball2:
TNT1 A 1 A_GiveInventory("DuoMeteor_Looping_P2")
TNT1 A 0 A_JumpIfInventory("DuoMeteorEnd",1,"Collide")
TNT1 A 0 A_JumpIfInventory("DuoMeteorTimer",4,"TimeOut")

TNT1 A 1 A_GiveInventory("DuoMeteor_Looping_P")
TNT1 A 0 A_JumpIfInventory("DuoMeteorEnd",1,"Collide")
TNT1 A 0 A_JumpIfInventory("DuoMeteorTimer",4,"TimeOut")

TNT1 A 1 A_GiveInventory("DuoMeteor_Looping_P")
TNT1 A 0 A_JumpIfInventory("DuoMeteorEnd",1,"Collide")
TNT1 A 0 A_JumpIfInventory("DuoMeteorTimer",4,"TimeOut")

TNT1 A 1 A_GiveInventory("DuoMeteor_Looping_P")
TNT1 A 0 A_JumpIfInventory("DuoMeteorEnd",1,"Collide")
TNT1 A 0 A_JumpIfInventory("DuoMeteorTimer",4,"TimeOut")
loop

TimeOut:
TNT1 A 0 A_GiveInventory("DuoMeteorEnd",1)
//TNT1 A 0 A_Stop
goto Fall

Collide:
TNT1 A 0 A_PlaySoundEx("weapon/blizzstrike","Weapon")
TNT1 A 0 A_FireCustomMissile("DuoMeteorCollide",0,0,0,0)
//TNT1 A 0 A_Stop
TNT1 A 0 ThrustThingZ(0,60,0,0)
//TNT1 A 0 A_Recoil(5)
goto Fall
Fall:
TNT1 A 0 A_GiveInventory("DuoSlideDelay",1)
TNT1 A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
TNT1 A 10 ACS_NamedExecuteWithResult("core_invulnerableplayer",0,0)
TNT1 A 1 A_GiveInventory("DuoMeteorFlagRemove_P",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_pickupdisableplayer",0,false)
goto GoAway
GoAway:
//TNT1 A 0 A_GiveInventory("NoWeaponSwitchSound",1)
TNT1 A 0 A_TakeInventory("Duo_W2",1)
TNT1 A 1
loop

}
}

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

actor DuoMeteor : Inventory{}
actor DuoMeteorGo : Inventory
{
inventory.amount 1
inventory.maxamount 20
}
actor DuoMeteorEnd : Inventory{}
actor DuoMeteorTimer : Inventory
{
inventory.amount 1
inventory.maxamount 999
}
actor DuoMeteorItemDelay : Powerup
{
Powerup.Duration 35
}

actor DuoMeteorFlagRemove_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("DuoGetReadyAmmo")
TNT1 A 0 A_TakeInventory("DuoMeteorGo")
TNT1 A 0 A_TakeInventory("DuoMeteorEnd")
TNT1 A 0 A_TakeInventory("DuoMeteor")
TNT1 A 0 A_TakeInventory("DuoMeteorTimer")
stop
}
}

actor DuoMeteorItem : BasicClassItem
{
//inventory.amount 1
//inventory.maxamount 1
inventory.icon "DuoIconD"
inventory.pickupmessage "Support Item! Duo Meteor!"
//Inventory.PickupSound "item/1up"
Tag "Duo Meteor"
//+INVENTORY.KEEPDEPLETED
states
{
Spawn:
DUOL Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("Duo_W2",1,"No")
TNT1 A 0 A_JumpIfInventory("DuoMeteorItemDelay",1,"No")
TNT1 A 0 A_JumpIfInventory("GrandeurBashAmmo",40,"Use2")
fail//goto Use2
Use2:
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("DuoMeteorItemDelay",1)
TNT1 A 0 A_GiveInventory("Duo_W2",1)
TNT1 A 0 A_SpawnItemEx("DuoMeteorItem_H")
fail
}
}

actor DuoMeteorItem_H : BasicHelper
{
+SERVERSIDEONLY
ReactionTime 20
States
{
Spawn:
TNT1 A 1 A_CountDown
TNT1 A 3 A_GiveToTarget("DuoMeteorItem_P",1)
TNT1 A 4 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_DuoGetWepCheck"),"Spawn")
TNT1 A 0
stop
}
}

actor DuoMeteorItem_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SelectWeapon("Duo_W2")
stop
}
}


actor DuoMeteor_RiseUp_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 ThrustThingZ(0,7,0,0)//10
TNT1 A 0 A_GiveInventory("DuoGetReadyAmmo",2+CallACS("core_checkrune",RUNE_RAGE,0)*2)
stop
}
}


actor DuoMeteor_Looping_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEX("DuoMeteorCollideCheck",0,0,0,momx,momy,momz,0,8,0)
TNT1 A 0 A_SpawnItemEX("DuoMeteorMotionCheck",0,0,0,0,0,0)
TNT1 A 0 A_SpawnItemEx("DuoMeteorTwinkleFX",random(-48,48),random(-48,48),random(-48,48)+32,0,0,0,0,0,64) 

TNT1 A 0 A_JumpIfInventory("DuoGetReadyAmmo",1,2)
TNT1 A 0 A_GiveInventory("DuoMeteorTimer",1)
TNT1 A 0 A_TakeInventory("DuoGetReadyAmmo",1)
//TNT1 A 0 A_ChangeVelocity(cos(pitch)*40,0,-sin(pitch)*40,3)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
TNT1 A 0 A_ChangeVelocity(cos(Args[3]*0.00001)*cos(Args[4]*0.00001)*40,sin(Args[3]*0.00001)*cos(Args[4]*0.00001)*40,-sin(Args[4]*0.00001)*40,2)
stop
TNT1 A 0 A_ChangeVelocity(cos(Args[3]*0.00001)*cos(Args[4]*0.00001)*55,sin(Args[3]*0.00001)*cos(Args[4]*0.00001)*55,-sin(Args[4]*0.00001)*55,2)
stop
}
}
actor DuoMeteor_Looping_P2 : DuoMeteor_Looping_P
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEX("DuoMeteorCollideCheck2",0,0,0,momx,momy,momz,0,1+8)//Spawn GigaFistFXLefty
goto Super::Pickup+1
}
}

actor DuoMeteorTwinkleFX : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
reactiontime 10
scale 3.0
states
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_SetScale(ScaleX-0.1*random(0,10))
TNT1 A 0 A_Jump(256,1,2,3,4,5,6)
SpawnLoop:
RBFX TTTUUU 2 A_CountDown
loop
//GIGO PPPQQQ 2 A_CountDown
}
}

actor DuoMeteorMotionCheck : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 2
TNT1 A 1 A_JumpIfCloser(40,"Stopped")
stop
Stopped:
TNT1 A 1 A_GiveToTarget("DuoMeteorTimer",999)
stop
}
}

actor DuoMeteorCollideCheck
{
PROJECTILE
+DONTBLAST
+DONTREFLECT
+NOGRAVITY
Radius 40
Height 60
damage 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Death:
TNT1 A 0 A_GiveToTarget("DuoMeteorEnd",1)
Stop
}
}

actor DuoMeteorCollideCheck2 : DuoMeteorCollideCheck
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 //A_SpawnItemEX("GigaFistFXLefty",0,0,28,0,0,0,0,1)
stop
}
}


actor PainDuo_MeteorHit : Basic_PainFling_H{Args 40,32,0}
actor DeathDuo_MeteorHit : Basic_DeathFling_H{Args 44,80,0}

actor DuoMeteorCollide : BasicImplosion
{
damagetype "Duo_Meteor"
Obituary "$OB_DUOMETEOR"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(300,150,0,0,16)
stop
}
}

//actor Duo_W_NormalBar : NormalBar {Args 220,195}
actor Duo_W_ScriptBar : ScriptBar {}
actor Duo_W2_ScriptBar : ScriptBar {}