Terraria.ModLoader.ModBuff

This class serves as a place for you to define a new buff and how that buff behaves.

Methods

Autoload(System.String@,System.String@)()
Allows you to automatically load a buff instead of using Mod.AddBuff. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name and texture is initialized to the namespace and overriding class name with periods replaced with slashes. Use this method to either force or stop an autoload, and to change the default display name and texture path.
SetDefaults()
This is where all buff related assignments go. For example:
Update(Terraria.Player,System.Int32@)()
Allows you to make this buff give certain effects to the given player. If you remove the buff from the player, make sure the decrement the buffIndex parameter by 1.
Update(Terraria.NPC,System.Int32@)()
Allows you to make this buff give certain effects to the given NPC. If you remove the buff from the NPC, make sure to decrement the buffIndex parameter by 1.
ReApply(Terraria.Player,System.Int32,System.Int32)()
Allows to you make special things happen when adding this buff to a player when the player already has this buff. Return true to block the vanilla re-apply code from being called; returns false by default. The vanilla re-apply code sets the buff time to the "time" argument if that argument is larger than the current buff time.
ReApply(Terraria.NPC,System.Int32,System.Int32)()
Allows to you make special things happen when adding this buff to an NPC when the NPC already has this buff. Return true to block the vanilla re-apply code from being called; returns false by default. The vanilla re-apply code sets the buff time to the "time" argument if that argument is larger than the current buff time.
ModifyBuffTip(System.String@,System.Int32@)()
Allows you to modify the tooltip that displays when the mouse hovers over the buff icon, as well as the color the buff's name is drawn in.