mechanics.moves
Class MoveList.SpikesEffect

java.lang.Object
  extended by mechanics.statuses.StatusEffect
      extended by mechanics.statuses.field.FieldEffect
          extended by mechanics.moves.MoveList.SpikesEffect
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
MoveList.StealthRockEffect, MoveList.ToxicSpikesEffect
Enclosing class:
MoveList

public static class MoveList.SpikesEffect
extends FieldEffect


Field Summary
protected  int[] m_layers
           
protected  int m_maxLayers
           
protected  java.lang.String m_message
           
 
Fields inherited from class mechanics.statuses.StatusEffect
m_lock, SPECIAL_EFFECT_LOCK, STATE_ACTIVE, STATE_DEACTIVATED, STATE_REMOVABLE, WEATHER_EFFECT_LOCK
 
Constructor Summary
MoveList.SpikesEffect()
           
 
Method Summary
 void addSpikes(Pokemon p)
          Adds a layer of spikes to a Pokemon's team.
 boolean applyToField(BattleField field)
          Apply this effect to a field.
 java.lang.String getDescription()
          Get a description of this status effect.
 int getLayers(Pokemon p)
          Returns the number of layers of spikes that are applied to a Pokemon.
 java.lang.String getName()
          Get the name of this status effect.
static MoveList.SpikesEffect getSpikes(BattleField field, java.lang.Class type)
          Returns the instance of a certain class of spikes on the field, if one is present.
 int getTier()
          Remove the tier of the after-turn effect.
 void removeSpikes(Pokemon p)
          Removes spikes from a Pokemon's team.
 void switchIn(Pokemon p)
          Called when a pokemon with this status effect switches in.
 boolean tickField(BattleField field)
          Tick the effect on the whole field.
 
Methods inherited from class mechanics.statuses.field.FieldEffect
beginTick, clone, getFieldCopy, switchOut, tick, tickPokemon, unapplyToField
 
Methods inherited from class mechanics.statuses.StatusEffect
activate, apply, apply, canSwitch, canSwitch, deactivate, deactivates, disable, equals, executeTurn, getEffectiveness, getEnemyTransformedEffectiveness, getEnemyTransformedMove, getInducer, getLock, getMove, getTierCount, getTransformedEffectiveness, getTransformedMove, hitsThroughSubstitute, immobilises, informDamaged, informDuplicateEffect, isActive, isEffectivenessTransformer, isExclusiveWith, isListener, isMoveTransformer, isPassable, isRemovable, isSingleton, setInducer, unapply, vetoesMove
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_layers

protected int[] m_layers

m_maxLayers

protected int m_maxLayers

m_message

protected java.lang.String m_message
Constructor Detail

MoveList.SpikesEffect

public MoveList.SpikesEffect()
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

getDescription

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

Overrides:
getDescription 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

getSpikes

public static MoveList.SpikesEffect getSpikes(BattleField field,
                                              java.lang.Class type)
Returns the instance of a certain class of spikes on the field, if one is present.


getLayers

public int getLayers(Pokemon p)
Returns the number of layers of spikes that are applied to a Pokemon.


addSpikes

public void addSpikes(Pokemon p)
Adds a layer of spikes to a Pokemon's team.


removeSpikes

public void removeSpikes(Pokemon p)
Removes spikes from a Pokemon's team.


switchIn

public void switchIn(Pokemon p)
Description copied from class: StatusEffect
Called when a pokemon with this status effect switches in.

Overrides:
switchIn in class StatusEffect

applyToField

public boolean applyToField(BattleField field)
Description copied from class: FieldEffect
Apply this effect to a field.

Specified by:
applyToField in class FieldEffect

tickField

public boolean tickField(BattleField field)
Description copied from class: FieldEffect
Tick the effect on the whole field.

Specified by:
tickField in class FieldEffect
Returns:
whether the effect was removed