com.planet_ink.coffee_mud.Libraries
Class CharCreation

java.lang.Object
  extended by com.planet_ink.coffee_mud.Libraries.StdLibrary
      extended by com.planet_ink.coffee_mud.Libraries.CharCreation
All Implemented Interfaces:
CMObject, Tickable, CharCreationLibrary, CMLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class CharCreation
extends StdLibrary
implements CharCreationLibrary


Nested Class Summary
static class CharCreation.LoginState
           
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CharCreationLibrary
CharCreationLibrary.LoginResult, CharCreationLibrary.LoginSession, CharCreationLibrary.NewCharNameCheckResult
 
Field Summary
 PairList<MaskingLibrary.CompiledZMask,java.lang.String> bodyRoomMasks
           
 java.util.Map<java.lang.String,java.lang.String> bodyRooms
           
 PairList<MaskingLibrary.CompiledZMask,java.lang.String> deathRoomMasks
           
 java.util.Map<java.lang.String,java.lang.String> deathRooms
           
static java.lang.String[] DEFAULT_BADNAMES
           
 Pair<java.lang.String,java.lang.Integer>[] randomNameConsonants
           
 Pair<java.lang.String,java.lang.Integer>[] randomNameVowels
           
protected  java.lang.String RECONFIRMSTR
           
 PairList<MaskingLibrary.CompiledZMask,java.lang.String> startRoomMasks
           
 java.util.Map<java.lang.String,java.lang.String> startRooms
           
 
Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
isDebugging, name, serviceClient, tickStatus
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Constructor Summary
CharCreation()
           
 
Method Summary
protected  CharCreationLibrary.LoginResult acctcreateANSIConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreateEmailConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreateEmailEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreateEmailPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreateEmailStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreatePassworded(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctcreateStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuAddToCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuConfirmCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuShowChars(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuShowMenu(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult acctmenuStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  java.lang.String buildQualifyingClassList(MOB mob, java.util.List<CharClass> classes, java.lang.String finalConnector)
           
 boolean canChangeToThisClass(MOB mob, CharClass thisClass, int theme)
          Returns whether the given mob can change to the given class (that is, to become level 0 in that class) in the given theme.
protected  CharCreationLibrary.LoginResult charcrANSIConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrANSIDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrClassConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrClassDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrClassInit(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrClassPicked(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrClassStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrEmailConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrEmailDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrEmailEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrEmailPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrEmailStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrFactionDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrFactionNext(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrFactionPick(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrFinish(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrGenderDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrGenderStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrPasswordDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrRaceConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrRaceDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrRaceReEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrRaceStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStatConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStatDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStatInit(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session, int bonusPoints)
           
protected  CharCreationLibrary.LoginResult charcrStatPick(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStatPickAdd(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrStatStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrThemeDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrThemePicked(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult charcrThemeStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
 java.util.List<CharClass> classQualifies(MOB mob, int theme)
          Returns the list of all character classes that the given mob can change into, given their currrent state, and the given theme.
 CharCreationLibrary.LoginResult completeCharacterLogin(Session session, java.lang.String login, boolean wiziFlag)
           
 CharCreationLibrary.LoginResult completePlayerLogin(Session session, boolean wizi)
          Takes the given session and mobs login by putting the mob into the given start room in the world, checking their email, and seeing if they are allowed in.
 CharCreationLibrary.LoginResult createCharacter(java.lang.String login, Session session)
          Attempts to send the given session through the character creation process, at the end of which a character with the given login as name will be in the database, ready to load.
 CharCreationLibrary.LoginSession createLoginSession(Session session)
          Creates a new Login Session for the given Session, which will start the login state machine process that will end eventually with either a disconnect or a character logged in.
protected  void finishCreateAccount(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, PlayerAccount acct, java.lang.String login, java.lang.String pw, java.lang.String emailAddy, Session session)
           
 CharCreationLibrary.LoginResult finishLogin(Session session, MOB mob, Room startRoom, boolean resetStats)
          Completes the given session and mobs login by putting the mob into the given start room in the world, checking their email, and seeing if they are allowed in.
 CharCreationLibrary.NewCharNameCheckResult finishNameCheck(java.lang.String login, java.lang.String ipAddress)
           
 java.lang.String generateRandomName(int minSyllable, int maxSyllable)
          Returns a random fantasy name with the range of syllables given.
 Room getDefaultBodyRoom(MOB mob)
          Given the characteristics of the given mob, this method returns the appropriate morgue room for the given mob.
 Room getDefaultDeathRoom(MOB mob)
          Given the characteristics of the given mob, this method returns the appropriate death room for the given mob.
 Room getDefaultStartRoom(MOB mob)
          Given the characteristics of the given mob, this method returns the appropriate start/recall room for the given mob.
 java.util.List<java.lang.String> getExpiredAcctOrCharsList()
          Returns the list of the names of all the expired Accounts or Characters, depending on whether the account system is used or not.
protected  java.util.List<java.lang.String> getNamedFactionChoices(Faction F, java.util.List<java.lang.Integer> mine)
           
protected  Pair<java.lang.String,java.lang.Integer>[] getRandomConsonants()
           
protected  Pair<java.lang.String,java.lang.Integer>[] getRandomVowels()
           
 int getTotalBonusStatPoints(PlayerStats playerStats, PlayerAccount account)
          Based on the rules of the system, this method returns the number of bonus stat points available to players to allocate, if the system lets them do such a thing.
 int getTrainingCost(MOB mob, int abilityCode, boolean quiet)
          Returns the cost, in trains, for the given mob to gain a point in the given ability code stat number.
protected  void getUniversalStartingItems(int theme, MOB mob)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void initBodyRooms(CMProps page)
          Initialize the rules for determining the new character morgue room given the characteristics of the player.
 void initDeathRooms(CMProps page)
          Initialize the rules for determining the new character death room given the characteristics of the player.
 void initStartRooms(CMProps page)
          Initialize the rules for determining the new character start/recall room given the characteristics of the player.
 boolean isAvailableCharClass(CharClass C)
          Returns whether the given character class may be selected by a user.
 boolean isAvailableRace(Race R)
          Returns whether the given race may be selected by a user.
 boolean isBadName(java.lang.String login)
          Returns only whether the given name has a bad word in it.
 boolean isExpired(PlayerAccount acct, Session session, MOB mob)
           
 boolean isOkName(java.lang.String login, boolean spacesOk)
          Returns whether the given name is a valid, legitimate, unused, unbanned, non-bad name to use in coffeemud, for accounts or players.
protected  CharCreationLibrary.LoginResult loginAcctcharPword(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginAcctconvConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginEmailPassword(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginName(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginNewaccountConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginNewcharConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginPassReceived(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginPassStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
protected  CharCreationLibrary.LoginResult loginSubsystem(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
 CharCreationLibrary.LoginResult loginSystem(Session session, com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj)
           
protected  void logoutLoginSession(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginSession)
           
protected  Pair<java.lang.String,java.lang.Integer>[] makeRandomNameSets(java.lang.String rawData)
           
 CharCreationLibrary.NewCharNameCheckResult newAccountNameCheck(java.lang.String login, java.lang.String ipAddress)
          Checks whether an account with the given login name from the given ipAddress may be created at this time.
 boolean newAccountsAllowed(java.lang.String login, Session session, PlayerAccount acct)
           
 boolean newCharactersAllowed(java.lang.String login, Session session, PlayerAccount acct, boolean skipAccountNameCheck)
           
 CharCreationLibrary.NewCharNameCheckResult newCharNameCheck(java.lang.String login, java.lang.String ipAddress, boolean skipAccountNameCheck)
          Checks whether a character with the given login name from the given ipAddress may be created at this time.
 void notifyFriends(MOB mob, java.lang.String message)
          If any of the given mobs friends are online, they are sent the given message.
protected  void pageRooms(CMProps page, java.util.Map<java.lang.String,java.lang.String> table, PairList<MaskingLibrary.CompiledZMask,java.lang.String> masks, java.lang.String start)
           
 boolean performSpamConnectionCheck(java.lang.String address)
          Does a connection spam check against the given address, returning true if all is well, and false if it needs blocking.
 CharCreationLibrary.LoginResult prelimChecks(Session session, MOB pickedMOB, java.lang.String login, java.lang.String email)
           
 void promptBaseCharStats(int theme, MOB mob, int timeoutSecs, Session session, int bonusPoints)
          A blocking call that populates the given mob with their base CharStats according to character creation rules.
 CharClass promptCharClass(int theme, MOB mob, Session session)
          A blocking call that populates the given mob with a character class according to character creation rules.
 char promptGender(int theme, MOB mob, Session session)
          A blocking call that populates the given mob with a particular gender according to character creation rules.
 Race promptRace(int theme, MOB mob, Session session)
          A blocking call that populates the given mob with a particular race according to character creation rules.
 java.util.List<Race> raceQualifies(int theme)
          Returns the list of all races that the given mob can choose into, given their currrent state, and the given theme.
 void reloadTerminal(MOB mob)
          Resets the MXP, MSP and other session flags based on the mobs attributes.
 void reRollStats(CharStats baseCharStats, int pointsLeft)
          Re-populates the base stats of the given CharStats object by resetting the values to minimum, and then adding as many of the given points to random stats until they are all gone.
 void setGlobalBitmaps(MOB mob)
           
protected  MOB setMOBClass(java.lang.String classID, com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj, Session session)
           
 void showTheNews(MOB mob)
          Resets the terminal to the given mobs specs, shows any available polls, the daily message, and runs the MOTD.
 boolean shutdown()
          Shuts down the library.
 
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, tick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary
activate, getServiceClient, L, propertiesLoaded
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

startRooms

public java.util.Map<java.lang.String,java.lang.String> startRooms

startRoomMasks

public PairList<MaskingLibrary.CompiledZMask,java.lang.String> startRoomMasks

deathRooms

public java.util.Map<java.lang.String,java.lang.String> deathRooms

deathRoomMasks

public PairList<MaskingLibrary.CompiledZMask,java.lang.String> deathRoomMasks

bodyRooms

public java.util.Map<java.lang.String,java.lang.String> bodyRooms

bodyRoomMasks

public PairList<MaskingLibrary.CompiledZMask,java.lang.String> bodyRoomMasks

randomNameVowels

public Pair<java.lang.String,java.lang.Integer>[] randomNameVowels

randomNameConsonants

public Pair<java.lang.String,java.lang.Integer>[] randomNameConsonants

RECONFIRMSTR

protected final java.lang.String RECONFIRMSTR
See Also:
Constant Field Values

DEFAULT_BADNAMES

public static final java.lang.String[] DEFAULT_BADNAMES
Constructor Detail

CharCreation

public CharCreation()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdLibrary
Returns:
the name of this class

createLoginSession

public CharCreationLibrary.LoginSession createLoginSession(Session session)
Description copied from interface: CharCreationLibrary
Creates a new Login Session for the given Session, which will start the login state machine process that will end eventually with either a disconnect or a character logged in.

Specified by:
createLoginSession in interface CharCreationLibrary
Parameters:
session - the telnet session trying to login
Returns:
the new session object, giving all necessary access to the login state machine.

getTotalBonusStatPoints

public int getTotalBonusStatPoints(PlayerStats playerStats,
                                   PlayerAccount account)
Description copied from interface: CharCreationLibrary
Based on the rules of the system, this method returns the number of bonus stat points available to players to allocate, if the system lets them do such a thing.

Specified by:
getTotalBonusStatPoints in interface CharCreationLibrary
Parameters:
playerStats - The player stats object for the player
account - the player account object for the player, if applicable
Returns:
the number of stat points available to allocate

reRollStats

public void reRollStats(CharStats baseCharStats,
                        int pointsLeft)
Description copied from interface: CharCreationLibrary
Re-populates the base stats of the given CharStats object by resetting the values to minimum, and then adding as many of the given points to random stats until they are all gone.

Specified by:
reRollStats in interface CharCreationLibrary
Parameters:
baseCharStats - the charstats object to populate
pointsLeft - the number of points above minimum to allocate
See Also:
CharStats

canChangeToThisClass

public boolean canChangeToThisClass(MOB mob,
                                    CharClass thisClass,
                                    int theme)
Description copied from interface: CharCreationLibrary
Returns whether the given mob can change to the given class (that is, to become level 0 in that class) in the given theme. The mob is optional, at which point it is only checking base rules and theme.

Specified by:
canChangeToThisClass in interface CharCreationLibrary
Parameters:
mob - null or the mob who wants to learn a new class
thisClass - the class that the mob wants to learn
theme - the theme defining which classes are available
Returns:
true if the mob can change to the class, false otherwise
See Also:
Area.THEME_FANTASY, CharCreationLibrary.classQualifies(MOB, int)

isAvailableCharClass

public boolean isAvailableCharClass(CharClass C)
Description copied from interface: CharCreationLibrary
Returns whether the given character class may be selected by a user.

Specified by:
isAvailableCharClass in interface CharCreationLibrary
Parameters:
C - the CharClass to check
Returns:
true if it's selectable, false otherwise

classQualifies

public java.util.List<CharClass> classQualifies(MOB mob,
                                                int theme)
Description copied from interface: CharCreationLibrary
Returns the list of all character classes that the given mob can change into, given their currrent state, and the given theme. The mob is optional, at which point it is only checking base class rules and theme.

Specified by:
classQualifies in interface CharCreationLibrary
Parameters:
mob - the mob who wants to change classes
theme - the theme to filter the classes by
Returns:
the list of classes that the mob may change to.
See Also:
CharCreationLibrary.canChangeToThisClass(MOB, CharClass, int)

isAvailableRace

public boolean isAvailableRace(Race R)
Description copied from interface: CharCreationLibrary
Returns whether the given race may be selected by a user.

Specified by:
isAvailableRace in interface CharCreationLibrary
Parameters:
R - the Race to check
Returns:
true if it's selectable, false otherwise

raceQualifies

public java.util.List<Race> raceQualifies(int theme)
Description copied from interface: CharCreationLibrary
Returns the list of all races that the given mob can choose into, given their currrent state, and the given theme. The mob is optional, at which point it is only checking base race rules and theme.

Specified by:
raceQualifies in interface CharCreationLibrary
Parameters:
theme - the theme to filter the races by
Returns:
the list of races that the mob may choose.
See Also:
CharCreationLibrary.canChangeToThisClass(MOB, CharClass, int)

isBadName

public boolean isBadName(java.lang.String login)
Description copied from interface: CharCreationLibrary
Returns only whether the given name has a bad word in it.

Specified by:
isBadName in interface CharCreationLibrary
Parameters:
login - the name to test
Returns:
true if it has a bad name, false otherwise
See Also:
CharCreationLibrary.isOkName(String, boolean), CharCreationLibrary.newCharNameCheck(String, String, boolean), CharCreationLibrary.newAccountNameCheck(String, String)

isOkName

public boolean isOkName(java.lang.String login,
                        boolean spacesOk)
Description copied from interface: CharCreationLibrary
Returns whether the given name is a valid, legitimate, unused, unbanned, non-bad name to use in coffeemud, for accounts or players.

Specified by:
isOkName in interface CharCreationLibrary
Parameters:
login - the name to test
spacesOk - true if spaces in the name are ok, false otherwise
Returns:
true if the name is ok, false otherwise
See Also:
CharCreationLibrary.isBadName(String), CharCreationLibrary.isOkName(String, boolean), CharCreationLibrary.newCharNameCheck(String, String, boolean), CharCreationLibrary.newAccountNameCheck(String, String)

reloadTerminal

public void reloadTerminal(MOB mob)
Description copied from interface: CharCreationLibrary
Resets the MXP, MSP and other session flags based on the mobs attributes. Typically done at sign-on only.

Specified by:
reloadTerminal in interface CharCreationLibrary
Parameters:
mob - the mob whose session needs to match his
See Also:
CharCreationLibrary.showTheNews(MOB)

showTheNews

public void showTheNews(MOB mob)
Description copied from interface: CharCreationLibrary
Resets the terminal to the given mobs specs, shows any available polls, the daily message, and runs the MOTD.

Specified by:
showTheNews in interface CharCreationLibrary
Parameters:
mob - the mob to show these things to
See Also:
CharCreationLibrary.reloadTerminal(MOB)

getExpiredAcctOrCharsList

public java.util.List<java.lang.String> getExpiredAcctOrCharsList()
Description copied from interface: CharCreationLibrary
Returns the list of the names of all the expired Accounts or Characters, depending on whether the account system is used or not. This only matters when the expiration system is being used, such as on a pay system

Specified by:
getExpiredAcctOrCharsList in interface CharCreationLibrary
Returns:
the list of the names of all the expired

isExpired

public boolean isExpired(PlayerAccount acct,
                         Session session,
                         MOB mob)

finishCreateAccount

protected void finishCreateAccount(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                   PlayerAccount acct,
                                   java.lang.String login,
                                   java.lang.String pw,
                                   java.lang.String emailAddy,
                                   Session session)

buildQualifyingClassList

protected java.lang.String buildQualifyingClassList(MOB mob,
                                                    java.util.List<CharClass> classes,
                                                    java.lang.String finalConnector)

getUniversalStartingItems

protected void getUniversalStartingItems(int theme,
                                         MOB mob)

prelimChecks

public CharCreationLibrary.LoginResult prelimChecks(Session session,
                                                    MOB pickedMOB,
                                                    java.lang.String login,
                                                    java.lang.String email)

notifyFriends

public void notifyFriends(MOB mob,
                          java.lang.String message)
Description copied from interface: CharCreationLibrary
If any of the given mobs friends are online, they are sent the given message.

Specified by:
notifyFriends in interface CharCreationLibrary
Parameters:
mob - the mob whose friends need notifying
message - the message to send to the mobs friends.

loginSubsystem

protected CharCreationLibrary.LoginResult loginSubsystem(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)
                                                  throws java.io.IOException
Throws:
java.io.IOException

loginStart

protected CharCreationLibrary.LoginResult loginStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                     Session session)

loginName

protected CharCreationLibrary.LoginResult loginName(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                    Session session)

loginAcctcharPword

protected CharCreationLibrary.LoginResult loginAcctcharPword(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                             Session session)

loginAcctconvConfirm

protected CharCreationLibrary.LoginResult loginAcctconvConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                               Session session)

acctcreateStart

protected CharCreationLibrary.LoginResult acctcreateStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

acctcreateANSIConfirm

protected CharCreationLibrary.LoginResult acctcreateANSIConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                Session session)

acctcreateEmailStart

protected CharCreationLibrary.LoginResult acctcreateEmailStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                               Session session)

acctcreateEmailPrompt

protected CharCreationLibrary.LoginResult acctcreateEmailPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                Session session)

acctcreateEmailEntered

protected CharCreationLibrary.LoginResult acctcreateEmailEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                 Session session)

acctcreateEmailConfirmed

protected CharCreationLibrary.LoginResult acctcreateEmailConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                   Session session)

acctcreatePassworded

protected CharCreationLibrary.LoginResult acctcreatePassworded(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                               Session session)

loginPassStart

protected CharCreationLibrary.LoginResult loginPassStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

loginNewcharConfirm

protected CharCreationLibrary.LoginResult loginNewcharConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                              Session session)

loginNewaccountConfirm

protected CharCreationLibrary.LoginResult loginNewaccountConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                 Session session)

loginPassReceived

protected CharCreationLibrary.LoginResult loginPassReceived(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)
                                                     throws java.io.IOException
Throws:
java.io.IOException

loginEmailPassword

protected CharCreationLibrary.LoginResult loginEmailPassword(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                             Session session)
                                                      throws java.io.IOException
Throws:
java.io.IOException

acctmenuStart

protected CharCreationLibrary.LoginResult acctmenuStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                        Session session)

acctmenuShowChars

protected CharCreationLibrary.LoginResult acctmenuShowChars(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

acctmenuShowMenu

protected CharCreationLibrary.LoginResult acctmenuShowMenu(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                           Session session)

acctmenuPrompt

protected CharCreationLibrary.LoginResult acctmenuPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

acctmenuConfirmCommand

protected CharCreationLibrary.LoginResult acctmenuConfirmCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                                 Session session)

acctmenuAddToCommand

protected CharCreationLibrary.LoginResult acctmenuAddToCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                               Session session)

acctmenuCommand

protected CharCreationLibrary.LoginResult acctmenuCommand(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)
                                                   throws java.io.IOException
Throws:
java.io.IOException

completePlayerLogin

public CharCreationLibrary.LoginResult completePlayerLogin(Session session,
                                                           boolean wizi)
                                                    throws java.io.IOException
Description copied from interface: CharCreationLibrary
Takes the given session and mobs login by putting the mob into the given start room in the world, checking their email, and seeing if they are allowed in. It does the complete login

Specified by:
completePlayerLogin in interface CharCreationLibrary
Parameters:
session - the session trying to login, with the mob to login
wizi - true if the player should login wizinvisible
Returns:
the LoginResult status of having tried to complete their login
Throws:
java.io.IOException - any I/O errors during the process

charcrStart

protected CharCreationLibrary.LoginResult charcrStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                      Session session)

charcrPasswordDone

protected CharCreationLibrary.LoginResult charcrPasswordDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                             Session session)

charcrEmailStart

protected CharCreationLibrary.LoginResult charcrEmailStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                           Session session)

charcrEmailPrompt

protected CharCreationLibrary.LoginResult charcrEmailPrompt(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrEmailEntered

protected CharCreationLibrary.LoginResult charcrEmailEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                             Session session)

charcrEmailConfirmed

protected CharCreationLibrary.LoginResult charcrEmailConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                               Session session)

charcrEmailDone

protected CharCreationLibrary.LoginResult charcrEmailDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

charcrANSIConfirmed

protected CharCreationLibrary.LoginResult charcrANSIConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                              Session session)

