Difference between revisions of "Monster defense"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
(Created page with '{{ #vardefine:name|monster_defense}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function_category=Adventuring| second_category=In-combat Consulting| fun…')
 
imported>StDoodle
m
Line 28: Line 28:
 
needscode=yes|
 
needscode=yes|
  
see_also={{SeeAlso|monster_attack|monster_hp}}|
+
see_also={{SeeAlso|monster_attack|monster_element|monster_hp}}|
 
more_info=For the current discussion of what's being tracked in-combat for monster level adjustments, please see [http://kolmafia.us/showthread.php?3452 this thread].|
 
more_info=For the current discussion of what's being tracked in-combat for monster level adjustments, please see [http://kolmafia.us/showthread.php?3452 this thread].|
 
special=When not logged in, this function returns 0 if no monster is specified.|
 
special=When not logged in, this function returns 0 if no monster is specified.|
 
}}
 
}}
 
{{RFI|Is the information about the self-updating nature of the return value correct?|Is the not-logged-in value correct?}}
 
{{RFI|Is the information about the self-updating nature of the return value correct?|Is the not-logged-in value correct?}}

Revision as of 14:41, 10 March 2010

needs(code_samples);

Function Syntax

int monster_defense()

int monster_defense(monster check_me )

  • check_me is the (optional) monster to get the defense value of

Returns the defense value of the specified monster check_me. If check_me is not specified, it defaults to the last monster you encountered. This function adjusts for know effects (such as monster level modifications).

This function can be used from within an In-combat Consulting script to help determine your fight strategy. When used this way, it isn't necessary to specify a monster, as the function will default to the one currently being fought. It will update the information returned each time it is called, to the best of KoLmafia's knowledge.

See Also

monster_attack() | monster_element() | monster_hp()

More Information

For the current discussion of what's being tracked in-combat for monster level adjustments, please see this thread.

Special

When not logged in, this function returns 0 if no monster is specified.


Attention KoLmafia Experts!

We need your help; some details of this function's operation are unknown or unclear.

The following specific questions have been raised:

  • Is the information about the self-updating nature of the return value correct?
  • Is the not-logged-in value correct?