actor ItemGiver : CustomInventory
{
+ACTIVATEMCROSS
//+INVENTORY.AUTOACTIVATE
//+FLOORCLIP
inventory.pickupmessage "ENERGY BALANCER!"
inventory.pickupsound "item/1up"
Scale 2.0
States
{
Spawn:
NRGB A 1
loop
Health:
NRGB A 0 A_GiveInventory("Health", 10)
stop
Death:
TNT1 A 0
stop
}
}

actor EnergyBalancerGiver : ItemGiver //replaces TrebleSentry
{
Inventory.RespawnTics 350
inventory.pickupmessage "ENERGY BALANCER!"
inventory.pickupsound "item/1up"
States
{
Spawn:
NRGB A 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("CanCopyWeapons", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
}
}

actor EnergyBalancerActive : Inventory
{
inventory.amount 1
inventory.maxamount 1
}

actor JetUpgradeGiver : ItemGiver replaces BassUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! Rush Jet Adaptor!"
inventory.pickupsound "item/1up"
States
{
Spawn:
JETB D 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("MegaBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("JetBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("PowerFistC", 1, "Success")
DUST B 0 A_JumpIfInventory("SuperAdaptorWep", 1,"Success")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Proto")
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("JetUpgrade", 1)
stop
Proto:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
}
}


actor JetUpgrade : CustomInventory //replaces BassUpgrade
{
Inventory.RespawnTics 350
inventory.amount 1
inventory.maxamount 1
inventory.pickupmessage "Support Item! Rush Jet Adaptor!"
inventory.icon "JETUP"
Inventory.PickupSound "item/1up"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
JETB D 1
loop
Use:
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 SetPlayerProperty(0,0,0)
WEA2 Q 0 SetPlayerProperty(0,0,4)
WEA3 A 0 A_JumpIfInventory("JetBusterC",1,"Super")
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_TakeInventory("MegaBusterC",1)
WEA3 A 0 A_TakeInventory("SuperAdaptorWep",1)
WEA3 A 0 A_TakeInventory("PowerFistC",1)
WEA3 A 0 A_GiveInventory("JetBusterC",1)
WEA3 A 0 A_SelectWeapon("JetBusterC")
stop
Super:
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_GiveInventory("MegaBusterC",1)
WEA3 A 0 A_TakeInventory("SuperAdaptorWep",1)
WEA3 A 0 A_TakeInventory("PowerFistC",1)
WEA3 A 0 A_TakeInventory("JetBusterC",1)
WEA3 A 0 A_SelectWeapon("MegaBusterC")
stop
}
}

actor PowerUpgradeGiver : ItemGiver replaces ProtoUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! Rush Power Adaptor!"
inventory.pickupsound "item/1up"
States
{
Spawn:
POWA H 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("MegaBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("JetBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("PowerFistC", 1, "Success")
DUST B 0 A_JumpIfInventory("SuperAdaptorWep", 1, "Success")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Proto")
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("PowerUpgrade", 1)
stop
Proto:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
}
}

actor PowerUpgrade : CustomInventory //replaces ProtoUpgrade
{
Inventory.RespawnTics 350
inventory.amount 1
inventory.maxamount 1
inventory.pickupmessage "Support Item! Rush Power Adaptor!"
inventory.icon "POWUP"
Inventory.PickupSound "item/1up"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
POWA H 1
loop
Use:
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 SetPlayerProperty(0,0,0)
WEA2 Q 0 SetPlayerProperty(0,0,4)
WEA3 A 0 A_JumpIfInventory("PowerFistC",1,"Super")
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_TakeInventory("MegaBusterC",1)
WEA3 A 0 A_TakeInventory("SuperAdaptorWep",1)
WEA3 A 0 A_TakeInventory("JetBusterC",1)
WEA3 A 0 A_GiveInventory("PowerFistC",1)
WEA3 A 0 A_SelectWeapon("PowerFistC")
stop
Super:
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_GiveInventory("MegaBusterC",1)
WEA3 A 0 A_TakeInventory("SuperAdaptorWep",1)
WEA3 A 0 A_TakeInventory("PowerFistC",1)
WEA3 A 0 A_TakeInventory("JetBusterC",1)
WEA3 A 0 A_SelectWeapon("MegaBusterC")
stop
}
}


actor RushCoilC : RushCoil
{
}

actor RushCoilGiver : ItemGiver replaces RushCoil
{
//Inventory.RespawnTics 300
inventory.pickupmessage "Support Item! Rush coil!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEAP B 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Proto")
NRGB A 0 A_GiveInventory("RushCoilC", 1)
stop
Proto:
NRGB A 0 A_GiveInventory("ProtoCoil", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("NewTreblebooster", 1)
stop
}
}

actor RushJetC : RushJet
{
}

