47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Items.Placeables;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
public class EnchantedPearl : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Enchanted Pearl");
|
|
Tooltip.SetDefault("Increases fishing skill\n" +
|
|
"Increases chance to catch crates");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 26;
|
|
item.height = 26;
|
|
item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
|
item.rare = ItemRarityID.Orange;
|
|
item.accessory = true;
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
player.fishingSkill += 10;
|
|
player.Calamity().enchantedPearl = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ItemID.FishingPotion);
|
|
recipe.AddIngredient(ItemID.CratePotion, 8);
|
|
recipe.AddRecipeGroup("Boss2Material", 5);
|
|
recipe.AddIngredient(ModContent.ItemType<SeaPrism>(), 10);
|
|
recipe.AddIngredient(ModContent.ItemType<VictideBar>(), 3);
|
|
recipe.AddTile(TileID.Anvils);
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|