<NME> CharStats.java
<BEF> package com.planet_ink.coffee_mud.Common.interfaces;
import java.util.*;

import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.Deity.DeityWorshipper;
import com.planet_ink.coffee_mud.Races.interfaces.*;
/*
   Copyright 2001-2022 Bo Zimmerman

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

	   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
/**
 * An object to access and change fields representing the varias aspects of a MOB
 * @see com.planet_ink.coffee_mud.MOBS.interfaces.MOB
 * @author Bo Zimmerman
 *
 */
public interface CharStats extends CMCommon, Modifiable, DeityWorshipper
{
	/** stat constant for strength */
	public static final int VALUE_ALLSTATS_DEFAULT=10;

	/** stat constant for strength */
	public static final int STAT_STRENGTH=0;
	/** stat constant for intelligence */
	public static final int STAT_INTELLIGENCE=1;
	/** stat constant for dexterity */
	public static final int STAT_DEXTERITY=2;
	/** stat constant for constitution */
	public static final int STAT_CONSTITUTION=3;
	/** stat constant for  constitution*/
	public static final int STAT_CHARISMA=4;
	/** stat constant for  charisma*/
	public static final int STAT_WISDOM=5;
	/** stat constant for  gender*/
	public static final int STAT_GENDER=6;
	/** stat constant for  save vs paralysis*/
	public static final int STAT_SAVE_PARALYSIS=7;
	/** stat constant for  save vs fire*/
	public static final int STAT_SAVE_FIRE=8;
	/** stat constant for  save vs cold*/
	public static final int STAT_SAVE_COLD=9;
	/** stat constant for  save vs water*/
	public static final int STAT_SAVE_WATER=10;
	/** stat constant for  save vs gas*/
	public static final int STAT_SAVE_GAS=11;
	/** stat constant for  save vs mind attacks/illusion*/
	public static final int STAT_SAVE_MIND=12;
	/** stat constant for  save vs somethingelse*/
	public static final int STAT_SAVE_GENERAL=13;
	/** stat constant for  save vs humiliation*/
	public static final int STAT_SAVE_JUSTICE=14;
	/** stat constant for  save vs acid*/
	public static final int STAT_SAVE_ACID=15;
	/** stat constant for  save vs electricity*/
	public static final int STAT_SAVE_ELECTRIC=16;
	/** stat constant for  save vs poison*/
	public static final int STAT_SAVE_POISON=17;
	/** stat constant for  save vs undead attacks*/
	public static final int STAT_SAVE_UNDEAD=18;
	/** stat constant for  save vs magic*/
	public static final int STAT_SAVE_MAGIC=19;
	/** stat constant for  save vs disease*/
	public static final int STAT_SAVE_DISEASE=20;
	/** stat constant for  save vs traps*/
	public static final int STAT_SAVE_TRAPS=21;
	/** stat constant for  max strength adjustment*/
	public static final int STAT_MAX_STRENGTH_ADJ=22;
	/** stat constant for  max intelligence adjustment*/
	public static final int STAT_MAX_INTELLIGENCE_ADJ=23;
	/** stat constant for  max dextity adjustment*/
	public static final int STAT_MAX_DEXTERITY_ADJ=24;
	/** stat constant for  nax constitution adjustment*/
	public static final int STAT_MAX_CONSTITUTION_ADJ=25;
	/** stat constant for  mac charisma adjustment*/
	public static final int STAT_MAX_CHARISMA_ADJ=26;
	/** stat constant for  max wisdom adjustment*/
	public static final int STAT_MAX_WISDOM_ADJ=27;
	/** stat constant for age*/
	public static final int STAT_AGE=28;
	/** stat constant for save vs detection when hiding */
	public static final int STAT_SAVE_DETECTION=29;
	/** stat constant for save vs overlooking hidden things */
	public static final int STAT_SAVE_OVERLOOKING=30;
	/** stat constant for amount of doubt? */
	public static final int STAT_SAVE_DOUBT=31;
	/** stat constant for additions/subtractions from base weight */
	public static final int STAT_WEIGHTADJ=32;
	/** stat constant for  save vs bludgeoning*/
	public static final int STAT_SAVE_BLUNT=33;
	/** stat constant for  save vs piercing*/
	public static final int STAT_SAVE_PIERCE=34;
	/** stat constant for  save vs slashing*/
	public static final int STAT_SAVE_SLASH=35;
	/** stat constant for  save vs spells*/
	public static final int STAT_SAVE_SPELLS=36;
	/** stat constant for  save vs prayers*/
	public static final int STAT_SAVE_PRAYERS=37;
	/** stat constant for  save vs songs*/
	public static final int STAT_SAVE_SONGS=38;
	/** stat constant for  save vs chants*/
	public static final int STAT_SAVE_CHANTS=39;
	/** stat constant for  bonus chance % to critical hits with a weapon */
	public static final int STAT_CRIT_CHANCE_PCT_WEAPON=40;
	/** stat constant for  bonus chance % to critical hits with magic */
	public static final int STAT_CRIT_CHANCE_PCT_MAGIC=41;
	/** stat constant for  bonus damage % to critical hits with a weapon */
	public static final int STAT_CRIT_DAMAGE_PCT_WEAPON=42;
	/** stat constant for  bonus damage % to critical hits with magic */
	public static final int STAT_CRIT_DAMAGE_PCT_MAGIC=43;
	/** stat constant for amount of faith? */
	public static final int STAT_FAITH=44;
	/** stat constant for recovery rate */
	public static final int STAT_RECOVERRATE5_ADJ=45;
	/** constant for total number of stat codes */
	public final static int DEFAULT_NUM_STATS=46;

	/**
	 * Copies the internal data of this object into another of kind.
	 * @param intoStats another CharStats object.
	 */
	public void copyInto(CharStats intoStats);

   /**
	 * Get the value of one of the STAT_ constants, representing attributes,
	 * saving throws, and max attributes, from the CharStats interface.
	 * @see CharStats
	 * @param statNum which STAT_ constant to get a value for
	 * @return the value of the given STAT
	 */
	public int getStat(int statNum);

	/**
	 * A method that simply calculates the nomimal max of the given
	 * ordinary stat code from available data.
	 * @param abilityCode (str, int, etc)
	 * @return the max stat.
	 */
	public int getMaxStat(int abilityCode);

	/**
	 * Set the value of one of the STAT_ constants, representing attributes,
	 * saving throws, and max attributes, from the CharStats interface.
	 * @see CharStats
	 * @param statNum which STAT_ constant to get a value for
	 * @param value the value of the given STAT
	 */
	public void setStat(int statNum, int value);

	/**
	 * Adjusts the value of one of the STAT_ constants, representing attributes,
	 * saving throws, and max attributes, from the CharStats interface.
	 * Using this method will also update the STAT_MAX_* attributes to make
	 * sure that they are not able to be trained upwards.
	 * @see CharStats
	 * @param statNum which STAT_ constant to adjust
	 * @param value the amount + or -, to adjust by
	 */
	public void adjStat(int statNum, int value);

	/**
	 * Set one of the basic attributes to a given value.  The basic attributes
	 * are defined as the first 6 STAT_ constants from the CharStats interface.
	 * Using this method will also update the STAT_MAX_* attributes to make
	 * sure that they are not able to be modifed upwards.
	 * @see CharStats
	 * @param statNum which STAT_ constant to get a value for
	 * @param value the value of the given STAT
	 */
	public void setPermanentStat(int statNum, int value);

	/**
	 * Set one of the basic attributes to approx the value.  The basic attributes
	 * are defined as the first 6 STAT_ constants from the CharStats interface.
	 * Using this method will also update the STAT_MAX_* attributes to make
	 * sure that they are not able to be trained upwards.
	 * @see CharStats
	 * @param statNum which STAT_ constant to get an approx value for
	 * @param value the value of the max, and approxvalue of the given STAT
	 */
	public void setRacialStat(int statNum, int value);

	/**
	 * Get one of the basic attributes after racial adjustment.
	 * @see CharStats
	 * @param mob the mob to get adjustments for
	 * @param statNum which STAT_ constant to get
	 * @return the value
	 */
	public int getRacialStat(MOB mob, int statNum);

	/**
	 * This method cross-references the given stat name string with the STAT_DESCS
	 * string list in the CharStats interface to return the STAT_ constant which
	 * the given string represents.
	 * @see CharStats
	 * @param statName name of which constant to determine the STAT_ constant for
	 * @return the STAT_ constant value from CharStats interface
	 */
	public int getStatCode(String statName);

	/**
	 * Uses the saving throw stats stored here the mob, modified by basic attributes,
	 * to return a final Saving Throw value for this mob.
	 * @see CharStats
	 * @param which which STAT_SAVE_ constant from CharStats interface to use
	 * @return the final saving throw value
	 */
	public int getSave(int which);

	/**
	 * Get saving throw and max stat info as an semicolon string list.
	 * @return semicolon string
	 */
	public String getNonBaseStatsAsString();

	/**
	 * set saving throw and max stat info from a semicolon string list.
	 * @param str semicolon string
	 */
	public void setNonBaseStatsFromString(String str);

	/**
	 * Return the number of a given body part which this mob has.  The
	 * racial part number comes from the Race interface BODY_ constants.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @param racialPartNumber the BODY_ constant from Race interface
	 * @return the number of the given body part this mob has
	 */
	public int getBodyPart(int racialPartNumber);

	/**
	 * Alter the number of a given body part which this mob has.  The
	 * racial part number comes from the Race interface BODY_ constants.
	 * The number is positive or negative reflecting the change.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @param racialPartNumber the BODY_ constant from Race interface
	 * @param number the amount to change by, positive or negative
	 */
	public void alterBodypart(int racialPartNumber, int number);

	/**
	 * Check the difference between the number of a given body part which
	 * this mob has and the number he or she should have.  The
	 * racial part number comes from the Race interface BODY_ constants.
	 * The return value is positive or negative reflecting the change.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @param racialPartNumber the BODY_ constant from Race interface
	 * @return the difference between parts he has and should have
	 */
	public int getBodypartAlteration(int racialPartNumber);

	/**
	 * Returns the entire current body part situation as a string list.
	 * @return the body parts alteration list
	 */
	public String getBodyPartsAsString();

	/**
	 * Sets the body part situation for this mob from a string list.  The
	 * name is a reminder to make sure the mobs Race is established first.
	 * @param str the string list representing the body part situation
	 */
	public void setBodyPartsFromStringAfterRace(String str);

	/**
	 * Returns the number of character classes that this mob has 0 or more
	 * levels in.
	 * @return number of character classes
	 */
	public int numClasses();

	/**
	 * Returns the CharClass object for this mob which corresponds to the
	 * the given index.  The oldest class is always indexed at 0, with next
	 * newest at 1, and the current one last.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @param i the index into the charclass list.
	 * @return the CharClass object
	 */
	public CharClass getMyClass(int i);

	/**
	 * Returns the CharClass object for this mob which corresponds to the
	 * the final index.  The oldest class is always indexed at 0, with next
	 * newest at 1, and the current one last.
	 * @see #numClasses()
	 * @see #getCharClasses()
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @return the 0 index CharClass object
	 */
	public CharClass getCurrentClass();

	/**
	 * Returns all CharClass objects for this mob.
	 * The oldest class is always indexed at 0, with next
	 * newest at 1, and the current one last.
	 * @see #numClasses()
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @return the Collection of CharClass objects
	 */
	public Collection<CharClass> getCharClasses();

	/**
	 * Returns the number of levels that this mob has in the CharClass
	 * object which corresponds to the final index.
	 * The oldest class is always indexed at 0, with next
	 * newest at 1, and the current one last.
	 * @see #numClasses()
	 * @return the number of levels in the 0 index class
	 */
	public int getCurrentClassLevel();

	/**
	 * Creates the enumerated set of character class objects stored here
	 * from a semicolon list of string names
	 * @param classes the semicolon list of character class names
	 */
	public void setMyClasses(String classes);

	/**
	 * Creates the enumerated set of character class levels stored here
	 * from a semicolon list of levels.
	 * @param levels the semicolon list of levels
	 */
	public void setMyLevels(String levels);

	/**
	 * Returns the enumerated set of character class names stored here
	 * as a semicolon list of string names
	 * @return the semicolon list of character class names
	 */
	public String getMyClassesStr();

	/**
	 * Returns the enumerated set of character class levels stored here
	 * as a semicolon list of levels.
	 * @return levels the semicolon list of levels
	 */
	public String getMyLevelsStr();

	/**
	 * Adds the character class to the mob to the given class, automatically
	 * making the class level 0, and making the class current.
	 * @see #getCurrentClass()
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @param aClass The charclass object to set the current class to
	 */
	public void setCurrentClass(CharClass aClass);

	/**
	 * Sets the current class level for the mob to the given level.
	 * @param level The chararacter class level to set the current class to
	 */
	public void setCurrentClassLevel(int level);

	/**
	 * Returns the number of levels this mob has in the given character class.
	 * -1 means the mob has NO levels in that class.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @param aClass the CharClass object to check
	 * @return the number of levels the mob has in the class, or -1
	 */
	public int getClassLevel(CharClass aClass);

	/**
	 * Returns the number of levels this mob has in the given character class by name.
	 * -1 means the mob has NO levels in that class.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @param aClass the name of the Character Class to check
	 * @return the number of levels the mob has in the class, or -1
	 */
	public int getClassLevel(String aClass);

	/**
	 * Returns the combined number of class levels the mob has in all of his classes,
	 * except for the current one.
	 * @return combined levels minus the current one.
	 */
	public int combinedSubLevels();

	/**
	 * Returns true if this user is capped by the given
	 * classes level cap (if one exists)
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass#getLevelCap()
	 * @param C the class to check
	 * @return true if the player is level capped, false otherwise
	 */
	public boolean isLevelCapped(CharClass C);

	/**
	 * Changes the number of class levels the mob has in the given character class
	 * to the given level.  If the mob does not have any levels in the given
	 * class, then setCurrentClass will be called first.
	 * @see #setCurrentClass(CharClass)
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @param aClass the character class to set a level for
	 * @param level the level to set for the given character class
	 */
	public void setClassLevel(CharClass aClass, int level);

	/**
	 * Returns the race of the mob.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @return the Race of the mob
	 */
	public Race getMyRace();

	/**
	 * Sets the race of the mob.  Race.startRacing should
	 * be called after this method is.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race#startRacing(MOB, boolean)
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @param newVal the Race of the mob
	 */
	public void setMyRace(Race newVal);

	/**
	 * Returns the displayable name of this mobs current race.  If this method
	 * is called on the mobs charStats() object, as opposed to baseCharStats(), it
	 * may return something different than charStats().getMyRace().name().  For this
	 * reason, you should ONLY use this method when you want to display the mobs
	 * current race.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @see #setRaceName(String)
	 * @return the name of this mobs current race.
	 */
	public String raceName();

	/**
	 * Returns the term seen when a character arrives into a room
	 * By default, these come from the current
	 * actual race, unless set to something new.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @see #setArriveLeaveStr(String,String)
	 * @return the arrive string
	 */
	public String getArriveStr();

	/**
	 * Returns the term seen when a character leaves a room
	 * By default, these come from the current
	 * actual race, unless set to something new.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @see #setArriveLeaveStr(String,String)
	 * @return the leave string
	 */
	public String getLeaveStr();

