Stat bonus today: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
m moved Stat bonus today() to Stat bonus today: Conformity
imported>Grotfang
Conform to template
Line 1: Line 1:
[[stat]] [[stat_bonus_today()]]
{{#vardefine:name|stat_bonus_today}}
{{#vardefine:return_type|stat}}


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].
{{FunctionPage|
name={{#var:name}}|
function_category=Your Character|


This example attempts to eat some food giving moxie substats if today is a moxie day:
function1={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}
}}|


<code>
function_description=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].|
  if ([[stat_bonus_today()]] == $[[stat]][moxie]) {
    [[eat()|eat]](3, $[[item]][rat appendix chow mein]);
  }
</code>
[[Category:Your Character | Stat bonus today()]]
[[Category:Ash Functions | Stat bonus today()]]


When not logged in, this function either returns $stat[none] or functions normally (needs spading).
code1={{CodeSample|
title=Code Samples|
description=This example attempts to eat some food giving moxie substats if today is a moxie day.|
code=
<syntaxhighlight>
if(stat_bonus_today() == $stat[moxie]) {
  eat(3 , $item[rat appendix chow mein]);
}
</syntaxhighlight>
}}|
 
see_also={{SeeAlso|stat_bonus_tomorrow|my_primestat}}|
special=When not logged in, this function returns $stat[none](needs spading).
}}

Revision as of 12:35, 1 March 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).