63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Rarities;
|
|
using CalamityMod.Tiles.Furniture.CraftingStations;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Accessories
|
|
{
|
|
[LegacyName("AstralArcanum")]
|
|
public class Purity : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Accessories";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7));
|
|
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 18;
|
|
Item.height = 44;
|
|
Item.defense = 8;
|
|
Item.accessory = true;
|
|
Item.value = CalamityGlobalItem.Rarity15BuyPrice;
|
|
Item.rare = ModContent.RarityType<Violet>();
|
|
}
|
|
|
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
player.statLifeMax2 += 100;
|
|
|
|
// Abyss light, debuff near-immunity, life regen effects, and massively enhances debuff halving
|
|
modPlayer.purity = true;
|
|
|
|
// Inherits effects from Honey Dew and Living Dew
|
|
modPlayer.alwaysHoneyRegen = true;
|
|
modPlayer.honeyDewHalveDebuffs = true;
|
|
modPlayer.livingDewHalveDebuffs = true;
|
|
|
|
// Add light if the other accessories aren't equipped and visibility is turned on
|
|
if (!(modPlayer.rOoze || modPlayer.aAmpoule) && !hideVisual)
|
|
Lighting.AddLight(player.Center, new Vector3(1.32f, 1.32f, 1.82f));
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<AmbrosialAmpoule>().
|
|
AddIngredient<InfectedJewel>().
|
|
AddIngredient<AuricBar>(5).
|
|
AddIngredient<AscendantSpiritEssence>(4).
|
|
AddTile<CosmicAnvil>().
|
|
Register();
|
|
}
|
|
}
|
|
}
|