|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.player.Races
This class encapsulates information about the various player races. It provides static access methods for convenience. It's also the single least object-oriented, least polymorphic piece of code in the game. I'm terribly ashamed of it, and we'll migrate to using classes for each race as soon as possible.
Field Summary | |
static int |
HALL_OF_FAME_LEVEL
|
static int |
WARN_POINTS_PER_LEVEL
|
Method Summary | |
static void |
advanceLevel(Player player,
int new_level)
Pushes the player up to another level. |
static java.lang.String |
getAdjective(java.lang.String race)
Returns an adjective (e.g. |
static void |
inductToHOF(Player player)
The player has won - put them in the Hall of Fame. |
static boolean |
isSupported(java.lang.String race)
Returns true if the passed race is one of the supported races. |
static int |
levelForXP(int xp)
Tells you what level the player should be given his/her current XP. |
static int |
xpForLevel(int level)
Returns the minimum number of XP needed for the passed level. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int HALL_OF_FAME_LEVEL
public static final int WARN_POINTS_PER_LEVEL
Method Detail |
public static boolean isSupported(java.lang.String race)
race
- the race to check - can have any case
public static java.lang.String getAdjective(java.lang.String race)
public static int levelForXP(int xp)
xp
- the current XP for the player
public static int xpForLevel(int level)
level
- the desired level
public static void advanceLevel(Player player, int new_level)
player
- the player to advancenew_level
- the player's new levelpublic static void inductToHOF(Player player)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |