Effect modifier

From Kolmafia
Revision as of 10:17, 4 May 2010 by imported>Bale (Created page with '{{ #vardefine:name|effect_modifier}}{{ #vardefine:return_type|effect}}{{ FunctionPage| name={{#var:name}}| function_category=Modifier Functions| function1={{Function| name={{#v…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

effect effect_modifier(string check_me ,string modifier_name )

effect effect_modifier(item check_me ,string modifier_name )

Returns an effect if check_me is effect specific. modifier_name is the modifier to check for.

Code Sample

Prints a list of all items that have intrinsic effects

effect eff;
foreach doodad in $items[] {
   eff = effect_modifier( doodad , "Intrinsic Effect" );
   if(eff != $effect[none])
      print(doodad +" grants "+ eff);
}

More Information

See this thread for details.