Stat modifier: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
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…'
 
imported>Bale
mNo edit summary
 
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Modifier Functions|


function1={{Function|
function1={{Function|
Line 42: Line 41:
more_info= See [http://kolmafia.us/showthread.php?802 this thread] for details.|
more_info= See [http://kolmafia.us/showthread.php?802 this thread] for details.|
}}
}}
[[Category:Modifier Functions]]

Latest revision as of 05:25, 22 May 2010

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.