using Decimation.Content.Projectiles;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Decimation.Content.Items.Weapons.Bloodshot
{
    internal class Umbra : DecimationWeapon
    {
        protected override string ItemName => "Umbra";
        protected override string ItemTooltip => "Turns wooden arrows into siphon arrows.";
        protected override DamageType DamagesType => DamageType.Ranged;
        protected override int Damages => 20;
        protected override string ProjectileName => "WoodenArrowFriendly";
        protected override bool VanillaProjectile => true;

        protected override void InitWeapon()
        {
            item.width = 20;
            item.height = 20;
            item.value = Item.buyPrice(0, 2);
            item.rare = Rarity.Green.GetRarityValue();
            item.useAmmo = AmmoID.Arrow;
            item.shootSpeed = 6.8f;
            item.useTime = 26;
            item.useAnimation = 26;
            item.useStyle = 5;
            item.UseSound = SoundID.Item5;
            item.autoReuse = true;
            item.knockBack = 2.5f;
        }

        public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY,
            ref int type, ref int damage, ref float knockBack)
        {
            type = ModContent.ProjectileType<SiphonArrow>();
            return true;
        }
    }
}