45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using Decimation.Content.Items.Misc.Souls;
|
|
using Decimation.Content.Items.Placeable.DuneWyrm;
|
|
using Decimation.Content.Items.Tools;
|
|
using Decimation.Content.Items.Vanity.DuneWyrm;
|
|
using Decimation.Content.NPCs.DuneWyrm;
|
|
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Decimation.Content.Items.Boss.DuneWyrm
|
|
{
|
|
internal class DuneWyrmTreasureBag : DecimationItem
|
|
{
|
|
protected override string ItemName => "Treasure Bag";
|
|
protected override string ItemTooltip => "Right click to open";
|
|
public override int BossBagNPC => ModContent.NPCType<DuneWyrmHead>();
|
|
|
|
protected override void Init()
|
|
{
|
|
item.consumable = true;
|
|
item.width = 32;
|
|
item.height = 32;
|
|
item.rare = Rarity.Rainbow.GetRarityValue();
|
|
item.expert = true;
|
|
}
|
|
|
|
public override bool CanRightClick()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public override void OpenBossBag(Player player)
|
|
{
|
|
player.QuickSpawnItem(ModContent.ItemType<SoulofTime>(), Main.rand.Next(20, 35));
|
|
player.QuickSpawnItem(ItemID.FossilOre, Main.rand.Next(10, 15));
|
|
player.QuickSpawnItem(ModContent.ItemType<TheHourGlass>());
|
|
if (Main.rand.Next(7) == 0)
|
|
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmMask>());
|
|
if (Main.rand.NextBool(13))
|
|
player.QuickSpawnItem(ModContent.ItemType<DuneWyrmTrophy>());
|
|
}
|
|
}
|
|
} |