com.planet_ink.coffee_mud.MOBS
Class StdMOB

java.lang.Object
  extended by com.planet_ink.coffee_mud.MOBS.StdMOB
All Implemented Interfaces:
Affectable, Behavable, CMObject, Contingent, DBIdentifiable, Environmental, ItemPossessor, Modifiable, MsgListener, Physical, PhysicalAgent, Rider, StatsAffecting, Tickable, MOB, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
AngryCitizen, Ape, Bee, BlackBear, BrownBear, Buffalo, Bugbear, Bull, Cat, Centaur, Cheetah, Chicken, Chimp, Citizen, Cobra, CommonBat, Cow, Deer, Dog, Doppleganger, Dragon, DrowElf, Duck, Falcon, FireGiant, Fox, GardenSnake, GenMob, GiantBat, GiantScorpion, Gnoll, Goblin, Gorilla, HeavenlyServent, HillGiant, InvisibleStalker, Jaguar, Kitten, LargeBat, Lion, Lizard, LizardMan, Minotaur, Monkey, Mouse, Ogre, Orc, Panther, Parakeet, Pig, Puppy, Python, Rabbit, Rat, Rattlesnake, Raven, Sheep, StdAuctioneer, StdDeity, StdRideable, StdShopKeeper, StoneGiant, StoneGolem, Teacher, Tiger, Troll, Turtle, UmberHulk, Undead, WildEagle, Wolf, Wyvern

public class StdMOB
extends java.lang.Object
implements MOB


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
MOB.Follower, MOB.QMCommand, MOB.Tattoo
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
 
Field Summary
protected  SVector<Ability> abilitys
           
protected  SVector<Ability> affects
           
protected  long ageHours
           
protected  boolean amDead
           
protected  boolean amDestroyed
           
protected  MOB amFollowing
           
protected  int atRange
           
protected  int attributesBitmap
           
protected  CharStats baseCharStats
           
protected  PhyStats basePhyStats
           
 CharState baseState
           
protected  SVector<Behavior> behaviors
           
protected  java.lang.ref.WeakReference<Clan> cachedClan
           
protected  java.lang.String cachedImageName
           
protected  CharStats charStats
           
protected  ChameleonList<Ability> clanAffects
           
protected  java.lang.String clanID
           
protected  int clanRole
           
protected static java.lang.String[] CODES
           
protected  java.util.LinkedList<MOB.QMCommand> commandQue
           
 CharState curState
           
protected  java.lang.String databaseID
           
protected  byte[] description
           
protected  java.lang.String displayText
           
protected  int experience
           
protected  SVector<java.lang.String> expertises
           
protected  SHashtable<java.lang.String,Faction.FactionData> factions
           
protected  SVector<MOB.Follower> followers
           
protected  boolean imMobile
           
protected  SVector<Item> inventory
           
protected  boolean kickFlag
           
protected  Room lastLocation
           
protected  java.lang.String liegeID
           
protected  Room location
           
 CharState maxState
           
protected  byte[] miscText
           
protected  int money
           
protected  double moneyVariation
           
protected  Session mySession
           
protected  long peaceTime
           
protected  PhyStats phyStats
           
protected  PlayerStats playerStats
           
protected  boolean pleaseDestroy
           
protected  int possibleWeaponIndex
           
protected  int practices
           
protected  int questPoint
           
protected  ChameleonList<Ability> racialAffects
           
protected  java.lang.String rawImageName
           
protected  int recoverTickCounter
           
protected  Rideable riding
           
protected  SVector<ScriptingEngine> scripts
           
protected  MOB soulMate
           
protected  Room startRoomPossibly
           
protected  SVector<MOB.Tattoo> tattoos
           
protected  int tickCounter
           
protected  long tickStatus
           
protected  int trains
           
 java.lang.String username
           
protected  MOB victim
           
protected  int wimpHitPoint
           
protected  java.lang.String worshipCharID
           
protected  java.lang.String[] xtraValues
           
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
ATT_ANSI, ATT_AUTOASSIST, ATT_AUTODRAW, ATT_AUTOEXITS, ATT_AUTOFORWARD, ATT_AUTOGOLD, ATT_AUTOGUARD, ATT_AUTOIMPROVE, ATT_AUTOLOOT, ATT_AUTOMELEE, ATT_AUTONOTIFY, ATT_AUTORUN, ATT_AUTOWEATHER, ATT_BRIEF, ATT_COMPRESS, ATT_DAILYMESSAGE, ATT_MXP, ATT_NOFOLLOW, ATT_NOTEACH, ATT_PLAYERKILL, ATT_QUIET, ATT_SOUND, ATT_SYSOPMSGS, AUTODESC, AUTOREV, END_SHEATH_TIME, START_SHEATH_TIME
 
Constructor Summary
StdMOB()
           
 
Method Summary
 java.util.Enumeration<Ability> abilities()
           
 double actions()
           
 void addAbility(Ability to)
          Manipulation of ability objects, which includes spells, traits, skills, etc.
 void addBehavior(Behavior to)
          Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc.
 void addEffect(Ability to)
          Add a new effect to this object, whether permanent or temporary.
 void addExpertise(java.lang.String of)
          Manipulation of the expertise list
 void addFaction(java.lang.String which, int start)
          Manipulation of the factions list
 void addFollower(MOB follower, int order)
          Manipulation of followers
 void addItem(Item item)
          Adds a new item to its possessor.
 void addItem(Item item, ItemPossessor.Expire expire)
          Adds a new item to its possessor, with an expiration code.
 void addNonUninvokableEffect(Ability to)
          Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked.
 void addPriorityEffect(Ability to)
           
 void addScript(ScriptingEngine S)
          Manipulation of the scripts list
 void addTattoo(MOB.Tattoo of)
          Manipulation of the tatoo list
 void adjustFaction(java.lang.String which, int amount)
           
 void affectCharState(MOB affectedMob, CharState affectableMaxState)
          This method is called by the recoverCharState() method on other MOB objects.
 void affectCharStats(MOB affectedMob, CharStats affectableStats)
          This method is called by the recoverCharStats() method on other MOB objects.
 void affectPhyStats(Physical affected, PhyStats affectableStats)
          This method is called by the recoverPhyStats() method on other Environmental objects.
 boolean amActive()
           
 boolean amDead()
          Combat and death
 boolean amDestroyed()
          Whether the destroy() method has been previousy called on this object.
 MOB amFollowing()
           
 MOB amUltimatelyFollowing()
           
 CharStats baseCharStats()
           
 PhyStats basePhyStats()
          Object containing a set of base, unmodified, mostly numeric fields.
 CharState baseState()
           
 int baseWeight()
           
 java.util.Enumeration<Behavior> behaviors()
          Returns an enumerator of all the behaviors on this object.
 void bringToLife()
           
 void bringToLife(Room newLocation, boolean resetStats)
           
protected  double calculateTickDelay(java.lang.Object command, java.util.List<java.lang.String> commands, double tickDelay)
           
 boolean canSaveDatabaseID()
          Returns true if this object can safely store and retrieve a database ID, and false if the TYPE of object can, but this particular instance can not.
 CharStats charStats()
           
protected  ChameleonList<Ability> clanEffects()
           
