using Decimation.Content.Items.Misc.Souls; using Decimation.Content.Items.Placeable.DuneWorm; using Decimation.Content.Items.Tools; using Decimation.Content.Items.Vanity.DuneWorm; using Decimation.Content.NPCs.AncientDuneWorm; using Decimation.Lib.Items; using Decimation.Lib.Util; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Decimation.Content.Items.Boss.DuneWorm { internal class DuneWormTreasureBag : DecimationItem { protected override string ItemName => "Treasure Bag"; protected override string ItemTooltip => "Right click to open"; public override int BossBagNPC => ModContent.NPCType(); protected override void Init() { item.consumable = true; item.width = 24; item.height = 24; item.rare = Rarity.Rainbow.GetRarityValue(); this.item.expert = true; } public override bool CanRightClick() { return true; } public override void OpenBossBag(Player player) { player.QuickSpawnItem(ModContent.ItemType(), Main.rand.Next(20, 35)); player.QuickSpawnItem(ItemID.FossilOre, Main.rand.Next(10, 15)); player.QuickSpawnItem(ModContent.ItemType()); if (Main.rand.Next(7) == 0) player.QuickSpawnItem(ModContent.ItemType()); if (Main.rand.NextBool(13)) player.QuickSpawnItem(ModContent.ItemType()); } } }