My effects

From Kolmafia
Revision as of 19:00, 16 August 2012 by imported>Relyk (fix if unsatisfactory)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

int [effect] my_effects()

Returns an array of the character's current effects and their durations. Intrinsic effects have a duration of -1.

Code Sample

The following shrugs off any Accordion Thief buffs currently active.

int [effect] currentEffects = my_effects(); // Array of current active effects
foreach buff in currentEffects{
	skill currentEffect = to_skill(buff);
	if (currentEffect.class == $class[accordion thief] && currentEffect.buff) // True if AT buff
	{
		cli_execute("uneffect " + to_string(buff));
	}
}

CLI Equivalent

The CLI command "effects" gives information on all of your current effect durations.

See Also

have_effect()