charcrANSIDone

protected CharCreationLibrary.LoginResult charcrANSIDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

charcrThemeStart

protected CharCreationLibrary.LoginResult charcrThemeStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                           Session session)

charcrThemePicked

protected CharCreationLibrary.LoginResult charcrThemePicked(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrThemeDone

protected CharCreationLibrary.LoginResult charcrThemeDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

setMOBClass

protected MOB setMOBClass(java.lang.String classID,
                          com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                          Session session)

charcrRaceStart

protected CharCreationLibrary.LoginResult charcrRaceStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

charcrRaceReEntered

protected CharCreationLibrary.LoginResult charcrRaceReEntered(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                              Session session)

charcrRaceConfirmed

protected CharCreationLibrary.LoginResult charcrRaceConfirmed(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                              Session session)

charcrRaceDone

protected CharCreationLibrary.LoginResult charcrRaceDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

charcrGenderStart

protected CharCreationLibrary.LoginResult charcrGenderStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrGenderDone

protected CharCreationLibrary.LoginResult charcrGenderDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                           Session session)

charcrStatInit

protected CharCreationLibrary.LoginResult charcrStatInit(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session,
                                                         int bonusPoints)

charcrStatStart

protected CharCreationLibrary.LoginResult charcrStatStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

charcrStatConfirm

