actor ItemGiver : CustomInventory
{
+ACTIVATEMCROSS
//+INVENTORY.AUTOACTIVATE
//+FLOORCLIP
inventory.pickupmessage "LEGENDARY PLACEHOLDER!"
inventory.pickupsound ""
Scale 2.0
States
{
Spawn:
NRGB A 1
loop
Health:
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(CBM_FetchMyHealth,2)==0,"SnatchCheck2")
TNT1 A 0 A_PlaySound("item/1up",3,1.0)
TNT1 A 0 ACS_ExecuteAlways(CBM_HealMyThing,0,1,10)
stop
SnatchCheck2:
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
fail
SnatchCheck3:
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
fail
TheSnatch2:
TNT1 A 0 A_GiveInventory("SnatchItems_P2",1)
stop
TheSnatch3:
TNT1 A 0 A_GiveInventory("SnatchItems_P3",1)
stop
NoNo:
TNT1 A 0
fail
2UP://Voice
TNT1 A 0 A_PlaySound("item/1up",2,1.0)
stop
3UP://Item
TNT1 A 0 A_PlaySound("item/1up",3,1.0)
stop
Death:
TNT1 A 0
stop
}
}

actor GotUpgradeFlag : OnceC{}
actor MegamanUpgradeFlag : OnceC{}
actor RockmanUpgradeFlag : OnceC{}
actor ProtomanUpgradeFlag : OnceC{}
actor BassUpgradeFlag : OnceC{}
actor DuoUpgradeFlag : OnceC{}
actor DocUpgradeFlag : OnceC{}

actor CopyClassUpgrade : ItemGiver
{
inventory.pickupmessage "$PU_COPYUPGRADE"
states
{
Spawn:
WEA7 U 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch3")
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("GotUpgradeFlag",1)
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"Proto")
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("DuoFistBoss",1,"Duo")
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Doc")
TNT1 A 0
fail
Mega://ammo recover
TNT1 A 0 A_GiveInventory("MegamanUpgradeFlag",1)
goto 3UP
Maestro://ammo increase
TNT1 A 0 A_GiveInventory("RockmanUpgradeFlag",1)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_CopyWepAmmoSet",0,4,0)//ACS_ExecuteAlways(423,0,7,4)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_CopyWepAmmoBasicGive",0,4)
goto 3UP
Proto://proto strike
TNT1 A 0 A_GiveInventory("ProtomanUpgradeFlag",1)
goto 3UP
Bass://air dash
TNT1 A 0 A_GiveInventory("BassUpgradeFlag",1)
goto 3UP
Duo://Super armor,power shield
TNT1 A 0 A_GiveInventory("DuoUpgradeFlag",1)
TNT1 A 0 A_GiveInventory("SemiStunArmor",1)
goto 3UP
Doc://ammo increase or ammo regen?
TNT1 A 0 A_GiveInventory("DocUpgradeFlag",1)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_CopyWepAmmoSet",0,4,0)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_CopyWepAmmoBasicGive",0,4)
goto 3UP
Pirate:
TNT1 A 0 A_GiveInventory("PirateTreasureStack",3)
TNT1 A 0 A_Jump(128,2)
TNT1 A 0 A_PlaySound("classes/Stolen1",3,1.0)
stop
TNT1 A 0 A_PlaySound("classes/Stolen2",3,1.0)
stop
}
}


actor EnergyBalancerGiver : ItemGiver replaces EnergyBalancer
{
Inventory.RespawnTics 245
inventory.pickupmessage "$PU_ENERGYBALANCER"
States
{
Spawn:
NRGB A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("EnergyBalancerActive",1,"NoNo")
TNT1 A 0 A_GiveInventory("EnergyBalancerActive",1)
goto 3UP
}
}


