Decimation_Mod/Content/Items/Boss/DuneWorm/DuneWormTreasureBag.cs
FyloZ ec4585bed5 - Changed Bloodshot Eye's music to Boss 1 Orchestra ( https://www.youtube.com/watch?time_continue=120&v=r-9nKGc85FQ )
- Added support for animated projectiles
- Refactoring
- Removed useless fields
- Fixed swords not dealing damages
- Added Hour Hand (from Evie's PR)
2020-03-21 00:11:07 -04:00

46 lines
1.5 KiB
C#

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<AncientDuneWormHead>();
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<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<DuneWormMask>());
if (Main.rand.NextBool(13))
player.QuickSpawnItem(ModContent.ItemType<DuneWormTrophy>());
}
}
}