|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectshoddybattle.PokemonSpecies
public class PokemonSpecies
This class represents a species of pokemon.
Field Summary | |
---|---|
static int |
GENDER_BOTH
|
static int |
GENDER_FEMALE
|
static int |
GENDER_MALE
Gender constants. |
static int |
GENDER_NONE
|
protected int[] |
m_base
|
protected int |
m_genders
|
protected java.lang.String |
m_name
|
protected int |
m_species
Serialised data. |
protected PokemonType[] |
m_type
|
Constructor Summary | |
---|---|
PokemonSpecies(PokemonSpecies i)
Allows for construction from another PokemonSpecies. |
|
PokemonSpecies(PokemonSpeciesData data,
int i)
Creates a new instance of PokemonSpecies |
|
PokemonSpecies(PokemonSpeciesData data,
java.lang.String str)
Construct by name. |
Method Summary | |
---|---|
boolean |
canLearn(PokemonSpeciesData data,
java.lang.String move)
Return whether this species can learn a particular move. |
boolean |
canUseAbility(PokemonSpeciesData data,
java.lang.String ability)
Return whether a pokemon can have a particular ability. |
int |
getBase(int i)
|
int[] |
getBaseStats()
Get this pokemon's base stats. |
static PokemonSpeciesData |
getDefaultData()
Return the default species data. |
java.util.TreeSet |
getLearnableMoves(PokemonSpeciesData data)
Return a TreeSet of moves that the pokemon can learn. |
MoveSet |
getMoveSet(MoveSetData data)
Get the MoveSet associated with this species. |
java.lang.String |
getName()
Get the name of this species. |
java.util.SortedSet |
getPossibleAbilities(PokemonSpeciesData data)
Return a TreeSet of possible abilities. |
int |
getPossibleGenders()
Return the possible genders for this species. |
PokemonType[] |
getTypes()
|
static java.lang.Object |
readObject(PokemonSpeciesData data,
java.io.ObjectInputStream in)
Read a PokemonSpecies from a stream, backed by an arbitrary PokemonSpeciesData object. |
static void |
setDefaultData(PokemonSpeciesData data)
Set the default species data. |
void |
setName(java.lang.String name)
Set the name of this species. |
void |
setPossibleGenders(int genders)
Set the possible genders for this species. |
void |
setType(PokemonType[] type)
Set the type of this pokemon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int m_species
protected java.lang.String m_name
public static final int GENDER_MALE
public static final int GENDER_FEMALE
public static final int GENDER_BOTH
public static final int GENDER_NONE
protected transient int[] m_base
protected transient PokemonType[] m_type
protected transient int m_genders
Constructor Detail |
---|
public PokemonSpecies(PokemonSpeciesData data, int i) throws PokemonException
PokemonException
public PokemonSpecies(PokemonSpecies i)
public PokemonSpecies(PokemonSpeciesData data, java.lang.String str) throws PokemonException
PokemonException
Method Detail |
---|
public int getPossibleGenders()
public void setPossibleGenders(int genders)
public static PokemonSpeciesData getDefaultData()
public static void setDefaultData(PokemonSpeciesData data)
public boolean canUseAbility(PokemonSpeciesData data, java.lang.String ability)
public java.util.SortedSet getPossibleAbilities(PokemonSpeciesData data)
public static java.lang.Object readObject(PokemonSpeciesData data, java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public int[] getBaseStats()
public PokemonType[] getTypes()
public void setType(PokemonType[] type)
public int getBase(int i) throws StatException
StatException
public java.lang.String getName()
public void setName(java.lang.String name)
public MoveSet getMoveSet(MoveSetData data)
public java.util.TreeSet getLearnableMoves(PokemonSpeciesData data)
public boolean canLearn(PokemonSpeciesData data, java.lang.String move)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |