CMObject
, Tickable
, CMLibrary
, MaskingLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class MUDZapper extends StdLibrary implements MaskingLibrary
Modifier and Type | Class | Description |
---|---|---|
static class |
MUDZapper.CompiledZapperMaskEntryImpl |
|
static class |
MUDZapper.CompiledZapperMaskImpl |
MaskingLibrary.CompiledZMask, MaskingLibrary.CompiledZMaskEntry, MaskingLibrary.ZapperKey
Modifier and Type | Field | Description |
---|---|---|
protected java.util.Map<MaskingLibrary.ZapperKey,java.util.TreeMap<java.lang.String,java.lang.Object>> |
compiledCache |
|
protected java.util.TreeMap<java.lang.String,MUDZapper.CompiledZapperMaskEntryImpl> |
looseCodesCache |
|
protected java.lang.String[] |
looseFinalLevels |
|
protected Item |
nonCrashingItem |
|
protected MOB |
nonCrashingMOB |
|
protected java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedClass> |
savedCharClasses |
|
protected long |
savedClassUpdateTime |
|
protected java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedRace> |
savedRaces |
|
protected java.util.Map<java.lang.String,MaskingLibrary.ZapperKey> |
zapCodes |
idConverter
isDebugging, name, serviceClient, tickStatus
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
MUDZapper() |
Modifier and Type | Method | Description |
---|---|---|
protected int |
appendCommaList(java.lang.StringBuilder buf,
java.util.List<java.lang.String> V,
int v) |
|
protected int |
appendCommaList(java.lang.StringBuilder buf,
java.util.List<java.lang.String> V,
int v,
java.lang.String startChar) |
|
void |
buildSavedClasses() |
|
java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedClass> |
charClasses() |
|
protected boolean |
checkLocation(Environmental E,
MOB M,
Room R,
java.lang.Object o,
java.lang.Object p) |
|
int |
countQuals(java.util.List<java.lang.String> V,
int v,
java.lang.String startsWith) |
|
MaskingLibrary.CompiledZMask |
createEmptyMask() |
Creates an empty always-passing compiled zappermask
object.
|
protected int |
determineSeasonCode(java.lang.String str) |
|
protected boolean |
doZapperCompare(MaskingLibrary.CompiledZMaskEntry entry,
int cl,
int i) |
|
protected boolean |
evaluateSkillFlagObject(java.lang.Object o,
Ability A) |
|
protected MaskingLibrary.CompiledZMaskEntry[] |
fixEntrySet(MaskingLibrary.CompiledZMaskEntry entry) |
|
protected int |
fromHereStartsWith(java.util.List<java.lang.String> lV,
int v,
java.lang.StringBuilder str,
MaskingLibrary.ZapperKey key) |
|
protected int |
fromHereStartsWith(java.util.List<java.lang.String> lV,
int v,
java.util.List<java.lang.Object> parms,
MaskingLibrary.ZapperKey key) |
|
java.util.List<java.lang.String> |
getAbilityEduReqs(java.lang.String text) |
If the given zappermask contains any references to ability or
expertise requirements, this will return the IDs of the
required object.
|
protected CharStats |
getBaseCharStats(CharStats base,
MOB mob) |
|
java.util.TreeMap<java.lang.String,java.lang.Object> |
getCompiledCache(MaskingLibrary.ZapperKey key) |
|
java.util.TreeMap<java.lang.String,MUDZapper.CompiledZapperMaskEntryImpl> |
getLooseCodes() |
|
protected java.util.Map<java.lang.String,MaskingLibrary.ZapperKey> |
getMaskCodes() |
|
MaskingLibrary.CompiledZMask |
getPreCompiledMask(java.lang.String str) |
Given a zappermask, this will check the internal cache for an
already compiled version of the given string, build a new one
if necessary, and return it
|
protected Faction.FRange |
getRange(java.lang.String s) |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
protected boolean |
isDateMatch(java.lang.Object o,
int num) |
|
protected MaskingLibrary.CompiledZMaskEntry |
levelCompiledHelper(java.lang.String str,
char c) |
|
protected java.lang.StringBuilder |
levelHelp(java.lang.String lvl,
char c,
java.lang.String append) |
|
protected int |
levelMinHelp(java.lang.String lvl,
char c,
int minMinLevel,
boolean reversed) |
|
protected java.lang.Object |
makeSkillFlagObject(java.lang.String str) |
|
protected boolean |
maskCheck(MaskingLibrary.CompiledZMaskEntry[] cset,
Environmental E,
boolean actual) |
|
boolean |
maskCheck(MaskingLibrary.CompiledZMask cset,
Environmental E,
boolean actual) |
Given a compiled zappermask and a Environmental object, this will return whether the
Environmental passes the filter, or is rejected by it.
|
boolean |
maskCheck(MaskingLibrary.CompiledZMask cset,
PlayerLibrary.ThinPlayer E) |
Given a compiled zappermask and a ThinPlayer object, this will return whether the
ThinPlayer passes the filter, or is rejected by it.
|
boolean |
maskCheck(java.lang.String text,
Environmental E,
boolean actual) |
Given a zappermask and a Environmental object, this will return whether the
Environmental passes the filter, or is rejected by it.
|
boolean |
maskCheck(java.lang.String text,
PlayerLibrary.ThinPlayer E) |
Given a zappermask and a ThinPlayer object, this will return whether the
ThinPlayer passes the filter, or is rejected by it.
|
protected boolean |
maskCheckSubEntries(MaskingLibrary.CompiledZMaskEntry[] set,
Environmental E,
boolean actual,
MOB mob,
Item item,
Room room,
Physical P) |
|
protected boolean |
maskCheckSubEntries(MaskingLibrary.CompiledZMaskEntry[] set,
PlayerLibrary.ThinPlayer E) |
|
MaskingLibrary.CompiledZMask |
maskCompile(java.lang.String text) |
Given a zappermask, this will return a compiled version of the
given string, build a new one if necessary, and return it
|
java.lang.String |
maskDesc(java.lang.String text) |
Given a zappermask, this will return a brief readable english
description of the mask.
|
java.lang.String |
maskDesc(java.lang.String text,
boolean skipFirstWord) |
Given a zappermask, this will return a brief readable english
description of the mask.
|
java.lang.String |
maskHelp(java.lang.String CR,
java.lang.String word) |
Returns the official help file for the list of all
zappermask codes, customized for the caller.
|
protected boolean |
matchesLooseCode(java.lang.String str) |
|
int |
minMaskLevel(java.lang.String text,
int minMinLevel) |
Given a zappermask string, this method will find any level-check
related criteria, such as level, classlevel, or maxclasslevel,
and returns the minimum level of the criteria.
|
protected boolean |
multipleQuals(java.util.List<java.lang.String> V,
int v,
java.lang.String startsWith) |
|
protected Item |
nonCrashingItem(MOB mob) |
|
protected MOB |
nonCrashingMOB() |
|
protected Room |
outdoorRoom(Area A) |
|
java.lang.String[] |
parseMaskKeys(java.lang.String maskStr) |
Parses the given string, returning all of the zappermask
keys in the order in which they appear.
|
java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedRace> |
races() |
|
protected java.lang.String |
rawMaskHelp() |
|
java.lang.String[] |
separateMaskStrs(java.lang.String newText) |
Lots of property strings support including zappermasks
by including the string MASK= followed by the remainder of
the string being the zappermask.
|
java.lang.String |
separateZapperMask(java.lang.String newText) |
Lots of props and behaviors support embedded
zappermasks, but they aren't delineated.
|
protected boolean |
skillFlagCheck(java.util.List<java.lang.String> V,
char plusMinus,
int fromHere,
MOB mob) |
|
boolean |
syntaxCheck(java.lang.String mask,
java.util.List<java.lang.String> errorSink) |
Parses the given string as a zappermask and returns true
if any parsed bit is a valid zappermask type word.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, initializeClass, name, newInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick
protected final java.util.Map<java.lang.String,MaskingLibrary.ZapperKey> zapCodes
protected volatile java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedClass> savedCharClasses
protected volatile java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedRace> savedRaces
protected volatile long savedClassUpdateTime
protected final java.util.Map<MaskingLibrary.ZapperKey,java.util.TreeMap<java.lang.String,java.lang.Object>> compiledCache
protected final java.util.TreeMap<java.lang.String,MUDZapper.CompiledZapperMaskEntryImpl> looseCodesCache
protected final java.lang.String[] looseFinalLevels
protected MOB nonCrashingMOB
protected Item nonCrashingItem
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
protected MOB nonCrashingMOB()
protected java.lang.String rawMaskHelp()
public void buildSavedClasses()
public final java.util.TreeMap<java.lang.String,MUDZapper.CompiledZapperMaskEntryImpl> getLooseCodes()
public final java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedClass> charClasses()
public final java.util.List<com.planet_ink.coffee_mud.Libraries.MUDZapper.SavedRace> races()
public final java.util.TreeMap<java.lang.String,java.lang.Object> getCompiledCache(MaskingLibrary.ZapperKey key)
public MaskingLibrary.CompiledZMask getPreCompiledMask(java.lang.String str)
MaskingLibrary
getPreCompiledMask
in interface MaskingLibrary
str
- the zappermask stringMaskingLibrary.maskCompile(String)
public MaskingLibrary.CompiledZMask createEmptyMask()
MaskingLibrary
createEmptyMask
in interface MaskingLibrary
protected java.util.Map<java.lang.String,MaskingLibrary.ZapperKey> getMaskCodes()
public java.lang.String maskHelp(java.lang.String CR, java.lang.String word)
MaskingLibrary
maskHelp
in interface MaskingLibrary
CR
- null, or the type of EOL string to use.word
- null, or a substitute for the word 'disallow'protected MaskingLibrary.CompiledZMaskEntry[] fixEntrySet(MaskingLibrary.CompiledZMaskEntry entry)
protected java.lang.Object makeSkillFlagObject(java.lang.String str)
protected boolean checkLocation(Environmental E, MOB M, Room R, java.lang.Object o, java.lang.Object p)
protected boolean evaluateSkillFlagObject(java.lang.Object o, Ability A)
protected boolean skillFlagCheck(java.util.List<java.lang.String> V, char plusMinus, int fromHere, MOB mob)
protected MaskingLibrary.CompiledZMaskEntry levelCompiledHelper(java.lang.String str, char c)
protected java.lang.StringBuilder levelHelp(java.lang.String lvl, char c, java.lang.String append)
protected int determineSeasonCode(java.lang.String str)
protected int levelMinHelp(java.lang.String lvl, char c, int minMinLevel, boolean reversed)
protected boolean matchesLooseCode(java.lang.String str)
protected int fromHereStartsWith(java.util.List<java.lang.String> lV, int v, java.util.List<java.lang.Object> parms, MaskingLibrary.ZapperKey key)
protected int fromHereStartsWith(java.util.List<java.lang.String> lV, int v, java.lang.StringBuilder str, MaskingLibrary.ZapperKey key)
protected Faction.FRange getRange(java.lang.String s)
public java.lang.String maskDesc(java.lang.String text)
MaskingLibrary
maskDesc
in interface MaskingLibrary
text
- the ZapperMask stringMaskingLibrary.maskDesc(String, boolean)
public int countQuals(java.util.List<java.lang.String> V, int v, java.lang.String startsWith)
protected boolean multipleQuals(java.util.List<java.lang.String> V, int v, java.lang.String startsWith)
protected int appendCommaList(java.lang.StringBuilder buf, java.util.List<java.lang.String> V, int v, java.lang.String startChar)
protected int appendCommaList(java.lang.StringBuilder buf, java.util.List<java.lang.String> V, int v)
public java.lang.String[] parseMaskKeys(java.lang.String maskStr)
MaskingLibrary
parseMaskKeys
in interface MaskingLibrary
maskStr
- the full zappermask stringpublic java.lang.String maskDesc(java.lang.String text, boolean skipFirstWord)
MaskingLibrary
maskDesc
in interface MaskingLibrary
text
- the ZapperMask stringskipFirstWord
- true to skip the word 'allows'MaskingLibrary.maskDesc(String)
protected final boolean isDateMatch(java.lang.Object o, int num)
public boolean syntaxCheck(java.lang.String mask, java.util.List<java.lang.String> errorSink)
MaskingLibrary
syntaxCheck
in interface MaskingLibrary
mask
- the postential zappermaskerrorSink
- the list to put the error message inpublic java.util.List<java.lang.String> getAbilityEduReqs(java.lang.String text)
MaskingLibrary
getAbilityEduReqs
in interface MaskingLibrary
text
- the zappermaskpublic int minMaskLevel(java.lang.String text, int minMinLevel)
MaskingLibrary
minMaskLevel
in interface MaskingLibrary
text
- the zappermaskminMinLevel
- the default floor to returnpublic MaskingLibrary.CompiledZMask maskCompile(java.lang.String text)
MaskingLibrary
maskCompile
in interface MaskingLibrary
text
- the zappermask stringMaskingLibrary.getPreCompiledMask(String)
public boolean maskCheck(java.lang.String text, Environmental E, boolean actual)
MaskingLibrary
maskCheck
in interface MaskingLibrary
text
- the zappermask to apply to the playerE
- the object to apply the pas toactual
- true to use base stats, false for adjustedMaskingLibrary.maskCheck(CompiledZMask, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(String, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(CompiledZMask, Environmental, boolean)
protected boolean maskCheck(MaskingLibrary.CompiledZMaskEntry[] cset, Environmental E, boolean actual)
public boolean maskCheck(MaskingLibrary.CompiledZMask cset, Environmental E, boolean actual)
MaskingLibrary
maskCheck
in interface MaskingLibrary
cset
- the compiled zappermask to apply to the playerE
- the object to apply the pas toactual
- true to use base stats, false for adjustedMaskingLibrary.maskCheck(CompiledZMask, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(String, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(String, Environmental, boolean)
protected boolean doZapperCompare(MaskingLibrary.CompiledZMaskEntry entry, int cl, int i)
protected boolean maskCheckSubEntries(MaskingLibrary.CompiledZMaskEntry[] set, Environmental E, boolean actual, MOB mob, Item item, Room room, Physical P)
public boolean maskCheck(java.lang.String text, PlayerLibrary.ThinPlayer E)
MaskingLibrary
maskCheck
in interface MaskingLibrary
text
- the zappermask to apply to the playerE
- the thinplayer objectPlayerLibrary.ThinPlayer
,
MaskingLibrary.maskCheck(CompiledZMask, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(CompiledZMask, Environmental, boolean)
,
MaskingLibrary.maskCheck(String, Environmental, boolean)
public boolean maskCheck(MaskingLibrary.CompiledZMask cset, PlayerLibrary.ThinPlayer E)
MaskingLibrary
maskCheck
in interface MaskingLibrary
cset
- the compiled zappermask to apply to the playerE
- the thinplayer objectPlayerLibrary.ThinPlayer
,
MaskingLibrary.maskCheck(String, com.planet_ink.coffee_mud.Libraries.interfaces.PlayerLibrary.ThinPlayer)
,
MaskingLibrary.maskCheck(CompiledZMask, Environmental, boolean)
,
MaskingLibrary.maskCheck(String, Environmental, boolean)
protected boolean maskCheckSubEntries(MaskingLibrary.CompiledZMaskEntry[] set, PlayerLibrary.ThinPlayer E)
public java.lang.String separateZapperMask(java.lang.String newText)
MaskingLibrary
separateZapperMask
in interface MaskingLibrary
newText
- the string to searchpublic java.lang.String[] separateMaskStrs(java.lang.String newText)
MaskingLibrary
separateMaskStrs
in interface MaskingLibrary
newText
- the property parameters