using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; using Terraria.ID; namespace FabusMod.Items; public class BossBags : GlobalItem { public override void OpenVanillaBag(string context, Player player, int arg) { if (context == "bossBag" && arg == ItemID.KingSlimeBossBag && Utils.NextFloat(Main.rand) < 0.5f && Main.expertMode) { player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); } if (context == "bossBag" && arg == ItemID.QueenBeeBossBag && Utils.NextFloat(Main.rand) < 0.4f) { player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); } if (context == "bossBag" && arg == ItemID.SkeletronBossBag && Utils.NextFloat(Main.rand) < 0.4f) { player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); } if (context == "bossBag" && arg == ItemID.QueenBeeBossBag && Utils.NextFloat(Main.rand) < 0.2f) { player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); player.QuickSpawnItem(new EntitySource_Misc(""), ModContent.ItemType()); } } }