actor MTankGiver : ItemGiver replaces MTank
{
inventory.pickupmessage "$PU_MTANK"
//inventory.pickupsound "item/1up"
States
{
Spawn:
EBAL E 0
EBAL E 0 Thing_ChangeTID(0,999)
EBAL EG 6
Goto Spawn+2
Pickup:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,2)
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_JumpIfInventory("ETankLite",1,"SnatchCheck3")
TNT1 A 0 A_GiveInventory("ETankLite",1)
goto 3UP
Success:
TNT1 A 0 A_JumpIfInventory("MTankX",1,"NoNo")
TNT1 A 0 A_GiveInventory("MTankX",1)
goto 3UP
}
}

actor ETankGiver : ItemGiver replaces ETank
{
inventory.pickupmessage "$PU_ETANK"
//inventory.pickupsound "item/1up"
States
{
Spawn:
EBAL E 0
EBAL E 0 Thing_ChangeTID(0,999)
EBAL EF 6
Goto Spawn+2
Pickup:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,2)
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_JumpIfInventory("ETankLite",1,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("ETankLite",1)
goto 3UP
Success:
TNT1 A 0 A_JumpIfInventory("ETankC",1,"NoNo")
TNT1 A 0 A_GiveInventory("ETankC",1)
goto 3UP
}
}

actor WTankGiver : ItemGiver replaces WTank
{
inventory.pickupmessage "$PU_WTANK"
States
{
Spawn:
EBAL E 0
EBAL E 0 Thing_ChangeTID(0,999)
EBAL EH 6
goto Spawn+2
Pickup:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 //A_JumpIfInventory("BearerFlag",1,"Success")
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Success")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
//TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0
fail
Success:
TNT1 A 0 A_JumpIfInventory("WTankC",5,"NoNo")
TNT1 A 0 A_GiveInventory("WTankC",1)
goto 3UP
}
}

actor RushCoilGiver : ItemGiver replaces RushCoil
{
Inventory.RespawnTics 245
inventory.pickupmessage "$PU_RUSHCOIL"
States
{
Spawn:
WEAP B 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"Proto")
TNT1 A 0 A_JumpIfInventory("DuoFistBoss",1,"Duo")
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Doc")
TNT1 A 0 A_JumpIfInventory("RushCoilC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushCoilC",1)
goto 3UP
Proto:
TNT1 A 0 A_JumpIfInventory("ProtoCoil",1,"NoNo")
TNT1 A 0 A_GiveInventory("ProtoCoil",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("BassCoil",1,"NoNo")
TNT1 A 0 A_GiveInventory("BassCoil",1)
goto 3UP
Duo:
TNT1 A 0 A_JumpIfInventory("DuoMeteorItem",3,"NoNo")
TNT1 A 0 A_GiveInventory("DuoMeteorItem",1)
goto 3UP
Doc:
TNT1 A 0 A_JumpIfInventory("DocCarry",20,"NoNo")
TNT1 A 0 A_GiveInventory("DocCarry",2)
goto 3UP
}
}

actor RushMarineGiver : ItemGiver replaces RushMarine
{
Inventory.RespawnTics 525
inventory.pickupmessage "$PU_RUSHMARINE"
States
{
Spawn:
RUSH N 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("CanUseItems",1,"Success")
DUST B 0 A_Jump(256,"Health")
DUST B 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"Proto")
//TNT1 A 0 A_JumpIfInventory("DuoFistBoss",1,"Duo")
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Doc")
TNT1 A 0 A_JumpIfInventory("RushMarineC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushMarineC",1)
goto 3UP
Proto:
TNT1 A 0 A_JumpIfInventory("ProtoMarine",1,"NoNo")
TNT1 A 0 A_GiveInventory("ProtoMarine",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("BassMarine",1,"NoNo")
TNT1 A 0 A_GiveInventory("BassMarine",1)
goto 3UP
Doc:
TNT1 A 0 A_JumpIfInventory("DocCarry",20,"NoNo")
TNT1 A 0 A_GiveInventory("DocCarry",3)
goto 3UP
}
}

