To skill: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
No edit summary
imported>StDoodle
mNo edit summary
Line 12: Line 12:
return_type={{#var:return_type}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
return_also={{#var:return_also}}|
parameter1={{Param|effect|check_me}}|
parameter1={{Param|int|convert}}|
p1desc={{Pspan|check_me}} is the effect to check|
}}|
}}|


function_description=Returns the skill that, when cast on a player, gives them the effect {{pspan|check_me}}. If {{pspan|check_me}} cannot be given by use of a skill, this function returns $skill[none].|
function2={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
parameter1={{Param|string|convert}}|
}}|
 
function3={{Function|
name={{#var:name}}|
aggregate={{#var:aggregate}}|
return_type={{#var:return_type}}|
return_also={{#var:return_also}}|
parameter1={{Param|effect|convert}}|
p1desc={{Pspan|convert}} is the int, string or effect to convert|
}}|
function_description=When supplied an int or string, returns the skill that corresponds to the specified parameter {{pspan|convert}}, or $skill[ none ] if no match is found. When supplied an effect, this returns the skill that, when cast on a player, gives them the effect {{pspan|convert}}. If {{pspan|convert}} cannot be given by use of a skill, this function returns $skill[ none ].|


needscode=yes|
needscode=yes|


}}
}}

Revision as of 01:42, 13 March 2010

needs(code_samples);

Function Syntax

skill to_skill(int convert )

skill to_skill(string convert )

skill to_skill(effect convert )

  • convert is the int, string or effect to convert

When supplied an int or string, returns the skill that corresponds to the specified parameter convert, or $skill[ none ] if no match is found. When supplied an effect, this returns the skill that, when cast on a player, gives them the effect convert. If convert cannot be given by use of a skill, this function returns $skill[ none ].