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)
           
 Command deferCommandCheck(MOB mob, Command C, java.util.List<java.lang.String> cmds)
           
 java.lang.String doBaseLevelAdjustment(MOB mob, int adjuster)
           
 MOB fillOutMOB(CharClass C, 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, MOB victim, java.lang.String homage, int amount, boolean quiet)
          Called whenever a player actually gains any experience.
 void gainRPExperience(MOB mob, MOB target, java.lang.String homageMessage, int amount, boolean quiet)
           
 int getLevelAttack(MOB mob)
          Returns the amount of combat prowess the given mob would have being their current base class.
 int getLevelExperience(int level)
          Returns how much experience a player must have to be the given level.
 int getLevelExperienceJustThisLevel(int level)
          Returns how much experience a player must gain at this level to advance to the next.
 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.
 void handleExperienceChange(CMMsg msg)
           
 void handleRPExperienceChange(CMMsg msg)
           
 void level(MOB mob)
           
 void loseExperience(MOB mob, int amount)
          Called whenever a member of this class loses any experience.
 void loseRPExperience(MOB mob, int amount)
           
 boolean postExperience(MOB mob, MOB victim, java.lang.String homage, int amount, boolean quiet)
           
 boolean postExperienceToAllAboard(Physical possibleShip, int amount)
          If the given item is a boardable, this method will post the given amount of experience to all abord.
 boolean postRPExperience(MOB mob, MOB target, java.lang.String homage, int amount, boolean quiet)
           
 void unLevel(MOB mob)
           
 
Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary
activate, getServiceClient, L, propertiesLoaded, shutdown
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

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

getLevelExperienceJustThisLevel

int getLevelExperienceJustThisLevel(int level)
Returns how much experience a player must gain at this level to advance to the next.

Parameters:
level - the level to check at
Returns:
the amount of experience

handleExperienceChange

void handleExperienceChange(CMMsg msg)

handleRPExperienceChange

void handleRPExperienceChange(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)

doBaseLevelAdjustment

java.lang.String doBaseLevelAdjustment(MOB mob,
                                       int adjuster)

level

void level(MOB mob)

unLevel

void unLevel(MOB mob)

loseRPExperience

void loseRPExperience(MOB mob,
                      int amount)

gainRPExperience

void gainRPExperience(MOB mob,
                      MOB target,
                      java.lang.String homageMessage,
                      int amount,
                      boolean quiet)

postRPExperience

boolean postRPExperience(MOB mob,
                         MOB target,
                         java.lang.String homage,
                         int amount,
                         boolean quiet)

deferCommandCheck

Command deferCommandCheck(MOB mob,
                          Command C,
                          java.util.List<java.lang.String> cmds)

postExperienceToAllAboard

boolean postExperienceToAllAboard(Physical possibleShip,
                                  int amount)
If the given item is a boardable, this method will post the given amount of experience to all abord.

Parameters:
possibleShip - the ship to give experience to
amount - amount of experience to give to each person found
Returns:
true if experience is posted, false otherwise

fillOutMOB

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. This method should create a mob for the caller if mob==null.

Parameters:
mob - the mob to fill out, or null
level - the level of the mob
Returns:
the filled in mob

fillOutMOB

MOB fillOutMOB(CharClass C,
               int level)
This method fills in combat and rejuvenation related stats for the given mob of the given class at the given level. This method should create a mob for the caller.

Parameters:
C - the class to use.
level - the level of the mob
Returns:
the filled in mob

getPlayerHitPoints

int getPlayerHitPoints(MOB mob)
Returns the amount of hp the given player would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the amount of hp a pc of this class should have

getLevelMana

int getLevelMana(MOB mob)
Returns the amount of mana the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the amount of mana an npc of this class should have

getLevelMoneyRange

double[] getLevelMoneyRange(MOB mob)
Returns the range of money the given mob would have being their current base class. Since money is variable, this is a range low-high

Parameters:
mob - the mob who would be this class
Returns:
the range of money an npc of this class should have

getLevelMOBSpeed

double getLevelMOBSpeed(MOB mob)
Returns the number of attacks the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the number of attacks an npc of this class should have

getLevelMove

int getLevelMove(MOB mob)
Returns the amount of movement the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the amount of movement an npc of this class should have

getLevelAttack

int getLevelAttack(MOB mob)
Returns the amount of combat prowess the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the amount of combat prowess an npc of this class should have

getLevelMOBArmor

int getLevelMOBArmor(MOB mob)
Returns the armor rating the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the armor rating an npc of this class should have

getLevelMOBDamage

int getLevelMOBDamage(MOB mob)
Returns the amount of damage per hit the given mob would have being their current base class.

Parameters:
mob - the mob who would be this class
Returns:
the amount of damage per hit an npc of this class should have

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 to
victim - the mob killed, if any, to cause the experience gain
homage - the name, if any, of another mob whose gain experience is causing this gain
amount - the amount of experience to gain
quiet - 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 from
amount - the amount of experience to take away
See Also:
unLevel(MOB)