Files
CalamityModPublic/Items/Accessories/CelestialJewel.cs
T

45 lines
1.4 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Potions;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class CelestialJewel : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Celestial Jewel");
Tooltip.SetDefault("Boosts life regen even while under the effects of a damaging debuff\n" +
"While under the effects of a damaging debuff you will gain 20 defense\n" +
"Press P to teleport to a random location");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.value = Item.buyPrice(0, 15, 0, 0);
item.rare = 7;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.celestialJewel = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CrownJewel>());
recipe.AddIngredient(ModContent.ItemType<AstralJelly>(), 20);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}