CMObject, Tickable, CMLibrary, ExpLevelLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>public class CoffeeLevels extends StdLibrary implements ExpLevelLibrary
ExpLevelLibrary.ModXP| Modifier and Type | Field | Description |
|---|---|---|
protected int[] |
experienceCaps |
|
protected ExpLevelLibrary.ModXP[] |
xpMods |
idConverterisDebugging, name, serviceClient, tickStatusSTATUS_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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET| Constructor | Description |
|---|---|
CoffeeLevels() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
adjustedExperience(MOB mob,
MOB victim,
int amount) |
Given a killer mob, and his victim, and a base
amount of experience, this method will adjust the
experience gain according to context, levels
and so forth
|
protected void |
checkedLevelGains(MOB mob) |
|
protected void |
checkedLevelLosses(MOB mob) |
|
Command |
deferCommandCheck(MOB mob,
Command C,
java.util.List<java.lang.String> cmds) |
Checks whether the given Command is assigned as the Deferred XP Assignment
command in the coffeemud.ini file.
|
protected java.lang.String |
doBaseLevelAdjustment(MOB mob,
int[] costGains,
boolean gain) |
|
protected void |
ensureMaxDeferredXP(MOB mob,
PlayerStats pStats) |
|
protected void |
ensureMaxRPXP(MOB mob,
PlayerStats pStats) |
|
MOB |
fillOutMOB(CharClass C,
Race R,
int level) |
This method fills in combat and rejuvenation related stats for the given
mob of the given class at the given level.
|
MOB |
fillOutMOB(MOB mob,
int level) |
This method fills in combat and rejuvenation related stats for the given
mob of their current base class at the given level.
|
protected boolean |
fixMobStatsIfNecessary(MOB mob,
int direction) |
|
protected int |
gainClanExperience(MOB mob,
int amount) |
|
void |
gainExperience(MOB mob,
java.lang.String sourceId,
MOB victim,
java.lang.String homageMessage,
int amount,
boolean quiet) |
Called whenever a player actually gains any experience.
|
protected int |
gainLeigeExperience(MOB mob,
int amount,
boolean quiet) |
|
void |
gainRPExperience(MOB mob,
java.lang.String sourceId,
MOB target,
java.lang.String homageMessage,
int amount,
boolean quiet) |
Called whenever a player actually gains RP experience.
|
int |
getAttackBonusNextLevel(MOB mob) |
|
int |
getEffectFudgedLevel(MOB mob) |
Calculates the 'Power Level' for the given mob.
|
protected int |
getGainedExperienceCap(MOB mob) |
|
int |
getLevelAttack(MOB mob) |
Returns the amount of combat prowess the given mob would have being their
current base class.
|
int |
getLevelExperience(MOB mob,
int level) |
Returns how much experience a player must have to be the given level.
|
int |
getLevelExperienceJustThisLevel(MOB mob,
int level) |
Returns how much experience a player must gain at this level to advance
to the next.
|
int |
getLevelHitPoints(MOB mob) |
Returns the amount of mana the given npc mob should have
|
int |
getLevelMana(MOB mob) |
Returns the amount of mana the given mob would have being their current
base class.
|
int |
getLevelMOBArmor(MOB mob) |
Returns the armor rating the given mob would have being their current
base class.
|
int |
getLevelMOBDamage(MOB mob) |
Returns the amount of damage per hit the given mob would have being their
current base class.
|
double |
getLevelMOBSpeed(MOB mob) |
Returns the number of attacks the given mob would have being their
current base class.
|
double[] |
getLevelMoneyRange(MOB mob) |
Returns the range of money the given mob would have being their current
base class.
|
int |
getLevelMove(MOB mob) |
Returns the amount of movement the given mob would have being their
current base class.
|
int |
getManaBonusNextLevel(MOB mob) |
|
int |
getMoveBonusNextLevel(MOB mob) |
|
int |
getPlayerHitPoints(MOB mob) |
Returns the amount of hp the given player would have being their current
base class.
|
int |
getPlayerHPBonusNextLevel(MOB mob) |
|
int |
getPowerLevel(MOB M) |
Returns the combat power level of the mob based
on basic combat stats.
|
void |
handleExperienceChange(CMMsg msg) |
Handles a message dealing with an experience change
and applies it if necessary.
|
void |
handleRPExperienceChange(CMMsg msg) |
Handles a message dealing with an RP experience change
and applies it if necessary.
|
int |
handleXPMods(MOB mob,
MOB target,
ExpLevelLibrary.ModXP m,
java.lang.String sourceID,
boolean useTarget,
int amount) |
Modifies the given amount of experience and returns
the modification, according to the global rules
defined by XPMOD in the ini file.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isFilledOutMOB(MOB mob) |
|
void |
level(MOB mob) |
Causes the given mob to gain a level, with all that entails
|
protected int |
loseClanExperience(MOB mob,
int amount) |
|
void |
loseExperience(MOB mob,
java.lang.String sourceId,
int amount) |
Called whenever a member loses any experience.
|
protected int |
loseLeigeExperience(MOB mob,
int amount) |
|
void |
loseRPExperience(MOB mob,
java.lang.String sourceId,
int amount) |
Called whenever a player actually loses RP experience.
|
protected int |
modGlobalExperience(MOB mob,
MOB target,
java.lang.String sourceId,
int amount) |
|
ExpLevelLibrary.ModXP[] |
parseXPMods(java.lang.String modStr) |
Given an encoded string of xp mods (see help on
Prop_ModExperience), this will return the parsed
and ready to use mod objects.
|
int |
postExperience(MOB mob,
java.lang.String sourceID,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet) |
Generates and posts a normal experience gain message, allowing it to
be previewed, modified, and then to happen.
|
boolean |
postExperienceToAllAboard(Physical possibleShip,
java.lang.String sourceID,
int amount,
Physical target) |
If the given item is a boardable, this method will post the given
amount of experience to all aboard.
|
boolean |
postRPExperience(MOB mob,
java.lang.String sourceID,
MOB target,
java.lang.String homage,
int amount,
boolean quiet) |
Generates and posts a rolePlay experience gain message, allowing it to
be previewed, modified, and then to happen.
|
void |
propertiesLoaded() |
This method is called whenever system properties are altered by the user.
|
protected int |
translateAmount(int amount,
java.lang.String val) |
|
protected java.lang.String |
translateNumber(java.lang.String val) |
|
void |
unLevel(MOB mob) |
Causes the given mob to lose a level, with all that entails
This might include losing skills/abilities, and always includes
things like losing trains and pracs
|
activate, getServiceClient, L, shutdowncopyOf, initializeClass, name, newInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitactivate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, setThreadStatus, shutdown, tickprotected final int[] experienceCaps
protected ExpLevelLibrary.ModXP[] xpMods
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdLibrarypublic int getManaBonusNextLevel(MOB mob)
public int getLevelMana(MOB mob)
ExpLevelLibrarygetLevelMana in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMove(MOB),
ExpLevelLibrary.getLevelMoneyRange(MOB),
ExpLevelLibrary.getLevelHitPoints(MOB)public int getLevelHitPoints(MOB mob)
ExpLevelLibrarygetLevelHitPoints in interface ExpLevelLibrarymob - the mob who would have hit pointsExpLevelLibrary.getLevelMana(MOB),
ExpLevelLibrary.getLevelMove(MOB),
ExpLevelLibrary.getLevelMoneyRange(MOB),
ExpLevelLibrary.getPlayerHitPoints(MOB)public int getAttackBonusNextLevel(MOB mob)
public int getLevelAttack(MOB mob)
ExpLevelLibrarygetLevelAttack in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMOBArmor(MOB),
ExpLevelLibrary.getLevelMOBDamage(MOB),
ExpLevelLibrary.getLevelMOBSpeed(MOB)public int getLevelMOBArmor(MOB mob)
ExpLevelLibrarygetLevelMOBArmor in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelAttack(MOB),
ExpLevelLibrary.getLevelMOBDamage(MOB),
ExpLevelLibrary.getLevelMOBSpeed(MOB)public int getLevelMOBDamage(MOB mob)
ExpLevelLibrarygetLevelMOBDamage in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMOBArmor(MOB),
ExpLevelLibrary.getLevelAttack(MOB),
ExpLevelLibrary.getLevelMOBSpeed(MOB)public double getLevelMOBSpeed(MOB mob)
ExpLevelLibrarygetLevelMOBSpeed in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMOBArmor(MOB),
ExpLevelLibrary.getLevelAttack(MOB),
ExpLevelLibrary.getLevelMOBDamage(MOB)public int getPowerLevel(MOB M)
ExpLevelLibrarygetPowerLevel in interface ExpLevelLibraryM - the mob to get the power level ofpublic int getMoveBonusNextLevel(MOB mob)
public int getLevelMove(MOB mob)
ExpLevelLibrarygetLevelMove in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMana(MOB),
ExpLevelLibrary.getLevelMoneyRange(MOB),
ExpLevelLibrary.getLevelHitPoints(MOB)public int getPlayerHPBonusNextLevel(MOB mob)
public int getPlayerHitPoints(MOB mob)
ExpLevelLibrarygetPlayerHitPoints in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelHitPoints(MOB)public MOB fillOutMOB(CharClass C, Race R, int level)
ExpLevelLibraryfillOutMOB in interface ExpLevelLibraryC - the class to use.R - the race to use.level - the level of the mobpublic boolean isFilledOutMOB(MOB mob)
public MOB fillOutMOB(MOB mob, int level)
ExpLevelLibraryfillOutMOB in interface ExpLevelLibrarymob - the mob to fill out, or nulllevel - the level of the mobpublic double[] getLevelMoneyRange(MOB mob)
ExpLevelLibrarygetLevelMoneyRange in interface ExpLevelLibrarymob - the mobExpLevelLibrary.getLevelMana(MOB),
ExpLevelLibrary.getLevelMove(MOB),
ExpLevelLibrary.getLevelHitPoints(MOB)protected java.lang.String doBaseLevelAdjustment(MOB mob, int[] costGains, boolean gain)
public void unLevel(MOB mob)
ExpLevelLibraryunLevel in interface ExpLevelLibrarymob - the mob to lose the levelExpLevelLibrary.level(MOB)public void loseExperience(MOB mob, java.lang.String sourceId, int amount)
ExpLevelLibraryloseExperience in interface ExpLevelLibrarymob - the mob to take experience away fromsourceId - arbitrary string denoting the source of xpamount - the amount of experience to take awayExpLevelLibrary.unLevel(MOB),
ExpLevelLibrary.handleExperienceChange(CMMsg),
ExpLevelLibrary.postExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.gainExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.loseRPExperience(MOB, String, int)protected void checkedLevelLosses(MOB mob)
protected int loseClanExperience(MOB mob, int amount)
protected int loseLeigeExperience(MOB mob, int amount)
protected int modGlobalExperience(MOB mob, MOB target, java.lang.String sourceId, int amount)
public void loseRPExperience(MOB mob, java.lang.String sourceId, int amount)
ExpLevelLibraryloseRPExperience in interface ExpLevelLibrarymob - the mob to take experience fromsourceId - an arbitrary string denoting the xp sourceamount - the amount of experience to loseExpLevelLibrary.gainRPExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.postRPExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.handleRPExperienceChange(CMMsg),
ExpLevelLibrary.loseExperience(MOB, String, int)protected int gainClanExperience(MOB mob, int amount)
protected int gainLeigeExperience(MOB mob, int amount, boolean quiet)
protected void checkedLevelGains(MOB mob)
protected int translateAmount(int amount,
java.lang.String val)
protected java.lang.String translateNumber(java.lang.String val)
public int handleXPMods(MOB mob, MOB target, ExpLevelLibrary.ModXP m, java.lang.String sourceID, boolean useTarget, int amount)
ExpLevelLibraryhandleXPMods in interface ExpLevelLibrarymob - the receiver or loser of xptarget - a possible target of the actionm - the mods to applysourceID - an arbitrary string denoting the xp sourceuseTarget - true to use the target for maskingamount - the amount of xp tentativelyExpLevelLibrary.parseXPMods(String)public ExpLevelLibrary.ModXP[] parseXPMods(java.lang.String modStr)
ExpLevelLibraryparseXPMods in interface ExpLevelLibrarymodStr - the encoded mods, or "", or nullExpLevelLibrary.handleXPMods(MOB, MOB, ModXP, String, boolean, int)public void gainExperience(MOB mob, java.lang.String sourceId, MOB victim, java.lang.String homageMessage, int amount, boolean quiet)
ExpLevelLibrarygainExperience in interface ExpLevelLibrarymob - the mob to distribute experience tosourceId - arbitrary string denoting the source of the xpvictim - the mob killed, if any, to cause the experience gainhomageMessage - the name, if any, of another mob whose gain experience is
causing this gainamount - the amount of experience to gainquiet - true if no messages should be givenExpLevelLibrary.level(MOB),
ExpLevelLibrary.handleExperienceChange(CMMsg),
ExpLevelLibrary.postExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.loseExperience(MOB, String, int),
ExpLevelLibrary.gainRPExperience(MOB, String, MOB, String, int, boolean)public void gainRPExperience(MOB mob, java.lang.String sourceId, MOB target, java.lang.String homageMessage, int amount, boolean quiet)
ExpLevelLibrarygainRPExperience in interface ExpLevelLibrarymob - the mob to distribute experience tosourceId - an arbitrary string denoting the xp sourcetarget - the mob killed, if any, to cause the experience gainhomageMessage - the name, if any, of another mob whose gain experience is
causing this gainamount - the amount of experience to gainquiet - true if no messages should be givenExpLevelLibrary.loseRPExperience(MOB, String, int),
ExpLevelLibrary.postRPExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.handleRPExperienceChange(CMMsg),
ExpLevelLibrary.gainExperience(MOB, String, MOB, String, int, boolean)public int postExperience(MOB mob, java.lang.String sourceID, MOB victim, java.lang.String homage, int amount, boolean quiet)
ExpLevelLibrarypostExperience in interface ExpLevelLibrarymob - the gainer of the xp, usually the killersourceID - arbitrary string denoting the source of the xpvictim - the victim of the event that causes the xp to be gainedhomage - null, or person to credit the xp to (or clan, or a message, whatever)amount - the amount of xp to gainquiet - true to gain xp silently, false to be up front.ExpLevelLibrary.handleExperienceChange(CMMsg),
ExpLevelLibrary.gainExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.loseExperience(MOB, String, int),
ExpLevelLibrary.postRPExperience(MOB, String, MOB, String, int, boolean)public boolean postRPExperience(MOB mob, java.lang.String sourceID, MOB target, java.lang.String homage, int amount, boolean quiet)
ExpLevelLibrarypostRPExperience in interface ExpLevelLibrarymob - the gainer of the rp xpsourceID - null, or arbitrary string that denotes source of the xptarget - the target of the event that causes the xp to be gainedhomage - null, or person to credit the xp to (or clan, or a message, whatever)amount - the amount of xp to gainquiet - true to gain xp silently, false to be up front.ExpLevelLibrary.loseRPExperience(MOB, String, int),
ExpLevelLibrary.gainRPExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.handleRPExperienceChange(CMMsg),
ExpLevelLibrary.postExperience(MOB, String, MOB, String, int, boolean)protected int getGainedExperienceCap(MOB mob)
public int getLevelExperience(MOB mob, int level)
ExpLevelLibrarygetLevelExperience in interface ExpLevelLibrarymob - the mob who has the experience levellevel - the level to base the exp onpublic int getLevelExperienceJustThisLevel(MOB mob, int level)
ExpLevelLibrarygetLevelExperienceJustThisLevel in interface ExpLevelLibrarymob - the mob who has the experience levellevel - the level to check atpublic void level(MOB mob)
ExpLevelLibrarylevel in interface ExpLevelLibrarymob - the mob to gain the levelExpLevelLibrary.unLevel(MOB)protected void ensureMaxDeferredXP(MOB mob, PlayerStats pStats)
protected void ensureMaxRPXP(MOB mob, PlayerStats pStats)
protected boolean fixMobStatsIfNecessary(MOB mob, int direction)
public int getEffectFudgedLevel(MOB mob)
ExpLevelLibrarygetEffectFudgedLevel in interface ExpLevelLibrarymob - the mob to get the power level ofpublic int adjustedExperience(MOB mob, MOB victim, int amount)
ExpLevelLibraryadjustedExperience in interface ExpLevelLibrarymob - the killer who gains xpvictim - the victimamount - the base amount of xp to gainExpLevelLibrary.handleExperienceChange(CMMsg),
ExpLevelLibrary.postExperience(MOB, String, MOB, String, int, boolean)public void handleExperienceChange(CMMsg msg)
ExpLevelLibraryhandleExperienceChange in interface ExpLevelLibrarymsg - the message to check and maybe handleExpLevelLibrary.handleRPExperienceChange(CMMsg),
ExpLevelLibrary.adjustedExperience(MOB, MOB, int),
ExpLevelLibrary.postExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.gainExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.loseExperience(MOB, String, int)public Command deferCommandCheck(MOB mob, Command C, java.util.List<java.lang.String> cmds)
ExpLevelLibrarydeferCommandCheck in interface ExpLevelLibrarymob - the mob who is commandingC - the command the mob wants to docmds - the command line that generated the commandpublic void handleRPExperienceChange(CMMsg msg)
ExpLevelLibraryhandleRPExperienceChange in interface ExpLevelLibrarymsg - the message to check and maybe handleExpLevelLibrary.handleExperienceChange(CMMsg),
ExpLevelLibrary.gainRPExperience(MOB, String, MOB, String, int, boolean),
ExpLevelLibrary.loseRPExperience(MOB, String, int),
ExpLevelLibrary.postRPExperience(MOB, String, MOB, String, int, boolean)public boolean postExperienceToAllAboard(Physical possibleShip, java.lang.String sourceID, int amount, Physical target)
ExpLevelLibrarypostExperienceToAllAboard in interface ExpLevelLibrarypossibleShip - the ship to give experience tosourceID - an abitrary string denoting the source of the xpamount - amount of experience to give to each person foundtarget - the vanquished whatever that was the reason for the xppublic void propertiesLoaded()
CMLibrarypropertiesLoaded in interface CMLibrarypropertiesLoaded in class StdLibrary