protected  void cloneFix(MOB M)
           
 int commandQueSize()
           
 int compareTo(CMObject o)
           
 void copyFactions(MOB source)
           
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 CharState curState()
           
 java.lang.String databaseID()
          Retrieve the unique contextual database ID for this object.
 void delAbility(Ability to)
           
 void delBehavior(Behavior to)
          Delete a behavior from this object.
 void delEffect(Ability to)
          Delete an effect from this object, whether permanent or temporary.
 void delExpertise(java.lang.String of)
           
 void delFollower(MOB follower)
           
 void delItem(Item item)
          Removes the item from this possessor.
 void delScript(ScriptingEngine S)
          Remove a running script from this object.
 void delTattoo(MOB.Tattoo of)
           
 boolean dequeCommand()
           
 java.lang.String description()
          The basic description of this object, as shown when the item is directly LOOKed at.
 void destroy()
          Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java.
 java.lang.String displayName(MOB viewer)
           
 java.lang.String displayText()
          Gets the raw string used to show what this object looks like in the room.
 java.lang.String displayText(MOB viewer)
           
 void dispossess(boolean giveMsg)
           
 void doCommand(java.util.List commands, int metaFlags)
           
protected  void doCommand(java.lang.Object O, java.util.List commands, int metaFlags)
           
 java.util.Enumeration<Ability> effects()
          Returns an enumerator of abilities listed as effects on this object.
 void enqueCommand(java.util.List<java.lang.String> commands, int metaFlags, double tickDelay)
           
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
 long expirationDate()
          If this object expires, it should have a timestamp saying when it expires, in real time.
 Ability fetchAbility(int index)
           
 Ability fetchAbility(java.lang.String ID)
           
 Behavior fetchBehavior(int index)
          Returns a behavior object on this object.
 Behavior fetchBehavior(java.lang.String ID)
          Returns a behavior object listed on this object.
 Item fetchCarried(Item goodLocation, java.lang.String itemName)
           
 Ability fetchEffect(int index)
          Returns an ability object listed as an effect on this object.
 Ability fetchEffect(java.lang.String ID)
          Returns an ability object listed as an effect on this object.
 java.lang.String fetchExpertise(int x)
           
 java.lang.String fetchExpertise(java.lang.String of)
           
 int fetchFaction(java.lang.String which)
           
 java.util.List<java.lang.String> fetchFactionRanges()
           
 java.util.Enumeration<java.lang.String> fetchFactions()
           
 Item fetchFirstWornItem(long wornCode)
           
 MOB fetchFollower(int index)
           
 MOB fetchFollower(java.lang.String named)
           
 int fetchFollowerOrder(MOB thisOne)
           
 Item fetchFromInventory(Item goodLocation, java.lang.String itemName, int wornFilter, boolean allowCoins, boolean respectLocationAndWornCode)
           
 ScriptingEngine fetchScript(int x)
          Retreive one of the enumerated scripts running on this object
 Item fetchWieldedItem()
           
 Item fetchWornItem(java.lang.String itemName)
           
 java.util.List<Item> fetchWornItems(long wornCode, short aboveOrAroundLayer, short layerAttributes)
           
 Ability findAbility(java.lang.String ID)
           
 Item findItem(Item goodLocation, java.lang.String itemName)
          Returns the item in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found).
 Item findItem(java.lang.String itemName)
          Returns the item in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found).
 java.util.List<Item> findItems(Item goodLocation, java.lang.String itemName)
          Returns all items in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found).
 java.util.List<Item> findItems(java.lang.String itemName)
          Returns all items in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found).
 MOB.Tattoo findTattoo(java.lang.String of)
           
 void flagVariableEq()
          Manipulation of inventory, which includes held, worn, wielded, and contained items
 java.util.Enumeration<MOB.Follower> followers()
           
 int freeWearPositions(long wornCode, short belowLayer, short layerAttributes)
           
 java.lang.String genericName()
           
 long getAgeHours()
           
 int getBitmap()
           
 java.lang.String getClanID()
           
 int getClanRole()
           
protected  int getCodeNum(java.lang.String code)
           
 int getExperience()
           
 int getExpNeededDelevel()
           
 int getExpNeededLevel()
           
 int getExpNextLevel()
           
 int getExpPrevLevel()
           
 java.lang.String getFactionListing()
           
 java.util.Set<MOB> getGroupMembers(java.util.Set<MOB> list)
           
 Item getItem(int index)
          Returns the item at the given index, regardless of container status, visibility, or other modifiers.
 java.lang.String getLiegeID()
           
 int getMoney()
           
 double getMoneyVariation()
           
 Clan getMyClan()
           
 Deity getMyDeity()
           
 int getPractices()
           
 int getQuestPoint()
           
 java.util.Set<MOB> getRideBuddies(java.util.Set<MOB> list)
           
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 Room getStartRoom()
           
 java.lang.String getStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String[] getStatCodes()
          Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.
 long getTickStatus()
          A coded status for this object during the period where its tick method is being called.
 int getTrains()
           
 MOB getVictim()
           
 int getWearPositions(long wornCode)
           
 int getWimpHitPoint()
           
 java.lang.String getWorshipCharID()
           
 boolean hasFaction(java.lang.String which)
           
 boolean hasOnlyGoldInInventory()
           
 java.lang.String healthText(MOB viewer)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 java.lang.String image()
          Returns the fully qualified and determined name of the image file displayed for this object when MXP is used.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean isContent(Item I)
          Returns whether the given item is in this possessors list.
 boolean isFollowedBy(MOB thisOne)
           
 boolean isGeneric()
          Whether the fields of this item are set in code, or set by builders.
 boolean isInCombat()
           
 boolean isMarriedToLiege()
           
 boolean isMine(Environmental env)
           
 boolean isMonster()
           
 boolean isPossessing()
           
 boolean isSavable()
          Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container.
 boolean isStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.util.Enumeration<Item> items()
          An enumeration of all the items at this possessor.
 DeadBody killMeDead(boolean createBody)
           
 long lastTickedDateTime()
           
 Room location()
           
 void makePeace()
           
 int maxCarry()
           
 int maxFollowers()
           
 int maxItems()
           
 int maxRange()
          the maximum range of this object, if applicable.
 int maxRange(Environmental tool)
           
 CharState maxState()
           
 boolean mayIFight(MOB mob)
           
 boolean mayPhysicallyAttack(MOB mob)
           
 int minRange()
          the minimum range of this object, if applicable.
 int minRange(Environmental tool)
           
 java.lang.String miscTextFormat()
          Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data.
 void moveItemTo(Item container)
          Intelligently removes an item from its current location and moves it to this possessor, managing any container contents.
 void moveItemTo(Item container, ItemPossessor.Expire expire, ItemPossessor.Move... moveFlags)
          Intelligently removes an item from its current location and moves it to this possessor, managing any container contents, and possibly followers/riders if the item is a cart.
 Weapon myNaturalWeapon()
           
 java.lang.String name()
          The displayable name of this object.
 java.lang.String Name()
          The raw unmodified name of this object as stored in the database.
 CMObject newInstance()
          Returns a new instance of this class.
 int numAbilities()
           
 int numAllEffects()
           
 int numBehaviors()
          The number of behaviors this object has.
 int numEffects()
          Returns the number of ability objects listed as effects on this object.
 int numExpertises()
           
 int numFollowers()
           
 int numItems()
          Returns the total number of items at this possessor, regardless of container status.
 int numLearnedAbilities()
           
 int numScripts()
          Return the number of scripts running on this object
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
 long peaceTime()
           
 java.util.Enumeration<Ability> personalEffects()
           
 PhyStats phyStats()
          Object containing a set of current, modified, usable, mostly numeric fields.
 PlayerStats playerStats()
          Some general statistics about MOBs.
 void prequeCommand(java.util.Vector commands, int metaFlags, double tickDelay)
           