actor RushJetGiver : ItemGiver replaces RushJet
{
//Inventory.RespawnTics 875
inventory.pickupmessage "Support Item! Rush jet!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEA2 B 1
loop
Pickup:
DUST B 0 A_JumpIfInventory("CanUseItems", 1,"Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Proto")
NRGB A 0 A_GiveInventory("RushJetC", 1)
stop
Proto:
NRGB A 0 A_GiveInventory("ProtoJet", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("NewTreblebooster", 1)
stop
}
}

actor ETankC : ETank
{
States
{
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(100)
EBAL E 0 A_TakeInventory("ETankC",1)
fail
}
}

actor ClassETank : ETank
{
inventory.icon "CTANK"
States
{
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 HealThing(30)
EBAL E 0 A_TakeInventory("ClassETank",1)
fail
}
}

actor ETankGiver : ItemGiver replaces ETank
{
//Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! E-Tank!"
inventory.pickupsound "item/1up"
States
{
Spawn:
EBAL E 0 
EBAL E 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==3,"Death")
EBAL EF 6
Goto Spawn+2
Pickup:
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
/*DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail*/
NRGB A 0 A_GiveInventory("ClassETank", 1)
stop
Success:
NRGB A 0 A_GiveInventory("ETankC", 1)
stop
}
}

actor WTankC : WTank
{
States
{
Success:
EBAL E 0 A_PlaySound("item/energyup")
EBAL E 0 A_PlaySoundEx("item/refill","Voice")
EBAL E 0 ACS_Execute(992, 0, 255)
EBAL E 0 A_TakeInventory("WTankC",1)
fail
}
}

actor WTankGiver : ItemGiver replaces WTank
{
//Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! W-Tank!"
inventory.pickupsound "item/1up"
States
{
Spawn:
EBAL EH 6
loop
Pickup:
DUST B 0 A_JumpIfInventory("DocBusterC", 1, "Health")
DUST B 0 A_JumpIfInventory("BearerFlag", 1, "Success")
DUST B 0 A_JumpIfInventory("CanCopyWeapons", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("WTankC", 1)
stop
}
}

actor MTankGiver : ItemGiver replaces MTank
{
//Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! M-Tank!"
inventory.pickupsound "item/1up"
States
{
Spawn:
EBAL E 0 
EBAL E 0 A_JumpIf(ACS_ExecuteWithResult(975,0)==3,"Death")
EBAL EG 6
Goto Spawn+2
Pickup:
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
/*DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail*/
NRGB A 0 A_GiveInventory("ClassETank", 1)
stop
Success:
NRGB A 0 A_GiveInventory("MTankX", 1)
stop
}
}

actor TangoSummonC : TangoSummon
{
}

actor TangoSummonGiver : ItemGiver replaces TangoSummon
{
Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! Tango Roll!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEA3 B 1
loop
Pickup:
//DUST B 0 A_JumpIfInventory("TrebleSentry", 1, 3)
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
NRGB A 0 A_GiveInventory("TangoSummonC", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("TrebleSentryReplaced", 1)
stop
}
}


actor TrebleSentryGiver : ItemGiver replaces TrebleSentry
{
inventory.pickupmessage "Support Item! Treble Sentry!"
States
{
Spawn:
TRBI A 1
loop
Pickup:
//DUST B 0 A_JumpIfInventory("TrebleSentry", 1, 3)
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
DUST B 0 A_JumpIfInventory("MegaBusterC", 1, "Tango")
DUST B 0 A_JumpIfInventory("JetBusterC", 1, "Tango")
DUST B 0 A_JumpIfInventory("PowerFistC", 1, "Tango")
DUST B 0 A_JumpIfInventory("SuperAdaptorWep", 1, "Tango")
DUST B 0 A_JumpIfInventory("RollFlag", 1, "Tango")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Tango")
NRGB A 0 A_GiveInventory("TrebleSentryReplaced", 1)
stop
Tango:
NRGB A 0 A_GiveInventory("TangoSummonC", 1)
stop
}
}

actor BeatCallGiver : ItemGiver replaces BeatCall
{
//Inventory.RespawnTics 210
inventory.pickupmessage "Support Item! Beat Call!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEA3 I 1
loop
Pickup:
//DUST B 0 A_JumpIfInventory("BeatCallCheck", 1, 3)
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("BeatCallCheck", 1)
stop
}
}

actor Item1C : Item1
{
}

actor Item1Giver : ItemGiver replaces Item1
{
Inventory.RespawnTics 210
inventory.pickupmessage "Support Item! Item 1!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEA2 A 1
loop
Pickup:
/*DUST B 0 A_JumpIfInventory("Item1C", 3, 4)
DUST B 0 A_JumpIfInventory("Carry", 1, 3)
DUST B 0 A_Jump(256, "Success")
DUST B 0 
fail
Success:*/
DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Item1")
NRGB A 0 A_GiveInventory("Carry", 1)
stop
Item1:
NRGB A 0 A_GiveInventory("Item1C", 3)
stop
}
}


