Elemental resistance: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Heeheehee (clarification) |
||
Line 20: | Line 20: | ||
code1={{CodeSample| | code1={{CodeSample| | ||
title=Code Samples| | title=Code Samples| | ||
description=Checks that | description=Checks that your current hot resistance reduces damage by more than 20 percent.| | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> |
Revision as of 03:17, 22 April 2010
Function Syntax
float elemental_resistance(element )
- The parameter of element is invoked using $element. Valid elements are hot ($element[hot]), cold, stench, spooky, sleaze.
Returns your current resistance for a specified element in the form of a floating point integer.
Code Samples
Checks that your current hot resistance reduces damage by more than 20 percent.
boolean hot_check() {
if(elemental_resistance($element[hot]) > 20) {
return true;
}
return false;
}
Special
When not logged in the function returns 0.0