Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
33 lines
883 B
C#
33 lines
883 B
C#
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Buffs.StatDebuffs
|
|
{
|
|
public class TimeSlow : ModBuff
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
DisplayName.SetDefault("Time Distortion");
|
|
Description.SetDefault("Time is slowed");
|
|
Main.debuff[Type] = true;
|
|
Main.pvpBuff[Type] = true;
|
|
Main.buffNoSave[Type] = true;
|
|
longerExpertDebuff = false;
|
|
canBeCleared = false;
|
|
}
|
|
|
|
public override void Update(NPC npc, ref int buffIndex)
|
|
{
|
|
if (npc.Calamity().timeSlow < npc.buffTime[buffIndex])
|
|
npc.Calamity().timeSlow = npc.buffTime[buffIndex];
|
|
npc.DelBuff(buffIndex);
|
|
buffIndex--;
|
|
}
|
|
|
|
/*public override void Update(Player player, ref int buffIndex)
|
|
{
|
|
player.Calamity().timeSlow = true;
|
|
}*/
|
|
}
|
|
}
|