Hi, I am making healing book (no attack, just left click for heal and 10 mana cost), but I tried to do some from dual use weapon tutorial but it wasnt working, so I am asking for help, how can I write to heal my player in this code??
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace BrokenHeartMod.Items
{
public class HealingBook : ModItem
{
public override void SetDefaults()
{
item.name = "Healing Book";
item.width = 24;
item.height = 28;
item.toolTip = "This book heals player, but costs 10 mana.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 5;
item.value = 100;
item.rare = 3;
item.mana = 10;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.useTurn = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, "PaperHeart", 1);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
}
}
Thank you