|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.Items.Basic.StdItem
public class StdItem
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
Wearable.CODES |
Field Summary | |
---|---|
protected EachApplicable.ApplyAffectPhyStats |
affectPhyStats
|
protected SVector<Ability> |
affects
|
protected int |
baseGoldValue
|
protected PhyStats |
basePhyStats
|
protected SVector<Behavior> |
behaviors
|
protected java.lang.String |
cachedImageName
|
protected static java.lang.String[] |
CODES
|
protected java.lang.String |
databaseID
|
protected java.lang.Object |
description
|
protected boolean |
destroyed
|
protected java.lang.String |
displayText
|
protected long |
dispossessionTime
|
protected int |
material
|
protected Item |
me
|
protected java.lang.String |
miscText
|
protected Container |
myContainer
|
protected int |
myUses
|
protected long |
myWornCode
|
protected java.lang.String |
name
|
protected ItemPossessor |
owner
|
protected PhyStats |
phyStats
|
protected long |
properWornBitmap
|
protected java.lang.String |
rawImageName
|
protected Rideable |
riding
|
protected SVector<ScriptingEngine> |
scripts
|
protected java.lang.String |
secretIdentity
|
protected short |
tickCtr
|
protected int |
tickStatus
|
protected boolean |
wornLogicalAnd
|
protected java.lang.String[] |
xtraValues
|
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
DEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD |
Constructor Summary | |
---|---|
StdItem()
|
Method Summary | |
---|---|
protected boolean |
abilityImbuesMagic()
|
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 |
addNonUninvokableEffect(Ability to)
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. |
void |
addScript(ScriptingEngine S)
Manipulation of the scripts list |
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. |
protected boolean |
alreadyWornMsg(MOB mob,
Item thisItem)
|
boolean |
amBeingWornProperly()
Returns whether this item is being worn properly, regardless of layering or multi-restrictions. |
boolean |
amDestroyed()
Whether the destroy() method has been previousy called on this object. |
boolean |
amWearingAt(long wornCode)
Can test where, if anywhere, an item is being worn. |
int |
baseGoldValue()
The user/builder-entered value of the item, represented in base CoffeeMud currency. |
PhyStats |
basePhyStats()
Object containing a set of base, unmodified, mostly numeric fields. |
java.util.Enumeration<Behavior> |
behaviors()
Returns an enumerator of all the behaviors on this object. |
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. |
boolean |
canWear(MOB mob,
long where)
Returns whether it is practical for the given mob to wear this Item on the given worn location as given by the wornCode. |
protected boolean |
canWearComplete(MOB mob,
long wearWhere)
|
protected void |
cloneFix(Item I)
|
boolean |
compareProperLocations(Item toThis)
compares whether this item is allowed to be worn on the same locations as the given item. |
int |
compareTo(CMObject o)
|
Container |
container()
Where the item is located. |
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
java.lang.String |
databaseID()
Retrieve the unique contextual database ID for this object. |
void |
delAllBehaviors()
Removes all behaviors from this object. |
void |
delAllEffects(boolean unInvoke)
Optionally uninvokes and then certainly removes all effects from this object. |
void |
delAllScripts()
Removes all executing scripts from this object. |
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 |
delScript(ScriptingEngine S)
Remove a running script from this object. |
java.lang.String |
description()
The basic description of this object, as shown when the item is directly LOOKed at. |
java.lang.String |
description(MOB viewerMob)
Returns the description, but as seen by the given viewer. |
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 |
displayText()
Gets the raw string used to show what this object looks like in the room. |
java.lang.String |
displayText(MOB viewerMob)
Returns the displayText, but as seen by the given viewer. |
void |
eachBehavior(EachApplicable<Behavior> applier)
Applies the given code to each behavior on this object |
void |
eachEffect(EachApplicable<Ability> applier)
Applies the given code to each effect on this object |
void |
eachScript(EachApplicable<ScriptingEngine> applier)
Applies the given code to each scripting engine on this object |
java.util.Enumeration<Ability> |
effects()
Returns an enumerator of abilities listed as effects on this object. |
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. |
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. |
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. |
ScriptingEngine |
fetchScript(int x)
Retrieve one of the enumerated scripts running on this object |
boolean |
fitsOn(long wornCode)
Whether this item is designated as being wearable on the given worn codes defined in the Item interface. |
protected int |
getCodeNum(java.lang.String code)
|
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
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. |
int |
getTickStatus()
A coded status for this object during the period where its tick method is being called. |
protected java.lang.String |
I(java.lang.String str)
|
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 |
isGeneric()
Whether the fields of this item are set in code, or set by builders. |
boolean |
isReadable()
Returns whether this thing is readable when the player uses the READ command and targets it. |
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.lang.String |
L(java.lang.String str,
java.lang.String... xs)
Localize an internal string -- shortcut. |
int |
material()
The resource code representing the material out of which this item is principally made. |
int |
maxRange()
the maximum range of this object, if applicable. |
int |
minRange()
the minimum range of this object, if applicable. |
java.lang.String |
miscTextFormat()
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. |
java.lang.String |
name()
The nice displayable name of this instance of this object |
java.lang.String |
Name()
The raw unmodified name of this object as stored in the database. |
java.lang.String |
name(MOB viewerMob)
Returns the name, but as seen by the given viewer. |
CMObject |
newInstance()
Returns a new instance of this class. |
int |
numBehaviors()
The number of behaviors this object has. |
int |
numberOfItems()
How many items this Item object represents. |
int |
numEffects()
Returns the number of ability objects listed as effects on this object. |
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. |
ItemPossessor |
owner()
The Room or MOB representing where this item is located. |
PhyStats |
phyStats()
Object containing a set of current, modified, usable, mostly numeric fields. |
java.lang.String |
rawImage()
Returns the raw name of the image file to display for this object when MXP is used. |
boolean |
rawLogicalAnd()
Flag which determines whether the rawProperLocationBitmap represents the fact that it is worn on ALL locations (value of true) or worn on any of the locations. |
long |
rawProperLocationBitmap()
Returns the builder-defined bitmap made from a logical combination of the worn location constants from the Item interface. |
java.lang.String |
rawSecretIdentity()
This method returns those secret properties of the item which are entered directly by the builder when the item is designed. |
long |
rawWornCode()
Returns the bitmap representing where this item is presently being worn by the mob or player who has the item in his or inventory. |
java.lang.String |
readableText()
For things that are readable, this returns the readable string for this thing. |
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. |
int |
recursiveWeight()
For a normal item, this method returns the same as phyStats().weight(). |
void |
removeFromOwnerContainer()
This method basically calls setContainer(null), and then removes this item from its owner(). |
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. |
java.lang.String |
secretIdentity()
This method returns the calculated and expanded description of the properties of the item as would be discovered through the Identify spell. |
void |
setBasePhyStats(PhyStats newStats)
Re-sets the object containing a set of base, unmodified, mostly numeric fields. |
void |
setBaseValue(int newValue)
Changes the base value of the item, represented in base CoffeeMud currency. |
void |
setContainer(Container newContainer)
Change the container where the item is located. |
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 |
setExpirationDate(long time)
If this object expires, it should have a timestamp saying when it expires, in real time. |
void |
setImage(java.lang.String newImage)
Sets the raw name of the image file to display for this object when MXP is used. |
void |
setMaterial(int newValue)
Sets the resource code representing the material out of which this item is principally made. |
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 |
setName(java.lang.String newName)
Sets the raw unmodified name of this object as stored in the database. |
void |
setOwner(ItemPossessor E)
Sets the Room or MOB representing where this item is located. |
void |
setRawLogicalAnd(boolean newAnd)
Sets flag which determines whether the rawProperLocationBitmap represents the fact that it is worn on ALL locations (value of true) or worn on any of the locations. |
void |
setRawProperLocationBitmap(long newValue)
Sets the builder-defined bitmap made from a logical combination of the worn location constants from the Item interface. |
void |
setRawWornCode(long newValue)
Sets the bitmap representing where this item is presently being worn by the mob or player who has the item in his or inventory. |
void |
setReadable(boolean truefalse)
Returns whether this thing is readable when the player uses the READ command and targets it. |
void |
setReadableText(java.lang.String text)
For things that are readable, this set the readable string for this thing. |
void |
setRiding(Rideable ride)
Sets the Rideable upon which this Rider is Riding. |
void |
setSavable(boolean truefalse)
Sets whether this object can be saved as a permanent aspect of its host. |
void |
setSecretIdentity(java.lang.String newIdentity)
This method is used to change the string returned by rawSecretIdentity. |
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 |
setUsesRemaining(int newUses)
Sets the uses remaining field, which is a general numeric value whose meaning differs for different Item types. |
void |
stopTicking()
If this Item is current Ticking due to its having Behaviors or other properties which might grant it the ability to Tick, this method will cause that ticking to cease and desist. |
boolean |
subjectToWearAndTear()
Whether the usesRemaining() number above is used to determine the percentage health of the item. |
protected java.lang.String |
tackOns()
|
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. |
Item |
ultimateContainer(Physical stopAtC)
If an item is in a container, which is in a container, etc, this will return the "highest" or ultimate container in which this item is located. |
void |
unWear()
Removes this item from a state of being worn, and puts it back into the mob or player inventory. |
int |
usesRemaining()
Uses remaining is a general use numeric value whose meaning differs for different Item types. |
int |
value()
The default value of the item, represented in the base CoffeeMud currency. |
void |
wearAt(long wornCode)
This method is similar to the wearEvenIfImpossible method method above, except that it does not inspect this item for allowed wearable locations, but always puts the item on the wear location represented by the given wornCode bitmap. |
void |
wearEvenIfImpossible(MOB mob)
Puts this item into a state of being worn regardless of whether it is practical for the given mob to wear it -- for instance, even if an item is already being worn where this item wants to be worn, or if the player has no such limbs to wear this item. |
boolean |
wearIfPossible(MOB mob)
Using the canWear method, this method will put the item into a state of being worn only if it is practical for the given mob or player to wear this Item. |
boolean |
wearIfPossible(MOB mob,
long wearCode)
Using the canWear method, this method will put the item into a state of being worn on the given location only if it is practical for the given mob or player to wear this Item at the given location. |
long |
whereCantWear(MOB mob)
Returns a bitmap of all the locations where the given mob is practically unable to wear an item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected java.lang.String displayText
protected java.lang.Object description
protected int myUses
protected long myWornCode
protected java.lang.String miscText
protected Rideable riding
protected java.lang.String rawImageName
protected java.lang.String cachedImageName
protected java.lang.String secretIdentity
protected boolean wornLogicalAnd
protected long properWornBitmap
protected int baseGoldValue
protected int material
protected java.lang.String[] xtraValues
protected long dispossessionTime
protected short tickCtr
protected int tickStatus
protected java.lang.String databaseID
protected boolean destroyed
protected Item me
protected PhyStats phyStats
protected PhyStats basePhyStats
protected volatile Container myContainer
protected volatile ItemPossessor owner
protected SVector<Ability> affects
protected SVector<Behavior> behaviors
protected SVector<ScriptingEngine> scripts
protected EachApplicable.ApplyAffectPhyStats affectPhyStats
protected static java.lang.String[] CODES
Constructor Detail |
---|
public StdItem()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
protected boolean abilityImbuesMagic()
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public boolean isGeneric()
Environmental
isGeneric
in interface Environmental
Environmental.text()
public java.lang.String Name()
Environmental
Name
in interface Environmental
Tickable.name()
public void setName(java.lang.String newName)
Environmental
setName
in interface Environmental
newName
- the raw base name of this object on the map.Environmental.Name()
public java.lang.String name()
Tickable
name
in interface CMObject
name
in interface Tickable
Environmental.Name()
public java.lang.String displayText(MOB viewerMob)
Physical
displayText
in interface Physical
viewerMob
- the mob viewing the physical thing
Environmental.displayText()
public java.lang.String name(MOB viewerMob)
Physical
name
in interface Physical
viewerMob
- the mob viewing the physical thing
Tickable.name()
public void setDatabaseID(java.lang.String id)
DBIdentifiable
setDatabaseID
in interface DBIdentifiable
id
- the unique contextual database ID for this object.DBIdentifiable.canSaveDatabaseID()
,
DBIdentifiable.databaseID()
public boolean canSaveDatabaseID()
DBIdentifiable
canSaveDatabaseID
in interface DBIdentifiable
DBIdentifiable.databaseID()
,
DBIdentifiable.setDatabaseID(String)
public java.lang.String databaseID()
DBIdentifiable
databaseID
in interface DBIdentifiable
DBIdentifiable.canSaveDatabaseID()
,
DBIdentifiable.setDatabaseID(String)
public java.lang.String image()
Environmental
image
in interface Environmental
public java.lang.String rawImage()
Environmental
rawImage
in interface Environmental
public void setImage(java.lang.String newImage)
Environmental
setImage
in interface Environmental
newImage
- the raw name of the mxp image filepublic PhyStats phyStats()
Affectable
phyStats
in interface Affectable
Affectable.basePhyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public PhyStats basePhyStats()
Affectable
basePhyStats
in interface Affectable
Affectable.phyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public void recoverPhyStats()
Affectable
recoverPhyStats
in interface Affectable
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.addEffect(Ability)
,
Behavable.addBehavior(Behavior)
,
PhyStats
public void setBasePhyStats(PhyStats newStats)
Affectable
setBasePhyStats
in interface Affectable
newStats
- a set of state fieldsAffectable.phyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public boolean subjectToWearAndTear()
Item
subjectToWearAndTear
in interface Item
protected void cloneFix(Item I)
public CMObject copyOf()
CMObject
copyOf
in interface CMObject
public Rideable riding()
Rider
riding
in interface Rider
Rideable
public void setRiding(Rideable ride)
Rider
setRiding
in interface Rider
ride
- the Rideable to ride uponRideable
public ItemPossessor owner()
Item
owner
in interface Item
MOB
,
Item
public void setOwner(ItemPossessor E)
Item
setOwner
in interface Item
E
- the mob or room where the item is locatedItemCollection.addItem(Item)
public long expirationDate()
Environmental
expirationDate
in interface Environmental
Environmental.setExpirationDate(long)
public void setExpirationDate(long time)
Environmental
setExpirationDate
in interface Environmental
time
- the time stamp when this thing expiresEnvironmental.expirationDate()
public boolean amDestroyed()
Contingent
amDestroyed
in interface Contingent
public boolean amWearingAt(long wornCode)
Wearable
amWearingAt
in interface Wearable
wornCode
- either 0, or one or more worn codes
Item
public boolean amBeingWornProperly()
Wearable
amBeingWornProperly
in interface Wearable
public boolean fitsOn(long wornCode)
Wearable
fitsOn
in interface Wearable
wornCode
- the worn code to check, as defined in the Item interface
Item
public void wearEvenIfImpossible(MOB mob)
Wearable
wearEvenIfImpossible
in interface Wearable
mob
- the player or mobpublic boolean wearIfPossible(MOB mob, long wearCode)
Wearable
wearIfPossible
in interface Wearable
mob
- the player or mob to put this item on.wearCode
- the bitmap wear code for the location to attempt
public boolean wearIfPossible(MOB mob)
Wearable
wearIfPossible
in interface Wearable
mob
- the player or mob to put this item on.
public void wearAt(long wornCode)
Wearable
wearAt
in interface Wearable
wornCode
- the bitmap from Item interface constants usedItem
,
Wearable.wearEvenIfImpossible(MOB)
public long rawProperLocationBitmap()
Wearable
rawProperLocationBitmap
in interface Wearable
Item
public boolean rawLogicalAnd()
Wearable
rawLogicalAnd
in interface Wearable
Wearable.rawProperLocationBitmap()
public void setRawProperLocationBitmap(long newValue)
Wearable
setRawProperLocationBitmap
in interface Wearable
newValue
- the worn location bitmap defined by the Item interface.Item
public void setRawLogicalAnd(boolean newAnd)
Wearable
setRawLogicalAnd
in interface Wearable
newAnd
- whether this item is worn on all locations or any of the locationsWearable.rawProperLocationBitmap()
public boolean compareProperLocations(Item toThis)
Wearable
compareProperLocations
in interface Wearable
toThis
- the item to compare this items allowed worn locations to
public long whereCantWear(MOB mob)
Wearable
whereCantWear
in interface Wearable
mob
- the player or mob to evaluate for unwearable locations
Item
public boolean canWear(MOB mob, long where)
Wearable
canWear
in interface Wearable
mob
- the player or mob being evaluatedwhere
- the worn location to check and see if this Item can be worn there.
Item
public long rawWornCode()
Wearable
rawWornCode
in interface Wearable
Item
,
Wearable.wearAt(long)
,
Wearable.wearIfPossible(MOB)
,
Wearable.wearEvenIfImpossible(MOB)
public void setRawWornCode(long newValue)
Wearable
setRawWornCode
in interface Wearable
newValue
- the current worn code for this itemItem
,
Wearable.wearAt(long)
,
Wearable.wearIfPossible(MOB)
,
Wearable.wearEvenIfImpossible(MOB)
public void unWear()
Wearable
unWear
in interface Wearable
public int material()
Item
material
in interface Item
RawMaterial
public void setMaterial(int newValue)
Item
setMaterial
in interface Item
newValue
- the resource codeRawMaterial
public int value()
Item
value
in interface Item
public int baseGoldValue()
Item
baseGoldValue
in interface Item
public void setBaseValue(int newValue)
Item
setBaseValue
in interface Item
newValue
- the new raw value of the itempublic java.lang.String readableText()
Readable
readableText
in interface Readable
Readable.isReadable()
,
Readable.setReadable(boolean)
,
Readable.setReadableText(String)
public void setReadableText(java.lang.String text)
Readable
setReadableText
in interface Readable
text
- the readable textReadable.isReadable()
,
Readable.setReadable(boolean)
,
Readable.readableText()
public boolean isReadable()
Readable
isReadable
in interface Readable
Readable.readableText()
,
Readable.setReadable(boolean)
,
Readable.setReadableText(String)
public void setReadable(boolean truefalse)
Readable
setReadable
in interface Readable
truefalse
- true if the thing is readable, and false otherwiseReadable.readableText()
,
Readable.isReadable()
,
Readable.setReadableText(String)
public void affectPhyStats(Physical affected, PhyStats affectableStats)
StatsAffecting
affectPhyStats
in interface StatsAffecting
affected
- the host of the PhyStats object being affectedaffectableStats
- the particular PhyStats object being affectedPhyStats
,
Environmental
,
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.recoverPhyStats()
public void affectCharStats(MOB affectedMob, CharStats affectableStats)
StatsAffecting
affectCharStats
in interface StatsAffecting
affectedMob
- the host of the CharStats object being affectedaffectableStats
- the particular CharStats object being affectedCharStats
,
MOB
,
MOB.baseCharStats()
,
MOB.charStats()
,
MOB.recoverCharStats()
public void affectCharState(MOB affectedMob, CharState affectableMaxState)
StatsAffecting
affectCharState
in interface StatsAffecting
affectedMob
- the host of the CharState object being affectedaffectableMaxState
- the particular CharState object being affectedCharState
,
MOB
,
MOB.baseState()
,
MOB.curState()
,
MOB.recoverMaxState()
public void setMiscText(java.lang.String newText)
Environmental
setMiscText
in interface Environmental
newText
- either an open internal text string, or XMLpublic java.lang.String text()
Environmental
text
in interface Environmental
public java.lang.String miscTextFormat()
Environmental
miscTextFormat
in interface Environmental
CMParms
,
Environmental.text()
,
Environmental.setMiscText(String)
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public int getTickStatus()
Tickable
getTickStatus
in interface Tickable
Tickable.tick(Tickable, int)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable
,
ServiceEngine
,
TickableGroup
public Item ultimateContainer(Physical stopAtC)
Item
ultimateContainer
in interface Item
stopAtC
- if contained in this object, it will return this object.. default null.
Container
public Container container()
Item
container
in interface Item
public java.lang.String rawSecretIdentity()
Item
rawSecretIdentity
in interface Item
public java.lang.String secretIdentity()
Item
secretIdentity
in interface Item
public void setSecretIdentity(java.lang.String newIdentity)
Item
setSecretIdentity
in interface Item
newIdentity
- the secret properties of this item. Empty string means it has none.public java.lang.String displayText()
Environmental
displayText
in interface Environmental
public void setDisplayText(java.lang.String newDisplayText)
Environmental
setDisplayText
in interface Environmental
newDisplayText
- the string describing how this object looks in the roompublic java.lang.String description()
Environmental
description
in interface Environmental
public java.lang.String description(MOB viewerMob)
Physical
description
in interface Physical
viewerMob
- the mob viewing the physical thing
Environmental.description()
public void setDescription(java.lang.String newDescription)
Environmental
setDescription
in interface Environmental
newDescription
- the basic detail description of this objectpublic void setContainer(Container newContainer)
Item
setContainer
in interface Item
newContainer
- Container item in which this item is contained.Container
public int numberOfItems()
Item
numberOfItems
in interface Item
public int usesRemaining()
Item
usesRemaining
in interface Item
public void setUsesRemaining(int newUses)
Item
setUsesRemaining
in interface Item
newUses
- a new general numeric value for this field.public boolean isSavable()
Contingent
isSavable
in interface Contingent
public void setSavable(boolean truefalse)
Contingent
setSavable
in interface Contingent
truefalse
- whether this behavior can be saved as part of its host.Contingent.isSavable()
protected boolean canWearComplete(MOB mob, long wearWhere)
protected boolean alreadyWornMsg(MOB mob, Item thisItem)
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executed
CMMsg
,
CMMsg.source()
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public int recursiveWeight()
Item
recursiveWeight
in interface Item
Container
public void stopTicking()
Item
stopTicking
in interface Item
public void destroy()
Contingent
destroy
in interface Contingent
public void removeFromOwnerContainer()
Item
removeFromOwnerContainer
in interface Item
Container
public void addNonUninvokableEffect(Ability to)
Affectable
addNonUninvokableEffect
in interface Affectable
to
- The ability object to add as an effect.Ability
,
Affectable.recoverPhyStats()
public void addEffect(Ability to)
Affectable
addEffect
in interface Affectable
to
- The ability object to add as an effect.Ability
,
Affectable.recoverPhyStats()
public void delEffect(Ability to)
Affectable
delEffect
in interface Affectable
to
- The ability object to remove as an effect on this objectAbility
,
Affectable.recoverPhyStats()
public void eachEffect(EachApplicable<Ability> applier)
Affectable
eachEffect
in interface Affectable
applier
- code to execute against each objectpublic void delAllEffects(boolean unInvoke)
Affectable
delAllEffects
in interface Affectable
unInvoke
- send true to uninvoke before deletingpublic java.util.Enumeration<Ability> effects()
Affectable
effects
in interface Affectable
Ability
public int numEffects()
Affectable
numEffects
in interface Affectable
Ability
public Ability fetchEffect(int index)
Affectable
fetchEffect
in interface Affectable
index
- which object to return
Ability
,
Affectable.numEffects()
public Ability fetchEffect(java.lang.String ID)
Affectable
fetchEffect
in interface Affectable
ID
- the Ability ID to look for in effects
Ability
,
CMObject.ID()
public void addBehavior(Behavior to)
addBehavior
in interface Behavable
to
- The behavior object to add.Behavior
,
Affectable.recoverPhyStats()
public void delAllBehaviors()
Behavable
delAllBehaviors
in interface Behavable
public void delBehavior(Behavior to)
Behavable
delBehavior
in interface Behavable
to
- The behavior object to remove.Behavior
,
Affectable.recoverPhyStats()
public int numBehaviors()
Behavable
numBehaviors
in interface Behavable
Behavior
public java.util.Enumeration<Behavior> behaviors()
Behavable
behaviors
in interface Behavable
Behavior
public Behavior fetchBehavior(int index)
Behavable
fetchBehavior
in interface Behavable
index
- which object to return
Behavior
,
Behavable.numBehaviors()
public Behavior fetchBehavior(java.lang.String ID)
Behavable
fetchBehavior
in interface Behavable
ID
- the Behavior ID to look for
Behavior
,
CMObject.ID()
public void eachBehavior(EachApplicable<Behavior> applier)
Behavable
eachBehavior
in interface Behavable
applier
- code to execute against each objectpublic void addScript(ScriptingEngine S)
addScript
in interface Behavable
S
- the scripting engine, fully populated, to addScriptingEngine
public void delScript(ScriptingEngine S)
Behavable
delScript
in interface Behavable
S
- the specific scripting engine to removeScriptingEngine
public void delAllScripts()
Behavable
delAllScripts
in interface Behavable
public int numScripts()
Behavable
numScripts
in interface Behavable
public java.util.Enumeration<ScriptingEngine> scripts()
Behavable
scripts
in interface Behavable
ScriptingEngine
public ScriptingEngine fetchScript(int x)
Behavable
fetchScript
in interface Behavable
x
- which script to return
ScriptingEngine
public void eachScript(EachApplicable<ScriptingEngine> applier)
Behavable
eachScript
in interface Behavable
applier
- code to execute against each objectprotected java.lang.String tackOns()
public int maxRange()
Environmental
maxRange
in interface Environmental
public int minRange()
Environmental
minRange
in interface Environmental
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
code
- the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public java.lang.String L(java.lang.String str, java.lang.String... xs)
Environmental
L
in interface Environmental
str
- the string to translatexs
- the array of variables to replace
Call with the string to translate, which may contain variables of the form @x1, @x2, etc. The array in xs
is then used to replace the variables AFTER the string is translated.
protected java.lang.String I(java.lang.String str)
public int getSaveStatIndex()
Modifiable
getSaveStatIndex
in interface Modifiable
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
code
- the name of the field to read.
Modifiable.getStatCodes()
protected int getCodeNum(java.lang.String code)
public boolean sameAs(Environmental E)
Environmental
sameAs
in interface Environmental
E
- the object to compare this one to
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |