|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.CoffeeUtensils
public class CoffeeUtensils
Field Summary | |
---|---|
static int |
LOOTFLAG_LOSS
|
static int |
LOOTFLAG_RUIN
|
static int |
LOOTFLAG_UNWORN
|
static int |
LOOTFLAG_WORN
|
Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
---|
isDebugging, name, serviceClient, tickStatus |
Constructor Summary | |
---|---|
CoffeeUtensils()
|
Method Summary | |
---|---|
boolean |
armorCheck(MOB mob,
int allowedArmorLevel)
Given the allowedArmorLevel code and the mob, this method returns whether the given mob is only wearing permitted items on the applicable armor slots. |
boolean |
armorCheck(MOB mob,
Item I,
int allowedArmorLevel)
Given the allowedArmorLevel code and the mob, this method returns whether the given mob is permitted to wear the given item is applicable armor slots given the armor level code. |
java.lang.String |
builtPrompt(MOB mob,
java.lang.String prompt)
Checks the given player mob for the format of their prompt in their playerstats and generates a fully formed prompt, complete with all variables filled in. |
boolean |
canBePlayerDestroyed(MOB mob,
Item I,
boolean ignoreBodies,
boolean ignoreWeight)
Returns whether the given item can be destroyed by the given mob, probably magically. |
long[][] |
compileConditionalRange(java.util.List<java.lang.String> condV,
int numDigits,
int startOfRange,
int endOfRange)
This strange method takes a list of space-delimited expressions of the form [CONDITION]number number number number, etc. |
void |
confirmWearability(MOB mob)
This method removes all equipment from the mob and quickly attempt to re-wear/hold/wield it all where it originally was by issueing wear messages which are previewed and executed. |
java.util.List<Item> |
deepCopyOf(Item oldItem)
Returns a copy of the given item/container and a copy of every item in that container, recursively. |
int |
disenchantItem(Item target)
Removes magical effects from wands, and other spell holders, deletes any effects after attempting to uninvoke. |
boolean |
disInvokeEffects(Environmental E)
Calls unInvoke on all effects on the given environmental. |
void |
extinguish(MOB source,
Physical target,
boolean mundane)
Recursively extinguishes everything from the given target on down. |
Trap |
fetchMyTrap(Physical myThang)
Returns any trap found on the given thing, or null. |
java.util.List<Race> |
getConstituantRaces(java.lang.String raceID)
Breaks apart a given generic mixed race ID to figure out which races were combined to make it up. |
java.util.List<DeadBody> |
getDeadBodies(Environmental E)
Returns any corpses found in the given container, recursively. |
java.lang.String |
getFormattedDate(Environmental E)
Returns the current mud-month-day-year for the object, depending on the timeclock where the environmental is located. |
Language |
getLanguageSpoken(Physical P)
Returns the language being spoke by the given object (mob, usually). |
Race |
getMixedRace(java.lang.String race1,
java.lang.String race2,
boolean ignoreRules)
Absolutely returns the correct race when mixing races of the two given IDs. |
MOB |
getMobPossessingAnother(MOB mob)
If any mob (probably a player) is possessing the given mob, this will return that mob, or null |
PairList<Item,java.lang.Long> |
getSeenEquipment(MOB mob,
long wornMask)
Returns a list of worn equipment at the top layer, where it can be seen. |
java.lang.String |
getUnsubscribeURL(java.lang.String name)
Does its best to come up with a specially encoded unsubscribe url for a particular user. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
Item |
isRuinedLoot(MOB mob,
Item I)
This method parses the item ruinning rules and possibly ruins the given item by returning the ruined version. |
Trap |
makeADeprecatedTrap(Physical unlockThis)
Creates one of the deprecated traps depending on what sort of object is passed in, whether it has a lid or a lock, etc. |
double |
memoryUse(Environmental E,
int number)
Returns a rediculous best guess on the amount of memory used by the given environmental. |
java.lang.String |
niceCommaList(java.util.List<?> V,
boolean andTOrF)
Nice english comma-delimited list, with oxford commas and trailing "and" or "or" at the end. |
void |
outfit(MOB mob,
java.util.List<Item> items)
Outfits the given mob with the list of given items. |
protected TriadVector<java.lang.Integer,java.lang.Integer,MaskingLibrary.CompiledZMask> |
parseLootPolicyFor(MOB mob)
|
int |
processVariableEquipment(MOB mob)
Assumes that every inventory item, equipped item, and store inventory are for an NPC mob, where "rejuv" doesn't really matter. |
protected java.lang.String |
raceMixRuleCheck(java.lang.String rule,
java.lang.String urace1,
java.lang.String urace2)
|
boolean |
reachableItem(MOB mob,
Environmental E)
Returns whether the given Item is reachable by the given mob. |
void |
recursiveDropMOB(MOB mob,
Room room,
Item thisContainer,
boolean bodyFlag)
Drops all items from the given mob into the given room which are inside the given container (or are the given item). |
void |
reloadCharClasses(CharClass oldC)
Iterates through every mob and player in the game, replacing the old char class object given with the new one of the same ID from CMClass. |
boolean |
resurrect(MOB tellMob,
Room corpseRoom,
DeadBody body,
int XPLevel)
Resurrects the given body according to all system rules. |
void |
roomAffectFully(CMMsg msg,
Room room,
int dirCode)
Normally just sends the message to the room by calling Room.send. |
Item |
ruinItem(Item I)
Always converts the given item into the Ruined version |
void |
setTrapped(Physical myThang)
Creates and sets a deprecated trap on the given exit, room, container, or whatever. |
void |
setTrapped(Physical myThang,
Trap theTrap)
Sets the given deprecated trap on the given exit, room, container, or whatever. |
void |
swapRaces(Race newR,
Race oldR)
Iterates through every mob and player in the game, replacing the old race object with the new one. |
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
---|
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary |
---|
activate, getServiceClient, L, propertiesLoaded, shutdown |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, initializeClass, name, newInstance |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
public static final int LOOTFLAG_RUIN
public static final int LOOTFLAG_LOSS
public static final int LOOTFLAG_WORN
public static final int LOOTFLAG_UNWORN
Constructor Detail |
---|
public CoffeeUtensils()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public java.lang.String niceCommaList(java.util.List<?> V, boolean andTOrF)
CMMiscUtils
niceCommaList
in interface CMMiscUtils
V
- the objects to listandTOrF
- true for trailing and, false for trailing or
public java.lang.String getFormattedDate(Environmental E)
CMMiscUtils
getFormattedDate
in interface CMMiscUtils
E
- the object curious about the date
public void outfit(MOB mob, java.util.List<Item> items)
CMMiscUtils
outfit
in interface CMMiscUtils
mob
- the mob to outfititems
- the items to outfit the mob withpublic Trap makeADeprecatedTrap(Physical unlockThis)
CMMiscUtils
makeADeprecatedTrap
in interface CMMiscUtils
unlockThis
- the exit, container, room, whatever
public void setTrapped(Physical myThang)
CMMiscUtils
setTrapped
in interface CMMiscUtils
myThang
- the thing to set the trap on.CMMiscUtils.makeADeprecatedTrap(Physical)
,
CMMiscUtils.setTrapped(Physical, Trap)
,
CMMiscUtils.fetchMyTrap(Physical)
public void setTrapped(Physical myThang, Trap theTrap)
CMMiscUtils
setTrapped
in interface CMMiscUtils
myThang
- the thing to set the trap on.theTrap
- the deprecated trap to set on itCMMiscUtils.makeADeprecatedTrap(Physical)
,
CMMiscUtils.setTrapped(Physical)
public Trap fetchMyTrap(Physical myThang)
CMMiscUtils
fetchMyTrap
in interface CMMiscUtils
myThang
- the thing to check for a trap
CMMiscUtils.makeADeprecatedTrap(Physical)
public boolean reachableItem(MOB mob, Environmental E)
CMMiscUtils
reachableItem
in interface CMMiscUtils
mob
- the mob who wants to reachE
- the Item to reach for
public double memoryUse(Environmental E, int number)
CMMiscUtils
memoryUse
in interface CMMiscUtils
E
- the object to check for a footprint ofnumber
- the accuracy -- higher is better
public Language getLanguageSpoken(Physical P)
CMMiscUtils
getLanguageSpoken
in interface CMMiscUtils
P
- the mob to check
public void extinguish(MOB source, Physical target, boolean mundane)
CMMiscUtils
extinguish
in interface CMMiscUtils
source
- the mob doing the extinguishingtarget
- the thing to extinguishmundane
- true to skip magic and elemental targetspublic void roomAffectFully(CMMsg msg, Room room, int dirCode)
CMMiscUtils
roomAffectFully
in interface CMMiscUtils
msg
- the message to sendroom
- the room to send the message todirCode
- if known, the direction of the target exitpublic int disenchantItem(Item target)
CMMiscUtils
disenchantItem
in interface CMMiscUtils
target
- the object to disenchant.
public boolean disInvokeEffects(Environmental E)
CMMiscUtils
disInvokeEffects
in interface CMMiscUtils
E
- the object to diseffect
public int processVariableEquipment(MOB mob)
CMMiscUtils
processVariableEquipment
in interface CMMiscUtils
mob
- the npc mob to process variable equipment on
public void recursiveDropMOB(MOB mob, Room room, Item thisContainer, boolean bodyFlag)
CMMiscUtils
recursiveDropMOB
in interface CMMiscUtils
mob
- the mob who is droppingroom
- the room where it's being droppedthisContainer
- the item or container where the items must bebodyFlag
- true if the container is a body, false otherwisepublic MOB getMobPossessingAnother(MOB mob)
CMMiscUtils
getMobPossessingAnother
in interface CMMiscUtils
mob
- the mob to check for possession
public boolean armorCheck(MOB mob, Item I, int allowedArmorLevel)
CMMiscUtils
armorCheck
in interface CMMiscUtils
mob
- the mob to checkI
- the item to checkallowedArmorLevel
- the allowed armor level
CharClass.ARMOR_DESCS
public boolean armorCheck(MOB mob, int allowedArmorLevel)
CMMiscUtils
armorCheck
in interface CMMiscUtils
mob
- the mob to checkallowedArmorLevel
- the allowed armor level
CharClass.ARMOR_DESCS
public java.util.List<DeadBody> getDeadBodies(Environmental E)
CMMiscUtils
getDeadBodies
in interface CMMiscUtils
E
- the container that possibly has corpses
public boolean canBePlayerDestroyed(MOB mob, Item I, boolean ignoreBodies, boolean ignoreWeight)
CMMiscUtils
canBePlayerDestroyed
in interface CMMiscUtils
mob
- the mob who wants to destroy the itemI
- the item to destroyignoreBodies
- true to ignore corpse checks, false otherwiseignoreWeight
- TODO
protected TriadVector<java.lang.Integer,java.lang.Integer,MaskingLibrary.CompiledZMask> parseLootPolicyFor(MOB mob)
public void confirmWearability(MOB mob)
CMMiscUtils
confirmWearability
in interface CMMiscUtils
mob
- the mob to confirm the equipment ofpublic Item ruinItem(Item I)
CMMiscUtils
ruinItem
in interface CMMiscUtils
I
- the item to ruin
CMMiscUtils.isRuinedLoot(MOB, Item)
public Item isRuinedLoot(MOB mob, Item I)
CMMiscUtils
isRuinedLoot
in interface CMMiscUtils
mob
- the mob to get ruin policies forI
- the item to potentially ruin
public void reloadCharClasses(CharClass oldC)
CMMiscUtils
reloadCharClasses
in interface CMMiscUtils
oldC
- the old charclass objectCMMiscUtils.swapRaces(Race, Race)
public void swapRaces(Race newR, Race oldR)
CMMiscUtils
swapRaces
in interface CMMiscUtils
newR
- the new race objectoldR
- the old race objectCMMiscUtils.reloadCharClasses(CharClass)
public boolean resurrect(MOB tellMob, Room corpseRoom, DeadBody body, int XPLevel)
CMMiscUtils
resurrect
in interface CMMiscUtils
tellMob
- if the corpse could not be resurrected, tell this mob.corpseRoom
- room to bring the mob to after resurrection, probably same as body's locationbody
- the corpse to resurrectXPLevel
- if > 0, and rules allow, bonus xp restored
public long[][] compileConditionalRange(java.util.List<java.lang.String> condV, int numDigits, int startOfRange, int endOfRange)
CMMiscUtils
compileConditionalRange
in interface CMMiscUtils
condV
- the list of fully expressionsnumDigits
- the min number of digits in each expressionstartOfRange
- the starting range to returnendOfRange
- the ending range to return > startOfRange
public java.util.List<Item> deepCopyOf(Item oldItem)
CMMiscUtils
deepCopyOf
in interface CMMiscUtils
oldItem
- the container or item to copy
public java.lang.String builtPrompt(MOB mob, java.lang.String prompt)
CMMiscUtils
builtPrompt
in interface CMMiscUtils
mob
- the mob to build a prompt forprompt
- TODO
protected java.lang.String raceMixRuleCheck(java.lang.String rule, java.lang.String urace1, java.lang.String urace2)
public java.lang.String getUnsubscribeURL(java.lang.String name)
CMMiscUtils
getUnsubscribeURL
in interface CMMiscUtils
name
- the account or player name
public java.util.List<Race> getConstituantRaces(java.lang.String raceID)
CMMiscUtils
getConstituantRaces
in interface CMMiscUtils
raceID
- the raceID to break apart
public PairList<Item,java.lang.Long> getSeenEquipment(MOB mob, long wornMask)
CMMiscUtils
getSeenEquipment
in interface CMMiscUtils
mob
- the mob to get equipment fromwornMask
- 0, or a bitmap of allowed wear locations
public Race getMixedRace(java.lang.String race1, java.lang.String race2, boolean ignoreRules)
CMMiscUtils
getMixedRace
in interface CMMiscUtils
race1
- the mother racerace2
- the father raceignoreRules
- TODO
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |