using System.Collections.Generic;
using Decimation.Content.Items.Misc.Souls;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Decimation.Lib.Util.Builder;
using Terraria.ID;
using Terraria.ModLoader;

namespace Decimation.Content.Items.Weapons.DuneWyrm
{
    public class Sundial : DecimationWeapon
    {
        protected override string ItemName => "Sundial";
        protected override int Damages => 15;
        protected override DamageType DamagesType => DamageType.Magic;
        protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Sundial>();

        protected override void InitWeapon()
        {
            item.width = 36;
            item.height = 42;
            item.shootSpeed = 1f;
            item.mana = 10; // TODO
            item.autoReuse = true;
            item.useStyle = 5;
            item.useTime = 24;
            item.useAnimation = 24;
            item.crit = 15;
            item.rare = Rarity.LightRed.GetRarityValue();
        }

        protected override List<ModRecipe> GetRecipes()
        {
            return new List<ModRecipe>
            {
                new RecipeBuilder(this)
                    .AnyIronBar(true)
                    .WithIngredient(ItemID.GoldWatch)
                    .WithIngredient(ItemID.AncientBattleArmorMaterial)
                    .WithIngredient(ModContent.ItemType<SoulofTime>(), 10)
                    .WithStation(TileID.MythrilAnvil)
                    .Build(),
                new RecipeBuilder(this)
                    .AnyIronBar(true)
                    .WithIngredient(ItemID.PlatinumWatch)
                    .WithIngredient(ItemID.AncientBattleArmorMaterial)
                    .WithIngredient(ModContent.ItemType<SoulofTime>(), 10)
                    .WithStation(TileID.MythrilAnvil)
                    .Build()
            };
        }
    }
}