Difference between revisions of "Monster level adjustment"

From Kolmafia
Jump to navigation Jump to search
imported>MapleMario
(New page: '''monster_level_adjustment()''' Returns your current +ML, including any MCDs. Example: <p><pre># Script that tries to figure out if it's better to use Volley or Brero # for a certain are...)
 
imported>Professorjellybean
m
 
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''monster_level_adjustment()'''
+
{{
Returns your current +ML, including any MCDs.
+
#vardefine:name|monster_level_adjustment}}{{
 +
#vardefine:return_type|int}}{{
  
Example:
+
FunctionPage|
<p><pre># Script that tries to figure out if it's better to use Volley or Brero
+
name={{#var:name}}|
# for a certain area's ML (assuming that your volley and 'brero are both 20 lbs.)
 
  
boolean better_to_use_brero(int ml_being_tested)
+
function1={{Function|
{
+
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}
 +
}}|
  
  int ml_modifier = monster_level_adjustment();
+
function_description=Returns the cumulative total of all monster level adjustments from equipment, effects and area modifiers.|
  if ((ml_being_tested + ml_modifier) >= 85) return true;
 
  return false;
 
  
}</pre></p>
+
code1={{CodeSample|
 +
title=Code Samples|
 +
description=Checks to see if you should use a level 20 sombrero over a volleyball for a monster of level 60.|
 +
code=
 +
<syntaxhighlight>
 +
boolean better_to_use_brero() {
 +
  int test = 60 + monster_level_adjustment();
 +
  return test >= 85;
 +
}
 +
</syntaxhighlight>
 +
}}|
 +
 
 +
see_also={{SeeAlso|current_mcd|change_mcd}}|
 +
special=Return 0 when not logged in.|
 +
}}
 +
 
 +
[[Category:Your Character]]

Latest revision as of 22:02, 4 April 2016

Function Syntax

int monster_level_adjustment()

Returns the cumulative total of all monster level adjustments from equipment, effects and area modifiers.

Code Samples

Checks to see if you should use a level 20 sombrero over a volleyball for a monster of level 60.

boolean better_to_use_brero() {
   int test = 60 + monster_level_adjustment();
   return test >= 85;
}

See Also

current_mcd() | change_mcd()

Special

Return 0 when not logged in.