Difference between revisions of "Stat bonus tomorrow"

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
imported>Grotfang
(Conform to template)
Line 1: Line 1:
[[stat]] [[stat_bonus_tomorrow()]]
+
{{#vardefine:name|stat_bonus_tomorrow}}
 +
{{#vardefine:return_type|stat}}
  
Returns the [[stat]] that will benefit from the moon phases tomorrow. If it will be an "ordinary" day (no stat benefits), the return value is $stat[none].
+
{{FunctionPage|
 +
name={{#var:name}}|
 +
function_category=Your Character|
  
The following [[function]] returns ''true'' if tomorrow will be a stat day benefitting your primary stat.
+
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 will benefit from the moon phases tomorrow. If it will be an "ordinary" day (no stat benefits), the return value is $stat[none].|
  [[boolean]] my_statday_tomorrow() {
 
    return ([[stat_bonus_tomorrow()]] == [[my_primestat()]]);
 
  }
 
</code>
 
[[Category:Your Character | Stat bonus tomorrow()]]
 
[[Category:Ash Functions | Stat bonus tomorrow()]]
 
  
When not logged in, this function returns $stat[none] or behaves normally (needs spading).
+
code1={{CodeSample|
 +
title=Code Samples|
 +
description=The following function checks to see if tomorrow will be a stat day benefiting your primary stat.|
 +
code=
 +
<syntaxhighlight>
 +
boolean my_statday_tomorrow() {
 +
  if(stat_bonus_tomorrow() == my_primestat()) {
 +
      return true;
 +
  }
 +
  return false;
 +
}
 +
</syntaxhighlight>
 +
}}|
 +
 
 +
see_also={{SeeAlso|my_primestat|stat_bonus_today}}|
 +
special=When not logged in, this function returns $stat[none].
 +
}}

Revision as of 12:28, 1 March 2010



Function Syntax

stat stat_bonus_tomorrow()

Returns the stat that will benefit from the moon phases tomorrow. If it will be an "ordinary" day (no stat benefits), the return value is $stat[none].

Code Samples

The following function checks to see if tomorrow will be a stat day benefiting your primary stat.

boolean my_statday_tomorrow() {
   if(stat_bonus_tomorrow() == my_primestat()) {
      return true;
   }
   return false;
}

See Also

my_primestat() | stat_bonus_today()

Special

When not logged in, this function returns $stat[none].