Decimation_Mod/Items/Accessories/RangersPouch.cs
2020-03-03 21:17:42 -05:00

43 lines
1.3 KiB
C#

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Decimation.Core.Items;
using Decimation.Core.Util;
namespace Decimation.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()
{
width = 30;
height = 30;
item.value = 10;
rarity = Rarity.Green;
}
protected override List<ModRecipe> GetAdditionalRecipes()
{
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;
}
}
}