Files
CalamityModPublic/Buffs/Summon/ProfanedSoulGuardians.cs
T
tomat 67bceff6e7 Initial dotnet format pass.
This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
2024-02-28 21:49:50 -08:00

35 lines
1.0 KiB
C#

using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class ProfanedSoulGuardians : ModBuff
{
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
Main.buffNoSave[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
CalamityPlayer modPlayer = player.Calamity();
if (!modPlayer.pSoulGuardians || modPlayer.profanedCrystalBuffs)
{
player.DelBuff(buffIndex);
buffIndex--;
}
else
player.buffTime[buffIndex] = 18000;
}
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
{
Player player = Main.player[Main.myPlayer];
if (player.Calamity().profanedCrystal && !player.Calamity().profanedCrystalBuffs)
tip = this.GetLocalizedValue("VanityDescription");
}
}
}