Stat bonus today: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>ZammyWarrior
No edit summary
imported>Zarqon
more links, consistent formatting, stub for logged-out info
Line 1: Line 1:
'''stat stat_bonus_today()'''<br/>
[[stat]] [[stat_bonus_today()]]
Returns the stat that is benefitted by the moon phases today. If it is an “ordinary” day, the return value is $stat[none].
 
<pre>if(stat_bonus_today() == $stat[moxie]){
Returns the [[stat]] that is benefitted by the moon phases today. If it is an "ordinary" day (no stat benefits), the return value is $stat[none].
eat(3, $item[rat appendix chow mein]);
 
}</pre>
This example attempts to eat some food giving moxie substats if today is a moxie day:
 
<code>
  if ([[stat_bonus_today()]] == $[[stat]][moxie]) {
    [[eat()|eat]](3, $[[item]][rat appendix chow mein]);
  }
</code>
[[Category:Your Character | Stat bonus today()]]
[[Category:Your Character | Stat bonus today()]]
[[Category:Ash Functions |Stat bonus today()]]
[[Category:Ash Functions | Stat bonus today()]]
 
When not logged in, this function either returns $stat[none] or functions normally (needs spading).

Revision as of 06:19, 30 January 2009

stat stat_bonus_today()

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

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]);
 }

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