Difference between revisions of "Weight adjustment"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
(Created page with example.)
 
imported>Ckb
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Your Character|
 
  
 
function1={{Function|
 
function1={{Function|
Line 21: Line 20:
 
code=
 
code=
 
<syntaxhighlight>
 
<syntaxhighlight>
boolean fam_weight() {
+
int fam_weight( familiar fam ) {
   return ( familiar_weight(my_familiar()) + weight_adjustment() );
+
   return ( familiar_weight(fam) + weight_adjustment() );
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 30: Line 29:
 
special=Returns 0 when not logged in.|
 
special=Returns 0 when not logged in.|
 
}}
 
}}
 +
 +
[[Category:Your Character]]

Latest revision as of 02:33, 14 October 2016

Function Syntax

int weight_adjustment()

Returns the cumulative total of all familiar weight adjustments from equipment, effects, passive skills, and area modifiers.

Code Samples

Checks to see how heavy a specified familiar is, including all weight-affecting effects.

int fam_weight( familiar fam ) {
   return ( familiar_weight(fam) + weight_adjustment() );
}

See Also

familiar_weight() | my_familiar()

Special

Returns 0 when not logged in.