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

namespace Decimation.Content.Items.Tools
{
    internal class TheHourGlass : DecimationTool
    {
        protected override string ItemName => "The Hour Glass";
        protected override string ItemTooltip => "Costs 50 mana.";

        protected override void InitTool()
        {
            this.item.mana = 50;
            item.width = 22;
            item.height = 36;
            item.useTime = 16;
            item.useAnimation = 16;
            item.useStyle = 4;
            item.rare = Rarity.Purple.GetRarityValue();
            this.item.expert = true;
        }

        public override bool UseItem(Player player)
        {
            if (Main.dayTime)
                Main.dayTime = false;
            else if (!Main.dayTime) Main.dayTime = true;
            return true;
        }
    }
}