Help implementing debuffs

ZZBowzer

Terrarian
I have been working on implementing a buff that creates a debuff that limits any regeneration As well as any consumable use. I have been wondering if it is possible to implement the effects of potion sickness without having the buff icon appear. I have code which allows the icon to appear but i am having trouble figuring out how to run the potion sickness debuff as long as my other debuff is active. Here is the code for any looking to help

public override void SetDefaults()
{
DisplayName.SetDefault("Sick");
Description.SetDefault("You are sick to your stomach, and are unable to heal");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = true;
}

public override void Update(Player player, ref int buffIndex)
{
player.lifeRegen = 0;

while (player.HasBuff(mod.BuffType("SickDebuff")))
{
if (!player.HasBuff(BuffID.PotionSickness))
{
player.AddBuff(BuffID.PotionSickness, 1);
}
}

}
 
Back
Top Bottom