com.planet_ink.coffee_mud.Libraries.interfaces
Interface ExpLevelLibrary
- All Superinterfaces:
- java.lang.Cloneable, CMLibrary, CMObject, java.lang.Comparable<CMObject>
- All Known Implementing Classes:
- CoffeeLevels
public interface ExpLevelLibrary
- extends CMLibrary
|
Method Summary |
int |
adjustedExperience(MOB mob,
MOB victim,
int amount)
|
java.lang.StringBuffer |
baseLevelAdjuster(MOB mob,
int adjuster)
|
void |
gainExperience(MOB mob,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet)
Called whenever a player actually gains any experience. |
int |
getLevelExperience(int level)
Returns how much experience a player must have to be the given level. |
void |
handleExperienceChange(CMMsg msg)
|
void |
level(MOB mob)
|
void |
loseExperience(MOB mob,
int amount)
Called whenever a member of this class loses any experience. |
boolean |
postExperience(MOB mob,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet)
|
void |
unLevel(MOB mob)
|
| Methods inherited from interface java.lang.Comparable |
compareTo |
getLevelExperience
int getLevelExperience(int level)
- Returns how much experience a player must have to be the given level.
- Parameters:
level - the level to base the exp on
- Returns:
- the amount of experiene required to be the given level
handleExperienceChange
void handleExperienceChange(CMMsg msg)
adjustedExperience
int adjustedExperience(MOB mob,
MOB victim,
int amount)
postExperience
boolean postExperience(MOB mob,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet)
baseLevelAdjuster
java.lang.StringBuffer baseLevelAdjuster(MOB mob,
int adjuster)
level
void level(MOB mob)
unLevel
void unLevel(MOB mob)
gainExperience
void gainExperience(MOB mob,
MOB victim,
java.lang.String homage,
int amount,
boolean quiet)
- Called whenever a player actually gains any experience. It actually does
the experience gain for the player as well as determining how much, if any
should be distributed to leiges or clans. Will automatically cause a call
to level if necessary.
- Parameters:
mob - the mob to distribute experience tovictim - 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 given- See Also:
level(MOB)
loseExperience
void loseExperience(MOB mob,
int amount)
- Called whenever a member of this class loses any experience. It actually does
the experience loss for the player as well as determining how much, if any
should be taken awa from leiges or clans. Will automatically cause an unleveling
if necessary.
- Parameters:
mob - the mob to take experience away fromamount - the amount of experience to take away- See Also:
unLevel(MOB)