Files
CalamityModPublic/Items/Accessories/AbyssalMirror.cs
T
2021-12-31 00:47:22 -05:00

56 lines
2.1 KiB
C#

using CalamityMod.CalPlayer;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Placeables;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class AbyssalMirror : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyssal Mirror");
Tooltip.SetDefault("Light does not reach the depths of the ocean\n" +
"Significantly reduces enemy aggression, even in the abyss\n" +
"Stealth generates 30% faster when standing still and 20% faster while moving\n" +
"Grants the ability to evade attacks, releasing a cloud of lumenyl fluid which damages and stuns nearby enemies\n" +
"Evading an attack grants a lot of stealth but has a 90 second cooldown\n" +
"This cooldown is shared with all other dodges and reflects");
}
public override void SetDefaults()
{
item.width = 30;
item.height = 38;
item.value = CalamityGlobalItem.Rarity7BuyPrice;
item.rare = ItemRarityID.Lime;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.stealthGenStandstill += 0.3f;
modPlayer.stealthGenMoving += 0.2f;
modPlayer.abyssalMirror = true;
player.aggro -= 450;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<MirageMirror>());
recipe.AddIngredient(ModContent.ItemType<InkBomb>());
recipe.AddIngredient(ItemID.SpectreBar, 8);
recipe.AddIngredient(ModContent.ItemType<SeaPrism>(), 10);
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 5);
recipe.AddIngredient(ModContent.ItemType<Lumenite>(), 5);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}