// Buster upgrading

actor BassUpgradeSH : BassUpgrade replaces BassUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
inventory.pickupmessage "Support Item! Bass Upgrade!"
states
{
Use:
WEA2 Q 0 A_JumpIfInventory("BassBusterSpecial", 1, "Speedster")
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",1)
WEA3 A 0 A_GiveInventory("BassBuster",1)
WEA3 A 0 A_SelectWeapon("BassBuster")
stop
Speedster:
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",1)
WEA3 A 0 A_TakeInventory("BassBusterSpecial",999)
WEA3 A 0 A_GiveInventory("BassBuster",1)
WEA3 A 0 A_SelectWeapon("BassBuster")
WEA3 A 0 ACS_ExecuteAlways(400,0,45)
stop
}
}


actor ProtoUpgradeSH : ProtoUpgrade replaces ProtoUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
states
{
Use:
WEA2 Q 0 A_JumpIfInventory("ProtoBusterSpecial", 1, "Sweeper")
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",2)
WEA2 Q 0 A_GiveInventory("ProtoBuster",1)
WEA2 Q 0 A_SelectWeapon("ProtoBuster")
stop
Sweeper:
WEA2 Q 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",2)
WEA2 Q 0 A_TakeInventory("ProtoBusterSpecial",999)
WEA2 Q 0 A_GiveInventory("ProtoBuster",1)
WEA2 Q 0 A_SelectWeapon("ProtoBuster")
WEA3 A 0 ACS_ExecuteAlways(400,0,46)
stop
}
}

actor DuoFistUpgradeSH : DuoFistUpgrade replaces DuoFistUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
states
{
Use:
WEA2 Q 0 A_JumpIfInventory("DuoFistSpecial", 1, "Tank")
DUOF A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",6)
DUOF A 0 A_GiveInventory("DuoFist",1)
DUOF A 0 A_SelectWeapon("DuoFist")
stop
Tank:
DUOF A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BusterGiven",6)
WEA2 Q 0 A_TakeInventory("DuoFistSpecial",999)
DUOF A 0 A_GiveInventory("DuoFist",1)
DUOF A 0 A_SelectWeapon("DuoFist")
WEA3 A 0 ACS_ExecuteAlways(400,0,47)
stop
}
}

actor LaserBusterUpgradeSH : LaserBusterUpgrade replaces LaserBusterUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
}


actor ArrowBusterUpgradeSH : ArrowBusterUpgrade replaces ArrowBusterUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
}

actor TrebleBoostUpgradeSH : TrebleBoostUpgrade replaces TrebleBoostUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
}

actor AdaptorUpgradeSH : AdaptorUpgrade replaces AdaptorUpgrade
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
}



actor MM11Weapons : MMWeaponGiver
{
+INVENTORY.AUTOACTIVATE
States
{
SpawnWeapons:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BlockDropperWepSH", 32)
TNT1 A 0 A_SpawnItemEx("PileDriverWepSH", 32, 0, 0, 0, 0, 0, 45)
TNT1 A 0 A_SpawnItemEx("TundraStormWepSH", 32, 0, 0, 0, 0, 0, 90)
TNT1 A 0 A_SpawnItemEx("BounceBallWepSH", 32, 0, 0, 0, 0, 0, 135)
TNT1 A 0 A_SpawnItemEx("AcidBarrierWepSH", 32, 0, 0, 0, 0, 0, 180)
TNT1 A 0 A_SpawnItemEx("ChainBlastWepSH", 32, 0, 0, 0, 0, 0, 225)
TNT1 A 0 A_SpawnItemEx("ScrambleThunderWepSH", 32, 0, 0, 0, 0, 0, 270)
TNT1 A 0 A_SpawnItemEx("BlazingTorchWepSH", 32, 0, 0, 0, 0, 0, 315)
stop
Use:
TNT1 A 0 A_PlaySoundEx("item/refill","Voice")
TNT1 A 0 A_GiveInventory("BlockDropperWep", 1)
TNT1 A 0 A_GiveInventory("PileDriverWep", 1)
TNT1 A 0 A_GiveInventory("TundraStormWep", 1)
TNT1 A 0 A_GiveInventory("BounceBallWep", 1)
TNT1 A 0 A_GiveInventory("AcidBarrierWep", 1)
TNT1 A 0 A_GiveInventory("ChainBlastWep", 1)
TNT1 A 0 A_GiveInventory("ScrambleThunderWep", 1)
TNT1 A 0 A_GiveInventory("BlazingTorchWep", 1)
stop
}
}

actor AttackItemGiver : CustomInventory
{
states
{
Pickup:
TNT1 A 0
TNT1 A 0 A_Jump(256,"Treble","Reggae","Bomber")
Treble:
TNT1 A 0 A_GiveInventory("TrebleSentry", 1)
stop
Reggae:
TNT1 A 0 A_GiveInventory("ReggaeCall", 1)
stop
Bomber:
TNT1 A 0 A_GiveInventory("EddieBomber", 1)
stop
}
}