com.planet_ink.coffee_mud.Common.interfaces
Class CharStats.CODES

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.interfaces.CharStats.CODES
Enclosing interface:
CharStats

public static class CharStats.CODES
extends java.lang.Object

Global character stat code data collector


Constructor Summary
CharStats.CODES()
           
 
Method Summary
 java.lang.String abbr(int code)
          Returns the abbreviation of the stat code
static java.lang.String ABBR(int code)
          Returns the abbreviation of the stat code
static java.lang.String[] ABBRS()
          Returns the abbreviations of the various stats
 void addAllStat(java.lang.String abbr, java.lang.String desc, java.lang.String name, java.lang.String attDesc, int cmmsgMap, boolean base)
          Adds a new miscellaneous stat to this object for all mobs and players to share
 void addBaseStat(java.lang.String abbr, java.lang.String desc, java.lang.String name, java.lang.String attDesc, int cmmsgMap)
          Adds a new base stat to this object for all mobs and players to share
 void addMaxStat(int baseCode, java.lang.String abbr, java.lang.String desc, java.lang.String name, java.lang.String attDesc, int cmmsgMap)
          Adds a new max stat to this object for all mobs and players to share
 void addSavingThrow(java.lang.String abbr, java.lang.String desc, java.lang.String name, java.lang.String attDesc, int cmmsgMap)
          Adds a new saving throw stat to this object for all mobs and players to share
 int[] all()
          Returns an array of the numeric codes for all stats
static int[] ALL()
          Returns an array of the numeric codes for all stats
static java.lang.String ATTDESC(int code)
          Returns the adjective description of the stat code
static java.lang.String[] ATTDESCS()
          Returns the adjective descriptions of the various stats
 int[] base()
          Returns an array of the numeric codes for all base stats
static int[] BASE()
          Returns an array of the numeric codes for all base stats
static CharStats.CODES c(char c)
           
static int[] CMMSGMAP()
          Returns the CMMsg mappings of the various stats
static int CMMSGMAP(int code)
          Returns the CMMsg mapping of the stat
 java.lang.String desc(int code)
          Returns the description of the stat code
static java.lang.String DESC(int code)
          Returns the description of the stat code
static java.lang.String[] DESCS()
          Returns the descriptions of the various stats
static CharStats.CODES instance()
           
 boolean isBase(int code)
          Returns whether the given code is a base stat
static boolean isBASE(int code)
          Returns whether the given code is a base stat
 int[] max()
          Returns an array of the numeric codes for all max stats
static int[] MAX()
          Returns an array of the numeric codes for all max stats
 java.lang.String name(int code)
          Returns the name of the stat code
static java.lang.String NAME(int code)
          Returns the name of the stat code
static java.lang.String[] NAMES()
          Returns the names of the various stats
static void reset()
           
 int[] saving_throws()
          Returns an array of the numeric codes for all save stats
static int[] SAVING_THROWS()
          Returns an array of the numeric codes for all save stats
 int toMaxBase(int max)
          Returns the code for the base code that matches the given max adj code Returns the code for the max adj code that matches the given base code Returns -1 if the code is not a max adj code.
static int toMAXBASE(int max)
          Returns the code for the base code that matches the given max adj code Returns the code for the max adj code that matches the given base code Returns -1 if the code is not a max adj code.
 int total()
          Returns total number of stat codes 0 - this-1
static int TOTAL()
          Returns total number of stat codes 0 - this-1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharStats.CODES

public CharStats.CODES()
Method Detail

c

public static CharStats.CODES c(char c)

instance

public static CharStats.CODES instance()

reset

public static void reset()

BASE

public static int[] BASE()
Returns an array of the numeric codes for all base stats

Returns:
an array of the numeric codes for all base stats

base

public int[] base()
Returns an array of the numeric codes for all base stats

Returns:
an array of the numeric codes for all base stats

isBASE

public static boolean isBASE(int code)
Returns whether the given code is a base stat

Returns:
whether the given code is a base stat

isBase

public boolean isBase(int code)
Returns whether the given code is a base stat

Returns:
whether the given code is a base stat

toMAXBASE

public static int toMAXBASE(int max)
Returns the code for the base code that matches the given max adj code Returns the code for the max adj code that matches the given base code Returns -1 if the code is not a max adj code.

Returns:
the translated code

toMaxBase

public int toMaxBase(int max)
Returns the code for the base code that matches the given max adj code Returns the code for the max adj code that matches the given base code Returns -1 if the code is not a max adj code.

Returns:
the translated code

MAX

public static int[] MAX()
Returns an array of the numeric codes for all max stats

Returns:
an array of the numeric codes for all max stats

max

public int[] max()
Returns an array of the numeric codes for all max stats