protected  ChameleonList<Ability> racialEffects()
           
 int rangeToTarget()
           
 java.lang.String rawImage()
          Returns the raw name of the image file to display for this object when MXP is used.
 void recoverCharStats()
           
 void recoverMaxState()
           
 void recoverPhyStats()
          This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to all surrounding objects with affectPhyStats(Environmental,PhyStats) method.
 void removeFaction(java.lang.String which)
           
 void removeFromGame(boolean preserveFollowers, boolean killSession)
           
 void resetToMaxState()
           
 Rideable riding()
          Returns the Rideable upon which this Rider is Riding.
 boolean sameAs(Environmental E)
          Whether this object instance is functionally identical to the object passed in.
 java.util.Enumeration<ScriptingEngine> scripts()
          Returns an enumerator of all the scripts on this object.
 Session session()
          Whether a sessiob object is attached to this MOB
 void setActions(double remain)
           
 void setAgeHours(long newVal)
           
 void setAtRange(int newRange)
           
 void setBaseCharStats(CharStats newBaseCharStats)
           
 void setBasePhyStats(PhyStats newStats)
          Re-sets the object containing a set of base, unmodified, mostly numeric fields.
 void setBaseState(CharState newState)
           
 void setBitmap(int newVal)
           
 void setClanID(java.lang.String clan)
           
 void setClanRole(int role)
           
 void setDatabaseID(java.lang.String id)
          Set the unique contextual database ID for this object.
 void setDescription(java.lang.String newDescription)
          Sets the basic description of this object, as shown when the item is directly LOOKed at.
 void setDisplayText(java.lang.String newDisplayText)
          Sets the raw string used to show what this object looks like in the room.
 void setExperience(int newVal)
           
 void setExpirationDate(long time)
          If this object expires, it should have a timestamp saying when it expires, in real time.
 void setExpNextLevel(int newVal)
           
 void setFollowing(MOB mob)
           
 void setImage(java.lang.String newImage)
          Sets the raw name of the image file to display for this object when MXP is used.
 void setLiegeID(java.lang.String newVal)
           
 void setLocation(Room newRoom)
           
 void setMiscText(java.lang.String newText)
          For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object.
 void setMoney(int newVal)
           
 void setMoneyVariation(double newVal)
           
 void setName(java.lang.String newName)
          Sets the raw unmodified name of this object as stored in the database.
 void setPlayerStats(PlayerStats newStats)
           
 void setPractices(int newVal)
           
 void setQuestPoint(int newVal)
           
 void setRiding(Rideable ride)
          Sets the Rideable upon which this Rider is Riding.
 void setSavable(boolean truefalse)
          Sets whether this behavior can be saved as a permanent aspect of its host.
 void setSession(Session newSession)
           
 void setSoulMate(MOB mob)
           
 void setStartRoom(Room room)
           
 void setStat(java.lang.String code, java.lang.String val)
          An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders.
 void setTrains(int newVal)
           
 void setVictim(MOB mob)
           
 void setWimpHitPoint(int newVal)
           
 void setWorshipCharID(java.lang.String newVal)
           
 MOB soulMate()
           
 java.util.Enumeration<MOB.Tattoo> tattoos()
           
 void tell(MOB source, Environmental target, Environmental tool, java.lang.String msg)
          Primary mob communication
 void tell(java.lang.String msg)
           
 java.lang.String text()
          For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object.
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 java.lang.String titledName()
           
 int totalFollowers()
           
 java.util.Enumeration<java.lang.String> uniqueExpertises()
           
 boolean willFollowOrdersOf(MOB mob)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

username

public java.lang.String username

clanID

protected java.lang.String clanID

cachedClan

protected java.lang.ref.WeakReference<Clan> cachedClan

clanRole

protected int clanRole

baseCharStats

protected CharStats baseCharStats

charStats

protected CharStats charStats

phyStats

protected PhyStats phyStats

basePhyStats

protected PhyStats basePhyStats

playerStats

protected PlayerStats playerStats

amDead

protected boolean amDead

location

protected Room location

lastLocation

protected Room lastLocation

riding

protected Rideable riding

mySession

protected Session mySession

pleaseDestroy

protected boolean pleaseDestroy

description

protected byte[] description

displayText

protected java.lang.String displayText

rawImageName

protected java.lang.String rawImageName

cachedImageName

protected java.lang.String cachedImageName

miscText

protected byte[] miscText

xtraValues

protected java.lang.String[] xtraValues

possibleWeaponIndex

protected int possibleWeaponIndex

tickStatus

protected long tickStatus

inventory

protected SVector<Item> inventory

abilitys

protected SVector<Ability> abilitys

affects

protected SVector<Ability> affects

behaviors

protected SVector<Behavior> behaviors

tattoos

protected SVector<MOB.Tattoo> tattoos

expertises

protected SVector<java.lang.String> expertises

followers

protected SVector<MOB.Follower> followers

commandQue

protected java.util.LinkedList<MOB.QMCommand> commandQue

scripts

protected SVector<ScriptingEngine> scripts

factions

protected SHashtable<java.lang.String,Faction.FactionData> factions

racialAffects

protected ChameleonList<Ability> racialAffects

clanAffects

protected ChameleonList<Ability> clanAffects

experience

protected int experience

practices

protected int practices

trains

protected int trains

ageHours

protected long ageHours

money

protected int money

moneyVariation

protected double moneyVariation

attributesBitmap

protected int attributesBitmap

databaseID

protected java.lang.String databaseID

tickCounter

protected int tickCounter

recoverTickCounter

protected int recoverTickCounter

curState

public CharState curState

maxState

public CharState maxState

baseState

public CharState baseState

startRoomPossibly

protected Room startRoomPossibly

worshipCharID

protected java.lang.String worshipCharID

liegeID

protected java.lang.String liegeID

wimpHitPoint

protected int wimpHitPoint

questPoint

protected int questPoint

victim

protected MOB victim

amFollowing

protected MOB amFollowing

soulMate

protected MOB soulMate

atRange

protected int atRange

peaceTime

protected long peaceTime

amDestroyed

protected boolean amDestroyed

kickFlag

protected boolean kickFlag

imMobile

protected boolean imMobile

CODES

protected static java.lang.String[] CODES
Constructor Detail

StdMOB

public StdMOB()
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
Returns:
the name of this class

lastTickedDateTime

public long lastTickedDateTime()
Specified by:
lastTickedDateTime in interface MOB

flagVariableEq

public void flagVariableEq()
Description copied from interface: MOB
Manipulation of inventory, which includes held, worn, wielded, and contained items

Specified by:
flagVariableEq in interface MOB

getAgeHours

public long getAgeHours()
Specified by:
getAgeHours in interface MOB

getPractices

