Decimation_Mod/Content/Items/Accessories/RangersPouch.cs
2020-06-11 23:19:28 -04:00

43 lines
1.3 KiB
C#

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Lib.Items;
using Decimation.Lib.Util;
namespace Decimation.Content.Items.Accessories
{
internal class RangersPouch : DecimationAccessory
{
protected override string ItemName => "Ranger's Pouch";
protected override string ItemTooltip =>
"25% Chance to not consume ammo \n+10% Ranged damage \n+5% Ranged critical chance";
protected override void InitAccessory()
{
item.width = 30;
item.height = 30;
item.value = 10;
item.rare = Rarity.Green.GetRarityValue();
}
protected override List<ModRecipe> GetRecipes()
{
ModRecipe recipe = GetNewModRecipe(this, 1, new List<int>() { TileID.MythrilAnvil }, false);
recipe.AddIngredient(ItemID.EndlessMusketPouch);
recipe.AddIngredient(ItemID.RangerEmblem);
recipe.AddIngredient(ItemID.SoulofSight, 5);
return new List<ModRecipe>() { recipe };
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.rangedDamage += 0.10f;
player.rangedCrit += 5;
player.ammoCost75 = true;
}
}
}