com.planet_ink.coffee_mud.Libraries
Class CoffeeLevels

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

public class CoffeeLevels
extends StdLibrary
implements ExpLevelLibrary


Constructor Summary
CoffeeLevels()
           
 
Method Summary
 int adjustedExperience(MOB mob, MOB victim, int amount)
           
 java.lang.StringBuffer baseLevelAdjuster(MOB mob, int adjuster)
           
 MOB fillOutMOB(CharClass C, int level)
          This method fills in combat and rejuvination 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 rejuvination related stats for the given mob of their current base class at the given level.
 void gainExperience(MOB mob, MOB victim, java.lang.String homageMessage, int amount, boolean quiet)
          Called whenever a player actually gains any experience.
 int getAttackBonusNextLevel(MOB mob)
           
 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 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.
 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)
           
 void handleExperienceChange(CMMsg msg)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 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 class com.planet_ink.coffee_mud.Libraries.StdLibrary
activate, compareTo, copyOf, getSupportThread, initializeClass, newInstance, propertiesLoaded, shutdown
 
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, getSupportThread, propertiesLoaded, shutdown
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CoffeeLevels

public CoffeeLevels()
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, MiscTech. 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

getManaBonusNextLevel

public int getManaBonusNextLevel(MOB mob)

getLevelMana

public int getLevelMana(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the amount of mana the given mob would have being their current base class.

Specified by:
getLevelMana in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the amount of mana an npc of this class should have

getAttackBonusNextLevel

public int getAttackBonusNextLevel(MOB mob)

getLevelAttack

public int getLevelAttack(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the amount of combat prowess the given mob would have being their current base class.

Specified by:
getLevelAttack in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the amount of combat prowess an npc of this class should have

getLevelMOBArmor

public int getLevelMOBArmor(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the armor rating the given mob would have being their current base class.

Specified by:
getLevelMOBArmor in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the armor rating an npc of this class should have

getLevelMOBDamage

public int getLevelMOBDamage(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the amount of damage per hit the given mob would have being their current base class.

Specified by:
getLevelMOBDamage in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the amount of damage per hit an npc of this class should have

getLevelMOBSpeed

public double getLevelMOBSpeed(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the number of attacks the given mob would have being their current base class.

Specified by:
getLevelMOBSpeed in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the number of attacks an npc of this class should have

getMoveBonusNextLevel

public int getMoveBonusNextLevel(MOB mob)

getLevelMove

public int getLevelMove(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the amount of movement the given mob would have being their current base class.

Specified by:
getLevelMove in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the amount of movement an npc of this class should have

getPlayerHPBonusNextLevel

public int getPlayerHPBonusNextLevel(MOB mob)

getPlayerHitPoints

public int getPlayerHitPoints(MOB mob)
Description copied from interface: ExpLevelLibrary
Returns the amount of hp the given player would have being their current base class.

Specified by:
getPlayerHitPoints in interface ExpLevelLibrary
Parameters:
mob - the mob who would be this class
Returns:
the amount of hp a pc of this class should have

fillOutMOB

public MOB fillOutMOB(CharClass C,
                      int level)
Description copied from interface: ExpLevelLibrary
This method fills in combat and rejuvination related stats for the given mob of the given class at the given level. This method should create a mob for the caller.

Specified by:
fillOutMOB in interface ExpLevelLibrary
Parameters:
C - the class to use.
level - the level of the mob
Returns:
the filled in mob

fillOutMOB

public MOB fillOutMOB(MOB mob,
                      int level)
Description copied from interface: ExpLevelLibrary
This method fills in combat and rejuvination 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.

Specified by:
fillOutMOB in interface ExpLevelLibrary
Parameters:
mob - the mob to fill out, or null
level - the level of the mob
Returns:
the filled in mob

baseLevelAdjuster

public java.lang.StringBuffer baseLevelAdjuster(MOB mob,
                                                int adjuster)
Specified by:
baseLevelAdjuster in interface ExpLevelLibrary

unLevel

public void unLevel(MOB mob)
Specified by:
unLevel in interface ExpLevelLibrary

loseExperience

public void loseExperience(MOB mob,
                           int amount)
Description copied from interface: ExpLevelLibrary
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.

Specified by:
loseExperience in interface ExpLevelLibrary
Parameters:
mob - the mob to take experience away from
amount - the amount of experience to take away
See Also:
ExpLevelLibrary.unLevel(MOB)

postExperience

public boolean postExperience(MOB mob,
                              MOB victim,
                              java.lang.String homage,
                              int amount,
                              boolean quiet)
Specified by:
postExperience in interface ExpLevelLibrary

getLevelExperience

public int getLevelExperience(int level)
Description copied from interface: ExpLevelLibrary
Returns how much experience a player must have to be the given level.

Specified by:
getLevelExperience in interface ExpLevelLibrary
Parameters:
level - the level to base the exp on
Returns:
the amount of experiene required to be the given level

level

public void level(MOB mob)
Specified by:
level in interface ExpLevelLibrary

adjustedExperience

public int adjustedExperience(MOB mob,
                              MOB victim,
                              int amount)
Specified by:
adjustedExperience in interface ExpLevelLibrary

gainExperience

public void gainExperience(MOB mob,
                           MOB victim,
                           java.lang.String homageMessage,
                           int amount,
                           boolean quiet)
Description copied from interface: ExpLevelLibrary
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.

Specified by:
gainExperience in interface ExpLevelLibrary
Parameters:
mob - the mob to distribute experience to
victim - the mob killed, if any, to cause the experience gain
homageMessage - 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:
ExpLevelLibrary.level(MOB)

handleExperienceChange

public void handleExperienceChange(CMMsg msg)
Specified by:
handleExperienceChange in interface ExpLevelLibrary