public int getPractices()
Specified by:
getPractices in interface MOB

getExperience

public int getExperience()
Specified by:
getExperience in interface MOB

getExpNextLevel

public int getExpNextLevel()
Specified by:
getExpNextLevel in interface MOB

getExpPrevLevel

public int getExpPrevLevel()
Specified by:
getExpPrevLevel in interface MOB

getExpNeededDelevel

public int getExpNeededDelevel()
Specified by:
getExpNeededDelevel in interface MOB

getExpNeededLevel

public int getExpNeededLevel()
Specified by:
getExpNeededLevel in interface MOB

getTrains

public int getTrains()
Specified by:
getTrains in interface MOB

getMoney

public int getMoney()
Specified by:
getMoney in interface MOB

getMoneyVariation

public double getMoneyVariation()
Specified by:
getMoneyVariation in interface MOB

getBitmap

public int getBitmap()
Specified by:
getBitmap in interface MOB

setAgeHours

public void setAgeHours(long newVal)
Specified by:
setAgeHours in interface MOB

setExperience

public void setExperience(int newVal)
Specified by:
setExperience in interface MOB

setExpNextLevel

public void setExpNextLevel(int newVal)
Specified by:
setExpNextLevel in interface MOB

setPractices

public void setPractices(int newVal)
Specified by:
setPractices in interface MOB

setTrains

public void setTrains(int newVal)
Specified by:
setTrains in interface MOB

setMoney

public void setMoney(int newVal)
Specified by:
setMoney in interface MOB

setMoneyVariation

public void setMoneyVariation(double newVal)
Specified by:
setMoneyVariation in interface MOB

setBitmap

public void setBitmap(int newVal)
Specified by:
setBitmap in interface MOB

getFactionListing

public java.lang.String getFactionListing()
Specified by:
getFactionListing in interface MOB

getLiegeID

public java.lang.String getLiegeID()
Specified by:
getLiegeID in interface MOB

getWorshipCharID

public java.lang.String getWorshipCharID()
Specified by:
getWorshipCharID in interface MOB

getWimpHitPoint

public int getWimpHitPoint()
Specified by:
getWimpHitPoint in interface MOB

getQuestPoint

public int getQuestPoint()
Specified by:
getQuestPoint in interface MOB

setLiegeID

public void setLiegeID(java.lang.String newVal)
Specified by:
setLiegeID in interface MOB

setWorshipCharID

public void setWorshipCharID(java.lang.String newVal)
Specified by:
setWorshipCharID in interface MOB

setWimpHitPoint

public void setWimpHitPoint(int newVal)
Specified by:
setWimpHitPoint in interface MOB

setQuestPoint

public void setQuestPoint(int newVal)
Specified by:
setQuestPoint in interface MOB

getMyDeity

public Deity getMyDeity()
Specified by:
getMyDeity in interface MOB

getMyClan

public final Clan getMyClan()
Specified by:
getMyClan in interface MOB

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

getStartRoom

public Room getStartRoom()
Specified by:
getStartRoom in interface MOB

setStartRoom

public void setStartRoom(Room room)
Specified by:
setStartRoom in interface MOB

peaceTime

public long peaceTime()
Specified by:
peaceTime in interface MOB

setDatabaseID

public void setDatabaseID(java.lang.String id)
Description copied from interface: DBIdentifiable
Set the unique contextual database ID for this object.

Specified by:
setDatabaseID in interface DBIdentifiable
Parameters:
id - the unique contextual database ID for this object.
See Also:
DBIdentifiable.canSaveDatabaseID(), DBIdentifiable.databaseID()

canSaveDatabaseID

public boolean canSaveDatabaseID()
Description copied from interface: DBIdentifiable
Returns true if this object can safely store and retrieve a database ID, and false if the TYPE of object can, but this particular instance can not.

Specified by:
canSaveDatabaseID in interface DBIdentifiable
Returns:
true if setDatabaseID can be called, false otherwise
See Also:
DBIdentifiable.databaseID(), DBIdentifiable.setDatabaseID(String)

databaseID

public java.lang.String databaseID()
Description copied from interface: DBIdentifiable
Retrieve the unique contextual database ID for this object.

Specified by:
databaseID in interface DBIdentifiable
Returns:
the unique contextual database ID for this object.
See Also:
DBIdentifiable.canSaveDatabaseID(), DBIdentifiable.setDatabaseID(String)

Name

public java.lang.String Name()
Description copied from interface: Environmental
The raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
Name in interface Environmental
Returns:
the raw base name of this object on the map.
See Also:
Environmental.name()

setName

public void setName(java.lang.String newName)
Description copied from interface: Environmental
Sets the raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
setName in interface Environmental
Parameters:
newName - the raw base name of this object on the map.
See Also:
Environmental.Name()

name

public java.lang.String name()
Description copied from interface: Environmental
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface Environmental
Specified by:
name in interface Tickable
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

titledName

public java.lang.String titledName()
Specified by:
titledName in interface MOB

genericName

public java.lang.String genericName()
Specified by:
genericName in interface MOB

image

public java.lang.String image()
Description copied from interface: Environmental
Returns the fully qualified and determined name of the image file displayed for this object when MXP is used. If rawImage() is non-empty, it will return rawImage, and otherwise use the mxp default data file.

Specified by:
image in interface Environmental
Returns:
the name of the mxp image to display for this object.

rawImage

public java.lang.String rawImage()
Description copied from interface: Environmental
Returns the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
rawImage in interface Environmental
Returns:
the raw name of the mxp image file

setImage

public void setImage(java.lang.String newImage)
Description copied from interface: Environmental
Sets the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
setImage in interface Environmental
Parameters:
newImage - the raw name of the mxp image file

expirationDate

public long expirationDate()
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
expirationDate in interface Environmental
Returns:
the time stamp when this thing expires
See Also:
Environmental.setExpirationDate(long)

setExpirationDate

public void setExpirationDate(long time)
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
setExpirationDate in interface Environmental
Parameters:
time - the time stamp when this thing expires
See Also:
Environmental.expirationDate()

amDestroyed

public final boolean amDestroyed()
Description copied from interface: Contingent
Whether the destroy() method has been previousy called on this object.

Specified by:
amDestroyed in interface Contingent
Returns:
whether the object is destroy()ed.

cloneFix

protected void cloneFix(MOB M)

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

isGeneric

public boolean isGeneric()
Description copied from interface: Environmental
Whether the fields of this item are set in code, or set by builders. Generic means that they are set by builders, in which case XML is returned by the text() method containing all of the values for all the fields.

Specified by:
isGeneric in interface Environmental
Returns:
whether this item is modifiable by builders
See Also:
Environmental.text()

phyStats

public PhyStats phyStats()
Description copied from interface: Affectable
Object containing a set of current, modified, usable, mostly numeric fields. This object is based on the object from basePhyStats() and then updated and modified by the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Specified by:
phyStats in interface Affectable
Returns:
the current set of state fields
See Also:
Affectable.basePhyStats(), Affectable.recoverPhyStats(), PhyStats

basePhyStats

public PhyStats basePhyStats()
Description copied from interface: Affectable
Object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Specified by:
basePhyStats in interface Affectable
Returns:
a set of state fields
See Also:
Affectable.phyStats(), Affectable.recoverPhyStats(), PhyStats

