Difference between revisions of "My buffedstat"

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
m (moved My buffedstat() to My buffedstat: Conformity)
imported>Grotfang
(Conform to template)
Line 1: Line 1:
[[int]] '''[[my_buffedstat()|my_buffedstat]]( [[stat]] st )'''
+
{{#vardefine:name|my_buffedstat}}
 +
{{#vardefine:return_type|int}}
  
Returns your current buffed value in the specified [[stat]] as an [[int]].
+
{{FunctionPage|
 +
name={{#var:name}}|
 +
function_category=Your Character|
  
Passing $stat[submuscle], $stat[submysticality], or $stat[submoxie] to this function will always return 0.
+
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
parameter1={{Param|stat|st}}|
 +
p1desc=Enter the stat you wish to return the buffed value of in the form of $stat[stat].
 +
}}|
  
This example prints your current buffed stats:
+
function_description=Returns your current buffed value in the specified stat as an int. Passing $stat[submuscle], $stat[submysticality], or $stat[submoxie] to this function will always return 0.|
  
<code>
+
code1={{CodeSample|
  [[print()|print]]("My buffed muscle: " + [[my_buffedstat()|my_buffedstat]]($[[stat]][muscle]));
+
title=Code Samples|
  [[print()|print]]("My buffed moxie: " + [[my_buffedstat()|my_buffedstat]]($[[stat]][moxie]));
+
description=This example prints your current buffed stats.|
  [[print()|print]]("My buffed muscle: " + [[my_buffedstat()|my_buffedstat]]($[[stat]][muscle]));
+
code=
</code>
+
<syntaxhighlight>
[[Category:Your Character | My buffedstat()]]
+
print("My buffed muscle: " + my_buffedstat($stat[muscle]));
[[Category:Ash Functions | My buffedstat()]]
+
print("My buffed mysticality: " + my_buffedstat($stat[mysticality]));
 +
print("My buffed moxie: " + my_buffedstat($stat[moxie]));
 +
</syntaxhighlight>
 +
}}|
  
When not logged in, this function returns 0 regardless of parameter.
+
see_also={{SeeAlso|my_basestat}}|
 +
special=When not logged in, this function returns 0 regardless of parameter.
 +
}}

Revision as of 13:00, 1 March 2010



Function Syntax

int my_buffedstat(stat st )

  • Enter the stat you wish to return the buffed value of in the form of $stat[stat].

Returns your current buffed value in the specified stat as an int. Passing $stat[submuscle], $stat[submysticality], or $stat[submoxie] to this function will always return 0.

Code Samples

This example prints your current buffed stats.

print("My buffed muscle: " + my_buffedstat($stat[muscle]));
print("My buffed mysticality: " + my_buffedstat($stat[mysticality]));
print("My buffed moxie: " + my_buffedstat($stat[moxie]));

See Also

my_basestat()

Special

When not logged in, this function returns 0 regardless of parameter.