CoffeeLevels
public interface ExpLevelLibrary extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static class |
ExpLevelLibrary.ModXP |
Class for tracking conditional changes to XP.
|
idConverter
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
|
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.
|
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.
|
void |
gainExperience(MOB mob,
java.lang.String sourceId,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet) |
Called whenever a player actually gains any experience.
|
void |
gainRPExperience(MOB mob,
java.lang.String sourceId,
MOB victim,
java.lang.String homageMessage,
int amount,
boolean quiet) |
Called whenever a player actually gains RP experience.
|
int |
getEffectFudgedLevel(MOB mob) |
Calculates the 'Power Level' for the given 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 |
getPlayerHitPoints(MOB mob) |
Returns the amount of hp the given player would have being their current
base class.
|
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 mod,
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.
|
void |
level(MOB mob) |
Causes the given mob to gain a level, with all that entails
|
void |
loseExperience(MOB mob,
java.lang.String sourceId,
int amount) |
Called whenever a member loses any experience.
|
void |
loseRPExperience(MOB mob,
java.lang.String sourceId,
int amount) |
Called whenever a player actually loses RP experience.
|
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 |
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, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
int getLevelExperience(MOB mob, int level)
mob
- the mob who has the experience levellevel
- the level to base the exp onint getLevelExperienceJustThisLevel(MOB mob, int level)
mob
- the mob who has the experience levellevel
- the level to check atint getEffectFudgedLevel(MOB mob)
mob
- the mob to get the power level ofvoid handleExperienceChange(CMMsg msg)
msg
- the message to check and maybe handlehandleRPExperienceChange(CMMsg)
,
adjustedExperience(MOB, MOB, int)
,
postExperience(MOB, String, MOB, String, int, boolean)
,
gainExperience(MOB, String, MOB, String, int, boolean)
,
loseExperience(MOB, String, int)
void handleRPExperienceChange(CMMsg msg)
msg
- the message to check and maybe handlehandleExperienceChange(CMMsg)
,
gainRPExperience(MOB, String, MOB, String, int, boolean)
,
loseRPExperience(MOB, String, int)
,
postRPExperience(MOB, String, MOB, String, int, boolean)
int adjustedExperience(MOB mob, MOB victim, int amount)
mob
- the killer who gains xpvictim
- the victimamount
- the base amount of xp to gainhandleExperienceChange(CMMsg)
,
postExperience(MOB, String, MOB, String, int, boolean)
void loseRPExperience(MOB mob, java.lang.String sourceId, int amount)
mob
- the mob to take experience fromsourceId
- an arbitrary string denoting the xp sourceamount
- the amount of experience to losegainRPExperience(MOB, String, MOB, String, int, boolean)
,
postRPExperience(MOB, String, MOB, String, int, boolean)
,
handleRPExperienceChange(CMMsg)
,
loseExperience(MOB, String, int)
void gainRPExperience(MOB mob, java.lang.String sourceId, MOB victim, java.lang.String homageMessage, int amount, boolean quiet)
mob
- the mob to distribute experience tosourceId
- an arbitrary string denoting the xp sourcevictim
- 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 givenloseRPExperience(MOB, String, int)
,
postRPExperience(MOB, String, MOB, String, int, boolean)
,
handleRPExperienceChange(CMMsg)
,
gainExperience(MOB, String, MOB, String, int, boolean)
boolean postRPExperience(MOB mob, java.lang.String sourceID, MOB target, java.lang.String homage, int amount, boolean quiet)
mob
- 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.loseRPExperience(MOB, String, int)
,
gainRPExperience(MOB, String, MOB, String, int, boolean)
,
handleRPExperienceChange(CMMsg)
,
postExperience(MOB, String, MOB, String, int, boolean)
int postExperience(MOB mob, java.lang.String sourceID, MOB victim, java.lang.String homage, int amount, boolean quiet)
mob
- 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.handleExperienceChange(CMMsg)
,
gainExperience(MOB, String, MOB, String, int, boolean)
,
loseExperience(MOB, String, int)
,
postRPExperience(MOB, String, MOB, String, int, boolean)
void level(MOB mob)
mob
- the mob to gain the levelunLevel(MOB)
void unLevel(MOB mob)
mob
- the mob to lose the levellevel(MOB)
Command deferCommandCheck(MOB mob, Command C, java.util.List<java.lang.String> cmds)
mob
- the mob who is commandingC
- the command the mob wants to docmds
- the command line that generated the commandboolean postExperienceToAllAboard(Physical possibleShip, java.lang.String sourceID, int amount, Physical target)
possibleShip
- 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 xpMOB fillOutMOB(MOB mob, int level)
mob
- the mob to fill out, or nulllevel
- the level of the mobMOB fillOutMOB(CharClass C, Race R, int level)
C
- the class to use.R
- the race to use.level
- the level of the mobint getPlayerHitPoints(MOB mob)
mob
- the mobgetLevelHitPoints(MOB)
int getLevelHitPoints(MOB mob)
mob
- the mob who would have hit pointsgetLevelMana(MOB)
,
getLevelMove(MOB)
,
getLevelMoneyRange(MOB)
,
getPlayerHitPoints(MOB)
int getLevelMana(MOB mob)
mob
- the mobgetLevelMove(MOB)
,
getLevelMoneyRange(MOB)
,
getLevelHitPoints(MOB)
double[] getLevelMoneyRange(MOB mob)
mob
- the mobgetLevelMana(MOB)
,
getLevelMove(MOB)
,
getLevelHitPoints(MOB)
double getLevelMOBSpeed(MOB mob)
mob
- the mobgetLevelMOBArmor(MOB)
,
getLevelAttack(MOB)
,
getLevelMOBDamage(MOB)
int getPowerLevel(MOB M)
M
- the mob to get the power level ofint getLevelMove(MOB mob)
mob
- the mobgetLevelMana(MOB)
,
getLevelMoneyRange(MOB)
,
getLevelHitPoints(MOB)
int getLevelAttack(MOB mob)
mob
- the mobgetLevelMOBArmor(MOB)
,
getLevelMOBDamage(MOB)
,
getLevelMOBSpeed(MOB)
int getLevelMOBArmor(MOB mob)
mob
- the mobgetLevelAttack(MOB)
,
getLevelMOBDamage(MOB)
,
getLevelMOBSpeed(MOB)
int getLevelMOBDamage(MOB mob)
mob
- the mobgetLevelMOBArmor(MOB)
,
getLevelAttack(MOB)
,
getLevelMOBSpeed(MOB)
void gainExperience(MOB mob, java.lang.String sourceId, MOB victim, java.lang.String homage, int amount, boolean quiet)
mob
- the mob to distribute experience tosourceId
- arbitrary string denoting the source of the xpvictim
- the mob killed, if any, to cause the experience gainhomage
- 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 givenlevel(MOB)
,
handleExperienceChange(CMMsg)
,
postExperience(MOB, String, MOB, String, int, boolean)
,
loseExperience(MOB, String, int)
,
gainRPExperience(MOB, String, MOB, String, int, boolean)
void loseExperience(MOB mob, java.lang.String sourceId, int amount)
mob
- the mob to take experience away fromsourceId
- arbitrary string denoting the source of xpamount
- the amount of experience to take awayunLevel(MOB)
,
handleExperienceChange(CMMsg)
,
postExperience(MOB, String, MOB, String, int, boolean)
,
gainExperience(MOB, String, MOB, String, int, boolean)
,
loseRPExperience(MOB, String, int)
ExpLevelLibrary.ModXP[] parseXPMods(java.lang.String modStr)
modStr
- the encoded mods, or "", or nullhandleXPMods(MOB, MOB, ModXP, String, boolean, int)
int handleXPMods(MOB mob, MOB target, ExpLevelLibrary.ModXP mod, java.lang.String sourceID, boolean useTarget, int amount)
mob
- the receiver or loser of xptarget
- a possible target of the actionmod
- the mods to applysourceID
- an arbitrary string denoting the xp sourceuseTarget
- true to use the target for maskingamount
- the amount of xp tentativelyparseXPMods(String)