actor Carry : CustomInventory
{
Inventory.RespawnTics 350
inventory.amount 1
inventory.maxamount 1
inventory.pickupmessage "Support Item! Carry!"
inventory.icon "CARRI"
Inventory.PickupSound "item/1up"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
CARY D 1
loop
Use:
HFIS A 0 A_JumpIf(momz==0, "land")
WEA2 A 0 A_SpawnItemEx("CarryPlatform", 0, 0, 14, 0, 0, 0, 0, 0, 0)
stop
Land:
WEA2 A 0 A_SpawnItemEx("CarryPlatform", 56, 0, 38, 0, 0, 0, 0, 0, 0)
stop
}
}

actor CarryPlatform
{
height 4
radius 24
scale 2.5
+FORCEYBILLBOARD
+NOGRAVITY
-SHOOTABLE
+SOLID
States
{
Spawn:
CARY ABCABCABCABCABCABCABCABCABCABCABCABCABC 3
//CARY ABCABCABCABCABCABCABCABC 3
Goto Death
Death:
MMFX B 0 A_ChangeFlag("SOLID",0)
MMFX BCDE 2
stop
}
}

actor AdaptorUpgradeGiver : ItemGiver replaces AdaptorUpgrade
{
Inventory.RespawnTics 350
inventory.pickupmessage "Support Item! Super adaptor Upgrade!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEA3 P 0
WEA3 P 1 A_JumpIf(ACS_ExecuteWithResult(975,0)==3,"Death")
WEA3 P 1
Goto Spawn+2
Pickup:
DUST B 0 A_JumpIfInventory("MegaBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("JetBusterC", 1, "Success")
DUST B 0 A_JumpIfInventory("PowerFistC", 1, "Success")
DUST B 0 A_JumpIfInventory("SuperAdaptorWep", 1, "Success")
DUST B 0 A_JumpIfInventory("ProtoBusterC", 1, "Proto")
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
DUST B 0 A_Jump(256, "Health")
DUST B 0 
fail
Success:
NRGB A 0 A_GiveInventory("AdaptorUpgrade2", 1)
stop
Proto:
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("NewTrebleBooster", 1)
NRGB A 0 A_GiveInventory("EnergyBalancerActive", 1)
stop
}
}

actor AdaptorUpgrade2 : AdaptorUpgrade //replaces AdaptorUpgrade
{
Inventory.RespawnTics 350
inventory.amount 1
inventory.maxamount 1
inventory.pickupmessage "Support Item! Super adaptor Upgrade!"
inventory.icon "ADAPSI"
Inventory.PickupSound "item/1up"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
WEA3 P 0
WEA3 P 1 A_JumpIf(ACS_ExecuteWithResult(975,0)==3,"Death")
WEA3 P 1
Goto Spawn+2
Use:
WEA2 Q 0 A_JumpIfInventory("SuperAdaptorWep",1,"Back")
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 SetPlayerProperty(0,0,0)
WEA2 Q 0 SetPlayerProperty(0,0,4)
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_GiveInventory("SuperadaptorWep",1)
WEA3 A 0 A_SelectWeapon("SuperadaptorWep")
WEA2 Q 0 A_TakeInventory("JetBusterC",1)
WEA3 A 0 A_TakeInventory("MegaBusterC",1)
WEA3 A 0 A_TakeInventory("PowerFistC",1)
stop
Back:
WEA2 Q 0 SetPlayerProperty(0,0,3)
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
WEA3 A 0 A_TakeInventory("SuperadaptorWep",1)
WEA3 A 0 A_GiveInventory("MegaBusterC",1)
WEA3 A 0 A_SelectWeapon("MegaBusterC")
stop
Death:
WEA3 P 1
stop
}
}

actor EddieSummonC : EddieSummon
{
}

actor EddieSummonGiver : ItemGiver replaces EddieSummon
{
inventory.pickupmessage "Support Item! Eddie Call!"
inventory.pickupsound "item/1up"
States
{
Spawn:
WEAP Q 0
WEAP Q 1 A_JumpIf(ACS_ExecuteWithResult(975,0)==3,"Death")
WEAP Q 1
Goto Spawn+2
Pickup:
DUST B 0 A_JumpIfInventory("BearerFlag", 1, 2)
DUST B 0 A_JumpIfInventory("CanCopyWeapons", 1, "Success")
//DUST B 0 A_JumpIfInventory("CanUseItems", 1, "Success")
DUST B 0 A_JumpIf(ACS_ExecuteWithResult(143,0)==-1,"Health")
DUST B 0 
//fail
Success:
DUST B 0 A_JumpIfInventory("BassBusterC", 1, "Bass")
NRGB A 0 A_GiveInventory("EddieSummonC", 1)
stop
Bass:
NRGB A 0 A_GiveInventory("TrebleSummon", 1)
stop
}
}