Stat modifier

From Kolmafia
Revision as of 10:10, 4 May 2010 by imported>Bale (Created page with '{{ #vardefine:name|stat_modifier}}{{ #vardefine:return_type|stat}}{{ FunctionPage| name={{#var:name}}| function_category=Modifier Functions| function1={{Function| name={{#var:n…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

stat stat_modifier(item check_me ,string modifier_name )

stat stat_modifier(string check_me ,string modifier_name )

Returns a stat if check_me is stat specific.

Code Sample

Prints the stats which are equalized by the effects of various equalizing potions.

stat st;
foreach eff in $effects[] {
   st = stat_modifier( eff , "Equalize" );
   if(st != $stat[none])
      print(eff +" equalizes all stats to "+ st);
}

More Information

See this thread for details.