|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmechanics.moves.PokemonMove
public class PokemonMove
This class represents a move that a pokemon can use on its turn.
Field Summary | |
---|---|
protected double |
m_accuracy
|
protected MoveListEntry |
m_entry
|
protected int |
m_power
|
protected int |
m_pp
|
protected PokemonType |
m_type
|
Constructor Summary | |
---|---|
PokemonMove(PokemonType type,
int power,
double accuracy,
int pp)
Initialise a typical attacking move. |
Method Summary | |
---|---|
boolean |
attemptHit(BattleMechanics mech,
Pokemon user,
Pokemon target)
Attempt to hit an enemy. |
void |
beginTurn(BattleTurn[] turn,
int index,
Pokemon source)
This function is called at the beginning on a turn on which this move is about to be used. |
boolean |
canCriticalHit()
Return whether this move can strike critical. |
java.lang.Object |
clone()
Clone this move. |
double |
getAccuracy()
Get accuracy. |
double |
getEffectiveness(Pokemon user,
Pokemon defender)
Get the effectiveness of this move against a denfending pokemon. |
static double |
getEffectiveness(PokemonType type,
Pokemon user,
Pokemon defender)
Get the effectiveness of one type of move against an arbitrary pokemon. |
MoveListEntry |
getMoveListEntry()
Return this move's entry in the move list. |
int |
getPower()
Get the power of this move. |
int |
getPp()
Get PP. |
int |
getPriority()
Get the priority of this move. |
java.lang.Class |
getStatusException()
Some moves can be used even if a status effect (e.g. |
PokemonType |
getType()
Get the type of this move. |
boolean |
hasHighCriticalHitRate()
Determine whether this move has a high chance of striking a critical hit. |
boolean |
isAttack()
Returns whether this move is an attack. |
boolean |
isBuggy()
Return whether this move is buggy. |
boolean |
isDamaging()
Return whether this move deals damage. |
boolean |
isSpecial(BattleMechanics mech)
Return whether this move should use special attack and defence. |
void |
setAccuracy(double accuracy)
Set the accuracy of this move. |
void |
setPower(int power)
Set the power of this move. |
void |
setType(PokemonType type)
Set the type of this move. |
void |
switchIn(Pokemon p)
This method is called when a pokemon who has this move is switched into the field. |
int |
use(BattleMechanics mech,
Pokemon user,
Pokemon target)
Cause a pokemon to use this move on another pokemon. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PokemonType m_type
protected int m_power
protected double m_accuracy
protected int m_pp
protected MoveListEntry m_entry
Constructor Detail |
---|
public PokemonMove(PokemonType type, int power, double accuracy, int pp)
Method Detail |
---|
public MoveListEntry getMoveListEntry()
public boolean isSpecial(BattleMechanics mech)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean attemptHit(BattleMechanics mech, Pokemon user, Pokemon target)
public int use(BattleMechanics mech, Pokemon user, Pokemon target)
public int getPp()
public boolean isDamaging()
public double getAccuracy()
public void setAccuracy(double accuracy)
public PokemonType getType()
public java.lang.Class getStatusException()
public double getEffectiveness(Pokemon user, Pokemon defender)
public static double getEffectiveness(PokemonType type, Pokemon user, Pokemon defender)
public void switchIn(Pokemon p)
public boolean canCriticalHit()
public void setType(PokemonType type)
public int getPower()
public void setPower(int power)
public int getPriority()
public boolean hasHighCriticalHitRate()
public boolean isAttack()
public void beginTurn(BattleTurn[] turn, int index, Pokemon source)
turn
- the moves about to be used on this turnindex
- the position of the source pokemon in the turn arraysource
- the pokemon who is using the movepublic boolean isBuggy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |