de.adom.jade.beings.races
Class Race

java.lang.Object
  extended by de.adom.jade.beings.races.Race
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PCRace

public class Race
extends java.lang.Object
implements java.io.Serializable

Implements all the basic data for a race. Races include attribute modifiers, racial skills and other details for members of that race. Races form the basis for all further data that a being is made up from.

See Also:
Serialized Form

Constructor Summary
Race(java.lang.String name, java.lang.String attribute, int hpPercentage, int pwPercentage, int dvMod, int pvMod, int speedMod, int stMod, int leMod, int wiMod, int dxMod, int toMod, int chMod, int apMod, int maMod, int peMod, int xpMod, Gender[] genders)
          Instantiates a new type of race.
 
Method Summary
 int getAttributeModifier(int index)
          Returns the attribute modifier for a given attribute.
 int getBasicAttribute(int attribute)
          Returns a basic attribute value for a given atribute and a member of this race.
 int getDVModifier()
          Returns the DV modifier of the given race.
 int getExperienceModifier()
           
 int getHpPercentageModifier()
           
static Race getPCRace(int index)
          Returns a specific race by index.
static Race[] getPCRaces()
          Returns an array of the available PC races.
 Gender[] getPermittedGenders()
          Returns an array of the permitted genders for this race.
 int getPVModifier()
          Returns the PV modifier of the given race.
 int getPwPercentageModifier()
           
 java.lang.String getRaceAttribute()
          Returns the racial attribute for this race.
 int getSpeedModifier()
           
 java.lang.String toString()
          Returns the name of the race.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Race

public Race(java.lang.String name,
            java.lang.String attribute,
            int hpPercentage,
            int pwPercentage,
            int dvMod,
            int pvMod,
            int speedMod,
            int stMod,
            int leMod,
            int wiMod,
            int dxMod,
            int toMod,
            int chMod,
            int apMod,
            int maMod,
            int peMod,
            int xpMod,
            Gender[] genders)
Instantiates a new type of race.

Parameters:
name - the name of the race
attribute - the attribute descriptor for members of this race
hpPercentage - the hit point modifier (in percent)
pwPercentage - the power point modifier (in percent)
dvMod - the absolute DV modifier
pvMod - the absolute PV modifier
speedMod - the absolute speed modifier
stMod - the absolute strength modifier for members of this race
leMod - the absolute learning modifier for members of this race
wiMod - the absolute willpower modifier for members of this race
dxMod - the absolute dexterity modifier for members of this race
toMod - the absolute toughness modifier for members of this race
chMod - the absolute charisma modifier for members of this race
apMod - the absolute appearance modifier for members of this race
maMod - the absolute mana modifier for members of this race
peMod - the absolute perception modifier for members of this race
xpMod - the experience point modifier (in percent)
Method Detail

getBasicAttribute

public int getBasicAttribute(int attribute)
Returns a basic attribute value for a given atribute and a member of this race.

Parameters:
attribute - the basic attribute value to be determined
Returns:
the basic atribute value

getAttributeModifier

public int getAttributeModifier(int index)
Returns the attribute modifier for a given attribute.

Parameters:
index - the index of the attribute
Returns:
the modifier

toString

public java.lang.String toString()
Returns the name of the race.

Overrides:
toString in class java.lang.Object
Returns:
the name of the race

getPCRaces

public static Race[] getPCRaces()
Returns an array of the available PC races.

Returns:
an array containing the available PC races

getPCRace

public static Race getPCRace(int index)
Returns a specific race by index.

Parameters:
index - the index of the race
Returns:
the race

getPermittedGenders

public Gender[] getPermittedGenders()
Returns an array of the permitted genders for this race.

Returns:
an array of the permitted genders for this race

getRaceAttribute

public java.lang.String getRaceAttribute()
Returns the racial attribute for this race.

Returns:
the racial attribute for this race

getPVModifier

public int getPVModifier()
Returns the PV modifier of the given race.

Returns:
the PV modifier of the given race

getDVModifier

public int getDVModifier()
Returns the DV modifier of the given race.

Returns:
the DV modifier of the given race

getHpPercentageModifier

public int getHpPercentageModifier()

getPwPercentageModifier

public int getPwPercentageModifier()

getSpeedModifier

public int getSpeedModifier()

getExperienceModifier

public int getExperienceModifier()