recoverPhyStats

public void recoverPhyStats()
Description copied from interface: Affectable
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to all surrounding objects with affectPhyStats(Environmental,PhyStats) method. Surrounding objects include the room where the object is located, the Ability objects in the Effects list, the Behaviors in the behaviors list, and race/charclass/area if applicable. Those methods will then make all necessary adjustments to the values in the new phyStats() object. When it returns, phyStats() will have a totally updated object. This method must be called in code whenever the object is placed on the map, or when anything changes in its environment, such as location, effects, or other states.

Specified by:
recoverPhyStats in interface Affectable
See Also:
Affectable.basePhyStats(), Affectable.phyStats(), Affectable.addEffect(Ability), Behavable.addBehavior(Behavior), PhyStats

setBasePhyStats

public void setBasePhyStats(PhyStats newStats)
Description copied from interface: Affectable
Re-sets the object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein. This method is rarely called -- the fields therein are usually set using setter methods from the PhyStats interface on the object itself.

Specified by:
setBasePhyStats in interface Affectable
Parameters:
newStats - a set of state fields
See Also:
Affectable.phyStats(), Affectable.recoverPhyStats(), PhyStats

baseWeight

public int baseWeight()
Specified by:
baseWeight in interface MOB

maxCarry

public int maxCarry()
Specified by:
maxCarry in interface MOB

maxItems

public int maxItems()
Specified by:
maxItems in interface MOB

maxFollowers

public int maxFollowers()
Specified by:
maxFollowers in interface MOB

totalFollowers

public int totalFollowers()
Specified by:
totalFollowers in interface MOB

baseCharStats

public CharStats baseCharStats()
Specified by:
baseCharStats in interface MOB

charStats

public CharStats charStats()
Specified by:
charStats in interface MOB

recoverCharStats

public void recoverCharStats()
Specified by:
recoverCharStats in interface MOB

setBaseCharStats

public void setBaseCharStats(CharStats newBaseCharStats)
Specified by:
setBaseCharStats in interface MOB

affectPhyStats

