using Decimation.Content.Items.Ores;
using Decimation.Content.Tiles;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Decimation.Content.Items.Weapons
{
    internal class TitanicRepeater : DecimationWeapon
    {
        protected override string ItemName => "Titanic Repeater";
        protected override DamageType DamagesType => DamageType.Ranged;
        protected override int Damages => 120;

        protected override void InitWeapon()
        {
            item.width = 56;
            item.height = 36;
            item.crit = 20;
            item.useStyle = 5;
            item.useTime = 12;
            item.useAnimation = 12;
            item.knockBack = 7;
            this.item.shoot = 1;
            this.item.useAmmo = AmmoID.Arrow;
            item.UseSound = SoundID.Item5;
            item.shootSpeed = 25;
            item.autoReuse = true;
            this.item.value = Item.buyPrice(gold: 45);
            item.rare = Rarity.LightPurple.GetRarityValue();
        }

        protected override ModRecipe GetRecipe()
        {
            ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType<TitanForge>());

            recipe.AddIngredient(ModContent.ItemType<TitaniteBar>(), 12);
            recipe.AddIngredient(ItemID.SoulofMight, 15);

            return recipe;
        }
    }
}