Difference between revisions of "Combat rate modifier"

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
(Created page with ' ')
 
imported>Fredg1
m (functionally equivalent to numeric_modifier("Combat Rate"))
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
+
{{
 +
#vardefine:name|combat_rate_modifier}}{{
 +
#vardefine:return_type|float}}{{
 +
 
 +
FunctionPage|
 +
name={{#var:name}}|
 +
 
 +
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}
 +
}}|
 +
 
 +
function_description=Returns the current percentage change on combat frequency including equipment and effects.|
 +
 
 +
code1={{CodeSample|
 +
title=Code Samples|
 +
description=Checks that your combat frequency modifier is positive (for example, before adventuring in the Purple Light District).|
 +
code=
 +
<syntaxhighlight>
 +
boolean is_combat_positive() {
 +
  if(combat_rate_modifier() > 0) {
 +
      return true;
 +
  }
 +
  return false;
 +
}
 +
</syntaxhighlight>|
 +
 
 +
moreinfo=This is functionally equivalent to doing <code>numeric_modifier("Combat Rate")</code>}}|
 +
 
 +
see_also={{SeeAlso|appearance_rates}}|
 +
special=Returns 0.0 when not logged in.
 +
}}
 +
 
 +
[[Category:Your Character]]

Latest revision as of 21:46, 3 June 2020

Function Syntax

float combat_rate_modifier()

Returns the current percentage change on combat frequency including equipment and effects.

Code Samples

Checks that your combat frequency modifier is positive (for example, before adventuring in the Purple Light District).

boolean is_combat_positive() {
   if(combat_rate_modifier() > 0) {
      return true;
   }
   return false;
}

This is functionally equivalent to doing numeric_modifier("Combat Rate")

See Also

appearance_rates()

Special

Returns 0.0 when not logged in.