Difference between revisions of "Stat bonus today"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>Bale
m
 
Line 5: Line 5:
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Your Character|
 
  
 
function1={{Function|
 
function1={{Function|
Line 30: Line 29:
 
special=When not logged in, this function returns $stat[none](needs spading).
 
special=When not logged in, this function returns $stat[none](needs spading).
 
}}
 
}}
 +
 +
[[Category:Your Character]]

Latest revision as of 21:37, 21 May 2010

Function Syntax

stat stat_bonus_today()

Returns the stat that is benefited by the moon phases today. If it is an "ordinary" day (no stat benefits), the return value is $stat[none].

Code Samples

This example attempts to eat some food giving moxie substats if today is a moxie day.

if(stat_bonus_today() == $stat[moxie]) {
   eat(3 , $item[rat appendix chow mein]);
}

See Also

stat_bonus_tomorrow() | my_primestat()

Special

When not logged in, this function returns $stat[none](needs spading).