Files
CalamityModPublic/Items/VanillaArmorChanges/EskimoArmorSetChange.cs
T
Ozzatron 6e4e1b68b7 1.4.4 port revert: Vanilla armor changes
Changed mining set so that we don't mess with the mining speed at all
2023-02-11 22:41:54 -05:00

48 lines
1.7 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.VanillaArmorChanges
{
public class EskimoArmorSetChange : VanillaArmorChange
{
public override int? HeadPieceID => ItemID.EskimoHood;
public override int? BodyPieceID => ItemID.EskimoCoat;
public override int? LegPieceID => ItemID.EskimoPants;
// The normal and Pink Eskimo set can be mixed and matched.
public override int[] AlternativeHeadPieceIDs => new int[] { ItemID.PinkEskimoHood };
public override int[] AlternativeBodyPieceIDs => new int[] { ItemID.PinkEskimoCoat };
public override int[] AlternativeLegPieceIDs => new int[] { ItemID.PinkEskimoPants };
public override bool NeedsToCreateSetBonusTextManually => true;
public override string ArmorSetName => "Eskimo";
public override void UpdateSetBonusText(ref string setBonusText)
{
// Not sure why it doesn't say Set bonus automatically
setBonusText = "Set bonus: Multiplies all cold-based debuff damage by 1.25\n" +
"Cold enemies will deal reduced contact damage to the player\n" +
"Provides immunity to the Chilled, Frozen, Frostburn and Glacial State debuffs";
}
public override void ApplyArmorSetBonus(Player player)
{
player.Calamity().eskimoSet = true;
// TODO -- DELETE THE FOLLOWING 2 LINES IN THE 1.4.4 PORT
player.buffImmune[BuffID.Chilled] = true;
player.buffImmune[BuffID.Frozen] = true;
player.buffImmune[BuffID.Frostburn] = true;
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
}
}
}