33 lines
889 B
C#
33 lines
889 B
C#
using CalamityMod.CalPlayer;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.Summon
|
|
{
|
|
public class ColdDivinityBuff : ModBuff
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
DisplayName.SetDefault("Cold Divinity");
|
|
Description.SetDefault("The magic of the ancient ice castle will aid you");
|
|
Main.buffNoTimeDisplay[Type] = true;
|
|
Main.buffNoSave[Type] = true;
|
|
}
|
|
|
|
public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.coldDivinity = true;
|
|
if (!modPlayer.coldDivinity)
|
|
{
|
|
player.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
else
|
|
{
|
|
player.buffTime[buffIndex] = 18000;
|
|
}
|
|
}
|
|
}
|
|
}
|