Files
CalamityModPublic/Items/LoreItems/KnowledgeMoonLord.cs
T

52 lines
1.6 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.LoreItems
{
public class KnowledgeMoonLord : LoreItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Moon Lord");
Tooltip.SetDefault("What a waste.\n" +
"Had it been fully restored it would have been a force to behold, but what you fought was an empty shell.\n" +
"However, that doesn't diminish the immense potential locked within it, released upon its death.\n" +
"Favorite this item to gain an improved Gravity Globe that gives you an increase to all stats while upside down.\n" +
"However, while not upside down you have permanent featherfall.");
}
public override void SetDefaults()
{
item.width = 20;
item.height = 20;
item.rare = 10;
item.consumable = false;
}
public override bool CanUseItem(Player player)
{
return false;
}
public override void UpdateInventory(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
if (item.favorited)
modPlayer.moonLordLore = true;
}
public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.SetResult(this);
r.AddTile(TileID.Bookcases);
r.AddIngredient(ItemID.MoonLordTrophy);
r.AddIngredient(ModContent.ItemType<VictoryShard>(), 10);
r.AddRecipe();
}
}
}