|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmechanics.BattleMechanics
mechanics.AdvanceMechanics
public class AdvanceMechanics
This class represents the mechanics in the advanced generation of pokemon.
Constructor Summary | |
---|---|
AdvanceMechanics(int bytes)
Creates a new instance of AdvanceMechanics |
Method Summary | |
---|---|
boolean |
attemptHit(PokemonMove move,
Pokemon user,
Pokemon target)
Return whether the move hit. |
int |
calculateDamage(PokemonMove move,
Pokemon attacker,
Pokemon defender,
boolean silent)
Calculate the damage done by a move. |
int |
calculateStat(Pokemon p,
int i)
Calculate the initial value of a stat from a pokemon's base stats and hidden stats. |
boolean |
isCriticalHit(PokemonMove move,
Pokemon user,
Pokemon target)
|
boolean |
isMoveSpecial(PokemonMove move)
Return whether a given move deals special damage. |
void |
validateHiddenStats(Pokemon p)
There are several conditions to validate. |
Methods inherited from class mechanics.BattleMechanics |
---|
calculateDamage, getRandom, getRandomBytes, getRandomSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdvanceMechanics(int bytes)
Method Detail |
---|
public int calculateStat(Pokemon p, int i) throws StatException
BattleMechanics
calculateStat
in class BattleMechanics
p
- the pokemon whose stats to calculatei
- the stat to calculate (use the constants Pokemon.S_HP, etc.)
StatException
public boolean attemptHit(PokemonMove move, Pokemon user, Pokemon target)
attemptHit
in class BattleMechanics
public boolean isCriticalHit(PokemonMove move, Pokemon user, Pokemon target)
public boolean isMoveSpecial(PokemonMove move)
isMoveSpecial
in class BattleMechanics
public int calculateDamage(PokemonMove move, Pokemon attacker, Pokemon defender, boolean silent)
BattleMechanics
calculateDamage
in class BattleMechanics
public void validateHiddenStats(Pokemon p) throws ValidationException
validateHiddenStats
in class BattleMechanics
ValidationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |