Difference between revisions of "Monster attack"

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
(better indicate mafia's handling, remove a needless RFI)
imported>Bale
(answered RFI)
Line 30: Line 30:
 
see_also={{SeeAlso|monster_defense|monster_element|monster_hp}}|
 
see_also={{SeeAlso|monster_defense|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=If no monster is specified and no monster has been fought in this session, this function returns 0. This is because mafia forgets the value of [[last_monster|last_monster()]] when it logs out.|
 
}}
 
}}
{{RFI|Is the not-logged-in value correct?}}
 

Revision as of 02:07, 28 April 2010

needs(code_samples);

Function Syntax

int monster_attack()

int monster_attack(monster check_me )

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

Returns the attack value of the specified monster check_me. If check_me is not specified, it will use the current monster if you are in a fight (i.e. you're calling the function from an In-combat Consulting script), or the last monster you encountered otherwise.

The return value includes monster level modifications. This means that for monsters with unknown attack, the return value will be equivalent to monster_level_adjustment(). Relatedly, it will update the information returned each time it is called, to the best of KoLmafia's knowledge.

See Also

monster_defense() | 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

If no monster is specified and no monster has been fought in this session, this function returns 0. This is because mafia forgets the value of last_monster() when it logs out.