all_monsters_with_id

From Kolmafia
Jump to navigation Jump to search

Function Syntax

boolean [monster] all_monsters_with_id()

Returns a map of all monsters that have a non-zero monster ID.

This function always retrieves the up-to-date internal list of known monsters. This function is needed because $monsters[] contains a list of monsters that is fixed when an ASH script begins execution, and does not change while the script is running. (See this post for explanation)

Code Samples

Show all monsters that drop at least 200 meat.

foreach mon in all_monsters_with_id()
{
   if ( mon.min_meat >= 200 )
   {
      print( `{mon}: {mon.min_meat}-{mon.max_meat}` );
   }
}