Returns:
an array of the numeric codes for all max stats

TOTAL

public static int TOTAL()
Returns total number of stat codes 0 - this-1

Returns:
total number of stat codes 0 - this-1

total

public int total()
Returns total number of stat codes 0 - this-1

Returns:
total number of stat codes 0 - this-1

ALL

public static int[] ALL()
Returns an array of the numeric codes for all stats

Returns:
an array of the numeric codes for all stats

all

public int[] all()
Returns an array of the numeric codes for all stats

Returns:
an array of the numeric codes for all stats

SAVING_THROWS

public static int[] SAVING_THROWS()
Returns an array of the numeric codes for all save stats

Returns:
an array of the numeric codes for all save stats

saving_throws

public int[] saving_throws()
Returns an array of the numeric codes for all save stats

Returns:
an array of the numeric codes for all save stats

NAMES

public static java.lang.String[] NAMES()
Returns the names of the various stats

Returns:
the names of the various stats

NAME

public static java.lang.String NAME(int code)
Returns the name of the stat code

Parameters:
code - the stat code
Returns:
the name of the stat code

name

public java.lang.String name(int code)
Returns the name of the stat code

Parameters:
code - the stat code
Returns:
the name of the stat code

DESCS

public static java.lang.String[] DESCS()
Returns the descriptions of the various stats

Returns:
the descriptions of the various stats

DESC

public static java.lang.String DESC(int code)
Returns the description of the stat code

Parameters:
code - the stat code
Returns:
the description of the stat code

desc

public java.lang.String desc(int code)
Returns the description of the stat code

Parameters:
code - the stat code
Returns:
the description of the stat code

ABBRS

public static java.lang.String[] ABBRS()
Returns the abbreviations of the various stats

Returns:
the abbreviations of the various stats

ABBR

public static java.lang.String ABBR(int code)
Returns the abbreviation of the stat code

Parameters:
code - the stat code
Returns:
the abbreviation of the stat code

abbr

public java.lang.String abbr(int code)
Returns the abbreviation of the stat code

Parameters:
code - the stat code
Returns:
the abbreviation of the stat code

ATTDESCS

public static java.lang.String[] ATTDESCS()
Returns the adjective descriptions of the various stats

Returns:
the adjective descriptions of the various stats

ATTDESC

public static java.lang.String ATTDESC(int code)
Returns the adjective description of the stat code

Parameters:
code - the stat code
Returns:
the adjective description of the stat code

CMMSGMAP

public static int[] CMMSGMAP()
Returns the CMMsg mappings of the various stats

Returns:
the CMMsg mappings of the various stats

CMMSGMAP

public static int CMMSGMAP(int code)
Returns the CMMsg mapping of the stat

Returns:
the CMMsg mapping of the stat

addBaseStat

public void addBaseStat(java.lang.String abbr,
                        java.lang.String desc,
                        java.lang.String name,
                        java.lang.String attDesc,
                        int cmmsgMap)
Adds a new base stat to this object for all mobs and players to share

Parameters:
abbr - 1-3 letter short code for this stat
desc - longer description of this stat
name - space-free coded name of this stat
attDesc - description of someone with this stat in abundance
cmmsgMap - a CMMsg message code that saves with this stat

addMaxStat

public void addMaxStat(int baseCode,
                       java.lang.String abbr,
                       java.lang.String desc,
                       java.lang.String name,
                       java.lang.String attDesc,
                       int cmmsgMap)
Adds a new max stat to this object for all mobs and players to share

Parameters:
baseCode - corresponding base stat code
abbr - 1-3 letter short code for this stat
desc - longer description of this stat
name - space-free coded name of this stat
attDesc - description of someone with this stat in abundance
cmmsgMap - a CMMsg message code that saves with this stat

addSavingThrow

public void addSavingThrow(java.lang.String abbr,
                           java.lang.String desc,
                           java.lang.String name,
                           java.lang.String attDesc,
                           int cmmsgMap)
Adds a new saving throw stat to this object for all mobs and players to share

Parameters:
abbr - 1-3 letter short code for this stat
desc - longer description of this stat
name - space-free coded name of this stat
attDesc - description of someone with this stat in abundance
cmmsgMap - a CMMsg message code that saves with this stat

addAllStat

public void addAllStat(java.lang.String abbr,
                       java.lang.String desc,
                       java.lang.String name,
                       java.lang.String attDesc,
                       int cmmsgMap,
                       boolean base)
Adds a new miscellaneous stat to this object for all mobs and players to share

Parameters:
abbr - 1-3 letter short code for this stat
desc - longer description of this stat
name - space-free coded name of this stat
attDesc - description of someone with this stat in abundance
cmmsgMap - a CMMsg message code that saves with this stat