actor RushJetGiver : ItemGiver replaces RushJet
{
Inventory.RespawnTics 525
inventory.pickupmessage "$PU_RUSHJET"
States
{
Spawn:
WEA2 B 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"Proto")
TNT1 A 0 A_JumpIfInventory("DuoFistBoss",1,"Duo")
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Doc")
TNT1 A 0 A_JumpIfInventory("RushJetC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushJetC",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("RushJetC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushJetC",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("RushJetC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushJetC",1)
goto 3UP
Proto:
TNT1 A 0 A_JumpIfInventory("ProtoJet",1,"NoNo")
TNT1 A 0 A_GiveInventory("ProtoJet",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("BassJet",1,"NoNo")
TNT1 A 0 A_GiveInventory("BassJet",1)
goto 3UP
Duo:
TNT1 A 0 A_JumpIfInventory("DuoMeteorItem",3,"NoNo")
TNT1 A 0 A_GiveInventory("DuoMeteorItem",2)
goto 3UP
Doc:
TNT1 A 0 A_JumpIfInventory("DocCarry",20,"NoNo")
TNT1 A 0 A_GiveInventory("DocCarry",4)
goto 3UP
}
}

actor Item1Giver : ItemGiver replaces Item1
{
Inventory.RespawnTics 210
inventory.pickupmessage "$PU_ITEM1"
States
{
Spawn:
WEA2 A 1
loop
Pickup:
/*TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Item1")
TNT1 A 0 A_JumpIfInventory("Carry",1,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("Carry",1)
goto 3UP*/
Item1:
TNT1 A 0 //A_JumpIfInventory("NoAmmoPickup",1,"Doc")
TNT1 A 0 A_JumpIfInventory("Item1",3,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("Item1",3)
goto 3UP
Doc:
TNT1 A 0 A_JumpIfInventory("DocCarry",20,"SnatchCheck3")
TNT1 A 0 A_GiveInventory("DocCarry",1)
goto 3UP
}
}

actor Item2Giver : ItemGiver replaces Item2
{
Inventory.RespawnTics 210
inventory.pickupmessage "$PU_ITEM2"
States
{
Spawn:
WEA2 D 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("Item2",2,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("Item2",2)
goto 3UP
}
}

actor Item3Giver : ItemGiver replaces Item3
{
Inventory.RespawnTics 210
inventory.pickupmessage "$PU_ITEM3"
States
{
Spawn:
ITM3 A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("Item3",2,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("Item3",2)
goto 3UP
}
}

actor WireAdaptorGiver : ItemGiver replaces WireAdaptor
{
Inventory.RespawnTics 245
inventory.pickupmessage "$PU_WIREADAPTOR"
States
{
Spawn:
WADP A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("WireAdaptor",2,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("WireAdaptor",2)
goto 3UP
}
}

actor BeatBoostItemGiver : ItemGiver replaces BeatBoostItem
{
Inventory.RespawnTics 245
inventory.pickupmessage "$PU_BEATCALL"
States
{
Spawn:
WEA3 I 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("BeatBoostItem",1,"SnatchCheck2")
TNT1 A 0 A_GiveInventory("BeatBoostItem",1)
goto 3UP
}
}

//BeatCall//Removed from core, but legacy maps
actor BeatCallGiver : ItemGiver replaces BeatCall
{
Inventory.RespawnTics 245
inventory.pickupmessage "$PU_BEATCALL"
States
{
Spawn:
WEA3 I 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("BeatCallCheck",1,"NoNo")
TNT1 A 0 A_GiveInventory("BeatCallCheck",1)
goto 3UP
}
}

actor TangoSummonGiver : ItemGiver replaces TangoSummon
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_TANGOROLL"
States
{
Spawn:
WEA3 B 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("TangoSummonC",1,"NoNo")
TNT1 A 0 A_GiveInventory("TangoSummonC",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("TrebleSentryC",1,"NoNo")
TNT1 A 0 A_GiveInventory("TrebleSentryC",1)
goto 3UP
}
}

actor TrebleSentryGiver : ItemGiver replaces TrebleSentry
{
inventory.pickupmessage "$PU_TREBLESENTRY"
States
{
Spawn:
TRBI A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Tango")
TNT1 A 0 A_JumpIfInventory("RollFlag",1,"Tango")
TNT1 A 0 A_JumpIfInventory("RockFlag",1,"Tango")
TNT1 A 0 A_JumpIfInventory("AutoFlag",1,"Tango")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"Tango")
TNT1 A 0 A_JumpIfInventory("TrebleSentryC",1,"NoNo")
TNT1 A 0 A_GiveInventory("TrebleSentryC",1)
goto 3UP
Tango:
TNT1 A 0 A_JumpIfInventory("TangoSummonC",1,"NoNo")
TNT1 A 0 A_GiveInventory("TangoSummonC",1)
goto 3UP
}
}

actor EddieBomberGiver : ItemGiver replaces EddieBomber
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_EDDIEBOMBER"
States
{
Spawn:
EDDI Q 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("EddieBomberC",1,"NoNo")
TNT1 A 0 A_GiveInventory("EddieBomberC",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("ReggaeCallC",1,"NoNo")
TNT1 A 0 A_GiveInventory("ReggaeCallC",1)
goto 3UP
}
}

actor ReggaeCallGiver : ItemGiver replaces ReggaeCall
{
inventory.pickupmessage "$PU_REGGAECALL"
States
{
Spawn:
WEA9 Z 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"EddieB")
TNT1 A 0 A_JumpIfInventory("RollFlag",1,"EddieB")
TNT1 A 0 A_JumpIfInventory("RockFlag",1,"EddieB")
TNT1 A 0 A_JumpIfInventory("AutoFlag",1,"EddieB")
TNT1 A 0 A_JumpIfInventory("ProtoBusterBoss",1,"EddieB")
TNT1 A 0 A_JumpIfInventory("ReggaeCallC",1,"NoNo")
TNT1 A 0 A_GiveInventory("ReggaeCallC",1)
goto 3UP
EddieB:
TNT1 A 0 A_JumpIfInventory("EddieBomberC",1,"NoNo")
TNT1 A 0 A_GiveInventory("EddieBomberC",1)
goto 3UP
}
}

actor BeatSupportGiver : ItemGiver replaces BeatSupport
{
inventory.pickupmessage "$PU_BEATSUPPORT"
States
{
Spawn:
WEA4 O 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_Jump(256,"Health")
TNT1 A 0 
fail
Success:
TNT1 A 0 A_JumpIfInventory("NoAmmoPickup",1,"Health")
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("BeatSupportC",1,"NoNo")
TNT1 A 0 A_GiveInventory("BeatSupportC",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("TrebleSentryC",1,"NoNo")
TNT1 A 0 A_GiveInventory("TrebleSentryC",1)
goto 3UP
}
}

actor EddieSummonGiver : ItemGiver replaces EddieSummon
{
inventory.pickupmessage "$PU_EDDIECALL"
States
{
Spawn:
WEAP Q 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("BearerFlag",1,2)
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Success")
//TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==-1,"Health")
TNT1 A 0 
//fail
Success:
TNT1 A 0 A_JumpIfInventory("BassFlag",1,"Bass")
TNT1 A 0 A_JumpIfInventory("EddieSummonC",1,"NoNo")
TNT1 A 0 A_GiveInventory("EddieSummonC",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("TrebleSummon",1,"NoNo")
TNT1 A 0 A_GiveInventory("TrebleSummon",1)
goto 3UP
}
}



actor JetUpgradeGiver : ItemGiver replaces BassUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_JETADAPTOR"
States
{
Spawn:
JETB D 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("JetUpgrade",1,"NoNo")
TNT1 A 0 A_GiveInventory("JetUpgrade",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("BassUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("BassUpgrade2",1)
goto 3UP
}
}

actor PowerUpgradeGiver : ItemGiver replaces ProtoUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_POWERADAPTOR"
States
{
Spawn:
POWA H 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("PowerUpgrade",1,"NoNo")
TNT1 A 0 A_GiveInventory("PowerUpgrade",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("ProtoUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("ProtoUpgrade2",1)
goto 3UP
}
}


actor AdaptorUpgrade2Giver : RushJetGiver replaces AdaptorUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_SUPERADAPTOR"
States
{
Spawn:
WEA3 P 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0 
fail
Mega:
TNT1 A 0 A_JumpIfInventory("AdaptorUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("AdaptorUpgrade2",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("AdaptorUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("AdaptorUpgrade2",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("Bass_SuperTrebleBoostUpgrade",1,"NoNo")
TNT1 A 0 A_GiveInventory("Bass_SuperTrebleBoostUpgrade",1)
goto 3UP
}
}

actor LaserBusterUpgrade2Giver : ItemGiver replaces LaserBusterUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_LASERBUSTER"
States
{
Spawn:
WEA4 K 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("LaserBusterUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("LaserBusterUpgrade2",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("LaserBusterUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("LaserBusterUpgrade2",1)
goto 3UP
}
}

actor ArrowBusterUpgrade2Giver : ItemGiver replaces ArrowBusterUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_ARROWBUSTER"
States
{
Spawn:
WEA4 L 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("ArrowBusterUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("ArrowBusterUpgrade2",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("ArrowBusterUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("ArrowBusterUpgrade2",1)
goto 3UP
}
}

actor DuoFistUpgrade2Giver : ItemGiver replaces DuoFistUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_DUOFIST"
States
{
Spawn:
DUOF A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0 A_JumpIfInventory("DuoFistBoss",1,"Duo")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Duo:
TNT1 A 0 A_JumpIfInventory("DuoMeteorItem",3,"Duo1")
TNT1 A 0 A_GiveInventory("DuoMeteorItem",2)
goto Duo2
Duo1:
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Duo2:
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"3UP")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("DuoFistUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("DuoFistUpgrade2",1)
goto 3UP
}
}

actor TrebleBoostUpgrade2Giver : RushJetGiver replaces TrebleBoostUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_TREBLEBOOST"
States
{
Spawn:
TRBB I 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanUseItems",1,"Success")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0 
fail
Mega:
TNT1 A 0 A_JumpIfInventory("RushJetC",1,"NoNo")
TNT1 A 0 A_GiveInventory("RushJetC",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("TrebleBoostUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("TrebleBoostUpgrade2",1)
goto 3UP
Bass:
TNT1 A 0 A_JumpIfInventory("Bass_SuperTrebleBoostUpgrade",1,"NoNo")
TNT1 A 0 A_GiveInventory("Bass_SuperTrebleBoostUpgrade",1)
goto 3UP
}
}

actor MegaArmUpgrade2Giver : ItemGiver replaces MegaArmUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "$PU_MEGAARM"
States
{
Spawn:
MARM A 1
loop
Pickup:
TNT1 A 0 A_JumpIfInventory("CanCopyWeapons",1,"Pickup2")
TNT1 A 0 A_JumpIfInventory("CanSnatch_F",1,"TheSnatch2")
TNT1 A 0
fail
Pickup2:
TNT1 A 0 A_JumpIfInventory("MegaFlag",1,"Mega")
TNT1 A 0 A_JumpIfInventory("GreenSupremeFlag",1,"Maestro")
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("GotUpgradeFlag",1,"NoNo")
TNT1 A 0 A_GiveInventory("CopyClassUpgrade",1)
goto 3UP
Mega:
TNT1 A 0 A_JumpIfInventory("MegaArmUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("MegaArmUpgrade2",1)
goto 3UP
Maestro:
TNT1 A 0 A_JumpIfInventory("MegaArmUpgrade2",1,"NoNo")
TNT1 A 0 A_GiveInventory("MegaArmUpgrade2",1)
goto 3UP
}
}
