Files
CalamityModPublic/Items/Accessories/DarkSunRing.cs
T

51 lines
1.7 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class DarkSunRing : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dark Sun Ring");
Tooltip.SetDefault("12% increase to damage, minion knockback, and melee speed\n" +
"+1 life regen, 15% increased pick speed, and +2 max minions\n" +
"During the day the player has +3 life regen\n" +
"During the night the player has +30 defense\n" +
"Contains the power of the dark sun");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6));
}
public override void SetDefaults()
{
item.width = 26;
item.height = 26;
item.value = Item.buyPrice(0, 90, 0, 0);
item.defense = 10;
item.lifeRegen = 1;
item.accessory = true;
item.Calamity().postMoonLordRarity = 15;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.darkSunRing = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<UeliaceBar>(), 10);
recipe.AddIngredient(ModContent.ItemType<DarksunFragment>(), 100);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}