mechanics.moves
Class StatusMove

java.lang.Object
  extended by mechanics.moves.PokemonMove
      extended by mechanics.moves.StatusMove
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
MoveList.FixedAttackMove

public class StatusMove
extends PokemonMove


Field Summary
 
Fields inherited from class mechanics.moves.PokemonMove
m_accuracy, m_entry, m_power, m_pp, m_type
 
Constructor Summary
StatusMove(PokemonType type, int power, double accuracy, int pp, StatusEffect[] statuses, boolean[] attacker, double[] chances)
          Creates a new instance of StatusMove
 
Method Summary
 boolean attemptHit(BattleMechanics mech, Pokemon user, Pokemon target)
          Attempt a hit.
 java.lang.Object clone()
          Clone this move.
 StatusEffect[] getEffects()
           
 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 isEffective(Pokemon target)
          Return whether this status effect can be successfully applied.
 void setAttacker(int idx, boolean attacker)
          Sets if a an effect affects the attacker.
 int use(BattleMechanics mech, Pokemon user, Pokemon target)
          The rules for whether this move can hit are elaborate.
 
Methods inherited from class mechanics.moves.PokemonMove
beginTurn, canCriticalHit, getAccuracy, getEffectiveness, getEffectiveness, getMoveListEntry, getPower, getPp, getPriority, getStatusException, getType, hasHighCriticalHitRate, isSpecial, setAccuracy, setPower, setType, switchIn
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusMove

public StatusMove(PokemonType type,
                  int power,
                  double accuracy,
                  int pp,
                  StatusEffect[] statuses,
                  boolean[] attacker,
                  double[] chances)
Creates a new instance of StatusMove

Method Detail

attemptHit

public boolean attemptHit(BattleMechanics mech,
                          Pokemon user,
                          Pokemon target)
Attempt a hit. Personal enhancement moves never miss, but other status moves can.

Overrides:
attemptHit in class PokemonMove

clone

public java.lang.Object clone()
Description copied from class: PokemonMove
Clone this move.

Overrides:
clone in class PokemonMove

getEffects

public StatusEffect[] getEffects()

isAttack

public boolean isAttack()
Description copied from class: PokemonMove
Returns whether this move is an attack. This method is shoddy and should be overridden by any exceptions.

Overrides:
isAttack in class PokemonMove

isDamaging

public boolean isDamaging()
Description copied from class: PokemonMove
Return whether this move deals damage.

Overrides:
isDamaging in class PokemonMove

isBuggy

public boolean isBuggy()
Description copied from class: PokemonMove
Return whether this move is buggy.

Overrides:
isBuggy in class PokemonMove

setAttacker

public void setAttacker(int idx,
                        boolean attacker)
Sets if a an effect affects the attacker.


isEffective

public boolean isEffective(Pokemon target)
Return whether this status effect can be successfully applied. This is very random and not logical at all.


use

public int use(BattleMechanics mech,
               Pokemon user,
               Pokemon target)
The rules for whether this move can hit are elaborate. If the move does damage then the normal type rules apply; if the move has no effect then it will not inflict statuses either. However, if the move does not do damage and does not inflict one of the SPECIAL_EFFECT_LOCK statuses then it can hit even types normally immune to the move's type.

Two intrinsic abilities also affect this method. If the user has Serene Grace then the chance of each effect being applied is double. If the target has Shield Dust then none of the effects can be applied to it so long as the move does damage.

Overrides:
use in class PokemonMove