mechanics.statuses
Class ChargeEffect

java.lang.Object
  extended by mechanics.statuses.StatusEffect
      extended by mechanics.statuses.ChargeEffect
All Implemented Interfaces:
java.lang.Cloneable

public class ChargeEffect
extends StatusEffect


Field Summary
 
Fields inherited from class mechanics.statuses.StatusEffect
m_lock, SPECIAL_EFFECT_LOCK, STATE_ACTIVE, STATE_DEACTIVATED, STATE_REMOVABLE, WEATHER_EFFECT_LOCK
 
Constructor Summary
ChargeEffect(int turns, java.lang.String msg, MoveListEntry move)
          Initialise a new charge effect.
 
Method Summary
 boolean apply(Pokemon p)
          Applies the initial effects of the status to a pokemon but does not add the status to the list of statuses the pokemon has.
 boolean deactivates(Pokemon p)
          Charge prevents the pokemon from choosing a move.
 java.lang.String getDescription()
          Get a description of this status effect.
 MoveListEntry getMove()
          Return the move that will be used after the charge finishes.
 java.lang.String getName()
          Get the name of this status effect.
 int getTier()
          Remove the tier of the after-turn effect.
 MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry)
           
 boolean immobilises(Pokemon p)
          Return whether this effect immobilises the pokemon.
 boolean isMoveTransformer(boolean enemy)
          Returns true if this status effect is capable of transforming moves.
 void setTurns(int turns)
           
 boolean switchOut(Pokemon p)
          Called when a pokemon with this status effect switches out.
 boolean tick(Pokemon p)
          Called each turn that this status effect is applied to a pokemon.
 void unapply(Pokemon p)
          Unapply this status effect.
 
Methods inherited from class mechanics.statuses.StatusEffect
activate, apply, beginTick, canSwitch, canSwitch, clone, deactivate, disable, equals, executeTurn, getEffectiveness, getEnemyTransformedEffectiveness, getEnemyTransformedMove, getInducer, getLock, getMove, getTierCount, getTransformedEffectiveness, hitsThroughSubstitute, informDamaged, informDuplicateEffect, isActive, isEffectivenessTransformer, isExclusiveWith, isListener, isPassable, isRemovable, isSingleton, setInducer, switchIn, vetoesMove
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargeEffect

public ChargeEffect(int turns,
                    java.lang.String msg,
                    MoveListEntry move)
Initialise a new charge effect.

Parameters:
turns - the number of turns to charge for
msg - message to display when effect is applied
move - move to use after charge is complete
Method Detail

getName

public java.lang.String getName()
Description copied from class: StatusEffect
Get the name of this status effect.

Overrides:
getName in class StatusEffect

setTurns

public void setTurns(int turns)

isMoveTransformer

public boolean isMoveTransformer(boolean enemy)
Description copied from class: StatusEffect
Returns true if this status effect is capable of transforming moves.

Overrides:
isMoveTransformer in class StatusEffect
Parameters:
enemy - whether this is an enemy move

getTransformedMove

public MoveListEntry getTransformedMove(Pokemon p,
                                        MoveListEntry entry)
Overrides:
getTransformedMove in class StatusEffect

apply

public boolean apply(Pokemon p)
Description copied from class: StatusEffect
Applies the initial effects of the status to a pokemon but does not add the status to the list of statuses the pokemon has.

Overrides:
apply in class StatusEffect

unapply

public void unapply(Pokemon p)
Description copied from class: StatusEffect
Unapply this status effect.

Overrides:
unapply in class StatusEffect

deactivates

public boolean deactivates(Pokemon p)
Charge prevents the pokemon from choosing a move.

Overrides:
deactivates in class StatusEffect

switchOut

public boolean switchOut(Pokemon p)
Description copied from class: StatusEffect
Called when a pokemon with this status effect switches out. Returns true if the status effect should be removed.

Overrides:
switchOut in class StatusEffect

getTier

public int getTier()
Description copied from class: StatusEffect
Remove the tier of the after-turn effect.

Overrides:
getTier in class StatusEffect

tick

public boolean tick(Pokemon p)
Description copied from class: StatusEffect
Called each turn that this status effect is applied to a pokemon. Returns whether the status was removed.

Overrides:
tick in class StatusEffect

getDescription

public java.lang.String getDescription()
Description copied from class: StatusEffect
Get a description of this status effect.

Overrides:
getDescription in class StatusEffect

getMove

public MoveListEntry getMove()
Return the move that will be used after the charge finishes.

Returns:
the move

immobilises

public boolean immobilises(Pokemon p)
Description copied from class: StatusEffect
Return whether this effect immobilises the pokemon.

Overrides:
immobilises in class StatusEffect