	/**
	 * Returns resource codes of what this race can breathe as
	 * an atmosphere.  The list is guaranteed sorted.  If the list
	 * is empty, the race can breathe anything at all.
	 * @see com.planet_ink.coffee_mud.Items.interfaces.RawMaterial
	 * @see #setBreathables(int[])
	 * @return a list of resource codes that this race can breathe
	 */
	public int[] getBreathables();

	/**
	 * Sets resource codes of what this race can breathe as
	 * an atmosphere.  The list MUST BE sorted.  If the list
	 * is empty, the race can breathe anything at all.
	 * @see com.planet_ink.coffee_mud.Items.interfaces.RawMaterial
	 * @see #getBreathables()
	 * @param newArray a list of resource codes that this race can breathe
	 */
	public void setBreathables(int[] newArray);

	/**
	 * Changes the apparent race of ths mob by setting a new name.  A value of null will
	 * reset this setting, allowing the mobs TRUE race to be displayed through the
	 * raceName method instead of the string set through this one.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @see #raceName()
	 * @param newRaceName the name of the mobs apparent race
	 */
	public void setRaceName(String newRaceName);

	/**
	 * Changes the terms seen when a character arrives into a room
	 * and leaves it.  By default, these come from the current
	 * actual race.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @see #getArriveStr()
	 * @see #getLeaveStr()
	 * @param arriveStr the arrive string
	 * @param leaveStr the leave string
	 */
	public void setArriveLeaveStr(String arriveStr, String leaveStr);

	/**
	 * Changes the apparent char class of ths mob by setting a new name.  A value of null will
	 * reset this setting, allowing the mobs TRUE current class to be displayed through the
	 * displayClassName method instead of the string set through this one.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @see #displayClassName()
	 * @see #displayClassLevel(MOB, boolean)
	 * @see #displayClassLevelOnly(MOB)
	 * @param newname the name of the mobs apparent current class
	 */
	public void setDisplayClassName(String newname);

	/**
	 * Changes the apparent level of ths mob by setting a new name.  A value of null will
	 * reset this setting, allowing the mobs TRUE level to be displayed through the
	 * displayClassLevel method instead of the string set through this one.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @see #displayClassName()
	 * @see #displayClassLevel(MOB, boolean)
	 * @see #displayClassLevelOnly(MOB)
	 * @see #setDisplayClassName(String)
	 * @param newlevel the name of the mobs apparent level
	 */
	public void setDisplayClassLevel(String newlevel);

	/**
	 * Returns the displayable name of this mobs current class.  If this method
	 * is called on the mobs charStats() object, as opposed to baseCharStats(), it
	 * may return something different than charStats().getCurrentClass().name().  For this
	 * reason, you should ONLY use this method when you want to display the mobs
	 * current class.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @see #setDisplayClassName(String)
	 * @see #displayClassLevel(MOB, boolean)
	 * @see #displayClassLevelOnly(MOB)
	 * @return the name of this mobs current class.
	 */
	public String displayClassName();

	/**
	 * Returns a combination of the displayClassName and displayClassLevel for
	 * the given mob.  If either are null, authentic values will be used.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @see #displayClassName()
	 * @see #setDisplayClassName(String)
	 * @see #displayClassLevelOnly(MOB)
	 * @param mob the mob whose class and overall level to display
	 * @param shortForm if true, display only the class and level, no extra wording
	 * @return the name of this mobs current class.
	 */
	public String displayClassLevel(MOB mob, boolean shortForm);

	/**
	 * Returns either the given mobs authentic classlevel/total level,
	 * or the value set through setDisplayClassLevel method.
	 * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass
	 * @see com.planet_ink.coffee_mud.Common.interfaces.CharStats#displayClassName()
	 * @see #setDisplayClassName(String)
	 * @see #displayClassLevel(MOB, boolean)
	 * @param mob the mob whose class and overall level to display
	 * @return the name of this mobs current class.
	 */
	public String displayClassLevelOnly(MOB mob);

	/**
	 * Resets all of the stats in this object, attributes and saves alike, to
	 * the same given value
	 * @param def the value to set all stats to.
	 */
	public void setAllValues(int def);

	/**
	 * Resets all the stats in this object to their factory defaults.
	 */
	public void reset();

	/**
	 * Resets all of the basic 1-6 stats in this object, to the same given value
	 * @param def the value to set all stats to.
	 */
	public void setAllBaseValues(int def);

	/**
	 * Returns the sum of local and race-based unwearability codes.
	 * @see com.planet_ink.coffee_mud.Items.interfaces.Item
	 * @return a bitmap of unwearable locations
	 */
	public long getWearableRestrictionsBitmap();

	/**
	 * Sets the sum of local and race-based unwearability codes.
	 * @see com.planet_ink.coffee_mud.Items.interfaces.Item
	 * @param bitmap a bitmap of unwearable locations
	 */
	public void setWearableRestrictionsBitmap(long bitmap);

	/**
	 * Sets the apparent gender of the mob. If null is used, this value is reset
	 * and the mobs real gender name will be displayed through the genderName method
	 * instead of the one set here.
	 * @see #genderName()
	 * @param gname the name of the mobs gender to display
	 */
	public void setGenderName(String gname);

	/**
	 * Returns the apparent gender of the mob.  If this method
	 * is called on the mobs charStats() object, as opposed to baseCharStats(), it
	 * may return something different than charStats().getStat(GENDER)  For this
	 * reason, you should ONLY use this method when you want to display the mobs
	 * current gender.
	 * @see #setGenderName(String)
	 * @return the apparent gender of the mob
	 */
	public String genderName();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "him", "her", or "it".
	 * @return the gender-correct pronoun for this mob
	 */
	public String himher();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "his", "her", or "its".
	 * @return the gender-correct pronoun for this mob
	 */
	public String hisher();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "he", "she", or "it".
	 * @return the gender-correct pronoun for this mob
	 */
	public String heshe();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "He", "She", or "It".
	 * @return the gender-correct pronoun for this mob
	 */
	public String HeShe();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "sir", "madam", or "sir".
	 * @return the gender-correct title for this mob
	 */
	public String sirmadam();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "Sir", "Madam", or "Sir".
	 * @return the gender-correct title for this mob
	 */
	public String SirMadam();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "Mr.", or "Ms.".
	 * @return the gender-correct title for this mob
	 */
	public String MrMs();

	/**
	 * Based on the apparent gender of the mob, return the appropriate word "Mister", or "Madam".
	 * @return the gender-correct title for this mob
	 */
	public String MisterMadam();

	/**
	 * Returns the age category for this mob, based on the age stat constant stored here.  The age
	 * categories are defined in the Race interface as AGE_ constants.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race
	 * @return the numeric age category of this mob
	 */
	public int ageCategory();

	/**
	 * Returns the string name of the age category for this mob, based on the age
	 * stat constant stored here.  The age category names are defined in the Race
	 * interface in the AGE_DESCS_ constant.
	 * @see com.planet_ink.coffee_mud.Races.interfaces.Race#AGE_DESCS
	 * @return the name of the age category for this mob
	 */
	public String ageName();

	/**
	 * Returns the adjustments to mob abilities, whether proficiency or
	 * something else numeric.
	 * Ability adjustments begin with "prof+" to adjust proficiency.
	 * They begin with "level+" to adjust the adjusted level.
	 * They begin with "X"+expertise code name + "+" for expertise level
	 * The are followed by the exact ID() of the ability, or * for All, or
	 * the skill classification name in uppercase, or the domain name in
	 * uppercase.
	 * @param ableID the ability ID, with an appropriate prefix
	 * @return the numeric value associated with the adjustment.
	 */
	public int getAbilityAdjustment(String ableID);

	/**
	 * Sets the adjustments to mob abilities, whether proficiency or
	 * something else numeric.
	 * Ability adjustments begin with "prof+" to adjust proficiency.
	 * They begin with "level+" to adjust the adjusted level.
	 * They begin with "X"+expertise code name + "+" for expertise level
	 * The are followed by the exact ID() of the ability, or * for All, or
	 * the skill classification name in uppercase, or the domain name in
	 * uppercase.
	 * @param ableID the ability ID, with an appropriate prefix
	 * @param newValue the numeric value associated with the adjustment.
	 */
	public void adjustAbilityAdjustment(String ableID, int newValue);

	/**
	 * Returns the list of special weapon or armor proficiencies,
	 * or special detriments, that this character has.
	 * Each one is a filterer which, if passes, means the character
	 * can always use the armor or weapon, even if class or race
	 * or other considerations might not permit it.
	 * @see #setItemProficiencies(DoubleFilterer[])
	 * @return a list of proficiency or deficiency codes
	 */
	public DoubleFilterer<Item>[] getItemProficiencies();

	/**
	 * Sets the list of special weapon or armor proficiencies,
	 * or special detriments, that this character has.
	 * Each one is a filterer which, if passes, means the character
	 * can always use the armor or weapon, even if class or race
	 * or other considerations might not permit it.
	 * @see #getItemProficiencies()
	 * @see #addItemDeficiency(String)
	 * @see #addItemProficiency(String)
	 * @param newArray a list of proficiency or deficiency codes
	 */
	public void setItemProficiencies(DoubleFilterer<Item>[] newArray);

	/**
	 * Adds a new weapon or armor proficiency, compiling it into
	 * the proficiency filter.  The argument is a zapper mask describing
	 * the type of item that the player is newly proficient at.
	 *
	 * @see #getItemProficiencies()
	 * @see #addItemDeficiency(String)
	 *
	 * @see com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary
	 * @param zapperMask the zapper mask
	 */
	public void addItemProficiency(String zapperMask);

	/**
	 * Adds a new weapon or armor deficiency, compiling it into
	 * the deficiency filter.  The argument is a zapper mask describing
	 * the type of item that the player is newly deficient at.
	 *
	 * @see #getItemProficiencies()
	 * @see #addItemProficiency(String)
	 *
	 * @see com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary
	 * @param zapperMask the zapper mask
	 */
	public void addItemDeficiency(String zapperMask);

	/** string array of abbreviations of each stat code, ordered by numeric value */
	public static final String[] DEFAULT_STAT_ABBR=
	{
		"S",
		"I",
		"D",
		"C",
		"CH",
		"W",
		"G",
		"vPY",
		"vF",
		"vC",
		"vW",
		"vG",
		"vMI",
		"V",
		"vJ",
		"vA",
		"vE",
		"vP",
		"vU",
		"vM",
		"vD",
		"vT",
		"mS",
		"mI",
		"mD",
		"mC",
		"mCH",
		"mW",
		"A",
		"vH",
		"vO",
		"vC",
		"Wa",
		"vWB",
		"vWP",
		"vWS",
		"vMS",
		"vMP",
		"vMG",
		"vMC",
		"cRW",
		"cRM",
		"cDW",
		"cDM",
		"F",
		"R"
	};

	/** string array of descriptions of each stat code, ordered by numeric value */
	public static final String[] DEFAULT_STAT_DESCS=
	{
		"STRENGTH",
		"INTELLIGENCE",
		"DEXTERITY",
		"CONSTITUTION",
		"CHARISMA",
		"WISDOM",
		"GENDER",
		"PARALYSIS SAVE",
		"SAVE VS FIRE",
		"SAVE VS COLD",
		"SAVE VS WATER",
		"SAVE VS GAS",
		"SAVE VS MIND",
		"GENERAL SAVE",
		"JUSTICE SAVE",
		"SAVE VS ACID",
		"SAVE VS ELECTRICITY",
		"SAVE VS POISON",
		"SAVE VS UNDEAD",
		"SAVE VS MAGIC",
		"SAVE VS DISEASE",
		"SAVE VS TRAPS",
		"MAX STRENGTH ADJ.",
		"MAX INTELLIGENCE ADJ.",
		"MAX DEXTERITY ADJ.",
		"MAX CONSTITUTION ADJ.",
		"MAX CHARISMA ADJ.",
		"MAX WISDOM ADJ.",
		"AGE",
		"SAVE VS DETECTION",
		"SAVE VS OVERLOOKING",
		"SAVE VS CONVERSIONS",
		"WEIGHT ADJUSTMENT",
		"SAVE VS BLUNT",
		"SAVE VS PIERCE",
		"SAVE VS SLASH",
		"SAVE VS SPELLS",
		"SAVE VS PRAYERS",
		"SAVE VS SONGS",
		"SAVE VS CHANTS",
		"CRIT WEAPON CHANCE PCT",
		"CRIT MAGIC CHANCE PCT",
		"CRIT WEAPON DAMAGE PCT",
		"CRIT MAGIC DAMAGE PCT",
		"FAITH",
		"REJUVENATION RATE ADJ"
	};