public void affectPhyStats(Physical affected,
                           PhyStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverPhyStats() method on other Environmental objects. It is used to transform the Environmental basePhyStats() object into a finished phyStats() object, both of which are objects implementing the PhyStats interface. See those methods for more information.

Specified by:
affectPhyStats in interface StatsAffecting
Parameters:
affected - the host of the PhyStats object being affected
affectableStats - the particular PhyStats object being affected
See Also:
PhyStats, Environmental, Affectable.basePhyStats(), Affectable.phyStats(), Affectable.recoverPhyStats()

affectCharState

public void affectCharState(MOB affectedMob,
                            CharState affectableMaxState)
Description copied from interface: StatsAffecting
This method is called by the recoverCharState() method on other MOB objects. It is used to transform the MOB baseCharState() object into a finished charState() object, both of which are objects implementing the CharState interface. See those methods for more information.

Specified by:
affectCharState in interface StatsAffecting
Parameters:
affectedMob - the host of the CharState object being affected
affectableMaxState - the particular CharState object being affected
See Also:
CharState, MOB, MOB.baseState(), MOB.curState(), MOB.recoverMaxState()

isMarriedToLiege

public boolean isMarriedToLiege()
Specified by:
isMarriedToLiege in interface MOB

curState

public CharState curState()
Specified by:
curState in interface MOB

maxState

public CharState maxState()
Specified by:
maxState in interface MOB

baseState

public CharState baseState()
Specified by:
baseState in interface MOB

playerStats

public PlayerStats playerStats()
Description copied from interface: MOB
Some general statistics about MOBs. See the CharStats class (in interfaces) for more info.

Specified by:
playerStats in interface MOB

setPlayerStats

public void setPlayerStats(PlayerStats newStats)
Specified by:
setPlayerStats in interface MOB

setBaseState

public void setBaseState(CharState newState)
Specified by:
setBaseState in interface MOB

resetToMaxState

public void resetToMaxState()
Specified by:
resetToMaxState in interface MOB

recoverMaxState

public void recoverMaxState()
Specified by:
recoverMaxState in interface MOB

amDead

public boolean amDead()
Description copied from interface: MOB
Combat and death

Specified by:
amDead in interface MOB

amActive

public boolean amActive()
Specified by:
amActive in interface MOB

dispossess

public void dispossess(boolean giveMsg)
Specified by:
dispossess in interface MOB

destroy

public void destroy()
Description copied from interface: Contingent
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Contingent

removeFromGame

public void removeFromGame(boolean preserveFollowers,
                           boolean killSession)
Specified by:
removeFromGame in interface MOB

getClanID

public java.lang.String getClanID()
Specified by:
getClanID in interface MOB

setClanID

public void setClanID(java.lang.String clan)
Specified by:
setClanID in interface MOB

getClanRole

public int getClanRole()
Specified by:
getClanRole in interface MOB

setClanRole

public void setClanRole(int role)
Specified by:
setClanRole in interface MOB

bringToLife

public void bringToLife()
Specified by:
bringToLife in interface MOB

bringToLife

public void bringToLife(Room newLocation,
                        boolean resetStats)
Specified by:
bringToLife in interface MOB

isInCombat

public boolean isInCombat()
Specified by:
isInCombat in interface MOB

mayIFight

public boolean mayIFight(MOB mob)
Specified by:
mayIFight in interface MOB

mayPhysicallyAttack

public boolean mayPhysicallyAttack(MOB mob)
Specified by:
mayPhysicallyAttack in interface MOB

setAtRange

public void setAtRange(int newRange)
Specified by:
setAtRange in interface MOB

rangeToTarget

public int rangeToTarget()
Specified by:
rangeToTarget in interface MOB

maxRange

public int maxRange()
Description copied from interface: Environmental
the maximum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat.

Specified by:
maxRange in interface Environmental
Returns:
the maximum range

minRange

public int minRange()
Description copied from interface: Environmental
the minimum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat. Usually 0.

Specified by:
minRange in interface Environmental
Returns:
the minimum range

maxRange

public int maxRange(Environmental tool)
Specified by:
maxRange in interface MOB

minRange

public int minRange(Environmental tool)
Specified by:
minRange in interface MOB

makePeace

public void makePeace()
Specified by:
makePeace in interface MOB

getVictim

public MOB getVictim()
Specified by:
getVictim in interface MOB

setVictim

public void setVictim(MOB mob)
Specified by:
setVictim in interface MOB

killMeDead

public DeadBody killMeDead(boolean createBody)
Specified by:
killMeDead in interface MOB

location

public Room location()
Specified by:
location in interface MOB

setLocation

public void setLocation(Room newRoom)
Specified by:
setLocation in interface MOB

riding

public Rideable riding()
Description copied from interface: Rider
Returns the Rideable upon which this Rider is Riding.

Specified by:
riding in interface Rider
Returns:
the Rideable upon which this Rider is Riding.
See Also:
Rideable

setRiding

public void setRiding(Rideable ride)
Description copied from interface: Rider
Sets the Rideable upon which this Rider is Riding.

Specified by:
setRiding in interface Rider
Parameters:
ride - the Rideable to ride upon
See Also:
Rideable

session

public Session session()
Description copied from interface: MOB
Whether a sessiob object is attached to this MOB

Specified by:
session in interface MOB

setSession

public void setSession(Session newSession)
Specified by:
setSession in interface MOB

myNaturalWeapon

public Weapon myNaturalWeapon()
Specified by:
myNaturalWeapon in interface MOB

displayName

public java.lang.String displayName(MOB viewer)
Specified by:
displayName in interface MOB

displayText

public java.lang.String displayText(MOB viewer)
Specified by:
displayText in interface MOB

displayText

public java.lang.String displayText()
Description copied from interface: Environmental
Gets the raw string used to show what this object looks like in the room. May be used as a basis for other methods, such as the title of rooms, and what an exit looks like when open. The value for Items may be null if the item is not displayed when the room is seen.

Specified by:
displayText in interface Environmental
Returns:
the string describing how this object looks in the room

setDisplayText

public void setDisplayText(java.lang.String newDisplayText)
Description copied from interface: Environmental
Sets the raw string used to show what this object looks like in the room. May be used as a basis for other methods, such as the title of rooms, and what an exit looks like when open. The value for Items may be null if the item is not displayed when the room is seen.

Specified by:
setDisplayText in interface Environmental
Parameters:
newDisplayText - the string describing how this object looks in the room

description

public java.lang.String description()
Description copied from interface: Environmental
The basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
description in interface Environmental
Returns:
the basic detail description of this object

setDescription

public void setDescription(java.lang.String newDescription)
Description copied from interface: Environmental
Sets the basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
setDescription in interface Environmental
Parameters:
newDescription - the basic detail description of this object

setMiscText

public void setMiscText(java.lang.String newText)
Description copied from interface: Environmental
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
setMiscText in interface Environmental
Parameters:
newText - either an open internal text string, or XML

text

public java.lang.String text()
Description copied from interface: Environmental
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
text in interface Environmental
Returns:
either an open internal text string, or XML

miscTextFormat

public java.lang.String miscTextFormat()
Description copied from interface: Environmental
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. Will use the CMParms.MTFORMAT_* constants for definition.

Specified by:
miscTextFormat in interface Environmental
Returns:
the format expected for the miscText field
See Also:
CMParms, Environmental.text(), Environmental.setMiscText(String)

healthText

public java.lang.String healthText(MOB viewer)
Specified by:
healthText in interface MOB

actions

public double actions()
Specified by:
actions in interface MOB

setActions

public void setActions(double remain)
Specified by:
setActions in interface MOB

commandQueSize

public int commandQueSize()
Specified by:
commandQueSize in interface MOB

dequeCommand

public boolean dequeCommand()
Specified by:
dequeCommand in interface MOB

doCommand

public void doCommand(java.util.List commands,
                      int metaFlags)
Specified by:
doCommand in interface MOB

doCommand

protected void doCommand(java.lang.Object O,
                         java.util.List commands,
                         int metaFlags)

calculateTickDelay

protected double calculateTickDelay(java.lang.Object command,
                                    java.util.List<java.lang.String> commands,
                                    double tickDelay)

prequeCommand

public void prequeCommand(java.util.Vector commands,
                          int metaFlags,
                          double tickDelay)
Specified by:
prequeCommand in interface MOB

enqueCommand

public void enqueCommand(java.util.List<java.lang.String> commands,
                         int metaFlags,
                         double tickDelay)
Specified by:
enqueCommand in interface MOB

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

tell

public void tell(MOB source,
                 Environmental target,
                 Environmental tool,
                 java.lang.String msg)
Description copied from interface: MOB
Primary mob communication

Specified by:
tell in interface MOB

tell

public void tell(java.lang.String msg)
Specified by:
tell in interface MOB

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

affectCharStats

public void affectCharStats(MOB affectedMob,
                            CharStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverCharStats() method on other MOB objects. It is used to transform the MOB baseCharStats() object into a finished charStats() object, both of which are objects implementing the CharStats interface. See those methods for more information.

Specified by:
affectCharStats in interface StatsAffecting
Parameters:
affectedMob - the host of the CharStats object being affected
affectableStats - the particular CharStats object being affected
See Also:
CharStats, MOB, MOB.baseCharStats(), MOB.charStats(), MOB.recoverCharStats()

getTickStatus

public long getTickStatus()
Description copied from interface: Tickable
A coded status for this object during the period where its tick method is being called. The statis is defined, at least in part, by constants in this interface STATUS_*. STATUS_NOT should be returned when the objects tick method is not currently in execution. It should never return STATUS_NOT when the objects tick method is in execution.

Specified by:
getTickStatus in interface Tickable
Returns:
the numeric status of this object
See Also:
Tickable.tick(Tickable, int)

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

isMonster

public boolean isMonster()
Specified by:
isMonster in interface MOB

isPossessing

public boolean isPossessing()
Specified by:
isPossessing in interface MOB

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

addItem

public void addItem(Item item)
Description copied from interface: ItemPossessor
Adds a new item to its possessor. By default, the item is added in a default resting state -- no containers, timeouts, or other modifiers are set. Duplicates will not be permitted.

Specified by:
addItem in interface ItemPossessor
Parameters:
item - the item to add
See Also:
ItemPossessor.delItem(Item)

addItem

public void addItem(Item item,
                    ItemPossessor.Expire expire)
Description copied from interface: ItemPossessor
Adds a new item to its possessor, with an expiration code. Duplicates will not be permitted.

Specified by:
addItem in interface ItemPossessor
Parameters:
item - the item to add
See Also:
ItemPossessor.Expire

delItem

public void delItem(Item item)
Description copied from interface: ItemPossessor
Removes the item from this possessor.

Specified by:
delItem in interface ItemPossessor
Parameters:
item - the item to remove

numItems

public int numItems()
Description copied from interface: ItemPossessor
Returns the total number of items at this possessor, regardless of container status.

Specified by:
numItems in interface ItemPossessor
Returns:
the total number of items

items

public java.util.Enumeration<Item> items()
Description copied from interface: ItemPossessor
An enumeration of all the items at this possessor.

Specified by:
items in interface ItemPossessor
Returns:
enumeration of all the items at this possessor.

isContent

public boolean isContent(Item I)
Description copied from interface: ItemPossessor
Returns whether the given item is in this possessors list.

Specified by:
isContent in interface ItemPossessor
Parameters:
I - the item to check
Returns:
true if the item was found, and false otherwise

findItems

public java.util.List<Item> findItems(Item goodLocation,
                                      java.lang.String itemName)
Description copied from interface: ItemPossessor
Returns all items in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found).

Specified by:
findItems in interface ItemPossessor
Parameters:
goodLocation - the container to look in, or null for none
itemName - the name or partial name of the item to fetch
Returns:
the item found, or null

getItem

public Item getItem(int index)
Description copied from interface: ItemPossessor
Returns the item at the given index, regardless of container status, visibility, or other modifiers.

Specified by:
getItem in interface ItemPossessor
Parameters:
index - the index of the item
Returns:
the item at that index, or null if its not found

fetchFromInventory

public Item fetchFromInventory(Item goodLocation,
                               java.lang.String itemName,
                               int wornFilter,
                               boolean allowCoins,
                               boolean respectLocationAndWornCode)
Specified by:
fetchFromInventory in interface MOB

findItem

public Item findItem(java.lang.String itemName)
Description copied from interface: ItemPossessor
Returns the item in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found). Handles indexing for duplicate-named items.

