Difference between revisions of "Current mcd"

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
 
imported>Bale
m
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''int current_mind_control_level()'''<br/>
+
{{
Returns the level of the Super-Secret Canadian Mind-Control Device
+
#vardefine:name|current_mcd}}{{
[[Category:Your Character | Current mind control level()]]
+
#vardefine:return_type|int}}{{
[[Category:Ash Functions |Current mind control level()]]
+
 
 +
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 level of the logged-in character's mind-control device (Detuned Radio, Super-Secret Canadian Mind-Control Device, or Annoy-o-Tron 5000) as an int.  Possible values are 0-11 for mysticality signs and 0-10 for others.|
 +
 
 +
code1={{CodeSample|
 +
title=Code Samples|
 +
description=This example function ensures that the MCD is set to 5 before attacking the Bonerdagon.|
 +
code=
 +
<syntaxhighlight>
 +
boolean fight_bonerdagon() {
 +
  if(current_mcd() != 5 || change_mcd(5)) {
 +
      adventure(1 , $location[Haert of the Cyrpt]);
 +
  }
 +
}
 +
</syntaxhighlight>
 +
}}|
 +
 
 +
see_also={{SeeAlso|change_mcd}}|
 +
special=When not logged in, this function returns 0.
 +
}}
 +
 
 +
[[Category:Your Character]]

Latest revision as of 21:37, 21 May 2010

Function Syntax

int current_mcd()

Returns the current level of the logged-in character's mind-control device (Detuned Radio, Super-Secret Canadian Mind-Control Device, or Annoy-o-Tron 5000) as an int. Possible values are 0-11 for mysticality signs and 0-10 for others.

Code Samples

This example function ensures that the MCD is set to 5 before attacking the Bonerdagon.

boolean fight_bonerdagon() {
   if(current_mcd() != 5 || change_mcd(5)) {
      adventure(1 , $location[Haert of the Cyrpt]);
   }
}

See Also

change_mcd()

Special

When not logged in, this function returns 0.