Difference between revisions of "Current hit stat"

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
imported>Zarqon
(added example, more links, consistent formatting)
Line 1: Line 1:
'''stat current_hit_stat()'''<br/>
+
[[stat]] [[current_hit_stat()]]
Returns the stat that is currently used to calculate hit percentages.
+
 
 +
Returns the [[stat]] that is currently used to calculate hit percentages.
 +
 
 +
The following will warn non-myst classes if they are equipping the wrong type of weapon (melee vs. ranged).
 +
 
 +
<code>
 +
  if ([[my_primestat()]] != $[[stat]][mysticality] && [[current_hit_stat()]] != [[my_primestat()]])
 +
    [[print()|print]]("You could probably select a more effective weapon!");
 +
</code>
 +
 
 +
A better use for this function would be in consult scripts to determine your expected success in smiting foes.
 +
 
 
[[Category:Your Character | hit stat()]]
 
[[Category:Your Character | hit stat()]]
[[Category:Ash Functions |hit stat()]]
+
[[Category:Ash Functions | hit stat()]]
[[Category:Needs Code Samples | hit stat()]]
+
 
 +
When not logged in, this function returns ?? (needs spading)

Revision as of 07:28, 30 January 2009

stat current_hit_stat()

Returns the stat that is currently used to calculate hit percentages.

The following will warn non-myst classes if they are equipping the wrong type of weapon (melee vs. ranged).

 if (my_primestat() != $stat[mysticality] && current_hit_stat() != my_primestat())
   print("You could probably select a more effective weapon!");

A better use for this function would be in consult scripts to determine your expected success in smiting foes.

When not logged in, this function returns ?? (needs spading)