protected CharCreationLibrary.LoginResult charcrStatConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrStatPickAdd

protected CharCreationLibrary.LoginResult charcrStatPickAdd(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrStatPick

protected CharCreationLibrary.LoginResult charcrStatPick(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

charcrStatDone

protected CharCreationLibrary.LoginResult charcrStatDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                         Session session)

charcrClassInit

protected CharCreationLibrary.LoginResult charcrClassInit(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

charcrClassStart

protected CharCreationLibrary.LoginResult charcrClassStart(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                           Session session)

charcrClassPicked

protected CharCreationLibrary.LoginResult charcrClassPicked(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrClassConfirm

protected CharCreationLibrary.LoginResult charcrClassConfirm(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                             Session session)

charcrClassDone

protected CharCreationLibrary.LoginResult charcrClassDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                          Session session)

charcrFactionNext

protected CharCreationLibrary.LoginResult charcrFactionNext(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrFactionPick

protected CharCreationLibrary.LoginResult charcrFactionPick(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrFactionDone

protected CharCreationLibrary.LoginResult charcrFactionDone(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                            Session session)

charcrFinish

protected CharCreationLibrary.LoginResult charcrFinish(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj,
                                                       Session session)

getNamedFactionChoices

protected java.util.List<java.lang.String> getNamedFactionChoices(Faction F,
                                                                  java.util.List<java.lang.Integer> mine)

finishNameCheck

public CharCreationLibrary.NewCharNameCheckResult finishNameCheck(java.lang.String login,
                                                                  java.lang.String ipAddress)

performSpamConnectionCheck

public boolean performSpamConnectionCheck(java.lang.String address)
Description copied from interface: CharCreationLibrary
Does a connection spam check against the given address, returning true if all is well, and false if it needs blocking.

Specified by:
performSpamConnectionCheck in interface CharCreationLibrary
Parameters:
address - the address to check
Returns:
true to proceed, false to block

newCharNameCheck

public CharCreationLibrary.NewCharNameCheckResult newCharNameCheck(java.lang.String login,
                                                                   java.lang.String ipAddress,
                                                                   boolean skipAccountNameCheck)
Description copied from interface: CharCreationLibrary
Checks whether a character with the given login name from the given ipAddress may be created at this time.

Specified by:
newCharNameCheck in interface CharCreationLibrary
Parameters:
login - the name to check
ipAddress - the ip address of the name checker
skipAccountNameCheck - true to ignore account name matches
Returns:
the results of the new character name check.
See Also:
CharCreationLibrary.isBadName(String), CharCreationLibrary.isOkName(String, boolean), CharCreationLibrary.newAccountNameCheck(String, String), CharCreationLibrary.NewCharNameCheckResult

newAccountNameCheck

public CharCreationLibrary.NewCharNameCheckResult newAccountNameCheck(java.lang.String login,
                                                                      java.lang.String ipAddress)
Description copied from interface: CharCreationLibrary
Checks whether an account with the given login name from the given ipAddress may be created at this time.

Specified by:
newAccountNameCheck in interface CharCreationLibrary
Parameters:
login - the name to check
ipAddress - the ip address of the name checker
Returns:
the results of the new account name check.
See Also:
CharCreationLibrary.isBadName(String), CharCreationLibrary.isOkName(String, boolean), CharCreationLibrary.newCharNameCheck(String, String, boolean)

newCharactersAllowed

public boolean newCharactersAllowed(java.lang.String login,
                                    Session session,
                                    PlayerAccount acct,
                                    boolean skipAccountNameCheck)

newAccountsAllowed

public boolean newAccountsAllowed(java.lang.String login,
                                  Session session,
                                  PlayerAccount acct)

setGlobalBitmaps

public void setGlobalBitmaps(MOB mob)

finishLogin

public CharCreationLibrary.LoginResult finishLogin(Session session,
                                                   MOB mob,
                                                   Room startRoom,
                                                   boolean resetStats)
                                            throws java.io.IOException
Description copied from interface: CharCreationLibrary
Completes the given session and mobs login by putting the mob into the given start room in the world, checking their email, and seeing if they are allowed in.

Specified by:
finishLogin in interface CharCreationLibrary
Parameters:
session - the session trying to login
mob - the mob trying to log in
startRoom - the room they will appear in
resetStats - true to reset their state (hit points, etc) or false to keep as-was
Returns:
the LoginResult status of having tried to complete their login
Throws:
java.io.IOException - any I/O errors during the process
See Also:
CharCreationLibrary.LoginResult

completeCharacterLogin

public CharCreationLibrary.LoginResult completeCharacterLogin(Session session,
                                                              java.lang.String login,
                                                              boolean wiziFlag)
                                                       throws java.io.IOException
Throws:
java.io.IOException

getDefaultStartRoom

public Room getDefaultStartRoom(MOB mob)
Description copied from interface: CharCreationLibrary
Given the characteristics of the given mob, this method returns the appropriate start/recall room for the given mob.

Specified by:
getDefaultStartRoom in interface CharCreationLibrary
Parameters:
mob - the mob who needs to know their start room
Returns:
the start room for the given mob
See Also:
CharCreationLibrary.initStartRooms(CMProps), CharCreationLibrary.getDefaultDeathRoom(MOB), CharCreationLibrary.getDefaultBodyRoom(MOB)

getDefaultDeathRoom

public Room getDefaultDeathRoom(MOB mob)
Description copied from interface: CharCreationLibrary
Given the characteristics of the given mob, this method returns the appropriate death room for the given mob.

Specified by:
getDefaultDeathRoom in interface CharCreationLibrary
Parameters:
mob - the mob who needs to know their death room
Returns:
the death room for the given mob
See Also:
CharCreationLibrary.initDeathRooms(CMProps), CharCreationLibrary.getDefaultStartRoom(MOB), CharCreationLibrary.getDefaultBodyRoom(MOB)

getDefaultBodyRoom

public Room getDefaultBodyRoom(MOB mob)
Description copied from interface: CharCreationLibrary
Given the characteristics of the given mob, this method returns the appropriate morgue room for the given mob.

Specified by:
getDefaultBodyRoom in interface CharCreationLibrary
Parameters:
mob - the mob who needs to know their morgue room
Returns:
the morgue room for the given mob
See Also:
CharCreationLibrary.initBodyRooms(CMProps), CharCreationLibrary.getDefaultStartRoom(MOB), CharCreationLibrary.getDefaultDeathRoom(MOB)

getTrainingCost

public int getTrainingCost(MOB mob,
                           int abilityCode,
                           boolean quiet)
Description copied from interface: CharCreationLibrary
Returns the cost, in trains, for the given mob to gain a point in the given ability code stat number.

Specified by:
getTrainingCost in interface CharCreationLibrary
Parameters:
mob - the mob who is trying to train
abilityCode - the ability code the mob wants to train
quiet - true to not give verbal errors
Returns:
negative number for error, or the number of trains required
See Also:
CharStats

pageRooms

protected void pageRooms(CMProps page,
                         java.util.Map<java.lang.String,java.lang.String> table,
                         PairList<MaskingLibrary.CompiledZMask,java.lang.String> masks,
                         java.lang.String start)

initStartRooms

public void initStartRooms(CMProps page)
Description copied from interface: CharCreationLibrary
Initialize the rules for determining the new character start/recall room given the characteristics of the player.

Specified by:
initStartRooms in interface CharCreationLibrary
Parameters:
page - the properties containing info about the start rooms
See Also:
CharCreationLibrary.initDeathRooms(CMProps), CharCreationLibrary.initBodyRooms(CMProps), CharCreationLibrary.getDefaultStartRoom(MOB)

initDeathRooms

public void initDeathRooms(CMProps page)
Description copied from interface: CharCreationLibrary
Initialize the rules for determining the new character death room given the characteristics of the player.

Specified by:
initDeathRooms in interface CharCreationLibrary
Parameters:
page - the properties containing info about the death rooms
See Also:
CharCreationLibrary.initStartRooms(CMProps), CharCreationLibrary.initBodyRooms(CMProps), CharCreationLibrary.getDefaultDeathRoom(MOB)

initBodyRooms

public void initBodyRooms(CMProps page)
Description copied from interface: CharCreationLibrary
Initialize the rules for determining the new character morgue room given the characteristics of the player.

Specified by:
initBodyRooms in interface CharCreationLibrary
Parameters:
page - the properties containing info about the morgue rooms
See Also:
CharCreationLibrary.initStartRooms(CMProps), CharCreationLibrary.initDeathRooms(CMProps), CharCreationLibrary.getDefaultBodyRoom(MOB)

shutdown

public boolean shutdown()
Description copied from interface: CMLibrary
Shuts down the library. Called at system shutdown time obviously, but is sometimes called just to reset the library.

Specified by:
shutdown in interface CMLibrary
Overrides:
shutdown in class StdLibrary
Returns:
true if shutdown was successful, false if there's nothing you can do about it
See Also:
CMLibrary.activate()

promptBaseCharStats

public void promptBaseCharStats(int theme,
                                MOB mob,
                                int timeoutSecs,
                                Session session,
                                int bonusPoints)
                         throws java.io.IOException
Description copied from interface: CharCreationLibrary
A blocking call that populates the given mob with their base CharStats according to character creation rules. This method might return instantly, or it might send the given session through the stat selection process. The bonusPoints are any over and above the standard allocation points.

Specified by:
promptBaseCharStats in interface CharCreationLibrary
Parameters:
theme - the theme code to use for stat allocation
mob - the mob who is getting the new char stats
timeoutSecs - number of seconds before prompt times out
session - the session which might help allocate the points
bonusPoints - any bonus points to allocate to stats
Throws:
java.io.IOException - any input errors that occur
See Also:
CharStats, Area.THEME_FANTASY, CharCreationLibrary.reRollStats(CharStats, int), CharCreationLibrary.promptCharClass(int, MOB, Session), CharCreationLibrary.promptRace(int, MOB, Session), CharCreationLibrary.promptGender(int, MOB, Session)

promptCharClass

public CharClass promptCharClass(int theme,
                                 MOB mob,
                                 Session session)
                          throws java.io.IOException
Description copied from interface: CharCreationLibrary
A blocking call that populates the given mob with a character class according to character creation rules. This method might return instantly, or it might send the given session through the class selection process.

Specified by:
promptCharClass in interface CharCreationLibrary
Parameters:
theme - the theme code to use for class selection
mob - the mob who is getting the new char class
session - the session which might help allocate the points
Returns:
null or the char class selected
Throws:
java.io.IOException - any input errors that occur
See Also:
CharStats, CharCreationLibrary.reRollStats(CharStats, int), CharCreationLibrary.promptBaseCharStats(int, MOB, int, Session, int), CharCreationLibrary.promptRace(int, MOB, Session), CharCreationLibrary.promptGender(int, MOB, Session), Area.THEME_FANTASY

promptRace

public Race promptRace(int theme,
                       MOB mob,
                       Session session)
                throws java.io.IOException
Description copied from interface: CharCreationLibrary
A blocking call that populates the given mob with a particular race according to character creation rules. This method might return instantly, or it might send the given session through the race selection process.

Specified by:
promptRace in interface CharCreationLibrary
Parameters:
theme - the theme code to use for race selection
mob - the mob who is getting the new race
session - the session which might help get the race
Returns:
the race selected by this process
Throws:
java.io.IOException - any input errors that occur
See Also:
CharStats, CharCreationLibrary.reRollStats(CharStats, int), CharCreationLibrary.promptBaseCharStats(int, MOB, int, Session, int), CharCreationLibrary.promptCharClass(int, MOB, Session), CharCreationLibrary.promptGender(int, MOB, Session), Area.THEME_FANTASY

promptGender

public char promptGender(int theme,
                         MOB mob,
                         Session session)
                  throws java.io.IOException
Description copied from interface: CharCreationLibrary
A blocking call that populates the given mob with a particular gender according to character creation rules. This method goes through the gender selection process.

Specified by:
promptGender in interface CharCreationLibrary
Parameters:
theme - the theme code to use for gender selection
mob - the mob who is getting the new gender
session - the session which might help get the gender
Returns:
the gender selected by this process
Throws:
java.io.IOException - any input errors that occur
See Also:
CharStats, CharCreationLibrary.reRollStats(CharStats, int), CharCreationLibrary.promptBaseCharStats(int, MOB, int, Session, int), CharCreationLibrary.promptCharClass(int, MOB, Session), CharCreationLibrary.promptRace(int, MOB, Session), Area.THEME_FANTASY

createCharacter

public CharCreationLibrary.LoginResult createCharacter(java.lang.String login,
                                                       Session session)
                                                throws java.io.IOException
Description copied from interface: CharCreationLibrary
Attempts to send the given session through the character creation process, at the end of which a character with the given login as name will be in the database, ready to load.

Specified by:
createCharacter in interface CharCreationLibrary
Parameters:
login - the name of the new character
session - the session of the character creating person
Returns:
the results of the effort
Throws:
java.io.IOException - an i/o error with the telnet session
See Also:
CharCreationLibrary.LoginResult

makeRandomNameSets

protected Pair<java.lang.String,java.lang.Integer>[] makeRandomNameSets(java.lang.String rawData)

getRandomVowels

protected Pair<java.lang.String,java.lang.Integer>[] getRandomVowels()

getRandomConsonants

protected Pair<java.lang.String,java.lang.Integer>[] getRandomConsonants()

generateRandomName

public java.lang.String generateRandomName(int minSyllable,
                                           int maxSyllable)
Description copied from interface: CharCreationLibrary
Returns a random fantasy name with the range of syllables given.

Specified by:
generateRandomName in interface CharCreationLibrary
Parameters:
minSyllable - the minimum number of syllables, at least 1
maxSyllable - the maximum number of syllables, at least minimum
Returns:
a random fansty name

loginSystem

public CharCreationLibrary.LoginResult loginSystem(Session session,
                                                   com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginObj)
                                            throws java.io.IOException
Throws:
java.io.IOException

logoutLoginSession

protected void logoutLoginSession(com.planet_ink.coffee_mud.Libraries.CharCreation.LoginSessionImpl loginSession)