I have no idea how to make stack limit like a daybroken debuff and if this possible after 5 stack increase damage dealt to target
public override bool InstancePerEntity => true;
public bool SBPoison;
public int PoisonStack = 0;
public override void ResetEffects(NPC npc)
{
SBPoison = false;
}
public override void UpdateLifeRegen(NPC npc, ref int damage)
{
if (SBPoison)
{
if (npc.lifeRegen > 0)
{
npc.lifeRegen = 0;
}
npc.lifeRegen -= PoisonStack * 2 * 10; // stack*2 for damage, and *10 to make it tick 5 times a second
if (damage < PoisonStack * 2)
{
damage = PoisonStack * 2;
}
}
else
{
PoisonStack = 0; //To reset the stack, when it's not refreshed
}
}
public override bool InstancePerEntity => true;
public bool SBPoison;
public int PoisonStack = 0;
public override void ResetEffects(NPC npc)
{
SBPoison = false;
}
public override void UpdateLifeRegen(NPC npc, ref int damage)
{
if (SBPoison)
{
if (npc.lifeRegen > 0)
{
npc.lifeRegen = 0;
}
npc.lifeRegen -= PoisonStack * 2 * 10; // stack*2 for damage, and *10 to make it tick 5 times a second
if (damage < PoisonStack * 2)
{
damage = PoisonStack * 2;
}
}
else
{
PoisonStack = 0; //To reset the stack, when it's not refreshed
}
}