using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Terraria;
using Terraria.ModLoader;

namespace Decimation.Content.Items.Misc
{
    internal class Thermoplasm : DecimationItem
    {
        protected override string ItemName => "Thermoplasm";
        protected override string ItemTooltip => "It resonates with the heat of the planet's core";

        protected override void Init()
        {
            item.width = 26;
            item.height = 36;
            item.value = Item.buyPrice(silver: 50);
            item.rare = Rarity.Yellow.GetRarityValue();
        }
    }

    public class ThermoplasmDrop : GlobalNPC
    {
        public override void NPCLoot(NPC npc)
        {
            if (Main.LocalPlayer.ZoneUnderworldHeight && Main.rand.NextBool(20))
                Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height,
                    ModContent.ItemType<Thermoplasm>());
        }
    }
}