Difference between revisions of "Your Character"

From Kolmafia
Jump to navigation Jump to search
imported>Grotfang
imported>Grotfang
Line 5: Line 5:
 
'''string [[my_name|my_name()]]''' - returns your character’s name in all-lowercase.
 
'''string [[my_name|my_name()]]''' - returns your character’s name in all-lowercase.
  
'''string [[my_id()]]''' - returns your character’s id.
+
'''string [[my_id|my_id()]]''' - returns your character’s id.
  
'''class [[my_class()]]''' - returns your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
+
'''class [[my_class|my_class()]]''' - returns your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
  
'''int [[my_level()]]''' - returns your level. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
+
'''int [[my_level|my_level()]]''' - returns your level. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_2:_Battlefield_gather|Battlefield_gather]])
  
'''int [[my_adventures()]]''' - returns the number of adventures that you have remaining. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]])
+
'''int [[my_adventures|my_adventures()]]''' - returns the number of adventures that you have remaining. (''Sample'':[[%28ASHRM%29_Code_Samples#Sample_4:_Hedging|Hedging]])
  
'''int [[my_turncount()]]''' - returns the number of adventures used so far in this ascension.
+
'''int [[my_turncount|my_turncount()]]''' - returns the number of adventures used so far in this ascension.
  
'''int [[my_inebriety()]]''' - returns your current drunkenness.<br />
+
'''int [[my_inebriety|my_inebriety()]]''' - returns your current drunkenness.<br />
'''int [[inebriety_limit()]]''' - returns your maximum safe drukenness level.
+
'''int [[inebriety_limit|inebriety_limit()]]''' - returns your maximum safe drukenness level.
  
'''int [[my_spleen_use()]]''' - returns your current spleen use.<br />
+
'''int [[my_spleen_use|my_spleen_use()]]''' - returns your current spleen use.<br />
'''int [[spleen_limit()]]''' - returns your spleen limit.
+
'''int [[spleen_limit|spleen_limit()]]''' - returns your spleen limit.
  
'''int [[my_fullness()]]''' - returns how full you are.<br />
+
'''int [[my_fullness|my_fullness()]]''' - returns how full you are.<br />
'''int [[fullness_limit()]]''' - returns your maximum possible fullness.
+
'''int [[fullness_limit|fullness_limit()]]''' - returns your maximum possible fullness.
  
'''boolean [[can_eat()]]'''<br />
+
'''boolean [[can_eat|can_eat()]]'''<br />
'''boolean [[can_drink()]]'''<br />
+
'''boolean [[can_drink|can_drink()]]'''<br />
'''boolean [[can_interact()]]'''<br />
+
'''boolean [[can_interact|can_interact()]]'''<br />
'''boolean [[in_hardcore()]]'''<br />
+
'''boolean [[in_hardcore|in_hardcore()]]'''<br />
 
Tells you about your limitations due to ronin, hardcore, or voluntary dietary restrictions
 
Tells you about your limitations due to ronin, hardcore, or voluntary dietary restrictions
  
Line 33: Line 33:
 
<hr>
 
<hr>
  
'''stat [[my_primestat()]]''' - returns the stat associated with your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
+
'''stat [[my_primestat|my_primestat()]]''' - returns the stat associated with your class. (''Sample'': [[%28ASHRM%29_Code_Samples#Sample_1:_Seltzer|Seltzer]])
  
'''boolean [[in_moxie_sign()]]'''<br />
+
'''boolean [[in_moxie_sign|in_moxie_sign()]]'''<br />
'''boolean [[in_muscle_sign()]]'''<br />
+
'''boolean [[in_muscle_sign|in_muscle_sign()]]'''<br />
'''boolean [[in_mysticality_sign()]]'''<br />
+
'''boolean [[in_mysticality_sign|in_mysticality_sign()]]'''<br />
 
Returns whether your ascension sign is associated with a specific stat zone.
 
Returns whether your ascension sign is associated with a specific stat zone.
  
'''int [[my_hp()]]''' - returns your current HP.<br />
+
'''int [[my_hp|my_hp()]]''' - returns your current HP.<br />
'''int [[my_mp()]]''' - returns your current MP.<br />
+
'''int [[my_mp|my_mp()]]''' - returns your current MP.<br />
'''int [[my_maxhp()]]''' - returns your current maximum HP.<br />
+
'''int [[my_maxhp|my_maxhp()]]''' - returns your current maximum HP.<br />
'''int [[my_maxmp()]]''' - returns your current maximum MP.<br />
+
'''int [[my_maxmp|my_maxmp()]]''' - returns your current maximum MP.<br />
'''int [[my_basestat()|my_basestat( stat st )]]''' - returns your current base value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].  Passing $stat[SubMuscle], $stat[SubMysticality], or $stat[SubMoxie] to this function will return total substat points.<br />
+
'''int [[my_basestat|my_basestat( stat st )]]''' - returns your current base value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].  Passing $stat[SubMuscle], $stat[SubMysticality], or $stat[SubMoxie] to this function will return total substat points.<br />
'''int [[my_buffedstat()|my_buffedstat( stat st )]]''' - returns your current buffed value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].
+
'''int [[my_buffedstat|my_buffedstat( stat st )]]''' - returns your current buffed value in the given [[%28ASHRM%29_Datatype_Constants#.24stat.5Bconstant.5D|stat]].
  
'''int [[current_mcd()]]''' - returns the current level of your mind-control device.<br />
+
'''int [[current_mcd|current_mcd()]]''' - returns the current level of your mind-control device.<br />
'''boolean [[change_mcd()|change_mcd( int level )]]''' - sets your mind-control device to the specified level.
+
'''boolean [[change_mcd|change_mcd( int level )]]''' - sets your mind-control device to the specified level.
  
'''stat [[stat_bonus_today()]]'''<br />
+
'''stat [[stat_bonus_today|stat_bonus_today()]]'''<br />
'''stat [[stat_bonus_tomorrow()]]'''<br />
+
'''stat [[stat_bonus_tomorrow|stat_bonus_tomorrow()]]'''<br />
 
Returns the stat that is benefitted by the moon phases today or tomorrow.  If it is an &#8220;ordinary&#8221; day, the return value is $stat[none].
 
Returns the stat that is benefitted by the moon phases today or tomorrow.  If it is an &#8220;ordinary&#8221; day, the return value is $stat[none].
  
Line 57: Line 57:
 
<hr>
 
<hr>
  
'''stat [[current_hit_stat()]]''' - returns the stat that is currently used to calculate hit percentages.<br />
+
'''stat [[current_hit_stat|current_hit_stat()]]''' - returns the stat that is currently used to calculate hit percentages.<br />
'''int [[buffed_hit_stat()]]''' - returns the current buffed value of your hit stat.  Identical to <tt>my_buffedstat(current_hit_stat())</tt>.
+
'''int [[buffed_hit_stat|buffed_hit_stat()]]''' - returns the current buffed value of your hit stat.  Identical to <tt>my_buffedstat(current_hit_stat())</tt>.
  
'''int [[raw_damage_absorption()]]''' - returns the total DA of all your gear and effects.<br />
+
'''int [[raw_damage_absorption|raw_damage_absorption()]]''' - returns the total DA of all your gear and effects.<br />
'''float [[damage_absorption_percent()]]''' - returns the percentage of damage that is blocked by all your gear and effects.<br />
+
'''float [[damage_absorption_percent|damage_absorption_percent()]]''' - returns the percentage of damage that is blocked by all your gear and effects.<br />
'''int [[damage_reduction()]]''' - returns the amount of damage deducted from successful attacks due to the DR of your gear and effects.
+
'''int [[damage_reduction|damage_reduction()]]''' - returns the amount of damage deducted from successful attacks due to the DR of your gear and effects.
  
'''float [[elemental_resistance()|elemental_resistance( element elem )]]''' - returns the percentage of damage reduction from the indicated elemental damage.
+
'''float [[elemental_resistance|elemental_resistance( element elem )]]''' - returns the percentage of damage reduction from the indicated elemental damage.
  
'''float [[combat_rate_modifier()]]''' - returns the adjustment to your percentage of combat adventures.<br>
+
'''float [[combat_rate_modifier|combat_rate_modifier()]]''' - returns the adjustment to your percentage of combat adventures.<br>
'''float [[initiative_modifier()]]''' - returns the adjustment to your chance of winning initiative in battle.<br />
+
'''float [[initiative_modifier|initiative_modifier()]]''' - returns the adjustment to your chance of winning initiative in battle.<br />
'''float [[experience_bonus()]]''' - returns the amount of bonus experience you receive.<br />
+
'''float [[experience_bonus|experience_bonus()]]''' - returns the amount of bonus experience you receive.<br />
'''float [[meat_drop_modifier()]]''' - returns the adjustment to your amount of meat dropped.<br />
+
'''float [[meat_drop_modifier|meat_drop_modifier()]]''' - returns the adjustment to your amount of meat dropped.<br />
'''float [[item_drop_modifier()]]''' - returns the adjustment to your percentage of item drops.
+
'''float [[item_drop_modifier|item_drop_modifier()]]''' - returns the adjustment to your percentage of item drops.
  
'''int [[monster_level_adjustment()]]''' - returns your total +ML (including the MCD).
+
'''int [[monster_level_adjustment|monster_level_adjustment()]]''' - returns your total +ML (including the MCD).

Revision as of 14:28, 1 March 2010

The Basics


We'll start with a long look in the mirror. Here's how to tell about you.

string my_name() - returns your character’s name in all-lowercase.

string my_id() - returns your character’s id.

class my_class() - returns your class. (Sample: Seltzer)

int my_level() - returns your level. (Sample: Battlefield_gather)

int my_adventures() - returns the number of adventures that you have remaining. (Sample:Hedging)

int my_turncount() - returns the number of adventures used so far in this ascension.

int my_inebriety() - returns your current drunkenness.
int inebriety_limit() - returns your maximum safe drukenness level.

int my_spleen_use() - returns your current spleen use.
int spleen_limit() - returns your spleen limit.

int my_fullness() - returns how full you are.
int fullness_limit() - returns your maximum possible fullness.

boolean can_eat()
boolean can_drink()
boolean can_interact()
boolean in_hardcore()
Tells you about your limitations due to ronin, hardcore, or voluntary dietary restrictions

Basic Stats


stat my_primestat() - returns the stat associated with your class. (Sample: Seltzer)

boolean in_moxie_sign()
boolean in_muscle_sign()
boolean in_mysticality_sign()
Returns whether your ascension sign is associated with a specific stat zone.

int my_hp() - returns your current HP.
int my_mp() - returns your current MP.
int my_maxhp() - returns your current maximum HP.
int my_maxmp() - returns your current maximum MP.
int my_basestat( stat st ) - returns your current base value in the given stat. Passing $stat[SubMuscle], $stat[SubMysticality], or $stat[SubMoxie] to this function will return total substat points.
int my_buffedstat( stat st ) - returns your current buffed value in the given stat.

int current_mcd() - returns the current level of your mind-control device.
boolean change_mcd( int level ) - sets your mind-control device to the specified level.

stat stat_bonus_today()
stat stat_bonus_tomorrow()
Returns the stat that is benefitted by the moon phases today or tomorrow. If it is an “ordinary” day, the return value is $stat[none].

More Advanced Stats


stat current_hit_stat() - returns the stat that is currently used to calculate hit percentages.
int buffed_hit_stat() - returns the current buffed value of your hit stat. Identical to my_buffedstat(current_hit_stat()).

int raw_damage_absorption() - returns the total DA of all your gear and effects.
float damage_absorption_percent() - returns the percentage of damage that is blocked by all your gear and effects.
int damage_reduction() - returns the amount of damage deducted from successful attacks due to the DR of your gear and effects.

float elemental_resistance( element elem ) - returns the percentage of damage reduction from the indicated elemental damage.

float combat_rate_modifier() - returns the adjustment to your percentage of combat adventures.
float initiative_modifier() - returns the adjustment to your chance of winning initiative in battle.
float experience_bonus() - returns the amount of bonus experience you receive.
float meat_drop_modifier() - returns the adjustment to your amount of meat dropped.
float item_drop_modifier() - returns the adjustment to your percentage of item drops.

int monster_level_adjustment() - returns your total +ML (including the MCD).