Files
CalamityModPublic/Buffs/StatBuffs/Haste.cs
T
2024-01-05 17:39:01 -05:00

26 lines
667 B
C#

using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatBuffs
{
public class Haste : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
// keep the buff active as long as the player's haste level is up
if (player.Calamity().hasteLevel > 0)
{
player.buffTime[buffIndex] = 60;
}
}
}
}