	/** string array of descriptions of each stat code, ordered by numeric value */
	public static final String[] DEFAULT_STAT_NAMES=
	{
		"STRENGTH",
		"INTELLIGENCE",
		"DEXTERITY",
		"CONSTITUTION",
		"CHARISMA",
		"WISDOM",
		"GENDER",
		"PARALYSIS",
		"FIRE",
		"COLD",
		"WATER",
		"GAS",
		"MIND",
		"GENERAL",
		"JUSTICE",
		"ACID",
		"ELECTRICITY",
		 * Returns an array of the numeric codes for all base stats
		 * @return an array of the numeric codes for all base stats
		 */
		public static int[] BASE() { return c().baseStatCodes;}

		/**
		 * Returns the name of all base stats
		"MAXDEXTERITY",
		"MAXCONSTITUTION",
		"MAXCHARISMA",
		"MAXWISDOM",
		"AGE",
		"DETECTION",
		"OVERLOOKING",
		"DOUBT",
		"WEIGHTADJ",
		"SAVEBLUNT",
		"SAVEPIERCE",
		"SAVESLASH",
		"SAVESPELLS",
		"SAVEPRAYERS",
		"SAVESONGS",
		"SAVECHANTS",
		"CRITPCTWEAPONS",
		"CRITPCTMAGIC",
		"CRITDMGWEAPONS",
		"CRITDMGMAGIC",
		"FAITH",
		"REJUVRATE"
	};

	/** string array of attributable descriptions of each stat code, ordered by numeric value */
	public static final String[] DEFAULT_STAT_DESC_ATTS=
	{
		"STRONG",
		"INTELLIGENT",
		"DEXTEROUS",
		"HEALTHY",
		"CHARISMATIC",
		"WISE",
		"",
		"RESISTANT TO PARALYSIS",
		"RESISTANT TO FIRE",
		"RESISTANT TO COLD",
		"RESISTANT TO WATER",
		"RESISTANT TO GAS",
		"RESISTANT TO MIND ATTACKS",
		"RESISTANT",
		"RESISTANT TO UNDIGNIFIED ATTACKS",
		"RESISTANT TO ACID",
		"RESISTANT TO ELECTRICITY",
		"RESISTANT TO POISON",
		 * Returns an array of the numeric codes for all max stats
		 * @return an array of the numeric codes for all max stats
		 */
		public static int[] MAX() { return c().maxStatCodes;}
		/**
		 * Returns an array of the numeric codes for all max stats
		 * @return an array of the numeric codes for all max stats
		"POTENTIALLY HEALTHY",
		"POTENTIALLY CHARISMATIC",
		"POTENTIALLY WISE",
		"OLD",
		"CONCEALED",
		"WATCHFUL",
		"DOUBTFUL",
		"",
		"RESISTANT TO BLUNT",
		"RESISTANT TO PIERCE",
		"RESISTANT TO SLASH",
		"RESISTANT TO SPELLS",
		"RESISTANT TO PRAYERS",
		 * Returns an array of the numeric codes for all stats
		 * @return an array of the numeric codes for all stats
		 */
		public static int[] ALL() { return c().allStatCodes;}
		/**
		 * Returns an array of the numeric codes for all stats
		 * @return an array of the numeric codes for all stats
		"REJUVENATINGLY DIFFERENT"
	};

	/** an appropriate CMMsg MSG type to correspond to the given saving throw, indexed as STAT_SAVE_ constant */
	public static int[] DEFAULT_STAT_MSG_MAP=
	{
		-1, // strength
		-1, // intelligence
		-1, // dexterity
		-1, // constitution
		-1, // charisma
		-1, // wisdom
		-1, // gender
		CMMsg.TYP_PARALYZE,
		CMMsg.TYP_FIRE,
		CMMsg.TYP_COLD,
		CMMsg.TYP_WATER,
		CMMsg.TYP_GAS,
		CMMsg.TYP_MIND,
		CMMsg.TYP_GENERAL,
		CMMsg.TYP_JUSTICE,
		CMMsg.TYP_ACID,
		CMMsg.TYP_ELECTRIC,
		CMMsg.TYP_POISON,
		CMMsg.TYP_UNDEAD,
		CMMsg.TYP_CAST_SPELL,
		CMMsg.TYP_DISEASE,
		-1, // traps
		-1, // max str
		-1, // max int
		-1, // max
		-1, // max dex
		-1, // max con
		-1, // max cha
		-1, // max wis
		-1, // age
		-1, // save conceilment
		-1, // save overlooking
		-1, // doubt
		-1, // weight adjustment
		-1, // save blunt
		-1, // save pierce
		-1, // save slash
		-1, // save spells
		-1, // save prayers
		-1, // save songs
		-1, // save chants
		-1, // bonus weapon crit chance
		-1, // bonus magic crit chance
		-1, // bonus weapon crit damage
		-1, // bonus magic crit damage
		-1, // faith
		-1, // rejuv rate
	};

	/**
	 * Global character stat code data collector
	 * @author Bo Zimmerman
	 */
	public class CODES
	{
		private static CODES[] insts=new CODES[256];

		private int[]			baseStatCodes				= new int[0];
		private int[]			maxStatCodes				= new int[0];
		private int[]			MaxBaseCrossCodes			= new int[0];
		private int[]			allStatCodes				= new int[0];
		private int[]			savingThrowCodes			= new int[0];
		private boolean[]		isBaseStatCode				= new boolean[0];
		private String[]		statAbbreviations			= new String[0];
		private String[]		statDescriptions			= new String[0];
		private String[]		statNames					= new String[0];
		private String[]		baseStatNames				= new String[0];
		private String[]		shortNames					= new String[0];
		private String[]		statAttributionDescriptions	= new String[0];
		private int[]			statCMMsgMapping			= new int[0];
		private int				longestBaseCodeName			= -1;
		private final Map<Integer,Integer> rvsStatCMMsgMapping	= new Hashtable<Integer,Integer>();

		public CODES()
		{
			super();
			final char c=Thread.currentThread().getThreadGroup().getName().charAt(0);
			if(insts==null)
				insts=new CODES[256];
			if(insts[c]==null)
				insts[c]=this;

			final String[][] addExtra = CMProps.instance().getStrsStarting("ADDCHARSTAT_");
			final String[][] repExtra = CMProps.instance().getStrsStarting("REPLACECHARSTAT_");
			for(int i=STAT_STRENGTH;i<=STAT_WISDOM;i++)
				addBaseStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);
			addAllStat(DEFAULT_STAT_ABBR[STAT_GENDER],DEFAULT_STAT_DESCS[STAT_GENDER],DEFAULT_STAT_NAMES[STAT_GENDER],
						DEFAULT_STAT_DESC_ATTS[STAT_GENDER],DEFAULT_STAT_MSG_MAP[STAT_GENDER],false);
			for(int i=STAT_SAVE_PARALYSIS;i<=STAT_SAVE_TRAPS;i++)
				addSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);
			int baseCtr=0;
			for(int i=STAT_MAX_STRENGTH_ADJ;i<=STAT_MAX_WISDOM_ADJ;i++)
				addMaxStat(baseStatCodes[baseCtr++],DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);
			addAllStat(DEFAULT_STAT_ABBR[STAT_AGE],DEFAULT_STAT_DESCS[STAT_AGE],DEFAULT_STAT_NAMES[STAT_AGE],
						DEFAULT_STAT_DESC_ATTS[STAT_AGE],DEFAULT_STAT_MSG_MAP[STAT_AGE],false);
			for(int i=STAT_SAVE_DETECTION;i<=STAT_SAVE_DOUBT;i++)
				addSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);
			for(int i=STAT_WEIGHTADJ;i<=STAT_WEIGHTADJ;i++)
				addAllStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i],false);
			for(int i=STAT_SAVE_BLUNT;i<=STAT_SAVE_CHANTS;i++)
				addSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);
			for(int i=STAT_CRIT_CHANCE_PCT_WEAPON;i<DEFAULT_NUM_STATS;i++)
				addAllStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i],false);
			for(int i=0;i<addExtra.length+repExtra.length;i++)
			{
				final String[] array = (i>=addExtra.length)?repExtra[i-addExtra.length]:addExtra[i];
				final boolean replace = i>=addExtra.length;
				String stat = array[0].toUpperCase().trim();
				final String p=array[1];
				final List<String> V=CMParms.parseCommas(p, false);
				if(V.size()!=4)
				{
					Log.errOut("CharStats","Bad coffeemud.ini charstat row, requires 4 ; separated entries: "+p);
					continue;
				}
				String type=V.get(0).toUpperCase().trim();
				int oldStatCode=-1;
				if(replace)
				{
					final String repStat=stat;
					stat=type;
					oldStatCode=CMParms.indexOf(DEFAULT_STAT_NAMES, repStat);
					if(oldStatCode<0)
						oldStatCode=CMParms.indexOf(DEFAULT_STAT_DESCS, repStat);
					if(oldStatCode>=0)
						type="REPLACE";
					else
					{
						Log.errOut("CharStats","Bad coffeemud.ini charstat row, bad stat name: "+repStat);
						continue;
					}
				}
				final String abbr=V.get(1);
				final String desc=V.get(2).toUpperCase();
				final String adj=V.get(3).toUpperCase();
				if(type.equalsIgnoreCase("BASE"))
				{
					addBaseStat(abbr, desc, stat, adj, -1);
					final int baseStatCode=allStatCodes.length-1;
					addMaxStat(baseStatCode, "m"+abbr, "MAX "+stat+" ADJ.", "MAX"+stat, "POTENTIALLY "+adj, -1);
				}
				else
				if(type.equalsIgnoreCase("SAVE"))
					addSavingThrow(abbr,desc,stat,adj,-1);
				else
				if(type.equalsIgnoreCase("OTHER"))
					addAllStat(abbr,desc,stat,adj,-1,false);
				else
				if(replace&&(oldStatCode>=0))
				{
					statAbbreviations[oldStatCode]=abbr;
					statDescriptions[oldStatCode]=desc;
					statNames[oldStatCode]=stat;
					if(stat.length()>3)
						shortNames[oldStatCode]=CMStrings.capitalizeAndLower(stat).substring(0,3);
					else
						shortNames[oldStatCode]=CMStrings.capitalizeAndLower(stat);
					statAttributionDescriptions[oldStatCode]=adj;
					statCMMsgMapping[oldStatCode]=-1;
				}
				else
					Log.errOut("CharStats","Bad coffeemud.ini charstat row, bad type: "+type);
			}
		}

		private static CODES c()
		{
			return insts[Thread.currentThread().getThreadGroup().getName().charAt(0)];
		}

		public static CODES c(final byte c)
		{
			return insts[c];
		}

		public static CODES instance()
		{
			CODES c=insts[Thread.currentThread().getThreadGroup().getName().charAt(0)];
			if(c==null)
				c=new CODES();
			return c;
		}

		public static void reset()
		{
			insts[Thread.currentThread().getThreadGroup().getName().charAt(0)]=null;
			instance();
		}

		/**
		 * Returns an array of the numeric codes for all base stats
		 * @return an array of the numeric codes for all base stats
		 */
		public static int[] BASECODES()
		{
			return c().baseStatCodes;
		}

		/**
		 * Returns the longest base code name
		 * @return the longest base code name
		 */
		public static int LONNGEST_BASECODE_NAME()
		{
			final CODES c=c();
			if(c.longestBaseCodeName<0)
			{
				for(final int code : c.baseStatCodes)
				{
					if(c.statNames[code].length()>c.longestBaseCodeName)
						c.longestBaseCodeName=c.statNames[code].length();
				}
			}
			return c.longestBaseCodeName;
		}

		/**
		 * Returns the name of all base stats
		 * @return names of all base stats
		 */
		public static String[] BASENAMES()
		{
			return c().baseStatNames;
		}

		/**
		 * Returns an array of the numeric codes for all base stats
		 *
		 * @return an array of the numeric codes for all base stats
		 */
		public int[] base()
		{
			return baseStatCodes;
		}

		/**
		 * Returns whether the given code is a base stat
		 *
		 * @param code the STAT code to check
		 * @return whether the given code is a base stat
		 */
		public static boolean isBASE(final int code)
		{
			return c().isBase(code);
		}

		/**
		 * Returns whether the given code is a base stat
		 *
		 * @param code the STAT code to check
		 * @return whether the given code is a base stat
		 */
		public boolean isBase(final int code)
		{
			if(code<isBaseStatCode.length)
				return isBaseStatCode[code];
			return false;
		}

		/**
		 * 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.
		 * @param max the MAX state adjustment code
		 * @return the translated code
		 */
		public static int toMAXBASE(final int max)
		{
			return c().toMaxBase(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.
		 * @param max the MAX state adjustment code
		 * @return the translated code
		 */
		public int toMaxBase(final int max)
		{
			if(max<MaxBaseCrossCodes.length)
				return MaxBaseCrossCodes[max];
			return -1;
		}
		/**
		 * Returns an array of the numeric codes for all max stats
		 * @return an array of the numeric codes for all max stats
		 */
		public static int[] MAXCODES()
		{
			return c().maxStatCodes;
		}

		/**
		 * Returns an array of the numeric codes for all max stats
		 *
		 * @return an array of the numeric codes for all max stats
		 */
		public int[] max()
		{
			return maxStatCodes;
		}

		/**
		 * Returns total number of stat codes 0 - this-1
		 *
		 * @return total number of stat codes 0 - this-1
		 */
		public static int TOTAL()
		{
			return c().allStatCodes.length;
		}

		/**
		 * Returns total number of stat codes 0 - this-1
		 *
		 * @return total number of stat codes 0 - this-1
		 */
		public int total()
		{
			return allStatCodes.length;
		}

		/**
		 * Returns an array of the numeric codes for all stats
		 *
		 * @return an array of the numeric codes for all stats
		 */
		public static int[] ALLCODES()
		{
			return c().allStatCodes;
		}

		/**
		 * Returns an array of the numeric codes for all stats
		 *
		 * @return an array of the numeric codes for all stats
		 */
		public int[] all()
		{
			return allStatCodes;
		}

		/**
		 * Returns an array of the numeric codes for all save stats
		 *
		 * @return an array of the numeric codes for all save stats
		 */
		public static int[] SAVING_THROWS()
		{
			return c().savingThrowCodes;
		}

		/**
		 * Returns an array of the numeric codes for all save stats
		 *
		 * @return an array of the numeric codes for all save stats
		 */
		public int[] saving_throws()
		{
			return savingThrowCodes;
		}

		/**
		 * Returns the names of the various stats
		 *
		 * @return the names of the various stats
		 */
		public static String[] NAMES()
		{
			return c().statNames;
		}

		/**
		 * Returns the name of the stat code
		 *
		 * @param code the stat code
		 * @return the name of the stat code
		 */
		public static String NAME(final int code)
		{
			return c().name(code);
		}

		/**
		 * Returns the short name of the stat code
		 *
		 * @param code the stat code
		 * @return the short name of the stat code
		 */
		public static String SHORTNAME(final int code)
		{
			return c().shortName(code);
		}

		/**
		 * Returns the name of the stat code
		 *
		 * @param code the stat code
		 * @return the name of the stat code
		 */
		public String name(final int code)
		{
			if(code < statNames.length)
				return statNames[code];
			return "";
		}

		/**
		 * Returns the name of the stat code
		 *
		 * @param code the stat code
		 * @return the name of the stat code
		 */
		public String shortName(final int code)
		{
			if(code < shortNames.length)
				return shortNames[code];
			return "";
		}

		/**
		 * Returns the descriptions of the various stats
		 *
		 * @return the descriptions of the various stats
		 */
		public static String[] DESCS()
		{
			return c().statDescriptions;
		}

		/**
		 * Returns the description of the stat code
		 *
		 * @param code the stat code
		 * @return the description of the stat code
		 */
		public static String DESC(final int code)
		{
			return c().desc(code);
		}

		/**
		 * Returns the description of the stat code
		 *
		 * @param code the stat code
		 * @return the description of the stat code
		 */
		public String desc(final int code)
		{
			if(code < statDescriptions.length)
				return statDescriptions[code];
			return "";
		}

		/**
		 * Returns the abbreviations of the various stats
		 *
		 * @return the abbreviations of the various stats
		 */
		public static String[] ABBRS()
		{
			return c().statAbbreviations;
		}

		/**
		 * Returns the abbreviation of the stat code
		 *
		 * @param code the stat code
		 * @return the abbreviation of the stat code
		 */
		public static String ABBR(final int code)
		{
			return c().abbr(code);
		}

		/**
		 * Returns the abbreviation of the stat code
		 *
		 * @param code the stat code
		 * @return the abbreviation of the stat code
		 */
		public String abbr(final int code)
		{
			if(code < statAbbreviations.length)
				return statAbbreviations[code];
			return "";
		}

		/**
		 * Returns the adjective descriptions of the various stats
		 *
		 * @return the adjective descriptions of the various stats
		 */
		public static String[] ATTDESCS()
		{
			return c().statAttributionDescriptions;
		}

		/**
		 * Returns the adjective description of the stat code
		 *
		 * @param code the stat code
		 * @return the adjective description of the stat code
		 */
		public static String ATTDESC(final int code)
		{
			return c().statAttributionDescriptions[code];
		}

		/**
		 * Returns the CMMsg mappings of the various stats
		 *
		 * @return the CMMsg mappings of the various stats
		 */
		public static int[] CMMSGMAP()
		{
			return c().statCMMsgMapping;
		}

		/**
		 * Returns the CMMsg mapping of the stat
		 *
		 * @param code the CMMsg mapping for the given stat code
		 * @return the CMMsg mapping of the stat
		 */
		public static int CMMSGMAP(final int code)
		{
			return c().statCMMsgMapping[code];
		}

		/**
		 * Returns the Reverse CMMsg mapping of the stat from MsgCode -&gt; Stat Code
		 * @param code the Stat mapping for the given CMMsg code or -1
		 * @return the Stat mapping of the CMMsg
		 */
		public static int RVSCMMSGMAP(final int code)
		{
			final Integer statCode = c().rvsStatCMMsgMapping.get(Integer.valueOf(code));
			if(statCode != null)
				return statCode.intValue();
			return -1;
		}

		/**
		 * Returns the code for the given stat name
		 * @param name the case insensitive name
		 * @param exactOnly true to only return exact matches, false to do otherwise
		 * @return the stat code
		 */
		public int find(final String name, final boolean exactOnly)
		{
			for(int i=0;i<total();i++)
			{
				if((name.equalsIgnoreCase(name(i)))
				||(name.equalsIgnoreCase(desc(i)))
				||(name.equalsIgnoreCase(abbr(i))))
					return i;
			}
			if(exactOnly)
				return -1;
			for(int i=0;i<total();i++)
			{
				if((name(i).toLowerCase().startsWith(name))||(desc(i).toLowerCase().startsWith(name)))
					return i;
			}
			return -1;
		}

		/**
		 * Returns the code for the given stat name
		 * @param name the case insensitive name
		 * @param exactOnly true to only return exact matches, false to do otherwise
		 * @return the stat code
		 */
		public static int findWhole(final String name, final boolean exactOnly)
		{
			return c().find(name, exactOnly);
		}

		/**
		 * Adds a new base stat to this object for all mobs and players to share
		 * @param abbr 1-3 letter short code for this stat
		 * @param desc longer description of this stat
		 * @param name space-free coded name of this stat
		 * @param attDesc description of someone with this stat in abundance
		 * @param cmmsgMap a CMMsg messf code that saves with this stat
		 */
		public void addBaseStat(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)
		{
			baseStatCodes=Arrays.copyOf(baseStatCodes, baseStatCodes.length+1);
			baseStatCodes[baseStatCodes.length-1]=allStatCodes.length;
			baseStatNames=Arrays.copyOf(baseStatNames, baseStatNames.length+1);
			baseStatNames[baseStatNames.length-1]=name;
			addAllStat(abbr,desc,name,attDesc,cmmsgMap,true);
		}

		/**
		 * Adds a new max stat to this object for all mobs and players to share
		 * @param baseCode corresponding base stat code
		 * @param abbr 1-3 letter short code for this stat
		 * @param desc longer description of this stat
		 * @param name space-free coded name of this stat
		 * @param attDesc description of someone with this stat in abundance
		 * @param cmmsgMap a CMMsg message code that saves with this stat
		 */
		public void addMaxStat(final int baseCode, final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)
		{
			maxStatCodes=Arrays.copyOf(maxStatCodes, maxStatCodes.length+1);
			final int maxCode = allStatCodes.length;
			maxStatCodes[maxStatCodes.length-1]=maxCode;

			addAllStat(abbr,desc,name,attDesc,cmmsgMap,false);

			MaxBaseCrossCodes=Arrays.copyOf(MaxBaseCrossCodes, allStatCodes.length);
			MaxBaseCrossCodes[maxCode]=baseCode;
			MaxBaseCrossCodes[baseCode]=maxCode;
		}

		/**
		 * Adds a new saving throw stat to this object for all mobs and players to share
		 * @param abbr 1-3 letter short code for this stat
		 * @param desc longer description of this stat
		 * @param name space-free coded name of this stat
		 * @param attDesc description of someone with this stat in abundance
		 * @param cmmsgMap a CMMsg message code that saves with this stat
		 */
		public void addSavingThrow(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)
		{
			savingThrowCodes=Arrays.copyOf(savingThrowCodes, savingThrowCodes.length+1);
			savingThrowCodes[savingThrowCodes.length-1]=allStatCodes.length;
			addAllStat(abbr,desc,name,attDesc,cmmsgMap,false);
		}

		/**
		 * Adds a new miscellaneous stat to this object for all mobs and players to share
		 * @param abbr 1-3 letter short code for this stat
		 * @param desc longer description of this stat
		 * @param name space-free coded name of this stat
		 * @param attDesc description of someone with this stat in abundance
		 * @param cmmsgMap a CMMsg message code that saves with this stat
		 * @param base true if the code is a base stat, false if a save or something else
		 */
		public void addAllStat(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap, final boolean base)
		{
			allStatCodes=Arrays.copyOf(allStatCodes, allStatCodes.length+1);
			allStatCodes[allStatCodes.length-1]=allStatCodes.length-1;
			isBaseStatCode=Arrays.copyOf(isBaseStatCode, allStatCodes.length);
			isBaseStatCode[allStatCodes.length-1]=base;
			statAbbreviations=Arrays.copyOf(statAbbreviations, allStatCodes.length);
			statAbbreviations[allStatCodes.length-1]=abbr;
			statDescriptions=Arrays.copyOf(statDescriptions, allStatCodes.length);
			statDescriptions[allStatCodes.length-1]=desc.toUpperCase().trim();
			statNames=Arrays.copyOf(statNames, allStatCodes.length);
			statNames[allStatCodes.length-1]=name.toUpperCase().trim().replace(' ','_');
			shortNames=Arrays.copyOf(shortNames, allStatCodes.length);
			if(name.length()>3)
				shortNames[allStatCodes.length-1]=CMStrings.capitalizeAndLower(name.trim().replace(' ','_')).substring(0, 3);
			else
				shortNames[allStatCodes.length-1]=CMStrings.capitalizeAndLower(name.trim().replace(' ','_'));
			statAttributionDescriptions=Arrays.copyOf(statAttributionDescriptions, allStatCodes.length);
			statAttributionDescriptions[allStatCodes.length-1]=attDesc.toUpperCase();
			statCMMsgMapping=Arrays.copyOf(statCMMsgMapping, allStatCodes.length);
			statCMMsgMapping[allStatCodes.length-1]=cmmsgMap;
			rvsStatCMMsgMapping.put(Integer.valueOf(cmmsgMap), Integer.valueOf(allStatCodes.length-1));
		}
	}
}

