Difference between revisions of "Monster initiative"

From Kolmafia
Jump to navigation Jump to search
imported>Darzil
(Created page with "{{ #vardefine:name|monster_initiative}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggrega...")
 
imported>Bale
(template)
Line 28: Line 28:
 
see_also={{SeeAlso|monster_attack|monster_defense|monster_element|monster_hp}}|
 
see_also={{SeeAlso|monster_attack|monster_defense|monster_element|monster_hp}}|
 
more_info=|
 
more_info=|
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.|
+
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 {{f|last_monster}} when it logs out.|
 
}}
 
}}
  
 
[[Category:Adventuring]][[Category:In-combat Consulting]]
 
[[Category:Adventuring]][[Category:In-combat Consulting]]

Revision as of 06:25, 8 November 2014

needs(code_samples);

Function Syntax

int monster_initiative()

int monster_initiative(monster check_me )

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

Returns the initiative 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.

When the function is given a monster as a parameter it will return the monster's initiative at the start of a fight including all monster level modifications. This means that for monsters with unknown initiative, the return value will only take into account monster level.

See Also

monster_attack() | monster_defense() | monster_element() | monster_hp()

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.