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

namespace Decimation.Content.Items.Weapons
{
    internal class MultigrainSword : DecimationWeapon
    {
        protected override string ItemName => "Multigrain Sword";
        protected override string ItemTooltip => "Smells like honeysuckle";
        protected override int Damages => 30;
        protected override string ProjectileName => "Stinger";

        protected override void InitWeapon()
        {
            item.width = 36;
            item.height = 37;
            item.useTime = 26;
            item.useAnimation = 26;
            item.knockBack = 5;
            item.value = Item.buyPrice(0, 0, 40);
            item.rare = Rarity.Green.GetRarityValue();
            item.crit = 4;
            item.autoReuse = true;
            item.expert = false;
            item.shootSpeed = 10f;
        }

        protected override ModRecipe GetRecipe()
        {
            ModRecipe recipe = GetNewModRecipe(this, 1, TileID.Anvils, true);

            recipe.AddIngredient(ItemID.CactusSword);
            recipe.AddIngredient(ItemID.Pumpkin, 15);
            recipe.AddIngredient(ItemID.Acorn, 5);
            recipe.AddIngredient(ItemID.Hay, 15);
            recipe.AddIngredient(ModContent.ItemType<TheGreatwoodSword>());

            return recipe;
        }
    }
}