Specified by:
findItem in interface ItemPossessor
Parameters:
itemName - the name or partial name of the item to fetch
Returns:
the item found, or null

findItem

public Item findItem(Item goodLocation,
                     java.lang.String itemName)
Description copied from interface: ItemPossessor
Returns the item in the given container that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller name is found). Handles indexing for duplicate-named items.

Specified by:
findItem in interface ItemPossessor
Parameters:
goodLocation - the container to look in, or null for none
itemName - the name or partial name of the item to fetch
Returns:
the item found, or null

fetchCarried

public Item fetchCarried(Item goodLocation,
                         java.lang.String itemName)
Specified by:
fetchCarried in interface MOB

fetchWornItem

public Item fetchWornItem(java.lang.String itemName)
Specified by:
fetchWornItem in interface MOB

findItems

public java.util.List<Item> findItems(java.lang.String itemName)
Description copied from interface: ItemPossessor
Returns all items in this possessor that matches the given itemID, whether by full name, description, class ID, or partial name (if no fuller names are found).

Specified by:
findItems in interface ItemPossessor
Parameters:
itemName - the name or partial name of the item to fetch
Returns:
the item found, or null

addFollower

public void addFollower(MOB follower,
                        int order)
Description copied from interface: MOB
Manipulation of followers

Specified by:
addFollower in interface MOB

delFollower

public void delFollower(MOB follower)
Specified by:
delFollower in interface MOB

numFollowers

public int numFollowers()
Specified by:
numFollowers in interface MOB

followers

public java.util.Enumeration<MOB.Follower> followers()
Specified by:
followers in interface MOB

fetchFollowerOrder

public int fetchFollowerOrder(MOB thisOne)
Specified by:
fetchFollowerOrder in interface MOB

fetchFollower

public MOB fetchFollower(java.lang.String named)
Specified by:
fetchFollower in interface MOB

fetchFollower

public MOB fetchFollower(int index)
Specified by:
fetchFollower in interface MOB

isFollowedBy

public boolean isFollowedBy(MOB thisOne)
Specified by:
isFollowedBy in interface MOB

willFollowOrdersOf

public boolean willFollowOrdersOf(MOB mob)
Specified by:
willFollowOrdersOf in interface MOB

amUltimatelyFollowing

public MOB amUltimatelyFollowing()
Specified by:
amUltimatelyFollowing in interface MOB

amFollowing

public MOB amFollowing()
Specified by:
amFollowing in interface MOB

setFollowing

public void setFollowing(MOB mob)
Specified by:
setFollowing in interface MOB

getRideBuddies

public java.util.Set<MOB> getRideBuddies(java.util.Set<MOB> list)
Specified by:
getRideBuddies in interface MOB

getGroupMembers

public java.util.Set<MOB> getGroupMembers(java.util.Set<MOB> list)
Specified by:
getGroupMembers in interface MOB

isSavable

public boolean isSavable()
Description copied from interface: Contingent
Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container. It always returns true except under unique circumstances.

Specified by:
isSavable in interface Contingent
Returns:
true, usually.

setSavable

public void setSavable(boolean truefalse)
Description copied from interface: Contingent
Sets whether this behavior can be saved as a permanent aspect of its host.

Specified by:
setSavable in interface Contingent
Parameters:
truefalse - whether this behavior can be saved as part of its host.
See Also:
Contingent.isSavable()

soulMate

public MOB soulMate()
Specified by:
soulMate in interface MOB

setSoulMate

public void setSoulMate(MOB mob)
Specified by:
setSoulMate in interface MOB

addAbility

public void addAbility(Ability to)
Description copied from interface: MOB
Manipulation of ability objects, which includes spells, traits, skills, etc.

Specified by:
addAbility in interface MOB

delAbility

public void delAbility(Ability to)
Specified by:
delAbility in interface MOB

numLearnedAbilities

public int numLearnedAbilities()
Specified by:
numLearnedAbilities in interface MOB

abilities

public java.util.Enumeration<Ability> abilities()
Specified by:
abilities in interface MOB

numAbilities

public int numAbilities()
Specified by:
numAbilities in interface MOB

fetchAbility

public Ability fetchAbility(int index)
Specified by:
fetchAbility in interface MOB

fetchAbility

public Ability fetchAbility(java.lang.String ID)
Specified by:
fetchAbility in interface MOB

findAbility

public Ability findAbility(java.lang.String ID)
Specified by:
findAbility in interface MOB

racialEffects

protected final ChameleonList<Ability> racialEffects()

clanEffects

protected final ChameleonList<Ability> clanEffects()

addNonUninvokableEffect

public void addNonUninvokableEffect(Ability to)
Description copied from interface: Affectable
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. recoverPhyStats() method should be called next. An Ability with a given ID() can only be added once per object.

Specified by:
addNonUninvokableEffect in interface Affectable
Parameters:
to - The ability object to add as an effect.
See Also:
Ability, Affectable.recoverPhyStats()

addPriorityEffect

public void addPriorityEffect(Ability to)
Specified by:
addPriorityEffect in interface MOB

addEffect

public void addEffect(Ability to)
Description copied from interface: Affectable
Add a new effect to this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modifies the stats. An Ability with a given ID() can only be added once per object.

Specified by:
addEffect in interface Affectable
Parameters:
to - The ability object to add as an effect.
See Also:
Ability, Affectable.recoverPhyStats()

delEffect

public void delEffect(Ability to)
Description copied from interface: Affectable
Delete an effect from this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modified the stats.

Specified by:
delEffect in interface Affectable
Parameters:
to - The ability object to remove as an effect on this object
See Also:
Ability, Affectable.recoverPhyStats()

numAllEffects

public int numAllEffects()
Specified by:
numAllEffects in interface MOB

numEffects

public int numEffects()
Description copied from interface: Affectable
Returns the number of ability objects listed as effects on this object.

Specified by:
numEffects in interface Affectable
Returns:
the number of effects this object has
See Also:
Ability

fetchEffect

public Ability fetchEffect(int index)
Description copied from interface: Affectable
Returns an ability object listed as an effect on this object. May return null even if the index is correct to mark a race condition.

Specified by:
fetchEffect in interface Affectable
Parameters:
index - which object to return
Returns:
the ability object effecting this object
See Also:
Ability, Affectable.numEffects()

fetchEffect

public Ability fetchEffect(java.lang.String ID)
Description copied from interface: Affectable
Returns an ability object listed as an effect on this object. The object will be the one with the same ID() string as passed in.

Specified by:
fetchEffect in interface Affectable
Returns:
the ability object effecting this object
See Also:
Ability, CMObject.ID()

personalEffects

public java.util.Enumeration<Ability> personalEffects()
Specified by:
personalEffects in interface MOB

effects

public java.util.Enumeration<Ability> effects()
Description copied from interface: Affectable
Returns an enumerator of abilities listed as effects on this object.

Specified by:
effects in interface Affectable
Returns:
the enumerator of ability objects effecting this object
See Also:
Ability

addBehavior

public void addBehavior(Behavior to)
Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc.

Specified by:
addBehavior in interface Behavable
Parameters:
to - The behavior object to add.
See Also:
Behavior, Affectable.recoverPhyStats()

