Files
CalamityModPublic/Buffs/DamageOverTime/RiptideDebuff.cs
T
Xyk 8df3188613 Added Riptide (Debuff) and changed Crush Depth
Riptide deals 20 dps on enemies and 3 dps on players
Crush Depth deals 50 dps on enemies and 9 dps on players

Abyssal Amulet and Depth crusher use Riptide instead of Crush Depth
2023-08-21 21:15:51 -07:00

31 lines
819 B
C#

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class RiptideDebuff : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().rTide = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().rTide < npc.buffTime[buffIndex])
npc.Calamity().rTide = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
}
}