|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Abilities.StdAbility
com.planet_ink.coffee_mud.Abilities.Traps.StdTrap
public class StdTrap
| Field Summary | |
|---|---|
protected int |
ableCode
|
protected boolean |
disabled
|
protected java.util.List<java.lang.String> |
newMessaging
|
protected int |
reset
|
PairVector<MOB,java.lang.Integer> |
safeDirs
|
protected boolean |
sprung
|
static java.lang.String[] |
TRIGGER
|
| Fields inherited from class com.planet_ink.coffee_mud.Abilities.StdAbility |
|---|
affected, amDestroyed, canBeUninvoked, empty, invoker, isAnAutoEffect, lastCastHelp, miscText, proficiency, savable, tickDown, unInvoked |
| Fields inherited from interface com.planet_ink.coffee_mud.Abilities.interfaces.Trap |
|---|
TRAP_GAS, TRAP_NEEDLE, TRAP_PIT_BLADE, TRAP_SPELL |
| Constructor Summary | |
|---|---|
StdTrap()
|
|
| Method Summary | |
|---|---|
int |
abilityCode()
Returns an optional numeric value whose purpose is entirely contextual. |
int |
abstractQuality()
Returns a constant value notifying the system of the general quality of the skill, whether it is malicious, beneficial, indifferent, or qualifiably beneficial (ok), as well as whether it is intended to target the invoker (self) or others. |
void |
activateBomb()
When called, this will cause the bomb to begin its countdown to going off, which can differ from bomb-to-bomb. |
int |
baseDestructTime(int level)
|
int |
baseRejuvTime(int level)
|
protected int |
canAffectCode()
Designates whether, when used as a property/effect, what sort of objects this ability can affect. |
protected boolean |
canInvokeTrapOn(MOB invoker,
MOB target)
|
boolean |
canReSetTrap(MOB mob)
Returns whether the given mob, at the given level, is allowed to re-set this trap. |
boolean |
canSetTrapOn(MOB mob,
Physical P)
Returns whether the given trapper is currently in a position to set this trap on the specified object. |
protected int |
canTargetCode()
Designates whether, when invoked as a skill, what sort of objects this ability can effectively target. |
int |
classificationCode()
Returns a bitmap describing the general classification of the skill (spell, skill, chant, or property, etc) and its domain. |
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
protected void |
destroyResources(Room room,
int resource,
int number)
|
void |
disable()
Causes the trap to become disabled and inert. |
boolean |
disabled()
Whether this trap has been disabled, as by a thief |
boolean |
doesSaveVsTraps(MOB target)
|
int |
enchantQuality()
Identical to abstractQuality() method, but returns a quality based on how the skill or spell behaves as a spell effect on a weapon or on armor. |
void |
executeMsg(Environmental myHost,
CMMsg msg)
The general message event handler for the object. |
protected RawMaterial |
findFirstResource(Room room,
int resource)
|
protected RawMaterial |
findMostOfMaterial(Room room,
int material)
|
protected int |
findNumberOfResource(Room room,
RawMaterial resource)
|
int |
getReset()
Return the number of ticks after a trap has been sprung before it will automatically reset itself for another victim. |
PairVector<MOB,java.lang.Integer> |
getSafeDirs()
|
java.util.List<Item> |
getTrapComponents()
Returns a sample set of the components used to make this trap. |
boolean |
getTravelThroughFlag()
|
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
boolean |
invoke(MOB mob,
java.util.List<java.lang.String> commands,
Physical givenTarget,
boolean auto,
int asLevel)
This method is called when a player or the system invokes this skill, casts this spell, etc. |
MOB |
invoker()
Always returns the mob that invoked or initiated the skill or effect. |
boolean |
isABomb()
Returns whether this trap is a bomb, with delayed effect. |
boolean |
isLocalExempt(MOB target)
|
boolean |
maySetTrap(MOB mob,
int asLevel)
Returns whether the given mob, at the given level, is allowed to set this trap. |
java.lang.String |
name()
The nice displayable name of this instance of this object |
boolean |
okMessage(Environmental myHost,
CMMsg msg)
The general message event previewer for the object. |
java.lang.String |
requiresToSet()
A simple display string describing the conditions necesssary to get the canSetTrapOn method to return true. |
void |
resetTrap(MOB mob)
Causes the trap to become reset and unsprung. |
void |
setAbilityCode(int code)
Sets an optional numeric value whose purpose is entirely contextual. |
void |
setInvoker(MOB mob)
Sets or changes the mob that invoked or initated the skill or effect. |
void |
setMiscText(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. |
void |
setReset(int Reset)
Sets the number of ticks to wait after a trap has been sprung, before it will automatically reset for another victim. |
Trap |
setTrap(MOB mob,
Physical P,
int trapBonus,
int qualifyingClassLevel,
boolean perm)
Completed the task of setting a trap on a given object. |
void |
spring(MOB target)
This method causes this trap to take affect against the given target. |
boolean |
sprung()
Returns whether this trap has already been sprung (and is not yet reset) |
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. |
protected int |
trapLevel()
|
java.lang.String[] |
triggerStrings()
A set of the command strings the user types to access this command when it is listed as a skill ability. |
| 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.Abilities.interfaces.Ability |
|---|
accountForYourself, adjustedLevel, affecting, appropriateToMyFactions, autoInvocation, bubbleAffect, canAffect, canAffect, canBeLearnedBy, canBePracticedBy, canBeTaughtBy, canBeUninvoked, canTarget, canTarget, castingQuality, castingTime, checkedCastingCost, combatCastingTime, externalFiles, flags, getTrainingCost, helpProficiency, invoke, isAutoInvoked, isNowAnAutoEffect, makeLongLasting, makeNonUninvokable, practice, preInvoke, proficiency, proficiencyCheck, putInCommandlist, requirements, setAffectedOne, setProficiency, startTickDown, teach, unInvoke, usageCost, usageType |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental |
|---|
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setName |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting |
|---|
affectCharState, affectCharStats, affectPhyStats |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
|---|
amDestroyed, destroy, isSavable, setSavable |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
|---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
| Field Detail |
|---|
public static final java.lang.String[] TRIGGER
protected boolean sprung
protected int reset
protected int ableCode
protected boolean disabled
protected java.util.List<java.lang.String> newMessaging
public PairVector<MOB,java.lang.Integer> safeDirs
| Constructor Detail |
|---|
public StdTrap()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectID in class StdAbilitypublic java.lang.String name()
Tickable
name in interface CMObjectname in interface Tickablename in class StdAbilityEnvironmental.Name()public java.lang.String[] triggerStrings()
Ability
triggerStrings in interface AbilitytriggerStrings in class StdAbilityAbility.putInCommandlist()public int abstractQuality()
Ability
abstractQuality in interface AbilityabstractQuality in class StdAbilityAbilitypublic int enchantQuality()
Ability
enchantQuality in interface AbilityenchantQuality in class StdAbilityAbility.abstractQuality(),
Abilityprotected int canAffectCode()
StdAbility
canAffectCode in class StdAbilityAbilityprotected int canTargetCode()
StdAbility
canTargetCode in class StdAbilityAbilityprotected int trapLevel()
public void setAbilityCode(int code)
Ability
setAbilityCode in interface AbilitysetAbilityCode in class StdAbilitycode - the optional numeric value or enhancementpublic int abilityCode()
Ability
abilityCode in interface AbilityabilityCode in class StdAbilitypublic boolean isABomb()
Trap
isABomb in interface Trappublic java.lang.String requiresToSet()
Trap
requiresToSet in interface TrapTrap.canSetTrapOn(MOB, Physical)public int baseRejuvTime(int level)
public int baseDestructTime(int level)
public boolean getTravelThroughFlag()
public boolean disabled()
Trap
disabled in interface TrapTrap.disable()public boolean doesSaveVsTraps(MOB target)
public boolean isLocalExempt(MOB target)
protected boolean canInvokeTrapOn(MOB invoker,
MOB target)
public void disable()
Trap
disable in interface TrapTrap.disabled()public void setReset(int Reset)
Trap
setReset in interface TrapReset - the number of ticks between usesTrap.getReset()public int getReset()
Trap
getReset in interface TrapTrap.setReset(int)public MOB invoker()
Ability
invoker in interface Abilityinvoker in class StdAbilityMOB,
Ability.setInvoker(MOB)public int classificationCode()
Ability
classificationCode in interface AbilityclassificationCode in class StdAbilityAbilitypublic void setMiscText(java.lang.String text)
Environmental
setMiscText in interface EnvironmentalsetMiscText in class StdAbilitytext - either an open internal text string, or XMLpublic java.lang.String text()
Environmental
text in interface Environmentaltext in class StdAbilitypublic PairVector<MOB,java.lang.Integer> getSafeDirs()
public CMObject copyOf()
CMObject
copyOf in interface CMObjectcopyOf in class StdAbility
public boolean okMessage(Environmental myHost,
CMMsg msg)
MsgListener
okMessage in interface MsgListenerokMessage in class StdAbilitymyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executed
CMMsg,
CMMsg.source()public void activateBomb()
Trap
activateBomb in interface Trap
public void executeMsg(Environmental myHost,
CMMsg msg)
MsgListener
executeMsg in interface MsgListenerexecuteMsg in class StdAbilitymyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsg
public boolean maySetTrap(MOB mob,
int asLevel)
Trap
maySetTrap in interface Trapmob - the trap setter to checkasLevel - the level of the trapper, compared to this traps internal level
Trap.canSetTrapOn(MOB, Physical),
Trap.setTrap(MOB, Physical, int, int, boolean)public boolean canReSetTrap(MOB mob)
Trap
canReSetTrap in interface Trapmob - the trap setter to check
Trap.canSetTrapOn(MOB, Physical),
Trap.resetTrap(MOB)
public boolean canSetTrapOn(MOB mob,
Physical P)
Trap
canSetTrapOn in interface Trapmob - the trapperP - the object this trap will be set upon
Trap.maySetTrap(MOB, int),
Trap.setTrap(MOB, Physical, int, int, boolean)public java.util.List<Item> getTrapComponents()
Trap
getTrapComponents in interface Trap
public Trap setTrap(MOB mob,
Physical P,
int trapBonus,
int qualifyingClassLevel,
boolean perm)
Trap
setTrap in interface Trapmob - the trapperP - the object to set the trap ontrapBonus - any bonus to the traps effectiveness (0 is normal)qualifyingClassLevel - the class-level at which the trapper qualified for this trapperm - true to make the trap reset after being triggered or disarmed, false to destroy
public void setInvoker(MOB mob)
Ability
setInvoker in interface AbilitysetInvoker in class StdAbilitymob - the invoker mobMOB,
Ability.invoker()
public boolean tick(Tickable ticking,
int tickID)
Tickable
tick in interface Tickabletick in class StdAbilityticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable,
ServiceEngine,
TickableGrouppublic void resetTrap(MOB mob)
Trap
resetTrap in interface Trapmob - the person resetting the trapTrap.canReSetTrap(MOB)public boolean sprung()
Trap
sprung in interface TrapTrap.spring(MOB)public void spring(MOB target)
Trap
spring in interface Traptarget - the target of the effectTrap.sprung()
protected RawMaterial findFirstResource(Room room,
int resource)
protected RawMaterial findMostOfMaterial(Room room,
int material)
protected void destroyResources(Room room,
int resource,
int number)
protected int findNumberOfResource(Room room,
RawMaterial resource)
public boolean invoke(MOB mob,
java.util.List<java.lang.String> commands,
Physical givenTarget,
boolean auto,
int asLevel)
Ability
invoke in interface Abilityinvoke in class StdAbilitymob - the player or mob invoking the skillcommands - the parameters entered for the skill (minus trigger word)givenTarget - null, unless being auto-invoked. Represents an override target.auto - false if player enters command, true if system invokes the commandasLevel - -1, unless being auto-invoked, when it is the level to invoke it at.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||