Jump chance: Difference between revisions
Jump to navigation
Jump to search
imported>Bale needscode=yes |
imported>Eliteofdelete No edit summary |
||
Line 70: | Line 70: | ||
function_description=Returns the chance of successfully getting the jump against the monster or in the location, optionally at a particular initiative value and monster level.| | function_description=Returns the chance of successfully getting the jump against the monster or in the location, optionally at a particular initiative value and monster level.| | ||
code1={{CodeSample| | |||
title=Code Samples| | |||
description=| | |||
code= | |||
<syntaxhighlight> | |||
void location_jump (location place) { | |||
print(""+place+" has the following enemies that you might get the jump on:", "purple"); | |||
foreach mob, freq in appearance_rates(place) //Appearance rates is used to weed out bosses/one time specials/etc | |||
if (freq > 0) | |||
print("The jump chance you have against "+mob+" is "+jump_chance(mob)+"%.", "blue"); | |||
} | |||
location_jump($location[The Black Forest]); | |||
</syntaxhighlight>| | |||
moreinfo= For more information on jump opponents visit KoL Wiki's [http://kol.coldfront.net/thekolwiki/index.php/Talk:Combat_Initiative Combat Initiative] | |||
}}| | |||
}} | }} |
Revision as of 14:37, 17 January 2015
Function Syntax
int [item] jump_chance()
int [item] jump_chance(monster m )
int [item] jump_chance(monster m ,int i )
int [item] jump_chance(monster m ,int i ,int ml )
int [item] jump_chance(location l )
Returns the chance of successfully getting the jump against the monster or in the location, optionally at a particular initiative value and monster level.
Code Samples
void location_jump (location place) {
print(""+place+" has the following enemies that you might get the jump on:", "purple");
foreach mob, freq in appearance_rates(place) //Appearance rates is used to weed out bosses/one time specials/etc
if (freq > 0)
print("The jump chance you have against "+mob+" is "+jump_chance(mob)+"%.", "blue");
}
location_jump($location[The Black Forest]);
For more information on jump opponents visit KoL Wiki's Combat Initiative