Goal exists
Function Syntax
boolean goal_exists(string type )
- type is checked to see if it is a goal. Valid goal types are:
- choiceadv
- autostop,
- meat
- health
- mana
- item
This function returns true if there are any goals that match type.
CodeSample
Version of is_goal()
that accepts a stat and return true if it is a goal.
boolean is_goal( stat gstat ) {
matcher stat_goal = create_matcher( "\\d+ "+to_lower_case(gstat), g );
foreach i,g in get_goals()
if( stat_goal.find() )
return true;
return false;
}