<MSG> 

git-svn-id: svn://192.168.1.10/public/CoffeeMud@11431 0d6f1817-ed0e-0410-87c9-987e46238f29

<DFF> @@ -896,7 +896,7 @@ public interface CharStats extends CMCommon, Modifiable
 		 * Returns an array of the numeric codes for all base stats
 		 * @return an array of the numeric codes for all base stats
 		 */
-		public static int[] BASE() { return c().baseStatCodes;}
+		public static int[] BASECODES() { return c().baseStatCodes;}
 
 		/**
 		 * Returns the name of all base stats
@@ -948,7 +948,7 @@ public interface CharStats extends CMCommon, Modifiable
 		 * Returns an array of the numeric codes for all max stats
 		 * @return an array of the numeric codes for all max stats
 		 */
-		public static int[] MAX() { return c().maxStatCodes;}
+		public static int[] MAXCODES() { return c().maxStatCodes;}
 		/**
 		 * Returns an array of the numeric codes for all max stats
 		 * @return an array of the numeric codes for all max stats
@@ -968,7 +968,7 @@ public interface CharStats extends CMCommon, Modifiable
 		 * Returns an array of the numeric codes for all stats
 		 * @return an array of the numeric codes for all stats
 		 */
-		public static int[] ALL() { return c().allStatCodes;}
+		public static int[] ALLCODES() { return c().allStatCodes;}
 		/**
 		 * Returns an array of the numeric codes for all stats
 		 * @return an array of the numeric codes for all stats

{'commit': 'diff --git a/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java b/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java\nindex 3050037977..4597820a06 100644\n--- a/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java\n+++ b/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java\n@@ -896,7 +896,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all base stats\r\n \t\t * @return an array of the numeric codes for all base stats\r\n \t\t */\r\n-\t\tpublic static int[] BASE() { return c().baseStatCodes;}\r\n+\t\tpublic static int[] BASECODES() { return c().baseStatCodes;}\r\n \r\n \t\t/**\r\n \t\t * Returns the name of all base stats\r\n@@ -948,7 +948,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all max stats\r\n \t\t * @return an array of the numeric codes for all max stats\r\n \t\t */\r\n-\t\tpublic static int[] MAX() { return c().maxStatCodes;}\r\n+\t\tpublic static int[] MAXCODES() { return c().maxStatCodes;}\r\n \t\t/**\r\n \t\t * Returns an array of the numeric codes for all max stats\r\n \t\t * @return an array of the numeric codes for all max stats\r\n@@ -968,7 +968,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all stats\r\n \t\t * @return an array of the numeric codes for all stats\r\n \t\t */\r\n-\t\tpublic static int[] ALL() { return c().allStatCodes;}\r\n+\t\tpublic static int[] ALLCODES() { return c().allStatCodes;}\r\n \t\t/**\r\n \t\t * Returns an array of the numeric codes for all stats\r\n \t\t * @return an array of the numeric codes for all stats\r\n', 'commit_subject': '', 'repo_name': 'bozimmerman/CoffeeMud', 'committer': {'name': 'bozimmerman', 'email': 'dc45fe023482b3b890b5e574e53c1d051f45b1ef@zimmers.net', 'time_sec': '1399415657', 'tz_offset': '0', 'date': {'seconds': '1399415657'}}, 'commit_tree': '971a61b313e0f9227afabf08507d72ab4a0cd6f5', 'commit_message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@11431 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'language_name': 'JavaScript', 'license': 'apache-2.0', 'hunks': '@@ -896,7 +896,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all base stats\r\n \t\t * @return an array of the numeric codes for all base stats\r\n \t\t */\r\n-\t\tpublic static int[] BASE() { return c().baseStatCodes;}\r\n+\t\tpublic static int[] BASECODES() { return c().baseStatCodes;}\r\n \r\n \t\t/**\r\n \t\t * Returns the name of all base stats\r\n@@ -948,7 +948,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all max stats\r\n \t\t * @return an array of the numeric codes for all max stats\r\n \t\t */\r\n-\t\tpublic static int[] MAX() { return c().maxStatCodes;}\r\n+\t\tpublic static int[] MAXCODES() { return c().maxStatCodes;}\r\n \t\t/**\r\n \t\t * Returns an array of the numeric codes for all max stats\r\n \t\t * @return an array of the numeric codes for all max stats\r\n@@ -968,7 +968,7 @@ public interface CharStats extends CMCommon, Modifiable\n \t\t * Returns an array of the numeric codes for all stats\r\n \t\t * @return an array of the numeric codes for all stats\r\n \t\t */\r\n-\t\tpublic static int[] ALL() { return c().allStatCodes;}\r\n+\t\tpublic static int[] ALLCODES() { return c().allStatCodes;}\r\n \t\t/**\r\n \t\t * Returns an array of the numeric codes for all stats\r\n \t\t * @return an array of the numeric codes for all stats\r\n', 'addition_count': 3, 'deletion_count': 3, 'src_file': 'a/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java', 'tgt_file': 'b/com/planet_ink/coffee_mud/Common/interfaces/CharStats.java', 'file_extension': '.java', 'before_file': 'package com.planet_ink.coffee_mud.Common.interfaces;\nimport java.util.*;\n\nimport com.planet_ink.coffee_mud.core.interfaces.*;\nimport com.planet_ink.coffee_mud.core.*;\nimport com.planet_ink.coffee_mud.core.collections.*;\nimport com.planet_ink.coffee_mud.Abilities.interfaces.*;\nimport com.planet_ink.coffee_mud.Areas.interfaces.*;\nimport com.planet_ink.coffee_mud.Behaviors.interfaces.*;\nimport com.planet_ink.coffee_mud.CharClasses.interfaces.*;\nimport com.planet_ink.coffee_mud.Commands.interfaces.*;\nimport com.planet_ink.coffee_mud.Common.interfaces.*;\nimport com.planet_ink.coffee_mud.Exits.interfaces.*;\nimport com.planet_ink.coffee_mud.Items.interfaces.*;\nimport com.planet_ink.coffee_mud.Libraries.interfaces.*;\nimport com.planet_ink.coffee_mud.Locales.interfaces.*;\nimport com.planet_ink.coffee_mud.MOBS.interfaces.*;\nimport com.planet_ink.coffee_mud.MOBS.interfaces.Deity.DeityWorshipper;\nimport com.planet_ink.coffee_mud.Races.interfaces.*;\n/*\n   Copyright 2001-2022 Bo Zimmerman\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\n/**\n * An object to access and change fields representing the varias aspects of a MOB\n * @see com.planet_ink.coffee_mud.MOBS.interfaces.MOB\n * @author Bo Zimmerman\n *\n */\npublic interface CharStats extends CMCommon, Modifiable, DeityWorshipper\n{\n\t/** stat constant for strength */\n\tpublic static final int VALUE_ALLSTATS_DEFAULT=10;\n\n\t/** stat constant for strength */\n\tpublic static final int STAT_STRENGTH=0;\n\t/** stat constant for intelligence */\n\tpublic static final int STAT_INTELLIGENCE=1;\n\t/** stat constant for dexterity */\n\tpublic static final int STAT_DEXTERITY=2;\n\t/** stat constant for constitution */\n\tpublic static final int STAT_CONSTITUTION=3;\n\t/** stat constant for  constitution*/\n\tpublic static final int STAT_CHARISMA=4;\n\t/** stat constant for  charisma*/\n\tpublic static final int STAT_WISDOM=5;\n\t/** stat constant for  gender*/\n\tpublic static final int STAT_GENDER=6;\n\t/** stat constant for  save vs paralysis*/\n\tpublic static final int STAT_SAVE_PARALYSIS=7;\n\t/** stat constant for  save vs fire*/\n\tpublic static final int STAT_SAVE_FIRE=8;\n\t/** stat constant for  save vs cold*/\n\tpublic static final int STAT_SAVE_COLD=9;\n\t/** stat constant for  save vs water*/\n\tpublic static final int STAT_SAVE_WATER=10;\n\t/** stat constant for  save vs gas*/\n\tpublic static final int STAT_SAVE_GAS=11;\n\t/** stat constant for  save vs mind attacks/illusion*/\n\tpublic static final int STAT_SAVE_MIND=12;\n\t/** stat constant for  save vs somethingelse*/\n\tpublic static final int STAT_SAVE_GENERAL=13;\n\t/** stat constant for  save vs humiliation*/\n\tpublic static final int STAT_SAVE_JUSTICE=14;\n\t/** stat constant for  save vs acid*/\n\tpublic static final int STAT_SAVE_ACID=15;\n\t/** stat constant for  save vs electricity*/\n\tpublic static final int STAT_SAVE_ELECTRIC=16;\n\t/** stat constant for  save vs poison*/\n\tpublic static final int STAT_SAVE_POISON=17;\n\t/** stat constant for  save vs undead attacks*/\n\tpublic static final int STAT_SAVE_UNDEAD=18;\n\t/** stat constant for  save vs magic*/\n\tpublic static final int STAT_SAVE_MAGIC=19;\n\t/** stat constant for  save vs disease*/\n\tpublic static final int STAT_SAVE_DISEASE=20;\n\t/** stat constant for  save vs traps*/\n\tpublic static final int STAT_SAVE_TRAPS=21;\n\t/** stat constant for  max strength adjustment*/\n\tpublic static final int STAT_MAX_STRENGTH_ADJ=22;\n\t/** stat constant for  max intelligence adjustment*/\n\tpublic static final int STAT_MAX_INTELLIGENCE_ADJ=23;\n\t/** stat constant for  max dextity adjustment*/\n\tpublic static final int STAT_MAX_DEXTERITY_ADJ=24;\n\t/** stat constant for  nax constitution adjustment*/\n\tpublic static final int STAT_MAX_CONSTITUTION_ADJ=25;\n\t/** stat constant for  mac charisma adjustment*/\n\tpublic static final int STAT_MAX_CHARISMA_ADJ=26;\n\t/** stat constant for  max wisdom adjustment*/\n\tpublic static final int STAT_MAX_WISDOM_ADJ=27;\n\t/** stat constant for age*/\n\tpublic static final int STAT_AGE=28;\n\t/** stat constant for save vs detection when hiding */\n\tpublic static final int STAT_SAVE_DETECTION=29;\n\t/** stat constant for save vs overlooking hidden things */\n\tpublic static final int STAT_SAVE_OVERLOOKING=30;\n\t/** stat constant for amount of doubt? */\n\tpublic static final int STAT_SAVE_DOUBT=31;\n\t/** stat constant for additions/subtractions from base weight */\n\tpublic static final int STAT_WEIGHTADJ=32;\n\t/** stat constant for  save vs bludgeoning*/\n\tpublic static final int STAT_SAVE_BLUNT=33;\n\t/** stat constant for  save vs piercing*/\n\tpublic static final int STAT_SAVE_PIERCE=34;\n\t/** stat constant for  save vs slashing*/\n\tpublic static final int STAT_SAVE_SLASH=35;\n\t/** stat constant for  save vs spells*/\n\tpublic static final int STAT_SAVE_SPELLS=36;\n\t/** stat constant for  save vs prayers*/\n\tpublic static final int STAT_SAVE_PRAYERS=37;\n\t/** stat constant for  save vs songs*/\n\tpublic static final int STAT_SAVE_SONGS=38;\n\t/** stat constant for  save vs chants*/\n\tpublic static final int STAT_SAVE_CHANTS=39;\n\t/** stat constant for  bonus chance % to critical hits with a weapon */\n\tpublic static final int STAT_CRIT_CHANCE_PCT_WEAPON=40;\n\t/** stat constant for  bonus chance % to critical hits with magic */\n\tpublic static final int STAT_CRIT_CHANCE_PCT_MAGIC=41;\n\t/** stat constant for  bonus damage % to critical hits with a weapon */\n\tpublic static final int STAT_CRIT_DAMAGE_PCT_WEAPON=42;\n\t/** stat constant for  bonus damage % to critical hits with magic */\n\tpublic static final int STAT_CRIT_DAMAGE_PCT_MAGIC=43;\n\t/** stat constant for amount of faith? */\n\tpublic static final int STAT_FAITH=44;\n\t/** stat constant for recovery rate */\n\tpublic static final int STAT_RECOVERRATE5_ADJ=45;\n\t/** constant for total number of stat codes */\n\tpublic final static int DEFAULT_NUM_STATS=46;\n\n\t/**\n\t * Copies the internal data of this object into another of kind.\n\t * @param intoStats another CharStats object.\n\t */\n\tpublic void copyInto(CharStats intoStats);\n\n   /**\n\t * Get the value of one of the STAT_ constants, representing attributes,\n\t * saving throws, and max attributes, from the CharStats interface.\n\t * @see CharStats\n\t * @param statNum which STAT_ constant to get a value for\n\t * @return the value of the given STAT\n\t */\n\tpublic int getStat(int statNum);\n\n\t/**\n\t * A method that simply calculates the nomimal max of the given\n\t * ordinary stat code from available data.\n\t * @param abilityCode (str, int, etc)\n\t * @return the max stat.\n\t */\n\tpublic int getMaxStat(int abilityCode);\n\n\t/**\n\t * Set the value of one of the STAT_ constants, representing attributes,\n\t * saving throws, and max attributes, from the CharStats interface.\n\t * @see CharStats\n\t * @param statNum which STAT_ constant to get a value for\n\t * @param value the value of the given STAT\n\t */\n\tpublic void setStat(int statNum, int value);\n\n\t/**\n\t * Adjusts the value of one of the STAT_ constants, representing attributes,\n\t * saving throws, and max attributes, from the CharStats interface.\n\t * Using this method will also update the STAT_MAX_* attributes to make\n\t * sure that they are not able to be trained upwards.\n\t * @see CharStats\n\t * @param statNum which STAT_ constant to adjust\n\t * @param value the amount + or -, to adjust by\n\t */\n\tpublic void adjStat(int statNum, int value);\n\n\t/**\n\t * Set one of the basic attributes to a given value.  The basic attributes\n\t * are defined as the first 6 STAT_ constants from the CharStats interface.\n\t * Using this method will also update the STAT_MAX_* attributes to make\n\t * sure that they are not able to be modifed upwards.\n\t * @see CharStats\n\t * @param statNum which STAT_ constant to get a value for\n\t * @param value the value of the given STAT\n\t */\n\tpublic void setPermanentStat(int statNum, int value);\n\n\t/**\n\t * Set one of the basic attributes to approx the value.  The basic attributes\n\t * are defined as the first 6 STAT_ constants from the CharStats interface.\n\t * Using this method will also update the STAT_MAX_* attributes to make\n\t * sure that they are not able to be trained upwards.\n\t * @see CharStats\n\t * @param statNum which STAT_ constant to get an approx value for\n\t * @param value the value of the max, and approxvalue of the given STAT\n\t */\n\tpublic void setRacialStat(int statNum, int value);\n\n\t/**\n\t * Get one of the basic attributes after racial adjustment.\n\t * @see CharStats\n\t * @param mob the mob to get adjustments for\n\t * @param statNum which STAT_ constant to get\n\t * @return the value\n\t */\n\tpublic int getRacialStat(MOB mob, int statNum);\n\n\t/**\n\t * This method cross-references the given stat name string with the STAT_DESCS\n\t * string list in the CharStats interface to return the STAT_ constant which\n\t * the given string represents.\n\t * @see CharStats\n\t * @param statName name of which constant to determine the STAT_ constant for\n\t * @return the STAT_ constant value from CharStats interface\n\t */\n\tpublic int getStatCode(String statName);\n\n\t/**\n\t * Uses the saving throw stats stored here the mob, modified by basic attributes,\n\t * to return a final Saving Throw value for this mob.\n\t * @see CharStats\n\t * @param which which STAT_SAVE_ constant from CharStats interface to use\n\t * @return the final saving throw value\n\t */\n\tpublic int getSave(int which);\n\n\t/**\n\t * Get saving throw and max stat info as an semicolon string list.\n\t * @return semicolon string\n\t */\n\tpublic String getNonBaseStatsAsString();\n\n\t/**\n\t * set saving throw and max stat info from a semicolon string list.\n\t * @param str semicolon string\n\t */\n\tpublic void setNonBaseStatsFromString(String str);\n\n\t/**\n\t * Return the number of a given body part which this mob has.  The\n\t * racial part number comes from the Race interface BODY_ constants.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @param racialPartNumber the BODY_ constant from Race interface\n\t * @return the number of the given body part this mob has\n\t */\n\tpublic int getBodyPart(int racialPartNumber);\n\n\t/**\n\t * Alter the number of a given body part which this mob has.  The\n\t * racial part number comes from the Race interface BODY_ constants.\n\t * The number is positive or negative reflecting the change.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @param racialPartNumber the BODY_ constant from Race interface\n\t * @param number the amount to change by, positive or negative\n\t */\n\tpublic void alterBodypart(int racialPartNumber, int number);\n\n\t/**\n\t * Check the difference between the number of a given body part which\n\t * this mob has and the number he or she should have.  The\n\t * racial part number comes from the Race interface BODY_ constants.\n\t * The return value is positive or negative reflecting the change.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @param racialPartNumber the BODY_ constant from Race interface\n\t * @return the difference between parts he has and should have\n\t */\n\tpublic int getBodypartAlteration(int racialPartNumber);\n\n\t/**\n\t * Returns the entire current body part situation as a string list.\n\t * @return the body parts alteration list\n\t */\n\tpublic String getBodyPartsAsString();\n\n\t/**\n\t * Sets the body part situation for this mob from a string list.  The\n\t * name is a reminder to make sure the mobs Race is established first.\n\t * @param str the string list representing the body part situation\n\t */\n\tpublic void setBodyPartsFromStringAfterRace(String str);\n\n\t/**\n\t * Returns the number of character classes that this mob has 0 or more\n\t * levels in.\n\t * @return number of character classes\n\t */\n\tpublic int numClasses();\n\n\t/**\n\t * Returns the CharClass object for this mob which corresponds to the\n\t * the given index.  The oldest class is always indexed at 0, with next\n\t * newest at 1, and the current one last.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @param i the index into the charclass list.\n\t * @return the CharClass object\n\t */\n\tpublic CharClass getMyClass(int i);\n\n\t/**\n\t * Returns the CharClass object for this mob which corresponds to the\n\t * the final index.  The oldest class is always indexed at 0, with next\n\t * newest at 1, and the current one last.\n\t * @see #numClasses()\n\t * @see #getCharClasses()\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @return the 0 index CharClass object\n\t */\n\tpublic CharClass getCurrentClass();\n\n\t/**\n\t * Returns all CharClass objects for this mob.\n\t * The oldest class is always indexed at 0, with next\n\t * newest at 1, and the current one last.\n\t * @see #numClasses()\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @return the Collection of CharClass objects\n\t */\n\tpublic Collection<CharClass> getCharClasses();\n\n\t/**\n\t * Returns the number of levels that this mob has in the CharClass\n\t * object which corresponds to the final index.\n\t * The oldest class is always indexed at 0, with next\n\t * newest at 1, and the current one last.\n\t * @see #numClasses()\n\t * @return the number of levels in the 0 index class\n\t */\n\tpublic int getCurrentClassLevel();\n\n\t/**\n\t * Creates the enumerated set of character class objects stored here\n\t * from a semicolon list of string names\n\t * @param classes the semicolon list of character class names\n\t */\n\tpublic void setMyClasses(String classes);\n\n\t/**\n\t * Creates the enumerated set of character class levels stored here\n\t * from a semicolon list of levels.\n\t * @param levels the semicolon list of levels\n\t */\n\tpublic void setMyLevels(String levels);\n\n\t/**\n\t * Returns the enumerated set of character class names stored here\n\t * as a semicolon list of string names\n\t * @return the semicolon list of character class names\n\t */\n\tpublic String getMyClassesStr();\n\n\t/**\n\t * Returns the enumerated set of character class levels stored here\n\t * as a semicolon list of levels.\n\t * @return levels the semicolon list of levels\n\t */\n\tpublic String getMyLevelsStr();\n\n\t/**\n\t * Adds the character class to the mob to the given class, automatically\n\t * making the class level 0, and making the class current.\n\t * @see #getCurrentClass()\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @param aClass The charclass object to set the current class to\n\t */\n\tpublic void setCurrentClass(CharClass aClass);\n\n\t/**\n\t * Sets the current class level for the mob to the given level.\n\t * @param level The chararacter class level to set the current class to\n\t */\n\tpublic void setCurrentClassLevel(int level);\n\n\t/**\n\t * Returns the number of levels this mob has in the given character class.\n\t * -1 means the mob has NO levels in that class.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @param aClass the CharClass object to check\n\t * @return the number of levels the mob has in the class, or -1\n\t */\n\tpublic int getClassLevel(CharClass aClass);\n\n\t/**\n\t * Returns the number of levels this mob has in the given character class by name.\n\t * -1 means the mob has NO levels in that class.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @param aClass the name of the Character Class to check\n\t * @return the number of levels the mob has in the class, or -1\n\t */\n\tpublic int getClassLevel(String aClass);\n\n\t/**\n\t * Returns the combined number of class levels the mob has in all of his classes,\n\t * except for the current one.\n\t * @return combined levels minus the current one.\n\t */\n\tpublic int combinedSubLevels();\n\n\t/**\n\t * Returns true if this user is capped by the given\n\t * classes level cap (if one exists)\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass#getLevelCap()\n\t * @param C the class to check\n\t * @return true if the player is level capped, false otherwise\n\t */\n\tpublic boolean isLevelCapped(CharClass C);\n\n\t/**\n\t * Changes the number of class levels the mob has in the given character class\n\t * to the given level.  If the mob does not have any levels in the given\n\t * class, then setCurrentClass will be called first.\n\t * @see #setCurrentClass(CharClass)\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @param aClass the character class to set a level for\n\t * @param level the level to set for the given character class\n\t */\n\tpublic void setClassLevel(CharClass aClass, int level);\n\n\t/**\n\t * Returns the race of the mob.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @return the Race of the mob\n\t */\n\tpublic Race getMyRace();\n\n\t/**\n\t * Sets the race of the mob.  Race.startRacing should\n\t * be called after this method is.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race#startRacing(MOB, boolean)\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @param newVal the Race of the mob\n\t */\n\tpublic void setMyRace(Race newVal);\n\n\t/**\n\t * Returns the displayable name of this mobs current race.  If this method\n\t * is called on the mobs charStats() object, as opposed to baseCharStats(), it\n\t * may return something different than charStats().getMyRace().name().  For this\n\t * reason, you should ONLY use this method when you want to display the mobs\n\t * current race.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @see #setRaceName(String)\n\t * @return the name of this mobs current race.\n\t */\n\tpublic String raceName();\n\n\t/**\n\t * Returns the term seen when a character arrives into a room\n\t * By default, these come from the current\n\t * actual race, unless set to something new.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @see #setArriveLeaveStr(String,String)\n\t * @return the arrive string\n\t */\n\tpublic String getArriveStr();\n\n\t/**\n\t * Returns the term seen when a character leaves a room\n\t * By default, these come from the current\n\t * actual race, unless set to something new.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @see #setArriveLeaveStr(String,String)\n\t * @return the leave string\n\t */\n\tpublic String getLeaveStr();\n\n\t/**\n\t * Returns resource codes of what this race can breathe as\n\t * an atmosphere.  The list is guaranteed sorted.  If the list\n\t * is empty, the race can breathe anything at all.\n\t * @see com.planet_ink.coffee_mud.Items.interfaces.RawMaterial\n\t * @see #setBreathables(int[])\n\t * @return a list of resource codes that this race can breathe\n\t */\n\tpublic int[] getBreathables();\n\n\t/**\n\t * Sets resource codes of what this race can breathe as\n\t * an atmosphere.  The list MUST BE sorted.  If the list\n\t * is empty, the race can breathe anything at all.\n\t * @see com.planet_ink.coffee_mud.Items.interfaces.RawMaterial\n\t * @see #getBreathables()\n\t * @param newArray a list of resource codes that this race can breathe\n\t */\n\tpublic void setBreathables(int[] newArray);\n\n\t/**\n\t * Changes the apparent race of ths mob by setting a new name.  A value of null will\n\t * reset this setting, allowing the mobs TRUE race to be displayed through the\n\t * raceName method instead of the string set through this one.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @see #raceName()\n\t * @param newRaceName the name of the mobs apparent race\n\t */\n\tpublic void setRaceName(String newRaceName);\n\n\t/**\n\t * Changes the terms seen when a character arrives into a room\n\t * and leaves it.  By default, these come from the current\n\t * actual race.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @see #getArriveStr()\n\t * @see #getLeaveStr()\n\t * @param arriveStr the arrive string\n\t * @param leaveStr the leave string\n\t */\n\tpublic void setArriveLeaveStr(String arriveStr, String leaveStr);\n\n\t/**\n\t * Changes the apparent char class of ths mob by setting a new name.  A value of null will\n\t * reset this setting, allowing the mobs TRUE current class to be displayed through the\n\t * displayClassName method instead of the string set through this one.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @see #displayClassName()\n\t * @see #displayClassLevel(MOB, boolean)\n\t * @see #displayClassLevelOnly(MOB)\n\t * @param newname the name of the mobs apparent current class\n\t */\n\tpublic void setDisplayClassName(String newname);\n\n\t/**\n\t * Changes the apparent level of ths mob by setting a new name.  A value of null will\n\t * reset this setting, allowing the mobs TRUE level to be displayed through the\n\t * displayClassLevel method instead of the string set through this one.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @see #displayClassName()\n\t * @see #displayClassLevel(MOB, boolean)\n\t * @see #displayClassLevelOnly(MOB)\n\t * @see #setDisplayClassName(String)\n\t * @param newlevel the name of the mobs apparent level\n\t */\n\tpublic void setDisplayClassLevel(String newlevel);\n\n\t/**\n\t * Returns the displayable name of this mobs current class.  If this method\n\t * is called on the mobs charStats() object, as opposed to baseCharStats(), it\n\t * may return something different than charStats().getCurrentClass().name().  For this\n\t * reason, you should ONLY use this method when you want to display the mobs\n\t * current class.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @see #setDisplayClassName(String)\n\t * @see #displayClassLevel(MOB, boolean)\n\t * @see #displayClassLevelOnly(MOB)\n\t * @return the name of this mobs current class.\n\t */\n\tpublic String displayClassName();\n\n\t/**\n\t * Returns a combination of the displayClassName and displayClassLevel for\n\t * the given mob.  If either are null, authentic values will be used.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @see #displayClassName()\n\t * @see #setDisplayClassName(String)\n\t * @see #displayClassLevelOnly(MOB)\n\t * @param mob the mob whose class and overall level to display\n\t * @param shortForm if true, display only the class and level, no extra wording\n\t * @return the name of this mobs current class.\n\t */\n\tpublic String displayClassLevel(MOB mob, boolean shortForm);\n\n\t/**\n\t * Returns either the given mobs authentic classlevel/total level,\n\t * or the value set through setDisplayClassLevel method.\n\t * @see com.planet_ink.coffee_mud.CharClasses.interfaces.CharClass\n\t * @see com.planet_ink.coffee_mud.Common.interfaces.CharStats#displayClassName()\n\t * @see #setDisplayClassName(String)\n\t * @see #displayClassLevel(MOB, boolean)\n\t * @param mob the mob whose class and overall level to display\n\t * @return the name of this mobs current class.\n\t */\n\tpublic String displayClassLevelOnly(MOB mob);\n\n\t/**\n\t * Resets all of the stats in this object, attributes and saves alike, to\n\t * the same given value\n\t * @param def the value to set all stats to.\n\t */\n\tpublic void setAllValues(int def);\n\n\t/**\n\t * Resets all the stats in this object to their factory defaults.\n\t */\n\tpublic void reset();\n\n\t/**\n\t * Resets all of the basic 1-6 stats in this object, to the same given value\n\t * @param def the value to set all stats to.\n\t */\n\tpublic void setAllBaseValues(int def);\n\n\t/**\n\t * Returns the sum of local and race-based unwearability codes.\n\t * @see com.planet_ink.coffee_mud.Items.interfaces.Item\n\t * @return a bitmap of unwearable locations\n\t */\n\tpublic long getWearableRestrictionsBitmap();\n\n\t/**\n\t * Sets the sum of local and race-based unwearability codes.\n\t * @see com.planet_ink.coffee_mud.Items.interfaces.Item\n\t * @param bitmap a bitmap of unwearable locations\n\t */\n\tpublic void setWearableRestrictionsBitmap(long bitmap);\n\n\t/**\n\t * Sets the apparent gender of the mob. If null is used, this value is reset\n\t * and the mobs real gender name will be displayed through the genderName method\n\t * instead of the one set here.\n\t * @see #genderName()\n\t * @param gname the name of the mobs gender to display\n\t */\n\tpublic void setGenderName(String gname);\n\n\t/**\n\t * Returns the apparent gender of the mob.  If this method\n\t * is called on the mobs charStats() object, as opposed to baseCharStats(), it\n\t * may return something different than charStats().getStat(GENDER)  For this\n\t * reason, you should ONLY use this method when you want to display the mobs\n\t * current gender.\n\t * @see #setGenderName(String)\n\t * @return the apparent gender of the mob\n\t */\n\tpublic String genderName();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "him", "her", or "it".\n\t * @return the gender-correct pronoun for this mob\n\t */\n\tpublic String himher();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "his", "her", or "its".\n\t * @return the gender-correct pronoun for this mob\n\t */\n\tpublic String hisher();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "he", "she", or "it".\n\t * @return the gender-correct pronoun for this mob\n\t */\n\tpublic String heshe();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "He", "She", or "It".\n\t * @return the gender-correct pronoun for this mob\n\t */\n\tpublic String HeShe();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "sir", "madam", or "sir".\n\t * @return the gender-correct title for this mob\n\t */\n\tpublic String sirmadam();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "Sir", "Madam", or "Sir".\n\t * @return the gender-correct title for this mob\n\t */\n\tpublic String SirMadam();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "Mr.", or "Ms.".\n\t * @return the gender-correct title for this mob\n\t */\n\tpublic String MrMs();\n\n\t/**\n\t * Based on the apparent gender of the mob, return the appropriate word "Mister", or "Madam".\n\t * @return the gender-correct title for this mob\n\t */\n\tpublic String MisterMadam();\n\n\t/**\n\t * Returns the age category for this mob, based on the age stat constant stored here.  The age\n\t * categories are defined in the Race interface as AGE_ constants.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race\n\t * @return the numeric age category of this mob\n\t */\n\tpublic int ageCategory();\n\n\t/**\n\t * Returns the string name of the age category for this mob, based on the age\n\t * stat constant stored here.  The age category names are defined in the Race\n\t * interface in the AGE_DESCS_ constant.\n\t * @see com.planet_ink.coffee_mud.Races.interfaces.Race#AGE_DESCS\n\t * @return the name of the age category for this mob\n\t */\n\tpublic String ageName();\n\n\t/**\n\t * Returns the adjustments to mob abilities, whether proficiency or\n\t * something else numeric.\n\t * Ability adjustments begin with "prof+" to adjust proficiency.\n\t * They begin with "level+" to adjust the adjusted level.\n\t * They begin with "X"+expertise code name + "+" for expertise level\n\t * The are followed by the exact ID() of the ability, or * for All, or\n\t * the skill classification name in uppercase, or the domain name in\n\t * uppercase.\n\t * @param ableID the ability ID, with an appropriate prefix\n\t * @return the numeric value associated with the adjustment.\n\t */\n\tpublic int getAbilityAdjustment(String ableID);\n\n\t/**\n\t * Sets the adjustments to mob abilities, whether proficiency or\n\t * something else numeric.\n\t * Ability adjustments begin with "prof+" to adjust proficiency.\n\t * They begin with "level+" to adjust the adjusted level.\n\t * They begin with "X"+expertise code name + "+" for expertise level\n\t * The are followed by the exact ID() of the ability, or * for All, or\n\t * the skill classification name in uppercase, or the domain name in\n\t * uppercase.\n\t * @param ableID the ability ID, with an appropriate prefix\n\t * @param newValue the numeric value associated with the adjustment.\n\t */\n\tpublic void adjustAbilityAdjustment(String ableID, int newValue);\n\n\t/**\n\t * Returns the list of special weapon or armor proficiencies,\n\t * or special detriments, that this character has.\n\t * Each one is a filterer which, if passes, means the character\n\t * can always use the armor or weapon, even if class or race\n\t * or other considerations might not permit it.\n\t * @see #setItemProficiencies(DoubleFilterer[])\n\t * @return a list of proficiency or deficiency codes\n\t */\n\tpublic DoubleFilterer<Item>[] getItemProficiencies();\n\n\t/**\n\t * Sets the list of special weapon or armor proficiencies,\n\t * or special detriments, that this character has.\n\t * Each one is a filterer which, if passes, means the character\n\t * can always use the armor or weapon, even if class or race\n\t * or other considerations might not permit it.\n\t * @see #getItemProficiencies()\n\t * @see #addItemDeficiency(String)\n\t * @see #addItemProficiency(String)\n\t * @param newArray a list of proficiency or deficiency codes\n\t */\n\tpublic void setItemProficiencies(DoubleFilterer<Item>[] newArray);\n\n\t/**\n\t * Adds a new weapon or armor proficiency, compiling it into\n\t * the proficiency filter.  The argument is a zapper mask describing\n\t * the type of item that the player is newly proficient at.\n\t *\n\t * @see #getItemProficiencies()\n\t * @see #addItemDeficiency(String)\n\t *\n\t * @see com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary\n\t * @param zapperMask the zapper mask\n\t */\n\tpublic void addItemProficiency(String zapperMask);\n\n\t/**\n\t * Adds a new weapon or armor deficiency, compiling it into\n\t * the deficiency filter.  The argument is a zapper mask describing\n\t * the type of item that the player is newly deficient at.\n\t *\n\t * @see #getItemProficiencies()\n\t * @see #addItemProficiency(String)\n\t *\n\t * @see com.planet_ink.coffee_mud.Libraries.interfaces.MaskingLibrary\n\t * @param zapperMask the zapper mask\n\t */\n\tpublic void addItemDeficiency(String zapperMask);\n\n\t/** string array of abbreviations of each stat code, ordered by numeric value */\n\tpublic static final String[] DEFAULT_STAT_ABBR=\n\t{\n\t\t"S",\n\t\t"I",\n\t\t"D",\n\t\t"C",\n\t\t"CH",\n\t\t"W",\n\t\t"G",\n\t\t"vPY",\n\t\t"vF",\n\t\t"vC",\n\t\t"vW",\n\t\t"vG",\n\t\t"vMI",\n\t\t"V",\n\t\t"vJ",\n\t\t"vA",\n\t\t"vE",\n\t\t"vP",\n\t\t"vU",\n\t\t"vM",\n\t\t"vD",\n\t\t"vT",\n\t\t"mS",\n\t\t"mI",\n\t\t"mD",\n\t\t"mC",\n\t\t"mCH",\n\t\t"mW",\n\t\t"A",\n\t\t"vH",\n\t\t"vO",\n\t\t"vC",\n\t\t"Wa",\n\t\t"vWB",\n\t\t"vWP",\n\t\t"vWS",\n\t\t"vMS",\n\t\t"vMP",\n\t\t"vMG",\n\t\t"vMC",\n\t\t"cRW",\n\t\t"cRM",\n\t\t"cDW",\n\t\t"cDM",\n\t\t"F",\n\t\t"R"\n\t};\n\n\t/** string array of descriptions of each stat code, ordered by numeric value */\n\tpublic static final String[] DEFAULT_STAT_DESCS=\n\t{\n\t\t"STRENGTH",\n\t\t"INTELLIGENCE",\n\t\t"DEXTERITY",\n\t\t"CONSTITUTION",\n\t\t"CHARISMA",\n\t\t"WISDOM",\n\t\t"GENDER",\n\t\t"PARALYSIS SAVE",\n\t\t"SAVE VS FIRE",\n\t\t"SAVE VS COLD",\n\t\t"SAVE VS WATER",\n\t\t"SAVE VS GAS",\n\t\t"SAVE VS MIND",\n\t\t"GENERAL SAVE",\n\t\t"JUSTICE SAVE",\n\t\t"SAVE VS ACID",\n\t\t"SAVE VS ELECTRICITY",\n\t\t"SAVE VS POISON",\n\t\t"SAVE VS UNDEAD",\n\t\t"SAVE VS MAGIC",\n\t\t"SAVE VS DISEASE",\n\t\t"SAVE VS TRAPS",\n\t\t"MAX STRENGTH ADJ.",\n\t\t"MAX INTELLIGENCE ADJ.",\n\t\t"MAX DEXTERITY ADJ.",\n\t\t"MAX CONSTITUTION ADJ.",\n\t\t"MAX CHARISMA ADJ.",\n\t\t"MAX WISDOM ADJ.",\n\t\t"AGE",\n\t\t"SAVE VS DETECTION",\n\t\t"SAVE VS OVERLOOKING",\n\t\t"SAVE VS CONVERSIONS",\n\t\t"WEIGHT ADJUSTMENT",\n\t\t"SAVE VS BLUNT",\n\t\t"SAVE VS PIERCE",\n\t\t"SAVE VS SLASH",\n\t\t"SAVE VS SPELLS",\n\t\t"SAVE VS PRAYERS",\n\t\t"SAVE VS SONGS",\n\t\t"SAVE VS CHANTS",\n\t\t"CRIT WEAPON CHANCE PCT",\n\t\t"CRIT MAGIC CHANCE PCT",\n\t\t"CRIT WEAPON DAMAGE PCT",\n\t\t"CRIT MAGIC DAMAGE PCT",\n\t\t"FAITH",\n\t\t"REJUVENATION RATE ADJ"\n\t};\n\n\t/** string array of descriptions of each stat code, ordered by numeric value */\n\tpublic static final String[] DEFAULT_STAT_NAMES=\n\t{\n\t\t"STRENGTH",\n\t\t"INTELLIGENCE",\n\t\t"DEXTERITY",\n\t\t"CONSTITUTION",\n\t\t"CHARISMA",\n\t\t"WISDOM",\n\t\t"GENDER",\n\t\t"PARALYSIS",\n\t\t"FIRE",\n\t\t"COLD",\n\t\t"WATER",\n\t\t"GAS",\n\t\t"MIND",\n\t\t"GENERAL",\n\t\t"JUSTICE",\n\t\t"ACID",\n\t\t"ELECTRICITY",\n\t\t * Returns an array of the numeric codes for all base stats\r\n\t\t * @return an array of the numeric codes for all base stats\r\n\t\t */\r\n\t\tpublic static int[] BASE() { return c().baseStatCodes;}\r\n\r\n\t\t/**\r\n\t\t * Returns the name of all base stats\r\n\t\t"MAXDEXTERITY",\n\t\t"MAXCONSTITUTION",\n\t\t"MAXCHARISMA",\n\t\t"MAXWISDOM",\n\t\t"AGE",\n\t\t"DETECTION",\n\t\t"OVERLOOKING",\n\t\t"DOUBT",\n\t\t"WEIGHTADJ",\n\t\t"SAVEBLUNT",\n\t\t"SAVEPIERCE",\n\t\t"SAVESLASH",\n\t\t"SAVESPELLS",\n\t\t"SAVEPRAYERS",\n\t\t"SAVESONGS",\n\t\t"SAVECHANTS",\n\t\t"CRITPCTWEAPONS",\n\t\t"CRITPCTMAGIC",\n\t\t"CRITDMGWEAPONS",\n\t\t"CRITDMGMAGIC",\n\t\t"FAITH",\n\t\t"REJUVRATE"\n\t};\n\n\t/** string array of attributable descriptions of each stat code, ordered by numeric value */\n\tpublic static final String[] DEFAULT_STAT_DESC_ATTS=\n\t{\n\t\t"STRONG",\n\t\t"INTELLIGENT",\n\t\t"DEXTEROUS",\n\t\t"HEALTHY",\n\t\t"CHARISMATIC",\n\t\t"WISE",\n\t\t"",\n\t\t"RESISTANT TO PARALYSIS",\n\t\t"RESISTANT TO FIRE",\n\t\t"RESISTANT TO COLD",\n\t\t"RESISTANT TO WATER",\n\t\t"RESISTANT TO GAS",\n\t\t"RESISTANT TO MIND ATTACKS",\n\t\t"RESISTANT",\n\t\t"RESISTANT TO UNDIGNIFIED ATTACKS",\n\t\t"RESISTANT TO ACID",\n\t\t"RESISTANT TO ELECTRICITY",\n\t\t"RESISTANT TO POISON",\n\t\t * Returns an array of the numeric codes for all max stats\r\n\t\t * @return an array of the numeric codes for all max stats\r\n\t\t */\r\n\t\tpublic static int[] MAX() { return c().maxStatCodes;}\r\n\t\t/**\r\n\t\t * Returns an array of the numeric codes for all max stats\r\n\t\t * @return an array of the numeric codes for all max stats\r\n\t\t"POTENTIALLY HEALTHY",\n\t\t"POTENTIALLY CHARISMATIC",\n\t\t"POTENTIALLY WISE",\n\t\t"OLD",\n\t\t"CONCEALED",\n\t\t"WATCHFUL",\n\t\t"DOUBTFUL",\n\t\t"",\n\t\t"RESISTANT TO BLUNT",\n\t\t"RESISTANT TO PIERCE",\n\t\t"RESISTANT TO SLASH",\n\t\t"RESISTANT TO SPELLS",\n\t\t"RESISTANT TO PRAYERS",\n\t\t * Returns an array of the numeric codes for all stats\r\n\t\t * @return an array of the numeric codes for all stats\r\n\t\t */\r\n\t\tpublic static int[] ALL() { return c().allStatCodes;}\r\n\t\t/**\r\n\t\t * Returns an array of the numeric codes for all stats\r\n\t\t * @return an array of the numeric codes for all stats\r\n\t\t"REJUVENATINGLY DIFFERENT"\n\t};\n\n\t/** an appropriate CMMsg MSG type to correspond to the given saving throw, indexed as STAT_SAVE_ constant */\n\tpublic static int[] DEFAULT_STAT_MSG_MAP=\n\t{\n\t\t-1, // strength\n\t\t-1, // intelligence\n\t\t-1, // dexterity\n\t\t-1, // constitution\n\t\t-1, // charisma\n\t\t-1, // wisdom\n\t\t-1, // gender\n\t\tCMMsg.TYP_PARALYZE,\n\t\tCMMsg.TYP_FIRE,\n\t\tCMMsg.TYP_COLD,\n\t\tCMMsg.TYP_WATER,\n\t\tCMMsg.TYP_GAS,\n\t\tCMMsg.TYP_MIND,\n\t\tCMMsg.TYP_GENERAL,\n\t\tCMMsg.TYP_JUSTICE,\n\t\tCMMsg.TYP_ACID,\n\t\tCMMsg.TYP_ELECTRIC,\n\t\tCMMsg.TYP_POISON,\n\t\tCMMsg.TYP_UNDEAD,\n\t\tCMMsg.TYP_CAST_SPELL,\n\t\tCMMsg.TYP_DISEASE,\n\t\t-1, // traps\n\t\t-1, // max str\n\t\t-1, // max int\n\t\t-1, // max\n\t\t-1, // max dex\n\t\t-1, // max con\n\t\t-1, // max cha\n\t\t-1, // max wis\n\t\t-1, // age\n\t\t-1, // save conceilment\n\t\t-1, // save overlooking\n\t\t-1, // doubt\n\t\t-1, // weight adjustment\n\t\t-1, // save blunt\n\t\t-1, // save pierce\n\t\t-1, // save slash\n\t\t-1, // save spells\n\t\t-1, // save prayers\n\t\t-1, // save songs\n\t\t-1, // save chants\n\t\t-1, // bonus weapon crit chance\n\t\t-1, // bonus magic crit chance\n\t\t-1, // bonus weapon crit damage\n\t\t-1, // bonus magic crit damage\n\t\t-1, // faith\n\t\t-1, // rejuv rate\n\t};\n\n\t/**\n\t * Global character stat code data collector\n\t * @author Bo Zimmerman\n\t */\n\tpublic class CODES\n\t{\n\t\tprivate static CODES[] insts=new CODES[256];\n\n\t\tprivate int[]\t\t\tbaseStatCodes\t\t\t\t= new int[0];\n\t\tprivate int[]\t\t\tmaxStatCodes\t\t\t\t= new int[0];\n\t\tprivate int[]\t\t\tMaxBaseCrossCodes\t\t\t= new int[0];\n\t\tprivate int[]\t\t\tallStatCodes\t\t\t\t= new int[0];\n\t\tprivate int[]\t\t\tsavingThrowCodes\t\t\t= new int[0];\n\t\tprivate boolean[]\t\tisBaseStatCode\t\t\t\t= new boolean[0];\n\t\tprivate String[]\t\tstatAbbreviations\t\t\t= new String[0];\n\t\tprivate String[]\t\tstatDescriptions\t\t\t= new String[0];\n\t\tprivate String[]\t\tstatNames\t\t\t\t\t= new String[0];\n\t\tprivate String[]\t\tbaseStatNames\t\t\t\t= new String[0];\n\t\tprivate String[]\t\tshortNames\t\t\t\t\t= new String[0];\n\t\tprivate String[]\t\tstatAttributionDescriptions\t= new String[0];\n\t\tprivate int[]\t\t\tstatCMMsgMapping\t\t\t= new int[0];\n\t\tprivate int\t\t\t\tlongestBaseCodeName\t\t\t= -1;\n\t\tprivate final Map<Integer,Integer> rvsStatCMMsgMapping\t= new Hashtable<Integer,Integer>();\n\n\t\tpublic CODES()\n\t\t{\n\t\t\tsuper();\n\t\t\tfinal char c=Thread.currentThread().getThreadGroup().getName().charAt(0);\n\t\t\tif(insts==null)\n\t\t\t\tinsts=new CODES[256];\n\t\t\tif(insts[c]==null)\n\t\t\t\tinsts[c]=this;\n\n\t\t\tfinal String[][] addExtra = CMProps.instance().getStrsStarting("ADDCHARSTAT_");\n\t\t\tfinal String[][] repExtra = CMProps.instance().getStrsStarting("REPLACECHARSTAT_");\n\t\t\tfor(int i=STAT_STRENGTH;i<=STAT_WISDOM;i++)\n\t\t\t\taddBaseStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);\n\t\t\taddAllStat(DEFAULT_STAT_ABBR[STAT_GENDER],DEFAULT_STAT_DESCS[STAT_GENDER],DEFAULT_STAT_NAMES[STAT_GENDER],\n\t\t\t\t\t\tDEFAULT_STAT_DESC_ATTS[STAT_GENDER],DEFAULT_STAT_MSG_MAP[STAT_GENDER],false);\n\t\t\tfor(int i=STAT_SAVE_PARALYSIS;i<=STAT_SAVE_TRAPS;i++)\n\t\t\t\taddSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);\n\t\t\tint baseCtr=0;\n\t\t\tfor(int i=STAT_MAX_STRENGTH_ADJ;i<=STAT_MAX_WISDOM_ADJ;i++)\n\t\t\t\taddMaxStat(baseStatCodes[baseCtr++],DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);\n\t\t\taddAllStat(DEFAULT_STAT_ABBR[STAT_AGE],DEFAULT_STAT_DESCS[STAT_AGE],DEFAULT_STAT_NAMES[STAT_AGE],\n\t\t\t\t\t\tDEFAULT_STAT_DESC_ATTS[STAT_AGE],DEFAULT_STAT_MSG_MAP[STAT_AGE],false);\n\t\t\tfor(int i=STAT_SAVE_DETECTION;i<=STAT_SAVE_DOUBT;i++)\n\t\t\t\taddSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);\n\t\t\tfor(int i=STAT_WEIGHTADJ;i<=STAT_WEIGHTADJ;i++)\n\t\t\t\taddAllStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i],false);\n\t\t\tfor(int i=STAT_SAVE_BLUNT;i<=STAT_SAVE_CHANTS;i++)\n\t\t\t\taddSavingThrow(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i]);\n\t\t\tfor(int i=STAT_CRIT_CHANCE_PCT_WEAPON;i<DEFAULT_NUM_STATS;i++)\n\t\t\t\taddAllStat(DEFAULT_STAT_ABBR[i],DEFAULT_STAT_DESCS[i],DEFAULT_STAT_NAMES[i],DEFAULT_STAT_DESC_ATTS[i],DEFAULT_STAT_MSG_MAP[i],false);\n\t\t\tfor(int i=0;i<addExtra.length+repExtra.length;i++)\n\t\t\t{\n\t\t\t\tfinal String[] array = (i>=addExtra.length)?repExtra[i-addExtra.length]:addExtra[i];\n\t\t\t\tfinal boolean replace = i>=addExtra.length;\n\t\t\t\tString stat = array[0].toUpperCase().trim();\n\t\t\t\tfinal String p=array[1];\n\t\t\t\tfinal List<String> V=CMParms.parseCommas(p, false);\n\t\t\t\tif(V.size()!=4)\n\t\t\t\t{\n\t\t\t\t\tLog.errOut("CharStats","Bad coffeemud.ini charstat row, requires 4 ; separated entries: "+p);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString type=V.get(0).toUpperCase().trim();\n\t\t\t\tint oldStatCode=-1;\n\t\t\t\tif(replace)\n\t\t\t\t{\n\t\t\t\t\tfinal String repStat=stat;\n\t\t\t\t\tstat=type;\n\t\t\t\t\toldStatCode=CMParms.indexOf(DEFAULT_STAT_NAMES, repStat);\n\t\t\t\t\tif(oldStatCode<0)\n\t\t\t\t\t\toldStatCode=CMParms.indexOf(DEFAULT_STAT_DESCS, repStat);\n\t\t\t\t\tif(oldStatCode>=0)\n\t\t\t\t\t\ttype="REPLACE";\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.errOut("CharStats","Bad coffeemud.ini charstat row, bad stat name: "+repStat);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinal String abbr=V.get(1);\n\t\t\t\tfinal String desc=V.get(2).toUpperCase();\n\t\t\t\tfinal String adj=V.get(3).toUpperCase();\n\t\t\t\tif(type.equalsIgnoreCase("BASE"))\n\t\t\t\t{\n\t\t\t\t\taddBaseStat(abbr, desc, stat, adj, -1);\n\t\t\t\t\tfinal int baseStatCode=allStatCodes.length-1;\n\t\t\t\t\taddMaxStat(baseStatCode, "m"+abbr, "MAX "+stat+" ADJ.", "MAX"+stat, "POTENTIALLY "+adj, -1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tif(type.equalsIgnoreCase("SAVE"))\n\t\t\t\t\taddSavingThrow(abbr,desc,stat,adj,-1);\n\t\t\t\telse\n\t\t\t\tif(type.equalsIgnoreCase("OTHER"))\n\t\t\t\t\taddAllStat(abbr,desc,stat,adj,-1,false);\n\t\t\t\telse\n\t\t\t\tif(replace&&(oldStatCode>=0))\n\t\t\t\t{\n\t\t\t\t\tstatAbbreviations[oldStatCode]=abbr;\n\t\t\t\t\tstatDescriptions[oldStatCode]=desc;\n\t\t\t\t\tstatNames[oldStatCode]=stat;\n\t\t\t\t\tif(stat.length()>3)\n\t\t\t\t\t\tshortNames[oldStatCode]=CMStrings.capitalizeAndLower(stat).substring(0,3);\n\t\t\t\t\telse\n\t\t\t\t\t\tshortNames[oldStatCode]=CMStrings.capitalizeAndLower(stat);\n\t\t\t\t\tstatAttributionDescriptions[oldStatCode]=adj;\n\t\t\t\t\tstatCMMsgMapping[oldStatCode]=-1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tLog.errOut("CharStats","Bad coffeemud.ini charstat row, bad type: "+type);\n\t\t\t}\n\t\t}\n\n\t\tprivate static CODES c()\n\t\t{\n\t\t\treturn insts[Thread.currentThread().getThreadGroup().getName().charAt(0)];\n\t\t}\n\n\t\tpublic static CODES c(final byte c)\n\t\t{\n\t\t\treturn insts[c];\n\t\t}\n\n\t\tpublic static CODES instance()\n\t\t{\n\t\t\tCODES c=insts[Thread.currentThread().getThreadGroup().getName().charAt(0)];\n\t\t\tif(c==null)\n\t\t\t\tc=new CODES();\n\t\t\treturn c;\n\t\t}\n\n\t\tpublic static void reset()\n\t\t{\n\t\t\tinsts[Thread.currentThread().getThreadGroup().getName().charAt(0)]=null;\n\t\t\tinstance();\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all base stats\n\t\t * @return an array of the numeric codes for all base stats\n\t\t */\n\t\tpublic static int[] BASECODES()\n\t\t{\n\t\t\treturn c().baseStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns the longest base code name\n\t\t * @return the longest base code name\n\t\t */\n\t\tpublic static int LONNGEST_BASECODE_NAME()\n\t\t{\n\t\t\tfinal CODES c=c();\n\t\t\tif(c.longestBaseCodeName<0)\n\t\t\t{\n\t\t\t\tfor(final int code : c.baseStatCodes)\n\t\t\t\t{\n\t\t\t\t\tif(c.statNames[code].length()>c.longestBaseCodeName)\n\t\t\t\t\t\tc.longestBaseCodeName=c.statNames[code].length();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn c.longestBaseCodeName;\n\t\t}\n\n\t\t/**\n\t\t * Returns the name of all base stats\n\t\t * @return names of all base stats\n\t\t */\n\t\tpublic static String[] BASENAMES()\n\t\t{\n\t\t\treturn c().baseStatNames;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all base stats\n\t\t *\n\t\t * @return an array of the numeric codes for all base stats\n\t\t */\n\t\tpublic int[] base()\n\t\t{\n\t\t\treturn baseStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns whether the given code is a base stat\n\t\t *\n\t\t * @param code the STAT code to check\n\t\t * @return whether the given code is a base stat\n\t\t */\n\t\tpublic static boolean isBASE(final int code)\n\t\t{\n\t\t\treturn c().isBase(code);\n\t\t}\n\n\t\t/**\n\t\t * Returns whether the given code is a base stat\n\t\t *\n\t\t * @param code the STAT code to check\n\t\t * @return whether the given code is a base stat\n\t\t */\n\t\tpublic boolean isBase(final int code)\n\t\t{\n\t\t\tif(code<isBaseStatCode.length)\n\t\t\t\treturn isBaseStatCode[code];\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Returns the code for the base code that matches the given max adj code\n\t\t * Returns the code for the max adj code that matches the given base code\n\t\t * Returns -1 if the code is not a max adj code.\n\t\t * @param max the MAX state adjustment code\n\t\t * @return the translated code\n\t\t */\n\t\tpublic static int toMAXBASE(final int max)\n\t\t{\n\t\t\treturn c().toMaxBase(max);\n\t\t}\n\n\t\t/**\n\t\t * Returns the code for the base code that matches the given max adj code\n\t\t * Returns the code for the max adj code that matches the given base code\n\t\t * Returns -1 if the code is not a max adj code.\n\t\t * @param max the MAX state adjustment code\n\t\t * @return the translated code\n\t\t */\n\t\tpublic int toMaxBase(final int max)\n\t\t{\n\t\t\tif(max<MaxBaseCrossCodes.length)\n\t\t\t\treturn MaxBaseCrossCodes[max];\n\t\t\treturn -1;\n\t\t}\n\t\t/**\n\t\t * Returns an array of the numeric codes for all max stats\n\t\t * @return an array of the numeric codes for all max stats\n\t\t */\n\t\tpublic static int[] MAXCODES()\n\t\t{\n\t\t\treturn c().maxStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all max stats\n\t\t *\n\t\t * @return an array of the numeric codes for all max stats\n\t\t */\n\t\tpublic int[] max()\n\t\t{\n\t\t\treturn maxStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns total number of stat codes 0 - this-1\n\t\t *\n\t\t * @return total number of stat codes 0 - this-1\n\t\t */\n\t\tpublic static int TOTAL()\n\t\t{\n\t\t\treturn c().allStatCodes.length;\n\t\t}\n\n\t\t/**\n\t\t * Returns total number of stat codes 0 - this-1\n\t\t *\n\t\t * @return total number of stat codes 0 - this-1\n\t\t */\n\t\tpublic int total()\n\t\t{\n\t\t\treturn allStatCodes.length;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all stats\n\t\t *\n\t\t * @return an array of the numeric codes for all stats\n\t\t */\n\t\tpublic static int[] ALLCODES()\n\t\t{\n\t\t\treturn c().allStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all stats\n\t\t *\n\t\t * @return an array of the numeric codes for all stats\n\t\t */\n\t\tpublic int[] all()\n\t\t{\n\t\t\treturn allStatCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all save stats\n\t\t *\n\t\t * @return an array of the numeric codes for all save stats\n\t\t */\n\t\tpublic static int[] SAVING_THROWS()\n\t\t{\n\t\t\treturn c().savingThrowCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns an array of the numeric codes for all save stats\n\t\t *\n\t\t * @return an array of the numeric codes for all save stats\n\t\t */\n\t\tpublic int[] saving_throws()\n\t\t{\n\t\t\treturn savingThrowCodes;\n\t\t}\n\n\t\t/**\n\t\t * Returns the names of the various stats\n\t\t *\n\t\t * @return the names of the various stats\n\t\t */\n\t\tpublic static String[] NAMES()\n\t\t{\n\t\t\treturn c().statNames;\n\t\t}\n\n\t\t/**\n\t\t * Returns the name of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the name of the stat code\n\t\t */\n\t\tpublic static String NAME(final int code)\n\t\t{\n\t\t\treturn c().name(code);\n\t\t}\n\n\t\t/**\n\t\t * Returns the short name of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the short name of the stat code\n\t\t */\n\t\tpublic static String SHORTNAME(final int code)\n\t\t{\n\t\t\treturn c().shortName(code);\n\t\t}\n\n\t\t/**\n\t\t * Returns the name of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the name of the stat code\n\t\t */\n\t\tpublic String name(final int code)\n\t\t{\n\t\t\tif(code < statNames.length)\n\t\t\t\treturn statNames[code];\n\t\t\treturn "";\n\t\t}\n\n\t\t/**\n\t\t * Returns the name of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the name of the stat code\n\t\t */\n\t\tpublic String shortName(final int code)\n\t\t{\n\t\t\tif(code < shortNames.length)\n\t\t\t\treturn shortNames[code];\n\t\t\treturn "";\n\t\t}\n\n\t\t/**\n\t\t * Returns the descriptions of the various stats\n\t\t *\n\t\t * @return the descriptions of the various stats\n\t\t */\n\t\tpublic static String[] DESCS()\n\t\t{\n\t\t\treturn c().statDescriptions;\n\t\t}\n\n\t\t/**\n\t\t * Returns the description of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the description of the stat code\n\t\t */\n\t\tpublic static String DESC(final int code)\n\t\t{\n\t\t\treturn c().desc(code);\n\t\t}\n\n\t\t/**\n\t\t * Returns the description of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the description of the stat code\n\t\t */\n\t\tpublic String desc(final int code)\n\t\t{\n\t\t\tif(code < statDescriptions.length)\n\t\t\t\treturn statDescriptions[code];\n\t\t\treturn "";\n\t\t}\n\n\t\t/**\n\t\t * Returns the abbreviations of the various stats\n\t\t *\n\t\t * @return the abbreviations of the various stats\n\t\t */\n\t\tpublic static String[] ABBRS()\n\t\t{\n\t\t\treturn c().statAbbreviations;\n\t\t}\n\n\t\t/**\n\t\t * Returns the abbreviation of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the abbreviation of the stat code\n\t\t */\n\t\tpublic static String ABBR(final int code)\n\t\t{\n\t\t\treturn c().abbr(code);\n\t\t}\n\n\t\t/**\n\t\t * Returns the abbreviation of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the abbreviation of the stat code\n\t\t */\n\t\tpublic String abbr(final int code)\n\t\t{\n\t\t\tif(code < statAbbreviations.length)\n\t\t\t\treturn statAbbreviations[code];\n\t\t\treturn "";\n\t\t}\n\n\t\t/**\n\t\t * Returns the adjective descriptions of the various stats\n\t\t *\n\t\t * @return the adjective descriptions of the various stats\n\t\t */\n\t\tpublic static String[] ATTDESCS()\n\t\t{\n\t\t\treturn c().statAttributionDescriptions;\n\t\t}\n\n\t\t/**\n\t\t * Returns the adjective description of the stat code\n\t\t *\n\t\t * @param code the stat code\n\t\t * @return the adjective description of the stat code\n\t\t */\n\t\tpublic static String ATTDESC(final int code)\n\t\t{\n\t\t\treturn c().statAttributionDescriptions[code];\n\t\t}\n\n\t\t/**\n\t\t * Returns the CMMsg mappings of the various stats\n\t\t *\n\t\t * @return the CMMsg mappings of the various stats\n\t\t */\n\t\tpublic static int[] CMMSGMAP()\n\t\t{\n\t\t\treturn c().statCMMsgMapping;\n\t\t}\n\n\t\t/**\n\t\t * Returns the CMMsg mapping of the stat\n\t\t *\n\t\t * @param code the CMMsg mapping for the given stat code\n\t\t * @return the CMMsg mapping of the stat\n\t\t */\n\t\tpublic static int CMMSGMAP(final int code)\n\t\t{\n\t\t\treturn c().statCMMsgMapping[code];\n\t\t}\n\n\t\t/**\n\t\t * Returns the Reverse CMMsg mapping of the stat from MsgCode -&gt; Stat Code\n\t\t * @param code the Stat mapping for the given CMMsg code or -1\n\t\t * @return the Stat mapping of the CMMsg\n\t\t */\n\t\tpublic static int RVSCMMSGMAP(final int code)\n\t\t{\n\t\t\tfinal Integer statCode = c().rvsStatCMMsgMapping.get(Integer.valueOf(code));\n\t\t\tif(statCode != null)\n\t\t\t\treturn statCode.intValue();\n\t\t\treturn -1;\n\t\t}\n\n\t\t/**\n\t\t * Returns the code for the given stat name\n\t\t * @param name the case insensitive name\n\t\t * @param exactOnly true to only return exact matches, false to do otherwise\n\t\t * @return the stat code\n\t\t */\n\t\tpublic int find(final String name, final boolean exactOnly)\n\t\t{\n\t\t\tfor(int i=0;i<total();i++)\n\t\t\t{\n\t\t\t\tif((name.equalsIgnoreCase(name(i)))\n\t\t\t\t||(name.equalsIgnoreCase(desc(i)))\n\t\t\t\t||(name.equalsIgnoreCase(abbr(i))))\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t\tif(exactOnly)\n\t\t\t\treturn -1;\n\t\t\tfor(int i=0;i<total();i++)\n\t\t\t{\n\t\t\t\tif((name(i).toLowerCase().startsWith(name))||(desc(i).toLowerCase().startsWith(name)))\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t\treturn -1;\n\t\t}\n\n\t\t/**\n\t\t * Returns the code for the given stat name\n\t\t * @param name the case insensitive name\n\t\t * @param exactOnly true to only return exact matches, false to do otherwise\n\t\t * @return the stat code\n\t\t */\n\t\tpublic static int findWhole(final String name, final boolean exactOnly)\n\t\t{\n\t\t\treturn c().find(name, exactOnly);\n\t\t}\n\n\t\t/**\n\t\t * Adds a new base stat to this object for all mobs and players to share\n\t\t * @param abbr 1-3 letter short code for this stat\n\t\t * @param desc longer description of this stat\n\t\t * @param name space-free coded name of this stat\n\t\t * @param attDesc description of someone with this stat in abundance\n\t\t * @param cmmsgMap a CMMsg messf code that saves with this stat\n\t\t */\n\t\tpublic void addBaseStat(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)\n\t\t{\n\t\t\tbaseStatCodes=Arrays.copyOf(baseStatCodes, baseStatCodes.length+1);\n\t\t\tbaseStatCodes[baseStatCodes.length-1]=allStatCodes.length;\n\t\t\tbaseStatNames=Arrays.copyOf(baseStatNames, baseStatNames.length+1);\n\t\t\tbaseStatNames[baseStatNames.length-1]=name;\n\t\t\taddAllStat(abbr,desc,name,attDesc,cmmsgMap,true);\n\t\t}\n\n\t\t/**\n\t\t * Adds a new max stat to this object for all mobs and players to share\n\t\t * @param baseCode corresponding base stat code\n\t\t * @param abbr 1-3 letter short code for this stat\n\t\t * @param desc longer description of this stat\n\t\t * @param name space-free coded name of this stat\n\t\t * @param attDesc description of someone with this stat in abundance\n\t\t * @param cmmsgMap a CMMsg message code that saves with this stat\n\t\t */\n\t\tpublic void addMaxStat(final int baseCode, final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)\n\t\t{\n\t\t\tmaxStatCodes=Arrays.copyOf(maxStatCodes, maxStatCodes.length+1);\n\t\t\tfinal int maxCode = allStatCodes.length;\n\t\t\tmaxStatCodes[maxStatCodes.length-1]=maxCode;\n\n\t\t\taddAllStat(abbr,desc,name,attDesc,cmmsgMap,false);\n\n\t\t\tMaxBaseCrossCodes=Arrays.copyOf(MaxBaseCrossCodes, allStatCodes.length);\n\t\t\tMaxBaseCrossCodes[maxCode]=baseCode;\n\t\t\tMaxBaseCrossCodes[baseCode]=maxCode;\n\t\t}\n\n\t\t/**\n\t\t * Adds a new saving throw stat to this object for all mobs and players to share\n\t\t * @param abbr 1-3 letter short code for this stat\n\t\t * @param desc longer description of this stat\n\t\t * @param name space-free coded name of this stat\n\t\t * @param attDesc description of someone with this stat in abundance\n\t\t * @param cmmsgMap a CMMsg message code that saves with this stat\n\t\t */\n\t\tpublic void addSavingThrow(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap)\n\t\t{\n\t\t\tsavingThrowCodes=Arrays.copyOf(savingThrowCodes, savingThrowCodes.length+1);\n\t\t\tsavingThrowCodes[savingThrowCodes.length-1]=allStatCodes.length;\n\t\t\taddAllStat(abbr,desc,name,attDesc,cmmsgMap,false);\n\t\t}\n\n\t\t/**\n\t\t * Adds a new miscellaneous stat to this object for all mobs and players to share\n\t\t * @param abbr 1-3 letter short code for this stat\n\t\t * @param desc longer description of this stat\n\t\t * @param name space-free coded name of this stat\n\t\t * @param attDesc description of someone with this stat in abundance\n\t\t * @param cmmsgMap a CMMsg message code that saves with this stat\n\t\t * @param base true if the code is a base stat, false if a save or something else\n\t\t */\n\t\tpublic void addAllStat(final String abbr, final String desc, final String name, final String attDesc, final int cmmsgMap, final boolean base)\n\t\t{\n\t\t\tallStatCodes=Arrays.copyOf(allStatCodes, allStatCodes.length+1);\n\t\t\tallStatCodes[allStatCodes.length-1]=allStatCodes.length-1;\n\t\t\tisBaseStatCode=Arrays.copyOf(isBaseStatCode, allStatCodes.length);\n\t\t\tisBaseStatCode[allStatCodes.length-1]=base;\n\t\t\tstatAbbreviations=Arrays.copyOf(statAbbreviations, allStatCodes.length);\n\t\t\tstatAbbreviations[allStatCodes.length-1]=abbr;\n\t\t\tstatDescriptions=Arrays.copyOf(statDescriptions, allStatCodes.length);\n\t\t\tstatDescriptions[allStatCodes.length-1]=desc.toUpperCase().trim();\n\t\t\tstatNames=Arrays.copyOf(statNames, allStatCodes.length);\n\t\t\tstatNames[allStatCodes.length-1]=name.toUpperCase().trim().replace(\' \',\'_\');\n\t\t\tshortNames=Arrays.copyOf(shortNames, allStatCodes.length);\n\t\t\tif(name.length()>3)\n\t\t\t\tshortNames[allStatCodes.length-1]=CMStrings.capitalizeAndLower(name.trim().replace(\' \',\'_\')).substring(0, 3);\n\t\t\telse\n\t\t\t\tshortNames[allStatCodes.length-1]=CMStrings.capitalizeAndLower(name.trim().replace(\' \',\'_\'));\n\t\t\tstatAttributionDescriptions=Arrays.copyOf(statAttributionDescriptions, allStatCodes.length);\n\t\t\tstatAttributionDescriptions[allStatCodes.length-1]=attDesc.toUpperCase();\n\t\t\tstatCMMsgMapping=Arrays.copyOf(statCMMsgMapping, allStatCodes.length);\n\t\t\tstatCMMsgMapping[allStatCodes.length-1]=cmmsgMap;\n\t\t\trvsStatCMMsgMapping.put(Integer.valueOf(cmmsgMap), Integer.valueOf(allStatCodes.length-1));\n\t\t}\n\t}\n}\n', 'message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@11431 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'author_name': 'bozimmerman', 'lang': 'java'}