Elemental resistance: Difference between revisions
Jump to navigation
Jump to search
imported>Grotfang m moved Elemental resistance() to Elemental resistance: Conformity |
imported>Grotfang Conform to template |
||
Line 1: | Line 1: | ||
{{#vardefine:name|elemental_resistance}} | |||
{{#vardefine:return_type|float}} | |||
{{FunctionPage| | |||
name={{#var:name}}| | |||
function_category=Your Character| | |||
function1={{Function| | |||
name={{#var:name}}| | |||
aggregate={{#var:aggregate}}| | |||
return_type={{#var:return_type}}| | |||
return_also={{#var:return_also}}| | |||
parameter1={{Param|element|$element[] can be hot, cold, stench, sleaze, spooky.}}| | |||
p1desc=Y | |||
}}| | |||
function_description=Returns your current resistance for a specified element in the form of a floating point integer.| | |||
When not logged in the function returns 0 (needs spading). | code1={{CodeSample| | ||
title=Code Samples| | |||
description=Checks that you have a resistance greater than 20 for the element "hot".| | |||
code= | |||
<syntaxhighlight> | |||
boolean hot_check() { | |||
if(elemental_resistance($element[hot]) > 20) { | |||
return true; | |||
} | |||
return false; | |||
} | |||
</syntaxhighlight> | |||
}}| | |||
special=When not logged in the function returns 0 (needs spading). | |||
}} |
Revision as of 22:34, 28 February 2010
Function Syntax
float elemental_resistance(element $element[] can be hot, cold, stench, sleaze, spooky. )
- Y
Returns your current resistance for a specified element in the form of a floating point integer.
Code Samples
Checks that you have a resistance greater than 20 for the element "hot".
boolean hot_check() {
if(elemental_resistance($element[hot]) > 20) {
return true;
}
return false;
}
Special
When not logged in the function returns 0 (needs spading).