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[] ALLCODES()
          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[] BASECODES()
          Returns an array of the numeric codes for all base stats
static java.lang.String[] BASENAMES()
          Returns the name of all base stats
static CharStats.CODES c(byte 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
 int find(java.lang.String name, boolean exactOnly)
          Returns the code for the given stat name
static int findWhole(java.lang.String name, boolean exactOnly)
          Returns the code for the given stat name
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
static int LONNGEST_BASECODE_NAME()
          Returns the longest base code name
 int[] max()
          Returns an array of the numeric codes for all max stats
static int[] MAXCODES()
          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()
           
static int RVSCMMSGMAP(int code)
          Returns the Reverse CMMsg mapping of the stat from MsgCode -> Stat Code
 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
 java.lang.String shortName(int code)
          Returns the name of the stat code
static java.lang.String SHORTNAME(int code)
          Returns the short name of the stat code
 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(byte c)

instance

public static CharStats.CODES instance()

reset

public static void reset()

BASECODES

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

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

LONNGEST_BASECODE_NAME

public static int LONNGEST_BASECODE_NAME()
Returns the longest base code name

Returns:
the longest base code name

BASENAMES

public static java.lang.String[] BASENAMES()
Returns the name of all base stats

Returns:
names of 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

Parameters:
code - the STAT code to check
Returns:
whether the given code is a base stat

isBase

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

Parameters:
code - the STAT code to check
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.

Parameters:
max - the MAX state adjustment 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.

Parameters:
max - the MAX state adjustment code
Returns:
the translated code

MAXCODES

public static int[] MAXCODES()
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

ALLCODES

public static int[] ALLCODES()
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

SHORTNAME

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

Parameters:
code - the stat code
Returns:
the short 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

shortName

public java.lang.String shortName(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

Parameters:
code - the CMMsg mapping for the given stat code
Returns:
the CMMsg mapping of the stat

RVSCMMSGMAP

public static int RVSCMMSGMAP(int code)
Returns the Reverse CMMsg mapping of the stat from MsgCode -> Stat Code

Parameters:
code - the Stat mapping for the given CMMsg code or -1
Returns:
the Stat mapping of the CMMsg

find

public int find(java.lang.String name,
                boolean exactOnly)
Returns the code for the given stat name

Parameters:
name - the case insensitive name
exactOnly - true to only return exact matches, false to do otherwise
Returns:
the stat code

findWhole

public static int findWhole(java.lang.String name,
                            boolean exactOnly)
Returns the code for the given stat name

Parameters:
name - the case insensitive name
exactOnly - true to only return exact matches, false to do otherwise
Returns:
the stat code

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 messf 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
base - true if the code is a base stat, false if a save or something else