delBehavior

public void delBehavior(Behavior to)
Description copied from interface: Behavable
Delete a behavior from this object. After calling this method, recoverPhyStats() should be called next in case this behavior object modified the stats.

Specified by:
delBehavior in interface Behavable
Parameters:
to - The behavior object to remove.
See Also:
Behavior, Affectable.recoverPhyStats()

numBehaviors

public int numBehaviors()
Description copied from interface: Behavable
The number of behaviors this object has.

Specified by:
numBehaviors in interface Behavable
Returns:
the number of behaviors
See Also:
Behavior

behaviors

public java.util.Enumeration<Behavior> behaviors()
Description copied from interface: Behavable
Returns an enumerator of all the behaviors on this object.

Specified by:
behaviors in interface Behavable
Returns:
an enumerator of all the behaviors on this object.
See Also:
Behavior

fetchBehavior

public Behavior fetchBehavior(int index)
Description copied from interface: Behavable
Returns a behavior object on this object. May return null even if the index is correct to mark a race condition.

Specified by:
fetchBehavior in interface Behavable
Parameters:
index - which object to return
Returns:
the behavior object
See Also:
Behavior, Behavable.numBehaviors()

fetchBehavior

public Behavior fetchBehavior(java.lang.String ID)
Description copied from interface: Behavable
Returns a behavior object listed on this object. The object will be the one with the same ID() string as passed in.

Specified by:
fetchBehavior in interface Behavable
Returns:
the behavior object
See Also:
Behavior, CMObject.ID()

addExpertise

public void addExpertise(java.lang.String of)
Manipulation of the expertise list

Specified by:
addExpertise in interface MOB

delExpertise

public void delExpertise(java.lang.String of)
Specified by:
delExpertise in interface MOB

numExpertises

public int numExpertises()
Specified by:
numExpertises in interface MOB

uniqueExpertises

public java.util.Enumeration<java.lang.String> uniqueExpertises()
Specified by:
uniqueExpertises in interface MOB

fetchExpertise

public java.lang.String fetchExpertise(int x)
Specified by:
fetchExpertise in interface MOB

fetchExpertise

public java.lang.String fetchExpertise(java.lang.String of)
Specified by:
fetchExpertise in interface MOB

addScript

public void addScript(ScriptingEngine S)
Manipulation of the scripts list

Specified by:
addScript in interface Behavable
Parameters:
S - the scripting engine, fully populated, to add
See Also:
ScriptingEngine

delScript

public void delScript(ScriptingEngine S)
Description copied from interface: Behavable
Remove a running script from this object.

Specified by:
delScript in interface Behavable
Parameters:
S - the specific scripting engine to remove
See Also:
ScriptingEngine

numScripts

public int numScripts()
Description copied from interface: Behavable
Return the number of scripts running on this object

Specified by:
numScripts in interface Behavable
Returns:
number of scripts

scripts

public java.util.Enumeration<ScriptingEngine> scripts()
Description copied from interface: Behavable
Returns an enumerator of all the scripts on this object.

Specified by:
scripts in interface Behavable
Returns:
an enumerator of all the scripts on this object.
See Also:
ScriptingEngine

fetchScript

public ScriptingEngine fetchScript(int x)
Description copied from interface: Behavable
Retreive one of the enumerated scripts running on this object

Specified by:
fetchScript in interface Behavable
Parameters:
x - which script to return
Returns:
the scripting engine
See Also:
ScriptingEngine

addTattoo

public void addTattoo(MOB.Tattoo of)
Manipulation of the tatoo list

Specified by:
addTattoo in interface MOB

delTattoo

public void delTattoo(MOB.Tattoo of)
Specified by:
delTattoo in interface MOB

tattoos

public java.util.Enumeration<MOB.Tattoo> tattoos()
Specified by:
tattoos in interface MOB

findTattoo

public MOB.Tattoo findTattoo(java.lang.String of)
Specified by:
findTattoo in interface MOB

addFaction

public void addFaction(java.lang.String which,
                       int start)
Manipulation of the factions list

Specified by:
addFaction in interface MOB

adjustFaction

public void adjustFaction(java.lang.String which,
                          int amount)
Specified by:
adjustFaction in interface MOB

fetchFactions

public java.util.Enumeration<java.lang.String> fetchFactions()
Specified by:
fetchFactions in interface MOB

fetchFaction

public int fetchFaction(java.lang.String which)
Specified by:
fetchFaction in interface MOB

removeFaction

public void removeFaction(java.lang.String which)
Specified by:
removeFaction in interface MOB

copyFactions

public void copyFactions(MOB source)
Specified by:
copyFactions in interface MOB

hasFaction

public boolean hasFaction(java.lang.String which)
Specified by:
hasFaction in interface MOB

fetchFactionRanges

public java.util.List<java.lang.String> fetchFactionRanges()
Specified by:
fetchFactionRanges in interface MOB

freeWearPositions

public int freeWearPositions(long wornCode,
                             short belowLayer,
                             short layerAttributes)
Specified by:
freeWearPositions in interface MOB

getWearPositions

public int getWearPositions(long wornCode)
Specified by:
getWearPositions in interface MOB

fetchWornItems

public java.util.List<Item> fetchWornItems(long wornCode,
                                           short aboveOrAroundLayer,
                                           short layerAttributes)
Specified by:
fetchWornItems in interface MOB

hasOnlyGoldInInventory

public boolean hasOnlyGoldInInventory()
Specified by:
hasOnlyGoldInInventory in interface MOB

fetchFirstWornItem

public Item fetchFirstWornItem(long wornCode)
Specified by:
fetchFirstWornItem in interface MOB

fetchWieldedItem

public Item fetchWieldedItem()
Specified by:
fetchWieldedItem in interface MOB

isMine

public boolean isMine(Environmental env)
Specified by:
isMine in interface MOB

moveItemTo

public void moveItemTo(Item container,
                       ItemPossessor.Expire expire,
                       ItemPossessor.Move... moveFlags)
Description copied from interface: ItemPossessor
Intelligently removes an item from its current location and moves it to this possessor, managing any container contents, and possibly followers/riders if the item is a cart. An expiration can be set on the move to have the items expire. Duplicates will not be permitted.

Specified by:
moveItemTo in interface ItemPossessor
Parameters:
container - the item to add
expire - the expiration code
moveFlags - any flags related to the move
See Also:
ItemPossessor.Expire

moveItemTo

public void moveItemTo(Item container)
Description copied from interface: ItemPossessor
Intelligently removes an item from its current location and moves it to this possessor, managing any container contents. Is the same as calling the longer moveItemTo with a Never expiration, and NO movement flags. Duplicates will not be permitted.

Specified by:
moveItemTo in interface ItemPossessor
Parameters:
container - the item to add
See Also:
ItemPossessor.Expire

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

getCodeNum

protected int getCodeNum(java.lang.String code)

sameAs

public boolean sameAs(Environmental E)
Description copied from interface: Environmental
Whether this object instance is functionally identical to the object passed in. Works by repeatedly calling getStat on both objects and comparing the values.

Specified by:
sameAs in interface Environmental
Parameters:
E - the object to compare this one to
Returns:
whether this object is the same as the one passed in
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String)