twindtrout9783
Steampunker
I'm trying to make an equipment item that (if possible) doubles the player's current amount of health. I'll add in extra items later that are used to craft it. (It'll be an after-MoonLord item, to keep things balanced.)
I have edited very little code so far, as this is my first time making a mod. My goal is to first make it an equitable item [that goes in the accessory slot], instead of a weapon (which is the default.) Here is my code so far:
I have edited very little code so far, as this is my first time making a mod. My goal is to first make it an equitable item [that goes in the accessory slot], instead of a weapon (which is the default.) Here is my code so far:
C#:
using Terraria.ID;
using Terraria.ModLoader;
namespace playerboosteritems.Items
{
public class heartofdivinity : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Heart of Divinity"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
Tooltip.SetDefault("Gives you a divine amount of health");
}
public override void SetDefaults()
{
item.damage = 50;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.ManaCrystal, 50);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}