com.planet_ink.coffee_mud.Abilities
Class StdAbility

java.lang.Object
  extended by com.planet_ink.coffee_mud.Abilities.StdAbility
All Implemented Interfaces:
Ability, CMObject, Contingent, Environmental, Modifiable, MsgListener, StatsAffecting, Tickable, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
Addictions, Adorable, Age, Allergies, Amputation, Antidote, ArchonSkill, AutoStack, BadReputation, Banishment, BardSkill, Bleeding, Blessing, BrokenLimbs, Burning, Chant, CombatFrenzy, CombatSleep, CommonSkill, Copyright, Dance, DiligentStudying, Disease, Disease_MummyRot, DiseaseCure, Dragonbreath, Druid_AquaticPass, Druid_Bite, Druid_DruidicPass, Druid_GolemForm, Druid_KnowPlants, Druid_MyPlants, Druid_PackCall, Druid_PlantForm, Druid_RecoverVoice, Druid_Rend, Druid_SeaLore, Druid_ShapeShift, Druid_WaterCover, Dueler, ExtAbility, Falling, Familiarity_Armor, Familiarity_Shield, Familiarity_Weapon, Fighter_CrescentKick, Fighter_SnapKick, FighterSkill, FoodBegging, Gait, GenAbility, Gore, GravityFloat, Grazing, Hamstring, Immunities, Injury, ItemRejuv, Loyalty, Milkable, Mood, Paladin_Breakup, Paladin_CommandHorse, Paladin_Defend, Paladin_HealingHands, Paladin_HolyStrike, Paladin_MountedCharge, Paladin_SummonMount, PaladinSkill, Paralysis, PlanarAbility, Play, Poison, PoisonousBite, Prayer, Pregnancy, PresenceReaction, Prisoner, Proficiency_Weapon, QuickSwipe, Quills, Ranger_AnimalFrenzy, Ranger_Camouflage, Ranger_Enemy1, Ranger_FierceCompanions, Ranger_FindWater, Ranger_Hide, Ranger_HuntersEndurance, Ranger_SenseTraps, Ranger_SetSnare, Ranger_Sneak, Ranger_Track, Ranger_TrackAnimal, Ranger_WoodlandCreep, Ranger_WoodlandLore, Regeneration, Scavenge, Shaming, ShootWeb, Sinking, Skill_BearForaging, Skill_FindHome, Skill_FindShip, Skill_TrackFriend, SlowLearner, SmellsLikeCherries, Soiled, Song, SoundEcho, Specialization_Armor, Specialization_SiegeWeapon, Specialization_Weapon, Spell, StdLanguage, StdSkill, StdTrap, Stigma, SuperPower, TechSkill, TemporaryAffects, TemporaryImmunity, ThiefSkill, ThrowFeces, Trap_Trap, Truce, Undead_ColdTouch, Undead_EnergyDrain, Undead_LifeDrain, Undead_WeakEnergyDrain, WanderHomeLater, WeakParalysis, WildTagTurf, WingFlying

public class StdAbility
extends java.lang.Object
implements Ability


Field Summary
protected  Physical affected
           
protected  boolean amDestroyed
           
protected  boolean canBeUninvoked
           
static java.lang.String[] empty
           
protected  MOB invoker
           
protected  boolean isAnAutoEffect
           
protected  long lastCastHelp
           
protected  java.lang.String miscText
           
protected  int proficiency
           
protected  boolean savable
           
protected  int tickDown
           
protected  boolean unInvoked
           
 
Fields inherited from interface com.planet_ink.coffee_mud.Abilities.interfaces.Ability
ACODE_CHANT, ACODE_COMMON_SKILL, ACODE_DESCS, ACODE_DESCS_, ACODE_DISEASE, ACODE_LANGUAGE, ACODE_POISON, ACODE_PRAYER, ACODE_PROPERTY, ACODE_SKILL, ACODE_SONG, ACODE_SPELL, ACODE_SUPERPOWER, ACODE_TECH, ACODE_THIEF_SKILL, ACODE_TRAP, ALL_ACODES, ALL_DOMAINS, CACHEINDEX_CLASSLESS, CACHEINDEX_EXPERTISE, CACHEINDEX_NORMAL, CACHEINDEX_TOTAL, CAN_AREAS, CAN_DESCS, CAN_EXITS, CAN_ITEMS, CAN_MOBS, CAN_ROOMS, COST_ALL, COST_NORMAL, COST_PCT, DOMAIN_ABJURATION, DOMAIN_ACROBATIC, DOMAIN_ALERT, DOMAIN_ALTERATION, DOMAIN_ANATOMY, DOMAIN_ANIMALAFFINITY, DOMAIN_ARCANELORE, DOMAIN_ARCHON, DOMAIN_ARMORUSE, DOMAIN_ARTISTIC, DOMAIN_BINDING, DOMAIN_BLESSING, DOMAIN_BREEDING, DOMAIN_BUILDINGSKILL, DOMAIN_CALLIGRAPHY, DOMAIN_COMBATFLUIDITY, DOMAIN_COMBATLORE, DOMAIN_COMMUNING, DOMAIN_CONJURATION, DOMAIN_CORRUPTION, DOMAIN_CRAFTINGSKILL, DOMAIN_CREATION, DOMAIN_CRIMINAL, DOMAIN_CURSING, DOMAIN_DANCING, DOMAIN_DEATHLORE, DOMAIN_DECEPTIVE, DOMAIN_DEEPMAGIC, DOMAIN_DESCS, DOMAIN_DETRAP, DOMAIN_DIRTYFIGHTING, DOMAIN_DIVINATION, DOMAIN_EDUCATIONLORE, DOMAIN_ENCHANTMENT, DOMAIN_ENDURING, DOMAIN_EPICUREAN, DOMAIN_EVANGELISM, DOMAIN_EVASIVE, DOMAIN_EVOCATION, DOMAIN_FITNESS, DOMAIN_FOOLISHNESS, DOMAIN_GATHERINGSKILL, DOMAIN_GRAPPLING, DOMAIN_HEALING, DOMAIN_HOLYPROTECTION, DOMAIN_ILLUSION, DOMAIN_INFLUENTIAL, DOMAIN_KICKING, DOMAIN_LEGAL, DOMAIN_MARTIALLORE, DOMAIN_MOONALTERING, DOMAIN_MOONSUMMONING, DOMAIN_NATURELORE, DOMAIN_NEUTRALIZATION, DOMAIN_PLANTCONTROL, DOMAIN_PLANTGROWTH, DOMAIN_PLAYING, DOMAIN_POISONING, DOMAIN_PRESERVING, DOMAIN_PUNCHING, DOMAIN_RACIALABILITY, DOMAIN_RESTORATION, DOMAIN_ROCKCONTROL, DOMAIN_SEATRAVEL, DOMAIN_SHAPE_SHIFTING, DOMAIN_SHIELDUSE, DOMAIN_SINGING, DOMAIN_STEALING, DOMAIN_STEALTHY, DOMAIN_STREETSMARTS, DOMAIN_THEATRE, DOMAIN_TRANSMUTATION, DOMAIN_TRAPPING, DOMAIN_VERBS, DOMAIN_VEXING, DOMAIN_WARDING, DOMAIN_WATERCONTROL, DOMAIN_WATERLORE, DOMAIN_WEAPON_USE, DOMAIN_WEATHER_MASTERY, FLAG_ADJUSTER, FLAG_AGGROFYING, FLAG_AIRBASED, FLAG_BINDING, FLAG_CASTER, FLAG_CHARMING, FLAG_CLANMAGIC, FLAG_DESCS, FLAG_EARTHBASED, FLAG_ENABLER, FLAG_FIREBASED, FLAG_HEALINGMAGIC, FLAG_HEATING, FLAG_HOLY, FLAG_IMMUNER, FLAG_INTOXICATING, FLAG_MINDALTERING, FLAG_MOVING, FLAG_NEUTRAL, FLAG_NOORDERING, FLAG_NOUNINVOKING, FLAG_PARALYZING, FLAG_POTENTIALLY_DEADLY, FLAG_RESISTER, FLAG_SUMMONING, FLAG_SUNSUMMONING, FLAG_TIDEALTERING, FLAG_TORTURING, FLAG_TRACKING, FLAG_TRANSPORTING, FLAG_UNCRAFTABLE, FLAG_UNHOLY, FLAG_WATERBASED, FLAG_WEATHERAFFECTING, FLAG_ZAPPER, QUALITY_BENEFICIAL_OTHERS, QUALITY_BENEFICIAL_SELF, QUALITY_DESCS, QUALITY_INDIFFERENT, QUALITY_MALICIOUS, QUALITY_OK_OTHERS, QUALITY_OK_SELF, RANGE_CHOICES, TICKS_ALMOST_FOREVER, TICKS_FOREVER, USAGE_DESCS, USAGE_HITPOINTS, USAGE_MANA, USAGE_MOVEMENT, USAGE_NADA, USAGEINDEX_HITPOINTS, USAGEINDEX_MANA, USAGEINDEX_MOVEMENT
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Constructor Summary
StdAbility()
           
 
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.
 java.lang.String accountForYourself()
          For use by the identify spell, this should return a nice description of any properties incorporated by this effect.
protected  int addedTickTime(MOB invokerMOB, int baseTickTime)
           
protected  int adjustBeneficialTickdownTime(MOB mob, Environmental target, int baseTicks)
           
 int adjustedLevel(MOB caster, int asLevel)
          This method calculates the strength level of this skill for the given mob, and taking into account the given override-level (asLevel).
protected  int adjustedMaxInvokerRange(int max)
           
protected  int adjustMaliciousTickdownTime(MOB mob, Physical target, int baseTicks, int asLevel)
           
 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.
 Physical affecting()
          Returns a reference to the room, item, mob, or exit that is currently being affected by this skill.
 void affectPhyStats(Physical affected, PhyStats affectableStats)
          This method is called by the recoverPhyStats() method on other Environmental objects.
 boolean amDestroyed()
          Whether the destroy() method has been previousy called on this object.
 boolean appropriateToMyFactions(MOB mob)
          Returns whether there are any Faction reasons why the given mob should not use this skill.
 boolean autoInvocation(MOB mob, boolean force)
          An autoinvocating ability is an ability which affects the mob just by having learned the ability.
 Ability beneficialAffect(MOB mob, Physical target, int asLevel, int tickAdjustmentFromStandard)
           
protected  boolean beneficialVisualFizzle(MOB mob, Environmental target, java.lang.String message)
           
protected  boolean beneficialWordsFizzle(MOB mob, Environmental target, java.lang.String message)
           
 boolean bubbleAffect()
          This method is used to modify the behavior of the affectPhyStats, affectCharStats, and affectCharState methods.
protected  int[] buildCostArray(MOB mob, int consumed, int minimum)
           
 boolean canAffect(int can_code)
          Returns whether, when used as a property/effect, this ability can affect the given type of object.
 boolean canAffect(Physical P)
          Returns whether, when used as a property/effect, this ability can affect the given object.
protected  int canAffectCode()
          Designates whether, when used as a property/effect, what sort of objects this ability can affect.
 boolean canBeLearnedBy(MOB teacher, MOB student)
          Returns whether the given student mob is able and allowed to learn this skill from the given teacher.
 boolean canBePracticedBy(MOB teacher, MOB student)
          Returns whether the given teacher mob is able and allowed to practice this skill with the given student *and* whether the student is able and allowed to practice this skill.
 boolean canBeTaughtBy(MOB teacher, MOB student)
          Returns whether the given teacher mob is able and allowed to teach this skill to the given student.
 boolean canBeUninvoked()
          Whether this skill is allowed to be uninvoked.
 boolean canTarget(int can_code)
          Returns whether, when used as a skill, this ability can target itself at an object of the given type.
 boolean canTarget(Physical P)
          Returns whether, when used as a skill, this ability can target itself at the given object.
protected  int canTargetCode()
          Designates whether, when invoked as a skill, what sort of objects this ability can effectively target.
 int castingQuality(MOB mob, Physical target)
          Serves a purpose similar to that of the Ability abstractQuality() method, but it determines a more exact quality based on a given invoker, target, and assumes an imminent use of the skill.
protected  int castingQuality(MOB mob, Physical target, int abstractQuality)
           
 double castingTime(MOB mob, java.util.List<java.lang.String> cmds)
          Returns the number of actions required to completely activate this skill.
protected  boolean checkComponents(MOB mob)
           
 double checkedCastingCost(MOB mob, java.util.List<java.lang.String> commands)
          Returns the number of actions required to completely activate this skill.
 int classificationCode()
          Returns a bitmap describing the general classification of the skill (spell, skill, chant, or property, etc) and its domain.
protected  void cloneFix(Ability E)
           
 double combatCastingTime(MOB mob, java.util.List<java.lang.String> cmds)
          Returns the number of actions required to completely activate this skill.
 int compareTo(CMObject o)
           
 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 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 displayText()
          Gets the raw string used to show what this object looks like in the room.
 boolean disregardsArmorCheck(MOB mob)
           
 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.
protected  Item evalTargetItem(MOB mob, Environmental givenTarget, Environmental target, java.lang.String targetName, boolean quiet)
           
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
protected  int experienceLevels(MOB caster, int asLevel)
           
protected  int expertise(MOB mob, Ability A, ExpertiseLibrary.Flag code)
           
 long expirationDate()
          If this object expires, it should have a timestamp saying when it expires, in real time.
 java.util.List<java.lang.String> externalFiles()
          Any external files which may be required to make this ability work files returned by this method should not be base distrib files!
 long flags()
          Returns a bitmap giving some specific information about the scope and purpose of the skill.
protected  Physical getAnyTarget(MOB mob, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter)
           
protected  Physical getAnyTarget(MOB mob, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter, boolean checkOthersInventory)
           
protected  Physical getAnyTarget(MOB mob, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter, boolean checkOthersInventory, boolean alreadyAffOk)
           
protected  Physical getAnyTarget(MOB mob, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter, boolean checkOthersInventory, boolean alreadyAffOk, boolean quiet)
           
protected  Physical getAnyTarget(MOB mob, Room location, boolean anyContainer, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter)
           
protected  Physical getAnyTarget(MOB mob, Room location, boolean anyContainer, java.util.List<java.lang.String> commands, Physical givenTarget, Filterer<Environmental> filter, boolean quiet)
           
protected  int getBeneficialTickdownTime(MOB mob, Environmental target, int tickAdjustmentFromStandard, int asLevel)
           
protected  int getCodeNum(java.lang.String code)
           
protected  java.util.Map<java.lang.String,int[]> getHardOverrideManaCache()
           
protected  int getInternalCodeNum(java.lang.String code)
           
protected  int getMaliciousTickdownTime(MOB mob, Physical target, int tickAdjustmentFromStandard, int asLevel)
           
protected  int getPersonalLevelAdjustments(MOB caster)
           
protected  ExpertiseLibrary.SkillCostDefinition getRawTrainingCost()
           
 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.
protected  MOB getTarget(MOB mob, java.util.List commands, Environmental givenTarget)
           
protected  MOB getTarget(MOB mob, java.util.List commands, Environmental givenTarget, boolean quiet, boolean alreadyAffOk)
           
protected  Item getTarget(MOB mob, Room location, Environmental givenTarget, boolean anyContainer, java.util.List<java.lang.String> commands, Filterer<Environmental> filter)
           
protected  Item getTarget(MOB mob, Room location, Environmental givenTarget, boolean anyContainer, java.util.List<java.lang.String> commands, Filterer<Environmental> filter, boolean quiet)
           
protected  Item getTarget(MOB mob, Room location, Environmental givenTarget, Item container, java.util.List<java.lang.String> commands, Filterer<Environmental> filter)
           
protected  Item getTarget(MOB mob, Room location, Environmental givenTarget, Item container, java.util.List<java.lang.String> commands, Filterer<Environmental> filter, boolean quiet)
           
protected  Item getTarget(MOB mob, Room location, Environmental givenTarget, java.util.List<java.lang.String> commands, Filterer<Environmental> filter)
           
protected  Item getTargetItemFavorMOB(MOB mob, Room location, Physical givenTarget, Item container, java.util.List<java.lang.String> commands, Filterer<Environmental> filter)
           
protected  Item getTargetItemFavorMOB(MOB mob, Room location, Physical givenTarget, Item container, java.util.List<java.lang.String> commands, Filterer<Environmental> filter, boolean quiet)
           
protected  Item getTargetItemFavorMOB(MOB mob, Room location, Physical givenTarget, java.util.List<java.lang.String> commands, Filterer<Environmental> filter)
           
 int getTickDownRemaining()
           
protected  int getTicksBetweenCasts()
           
 int getTickStatus()
          A coded status for this object during the period where its tick method is being called.
protected  long getTimeOfNextCast()
           
 ExpertiseLibrary.SkillCost getTrainingCost(MOB mob)
          Returns cost of training up this skill, for the given user.
protected  int getX1Level(MOB mob)
           
protected  int getX2Level(MOB mob)
           
protected  int getX3Level(MOB mob)
           
protected  int getX4Level(MOB mob)
           
protected  int getX5Level(MOB mob)
           
protected  int getXLEVELLevel(MOB mob)
           
protected  int getXLOWCOSTLevel(MOB mob)
           
protected  int getXLOWFREECOSTLevel(MOB mob)
           
protected  int getXMAXRANGELevel(MOB mob)
           
protected  int getXPCOSTAdjustment(MOB mob, int xpLoss)
           
protected  int getXPCOSTLevel(MOB mob)
           
protected  int getXTIMELevel(MOB mob)
           
 void helpProficiency(MOB mob, int adjustment)
          This method should, occasionally, add to the proficiency the given mob has in this skill.
protected static 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.
protected  int iniPracticesToPractice()
           
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean invoke(MOB mob, java.util.List<java.lang.String> commands, Physical target, boolean auto, int asLevel)
          This method is called when a player or the system invokes this skill, casts this spell, etc.
 boolean invoke(MOB mob, Physical target, 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 isAutoInvoked()
          An autoinvocating ability is an ability which affects the mob just by having learned the ability.
 boolean isGeneric()
          Whether the fields of this item are set in code, or set by builders.
 boolean isNowAnAutoEffect()
          An autoinvocating ability is an ability which affects the mob just by having learned the ability.
 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.
 void makeLongLasting()
          If this ability has been added as as temporary effect, like sleep, or trip, or other typical spells, calling this method will make it so thatit will not do so on its own for a long long time.
 void makeNonUninvokable()
          Designates that this skill should never be uninvoked.
 Ability maliciousAffect(MOB mob, Physical target, int asLevel, int tickAdjustmentFromStandard, int additionAffectCheckCode)
           
protected  boolean maliciousFizzle(MOB mob, Environmental target, java.lang.String message)
           
 int maxRange()
          the maximum range of this object, if applicable.
protected  long minCastWaitTime()
           
 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.
 CMObject newInstance()
          Returns a new instance of this class.
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
protected  int overrideMana()
          amount of mana/move used by this ability, overriding ini file -1=normal, Ability.COST_ALL=all, Ability.COST_PCT
protected static Item possibleContainer(MOB mob, java.util.List<java.lang.String> commands, boolean withStuff, Filterer<Environmental> filter)
           
 void practice(MOB teacher, MOB student)
          Causes the student to practice this skill, presumably with the teacher mob.
protected  int practicesToPractice(MOB mob)
           
 boolean preInvoke(MOB mob, java.util.List<java.lang.String> commands, Physical givenTarget, boolean auto, int asLevel, int secondsElapsed, double actionsRemaining)
          This method is only called when the mob invoking this skill does not have enough actions to complete it immediately.
 int proficiency()
          Returns a number from 0-100 representing the percent of proficiency the mob or player who has this instance in their Abilities list has in this skill.
 boolean proficiencyCheck(MOB mob, int adjustment, boolean auto)
          Returns whether the given mob passes their proficiency check in this skill at this time.
protected  java.util.List<MOB> properTargetList(MOB mob, Environmental givenTarget, boolean auto)
           
protected  java.util.Set<MOB> properTargets(MOB mob, Environmental givenTarget, boolean auto)
           
 boolean putInCommandlist()
          Returns whether this skills triggerStrings should be places in the master list of commands, unlike properties or other hidden skills.
 java.lang.String rawImage()
          Returns the raw name of the image file to display for this object when MXP is used.
 java.lang.String requirements(MOB mob)
          Returns a string describing the requirements and qualifications that are required to learn this skill.
protected  void restoreCombatState(java.util.Map<MOB,MOB> map)
           
 boolean sameAs(Environmental E)
          Whether this object instance is functionally identical to the object passed in.
protected  java.util.Map<MOB,MOB> saveCombatState(MOB mob, boolean andFollowers)
           
 void setAbilityCode(int newCode)
          Sets an optional numeric value whose purpose is entirely contextual.
 void setAffectedOne(Physical P)
          Sets a reference to the room, item, mob, or exit that is currently being affected by this skill.
 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 setInvoker(MOB mob)
          Sets or changes the mob that invoked or initated the skill or effect.
 void setMiscText(java.lang.String newMiscText)
          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 setProficiency(int newProficiency)
          Sets a number from 0-100 representing the percent of proficiency the mob or player who has this instance in their Abilities list has in this skill.
 void setSavable(boolean truefalse)
          Sets whether this object can be saved as a permanent aspect of its host.
 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 setTickDownRemaining(int newTick)
           
protected  void setTimeOfNextCast(long absoluteTime)
           
protected  void setTimeOfNextCast(MOB caster)
           
protected  int somanticCastCode(MOB mob, Physical target, boolean auto)
           
protected  int somanticCastMask(MOB mob, Physical target, boolean auto)
           
protected  void spreadImmunity(MOB mob)
           
 void startTickDown(MOB invokerMOB, Physical affected, int tickTime)
          Adds THIS Ability object as an effect on the given affected target, and sets it to unInvoke after the given number of ticks.
 void teach(MOB teacher, MOB student)
          Teaches this skill to the student mob, presumably from the teacher mob.
 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[] triggerStrings()
          A set of the command strings the user types to access this command when it is listed as a skill ability.
 void unInvoke()
          If this skill is uninvokable, this method will uninvoke it, remove it as an effect on the target, and shut it down.
 int[] usageCost(MOB mob, boolean ignoreClassOverride)
          Returns an integer array telling the system how much mana, movement, or hit points are required to invoke this skill.
 int usageType()
          Returns a bitmap made up of constants defined by Ability.USAGE_*.
protected  int verbalCastCode(MOB mob, Physical target, boolean auto)
           
protected  int verbalCastMask(MOB mob, Physical target, boolean auto)
           
protected  int verbalSpeakCode(MOB mob, Physical target, boolean auto)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isAnAutoEffect

protected boolean isAnAutoEffect

proficiency

protected int proficiency

savable

protected boolean savable

miscText

protected java.lang.String miscText

invoker

protected MOB invoker

affected

protected Physical affected

canBeUninvoked

protected boolean canBeUninvoked

unInvoked

protected volatile boolean unInvoked

tickDown

protected volatile int tickDown

lastCastHelp

protected long lastCastHelp

amDestroyed

protected boolean amDestroyed

empty

public static final java.lang.String[] empty
Constructor Detail

StdAbility

public StdAbility()
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, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

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

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:
Tickable.name()

name

public java.lang.String name()
Description copied from interface: Tickable
The nice displayable name of this instance of this object

Specified by:
name in interface CMObject
Specified by:
name in interface Tickable
Returns:
the displayable name of this object instance
See Also:
Environmental.Name()

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

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

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

triggerStrings

public java.lang.String[] triggerStrings()
Description copied from interface: Ability
A set of the command strings the user types to access this command when it is listed as a skill ability.

Specified by:
triggerStrings in interface Ability
Returns:
an array of command invoking string words
See Also:
Ability.putInCommandlist()

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

castingTime

public double castingTime(MOB mob,
                          java.util.List<java.lang.String> cmds)
Description copied from interface: Ability
Returns the number of actions required to completely activate this skill. A value of 0.0 means invoke instantly. This method only applies when the invoker is not in combat.

Specified by:
castingTime in interface Ability
Parameters:
mob - the potential caster
cmds - the potential command set
Returns:
the number of player free actions required to do this
See Also:
Ability.combatCastingTime(MOB, List), Ability.checkedCastingCost(MOB, List)

combatCastingTime

public double combatCastingTime(MOB mob,
                                java.util.List<java.lang.String> cmds)
Description copied from interface: Ability
Returns the number of actions required to completely activate this skill. A value of 0.0 means invoke instantly. This method only applies when the invoker is in combat.

Specified by:
combatCastingTime in interface Ability
Parameters:
mob - the potential caster
cmds - the potential command set
Returns:
the number of player free actions required to do this
See Also:
Ability.castingTime(MOB, List), Ability.checkedCastingCost(MOB, List)

checkedCastingCost

public double checkedCastingCost(MOB mob,
                                 java.util.List<java.lang.String> commands)
Description copied from interface: Ability
Returns the number of actions required to completely activate this skill. A value of 0.0 means invoke instantly. This method should return the correct time depending on the nature of the skill, and whether the user is in combat.

Specified by:
checkedCastingCost in interface Ability
Parameters:
mob - the potential caster
commands - the potential command set
Returns:
the number of player free actions required to do this
See Also:
Ability.castingTime(MOB, List), Ability.combatCastingTime(MOB, List)

putInCommandlist

public boolean putInCommandlist()
Description copied from interface: Ability
Returns whether this skills triggerStrings should be places in the master list of commands, unlike properties or other hidden skills.

Specified by:
putInCommandlist in interface Ability
Returns:
whether to add the triggerString to the commands list
See Also:
Ability.triggerStrings()

isAutoInvoked

public boolean isAutoInvoked()
Description copied from interface: Ability
An autoinvocating ability is an ability which affects the mob just by having learned the ability. Dodge is an example of this. This method returns whether this skill is classified as one of those kinds of abilities.

Specified by:
isAutoInvoked in interface Ability
Returns:
whether this is an autoinvoking skill

bubbleAffect

public boolean bubbleAffect()
Description copied from interface: Ability
This method is used to modify the behavior of the affectPhyStats, affectCharStats, and affectCharState methods. If this returns true, then those methods will be called only on the owner/mob of the item currently being affected by this skill. If false, those methods behave normally.

Specified by:
bubbleAffect in interface Ability
Returns:
whether this skill affects a mob owner of an item
See Also:
Item.owner()

getTicksBetweenCasts

protected int getTicksBetweenCasts()

getTimeOfNextCast

protected long getTimeOfNextCast()

setTimeOfNextCast

protected void setTimeOfNextCast(long absoluteTime)

getRawTrainingCost

protected ExpertiseLibrary.SkillCostDefinition getRawTrainingCost()

getTrainingCost

public ExpertiseLibrary.SkillCost getTrainingCost(MOB mob)
Description copied from interface: Ability
Returns cost of training up this skill, for the given user.

Specified by:
getTrainingCost in interface Ability
Parameters:
mob - the potential caster
Returns:
a pair, with the number of the cost type, and the cost type

practicesToPractice

protected int practicesToPractice(MOB mob)

iniPracticesToPractice

protected int iniPracticesToPractice()

setTimeOfNextCast

protected void setTimeOfNextCast(MOB caster)

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)

flags

public long flags()
Description copied from interface: Ability
Returns a bitmap giving some specific information about the scope and purpose of the skill. The bitmap is composed of FLAG_* constants from the Ability interface.

Specified by:
flags in interface Ability
Returns:
FLAG_* constant based bitmap
See Also:
Ability

usageType

public int usageType()
Description copied from interface: Ability
Returns a bitmap made up of constants defined by Ability.USAGE_*. It lets the system know which of the values in the usageCost(MOB,boolean) method are relevant. It determines whether this skill requires mana, movement, hit points, or some combination of the three.

Specified by:
usageType in interface Ability
Returns:
a bitmap defined by Ability.USAGE_*
See Also:
Ability

overrideMana

protected int overrideMana()
amount of mana/move used by this ability, overriding ini file -1=normal, Ability.COST_ALL=all, Ability.COST_PCT

Returns:
amount of mana/move used by this ability, overriding ini file

abstractQuality

public int abstractQuality()
Description copied from interface: Ability
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. These constants are defined in the Ability interface and called QUALITY_*

Specified by:
abstractQuality in interface Ability
Returns:
Ability.QUALITY_* constant classification
See Also:
Ability

enchantQuality

public int enchantQuality()
Description copied from interface: Ability
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. This helps decide whether this skill is appropriate in those roles. These constants are defined in the Ability interface and called QUALITY_*

Specified by:
enchantQuality in interface Ability
Returns:
Ability.QUALITY_* constant classification
See Also:
Ability.abstractQuality(), Ability

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

L

public java.lang.String L(java.lang.String str,
                          java.lang.String... xs)
Description copied from interface: Environmental
Localize an internal string -- shortcut. Same as calling:

Specified by:
L in interface Environmental
Parameters:
str - the string to translate
xs - the array of variables to replace
Returns:
the translated string, with all variables in place
See Also:
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.

I

protected static java.lang.String[] I(java.lang.String[] str)

castingQuality

protected int castingQuality(MOB mob,
                             Physical target,
                             int abstractQuality)

castingQuality

public int castingQuality(MOB mob,
                          Physical target)
Description copied from interface: Ability
Serves a purpose similar to that of the Ability abstractQuality() method, but it determines a more exact quality based on a given invoker, target, and assumes an imminent use of the skill. For this reason, the QUALITY_OK_* constants should be avoided in favor of the other Ability.QUALITY_* constants.

Specified by:
castingQuality in interface Ability
Parameters:
mob - the person to use the skill
target - the potential target -- may be invoker
Returns:
Ability.QUALITY_* constant classification
See Also:
Ability, Ability.abstractQuality()

expertise

protected int expertise(MOB mob,
                        Ability A,
                        ExpertiseLibrary.Flag code)

getX1Level

protected int getX1Level(MOB mob)

getX2Level

protected int getX2Level(MOB mob)

getX3Level

protected int getX3Level(MOB mob)

getX4Level

protected int getX4Level(MOB mob)

getX5Level

protected int getX5Level(MOB mob)

getXLEVELLevel

protected int getXLEVELLevel(MOB mob)

getXLOWCOSTLevel

protected int getXLOWCOSTLevel(MOB mob)

getXLOWFREECOSTLevel

protected int getXLOWFREECOSTLevel(MOB mob)

getXMAXRANGELevel

protected int getXMAXRANGELevel(MOB mob)

getXTIMELevel

protected int getXTIMELevel(MOB mob)

getXPCOSTLevel

protected int getXPCOSTLevel(MOB mob)

getXPCOSTAdjustment

protected int getXPCOSTAdjustment(MOB mob,
                                  int xpLoss)

adjustedMaxInvokerRange

protected int adjustedMaxInvokerRange(int max)

canAffectCode

protected int canAffectCode()
Designates whether, when used as a property/effect, what sort of objects this ability can affect. Uses the Ability.CAN_* constants.

Returns:
a mask showing the type of objects this ability can affect
See Also:
Ability

canTargetCode

protected int canTargetCode()
Designates whether, when invoked as a skill, what sort of objects this ability can effectively target. Uses the Ability.CAN_* constants.

Returns:
a mask showing the type of objects this ability can target
See Also:
Ability

classificationCode

public int classificationCode()
Description copied from interface: Ability
Returns a bitmap describing the general classification of the skill (spell, skill, chant, or property, etc) and its domain. It is made up of the ACODE_* constants the Ability interface, and optionally the DOMAIN_* constants also defined in this interface.

Specified by:
classificationCode in interface Ability
Returns:
ACODE_* constant classification
See Also:
Ability

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()

isNowAnAutoEffect

public boolean isNowAnAutoEffect()
Description copied from interface: Ability
An autoinvocating ability is an ability which affects the mob just by having learned the ability. Dodge is an example of this. Returns whether this instance was added to a mobs affects for this reason.

Specified by:
isNowAnAutoEffect in interface Ability
Returns:
whether this skill is currently an autoinvoked effect

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 object 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()

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

amDestroyed

public 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.

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()

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

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

abilityCode

public int abilityCode()
Description copied from interface: Ability
Returns an optional numeric value whose purpose is entirely contextual. For many skills, this reflects some sort of enhancement. Default is 0.

Specified by:
abilityCode in interface Ability
Returns:
the current optional numeric value or enhancement

setAbilityCode

public void setAbilityCode(int newCode)
Description copied from interface: Ability
Sets an optional numeric value whose purpose is entirely contextual. For many skills, this reflects some sort of enhancement. Default is 0.

Specified by:
setAbilityCode in interface Ability
Parameters:
newCode - the optional numeric value or enhancement

externalFiles

public java.util.List<java.lang.String> externalFiles()
Description copied from interface: Ability
Any external files which may be required to make this ability work files returned by this method should not be base distrib files!

Specified by:
externalFiles in interface Ability
Returns:
a list of local path names

minCastWaitTime

protected long minCastWaitTime()

setMiscText

public void setMiscText(java.lang.String newMiscText)
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:
newMiscText - 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

proficiency

public int proficiency()
Description copied from interface: Ability
Returns a number from 0-100 representing the percent of proficiency the mob or player who has this instance in their Abilities list has in this skill. Is also used for other miscellaneous purposes by other non-skill Abilities, such as Drowning.

Specified by:
proficiency in interface Ability
Returns:
the proficiency from 0-100
See Also:
AbilityContainer.addAbility(Ability), Ability.setProficiency(int)

setProficiency

public void setProficiency(int newProficiency)
Description copied from interface: Ability
Sets a number from 0-100 representing the percent of proficiency the mob or player who has this instance in their Abilities list has in this skill. Is also used for other miscellaneous purposes by other non-skill Abilities, such as Drowning.

Specified by:
setProficiency in interface Ability
Parameters:
newProficiency - the proficiency from 0-100
See Also:
AbilityContainer.addAbility(Ability), Ability.proficiency()

addedTickTime

protected int addedTickTime(MOB invokerMOB,
                            int baseTickTime)

startTickDown

public void startTickDown(MOB invokerMOB,
                          Physical affected,
                          int tickTime)
Description copied from interface: Ability
Adds THIS Ability object as an effect on the given affected target, and sets it to unInvoke after the given number of ticks. This method intelligently determines whether the target is already going to provide tick events to the Ability (like a mob) or whether the system should create a tick event for this ability (like on rooms or items).

Specified by:
startTickDown in interface Ability
Parameters:
invokerMOB - the invoker of the ability
affected - the object to be affected by this ability
tickTime - the number of ticks to keep the ability ticking.

disregardsArmorCheck

public boolean disregardsArmorCheck(MOB mob)

getPersonalLevelAdjustments

protected int getPersonalLevelAdjustments(MOB caster)

adjustedLevel

public int adjustedLevel(MOB caster,
                         int asLevel)
Description copied from interface: Ability
This method calculates the strength level of this skill for the given mob, and taking into account the given override-level (asLevel). The level returned should be based on a minimum baseline level (usually the class level of the class that qualifies for this skill at the lowest level), and should take into account the number of levels the mob has over and above that in appropriate classes

Specified by:
adjustedLevel in interface Ability
Parameters:
caster - the mob to evaluate the skill level of
asLevel - if greater than 0, this method always returns it
Returns:
the level of power the given mob has in this skill.

experienceLevels

protected int experienceLevels(MOB caster,
                               int asLevel)

canTarget

public boolean canTarget(int can_code)
Description copied from interface: Ability
Returns whether, when used as a skill, this ability can target itself at an object of the given type. This method derives its answer from the protected integer method canTargetCode(), and requires one of the Ability.CAN_* constants.

Specified by:
canTarget in interface Ability
Parameters:
can_code - a bitmap of one or more Ability.CAN_* constants
Returns:
whether the object type is a valid target
See Also:
canTargetCode()

canAffect

public boolean canAffect(int can_code)
Description copied from interface: Ability
Returns whether, when used as a property/effect, this ability can affect the given type of object. This method derives its answer from the protected integer method canAffectCode(), and requires one of the Ability.CAN_* constants.

Specified by:
canAffect in interface Ability
Parameters:
can_code - a bitmap of one or more Ability.CAN_* constants
Returns:
whether the object object type may have this as a property/effect
See Also:
Ability, canAffectCode()

canAffect

public boolean canAffect(Physical P)
Description copied from interface: Ability
Returns whether, when used as a property/effect, this ability can affect the given object. This method derives its answer from the protected integer method canAffectCode()

Specified by:
canAffect in interface Ability
Parameters:
P - the potential object to have this as a property/effect
Returns:
whether E is a valid object to have this as a property/effect
See Also:
canAffectCode()

canTarget

public boolean canTarget(Physical P)
Description copied from interface: Ability
Returns whether, when used as a skill, this ability can target itself at the given object. This method derives its answer from the protected integer method canTargetCode()

Specified by:
canTarget in interface Ability
Parameters:
P - the potential target of this skill
Returns:
whether E is a valid target
See Also:
canTargetCode()

getTarget

protected MOB getTarget(MOB mob,
                        java.util.List commands,
                        Environmental givenTarget)

getTarget

protected MOB getTarget(MOB mob,
                        java.util.List commands,
                        Environmental givenTarget,
                        boolean quiet,
                        boolean alreadyAffOk)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                Room location,
                                boolean anyContainer,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                Room location,
                                boolean anyContainer,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter,
                                boolean quiet)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter,
                                boolean checkOthersInventory)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter,
                                boolean checkOthersInventory,
                                boolean alreadyAffOk)

getAnyTarget

protected Physical getAnyTarget(MOB mob,
                                java.util.List<java.lang.String> commands,
                                Physical givenTarget,
                                Filterer<Environmental> filter,
                                boolean checkOthersInventory,
                                boolean alreadyAffOk,
                                boolean quiet)

possibleContainer

protected static Item possibleContainer(MOB mob,
                                        java.util.List<java.lang.String> commands,
                                        boolean withStuff,
                                        Filterer<Environmental> filter)

getTarget

protected Item getTarget(MOB mob,
                         Room location,
                         Environmental givenTarget,
                         java.util.List<java.lang.String> commands,
                         Filterer<Environmental> filter)

getTarget

protected Item getTarget(MOB mob,
                         Room location,
                         Environmental givenTarget,
                         boolean anyContainer,
                         java.util.List<java.lang.String> commands,
                         Filterer<Environmental> filter)

getTarget

protected Item getTarget(MOB mob,
                         Room location,
                         Environmental givenTarget,
                         boolean anyContainer,
                         java.util.List<java.lang.String> commands,
                         Filterer<Environmental> filter,
                         boolean quiet)

getTarget

protected Item getTarget(MOB mob,
                         Room location,
                         Environmental givenTarget,
                         Item container,
                         java.util.List<java.lang.String> commands,
                         Filterer<Environmental> filter)

evalTargetItem

protected Item evalTargetItem(MOB mob,
                              Environmental givenTarget,
                              Environmental target,
                              java.lang.String targetName,
                              boolean quiet)

getTarget

protected Item getTarget(MOB mob,
                         Room location,
                         Environmental givenTarget,
                         Item container,
                         java.util.List<java.lang.String> commands,
                         Filterer<Environmental> filter,
                         boolean quiet)

getTargetItemFavorMOB

protected Item getTargetItemFavorMOB(MOB mob,
                                     Room location,
                                     Physical givenTarget,
                                     Item container,
                                     java.util.List<java.lang.String> commands,
                                     Filterer<Environmental> filter)

getTargetItemFavorMOB

protected Item getTargetItemFavorMOB(MOB mob,
                                     Room location,
                                     Physical givenTarget,
                                     java.util.List<java.lang.String> commands,
                                     Filterer<Environmental> filter)

getTargetItemFavorMOB

protected Item getTargetItemFavorMOB(MOB mob,
                                     Room location,
                                     Physical givenTarget,
                                     Item container,
                                     java.util.List<java.lang.String> commands,
                                     Filterer<Environmental> filter,
                                     boolean quiet)

compareTo

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

cloneFix

protected void cloneFix(Ability E)

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

proficiencyCheck

public boolean proficiencyCheck(MOB mob,
                                int adjustment,
                                boolean auto)
Description copied from interface: Ability
Returns whether the given mob passes their proficiency check in this skill at this time. Will accept a numeric adjustment, positive or negative, to their base proficiency. Will also accept an auto parameter, which forces this method to always return true.

Specified by:
proficiencyCheck in interface Ability
Parameters:
mob - the mob whose proficiency to check
adjustment - a positive or negative adjustment to the mobs base proficiency
auto - if true, this method returns true always
Returns:
whether the mob passes their proficiency check
See Also:
Ability.proficiency()

affecting

public Physical affecting()
Description copied from interface: Ability
Returns a reference to the room, item, mob, or exit that is currently being affected by this skill. Does not apply to non-affecting skills like kick, but more to auto-invoking skills and spells that affect people like sleep.

Specified by:
affecting in interface Ability
Returns:
the room, mob, or item being affected
See Also:
Ability.setAffectedOne(Physical)

setAffectedOne

public void setAffectedOne(Physical P)
Description copied from interface: Ability
Sets a reference to the room, item, mob, or exit that is currently being affected by this skill. Does not apply to non-affecting skills like kick, but more to auto-invoking skills and spells that affect people like sleep, and especially to properties.

Specified by:
setAffectedOne in interface Ability
Parameters:
P - the room, mob, or item being affected
See Also:
Ability.affecting()

unInvoke

public void unInvoke()
Description copied from interface: Ability
If this skill is uninvokable, this method will uninvoke it, remove it as an effect on the target, and shut it down.

Specified by:
unInvoke in interface Ability
See Also:
Ability.canBeUninvoked()

canBeUninvoked

public boolean canBeUninvoked()
Description copied from interface: Ability
Whether this skill is allowed to be uninvoked. If it returns false, then it behaves as a permanent property of the object it is affecting. Not death, dispelling, or other negations will remove it.

Specified by:
canBeUninvoked in interface Ability
Returns:
whether this skill can be uninvoked.
See Also:
Ability.makeNonUninvokable()

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()

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()

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()

invoker

public MOB invoker()
Description copied from interface: Ability
Always returns the mob that invoked or initiated the skill or effect.

Specified by:
invoker in interface Ability
Returns:
the invoker mob
See Also:
MOB, Ability.setInvoker(MOB)

setInvoker

public void setInvoker(MOB mob)
Description copied from interface: Ability
Sets or changes the mob that invoked or initated the skill or effect.

Specified by:
setInvoker in interface Ability
Parameters:
mob - the invoker mob
See Also:
MOB, Ability.invoker()

buildCostArray

protected int[] buildCostArray(MOB mob,
                               int consumed,
                               int minimum)

getHardOverrideManaCache

protected java.util.Map<java.lang.String,int[]> getHardOverrideManaCache()

usageCost

public int[] usageCost(MOB mob,
                       boolean ignoreClassOverride)
Description copied from interface: Ability
Returns an integer array telling the system how much mana, movement, or hit points are required to invoke this skill. Use the Ability.USAGEINDEX_* constants to index the array. A value of 0-1000 is an absolute cost. A value of Ability.COST_ALL means to use all of the mana, movement, hit points. A value of Ability.COST_PCT and up represents a percentage of the cost. The values in this method MUST be accompanied by properly set usageType() bitmap.

Specified by:
usageCost in interface Ability
Parameters:
mob - the invoker of the skill
ignoreClassOverride - whether to ignore Class Overrides
Returns:
an array of costs, indexed by Ability.USAGEINDEX_*
See Also:
Ability.usageType(), Ability

helpProficiency

public void helpProficiency(MOB mob,
                            int adjustment)
Description copied from interface: Ability
This method should, occasionally, add to the proficiency the given mob has in this skill. There are no guarantees about how often this method is called, but presumably it is called when the mob is doing something that exercises this skill in some way. How often proficiency is effected by this method is up to the method, but is typically time-based, and based on intelligence and other factors.

Specified by:
helpProficiency in interface Ability
Parameters:
mob - the mob whose proficiency in this skill to possibly advance
adjustment - up or down to the chance of becoming more proficient
See Also:
Ability.proficiency()

preInvoke

public boolean preInvoke(MOB mob,
                         java.util.List<java.lang.String> commands,
                         Physical givenTarget,
                         boolean auto,
                         int asLevel,
                         int secondsElapsed,
                         double actionsRemaining)
Description copied from interface: Ability
This method is only called when the mob invoking this skill does not have enough actions to complete it immediately. The method is called when the command is entered, and every second afterwards until the invoker has enough actions to complete it. At completion time, invoke is called.

Specified by:
preInvoke in interface Ability
Parameters:
mob - the player or mob invoking the skill
commands - 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 command
asLevel - -1, unless being auto-invoked, when it is the level to invoke it at.
secondsElapsed - 0 at first, and increments every second
actionsRemaining - number of free actions the player is defficient.
Returns:
whether the skill should be allowed to invoke. false cancels altogether.
See Also:
Ability.invoke(MOB, List, Physical, boolean, int)

invoke

public boolean invoke(MOB mob,
                      Physical target,
                      boolean auto,
                      int asLevel)
Description copied from interface: Ability
This method is called when a player or the system invokes this skill, casts this spell, etc. Calls the more complete invoke method without an empty command strings vector unless target is non-null, in which case the vector will contain the name of the target.

Specified by:
invoke in interface Ability
Parameters:
mob - the player or mob invoking the skill
target - null, unless being auto-invoked. Represents an override target.
auto - false if player enters command, true if system invokes the command
asLevel - -1, unless being auto-invoked, when it is the level to invoke it at.
Returns:
whether the skill successfully invoked.
See Also:
Ability.invoke(MOB, List, Physical, boolean, int)

invoke

public boolean invoke(MOB mob,
                      java.util.List<java.lang.String> commands,
                      Physical target,
                      boolean auto,
                      int asLevel)
Description copied from interface: Ability
This method is called when a player or the system invokes this skill, casts this spell, etc. Calls the more complete invoke method without an empty command strings vector unless target is non-null, in which case the vector will contain the name of the target.

Specified by:
invoke in interface Ability
Parameters:
mob - the player or mob invoking the skill
commands - the parameters entered for the skill (minus trigger word)
target - null, unless being auto-invoked. Represents an override target.
auto - false if player enters command, true if system invokes the command
asLevel - -1, unless being auto-invoked, when it is the level to invoke it at.
Returns:
whether the skill successfully invoked.

checkComponents

protected boolean checkComponents(MOB mob)

properTargets

protected java.util.Set<MOB> properTargets(MOB mob,
                                           Environmental givenTarget,
                                           boolean auto)

properTargetList

protected java.util.List<MOB> properTargetList(MOB mob,
                                               Environmental givenTarget,
                                               boolean auto)

adjustMaliciousTickdownTime

protected int adjustMaliciousTickdownTime(MOB mob,
                                          Physical target,
                                          int baseTicks,
                                          int asLevel)

getMaliciousTickdownTime

protected int getMaliciousTickdownTime(MOB mob,
                                       Physical target,
                                       int tickAdjustmentFromStandard,
                                       int asLevel)

maliciousAffect

public Ability maliciousAffect(MOB mob,
                               Physical target,
                               int asLevel,
                               int tickAdjustmentFromStandard,
                               int additionAffectCheckCode)

beneficialWordsFizzle

protected boolean beneficialWordsFizzle(MOB mob,
                                        Environmental target,
                                        java.lang.String message)

beneficialVisualFizzle

protected boolean beneficialVisualFizzle(MOB mob,
                                         Environmental target,
                                         java.lang.String message)

maliciousFizzle

protected boolean maliciousFizzle(MOB mob,
                                  Environmental target,
                                  java.lang.String message)

adjustBeneficialTickdownTime

protected int adjustBeneficialTickdownTime(MOB mob,
                                           Environmental target,
                                           int baseTicks)

getBeneficialTickdownTime

protected int getBeneficialTickdownTime(MOB mob,
                                        Environmental target,
                                        int tickAdjustmentFromStandard,
                                        int asLevel)

beneficialAffect

public Ability beneficialAffect(MOB mob,
                                Physical target,
                                int asLevel,
                                int tickAdjustmentFromStandard)

spreadImmunity

protected void spreadImmunity(MOB mob)

autoInvocation

public boolean autoInvocation(MOB mob,
                              boolean force)
Description copied from interface: Ability
An autoinvocating ability is an ability which affects the mob just by having learned the ability. Dodge is an example of this. This method is called to initiate this, and is called whenever a mob gains this skill as a new Ability. This method will add the ability to the mob as an effect.

Specified by:
autoInvocation in interface Ability
Parameters:
mob - the player or npc mob who has this ability
force - if the skill has default-off settings, this overrides to ON
Returns:
whether the ability autoinvoked correctly
See Also:
Ability.isAutoInvoked(), Ability.isNowAnAutoEffect()

makeNonUninvokable

public void makeNonUninvokable()
Description copied from interface: Ability
Designates that this skill should never be uninvoked. Designates that this skill is a permanent property of the object it is affecting. Is normally called by addNonUninvokableAffect

Specified by:
makeNonUninvokable in interface Ability
See Also:
Affectable.addNonUninvokableEffect(Ability), Ability.canBeUninvoked()

accountForYourself

public java.lang.String accountForYourself()
Description copied from interface: Ability
For use by the identify spell, this should return a nice description of any properties incorporated by this effect.

Specified by:
accountForYourself in interface Ability
Returns:
a description of properties incorporated

getTickDownRemaining

public int getTickDownRemaining()

setTickDownRemaining

public void setTickDownRemaining(int newTick)

getTickStatus

public int 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)

canBeTaughtBy

public boolean canBeTaughtBy(MOB teacher,
                             MOB student)
Description copied from interface: Ability
Returns whether the given teacher mob is able and allowed to teach this skill to the given student. Error messages should be directed to both. This method should focus exclusively on the qualifications of the teacher.

Specified by:
canBeTaughtBy in interface Ability
Parameters:
teacher - the potential teacher of this skill
student - the potential learner of this skill
Returns:
whether the teacher can teach the skill to the student
See Also:
Ability.canBeLearnedBy(MOB, MOB), Ability.teach(MOB, MOB)

requirements

public java.lang.String requirements(MOB mob)
Description copied from interface: Ability
Returns a string describing the requirements and qualifications that are required to learn this skill.

Specified by:
requirements in interface Ability
Parameters:
mob - the mob whose requirements must be tested
Returns:
a description of the learning requirements of this skill.

canBeLearnedBy

public boolean canBeLearnedBy(MOB teacher,
                              MOB student)
Description copied from interface: Ability
Returns whether the given student mob is able and allowed to learn this skill from the given teacher. Error messages should be directed to both. This method should focus exclusively on the qualifications of the student, and the teacher is optional.

Specified by:
canBeLearnedBy in interface Ability
Parameters:
teacher - the potential teacher of this skill, may be null
student - the potential learner of this skill, may NOT be null
Returns:
whether the student can learn the skill from the teacher
See Also:
Ability.canBeTaughtBy(MOB, MOB), Ability.teach(MOB, MOB)

saveCombatState

protected java.util.Map<MOB,MOB> saveCombatState(MOB mob,
                                                 boolean andFollowers)

restoreCombatState

protected void restoreCombatState(java.util.Map<MOB,MOB> map)

verbalCastCode

protected int verbalCastCode(MOB mob,
                             Physical target,
                             boolean auto)

verbalSpeakCode

protected int verbalSpeakCode(MOB mob,
                              Physical target,
                              boolean auto)

verbalCastMask

protected int verbalCastMask(MOB mob,
                             Physical target,
                             boolean auto)

somanticCastCode

protected int somanticCastCode(MOB mob,
                               Physical target,
                               boolean auto)

somanticCastMask

protected int somanticCastMask(MOB mob,
                               Physical target,
                               boolean auto)

canBePracticedBy

public boolean canBePracticedBy(MOB teacher,
                                MOB student)
Description copied from interface: Ability
Returns whether the given teacher mob is able and allowed to practice this skill with the given student *and* whether the student is able and allowed to practice this skill. Error messages should be directed to both.

Specified by:
canBePracticedBy in interface Ability
Parameters:
teacher - the potential practice teacher of this skill
student - the potential practicer of this skil
Returns:
whether the teacher and student are capable of practicing together
See Also:
Ability.practice(MOB, MOB)

teach

public void teach(MOB teacher,
                  MOB student)
Description copied from interface: Ability
Teaches this skill to the student mob, presumably from the teacher mob. This method assumes that both the teacher and student are authorized. Authorization comes from canBeTaughtBy and canBeLearnedBy

Specified by:
teach in interface Ability
Parameters:
teacher - the teacher of this skill
student - the learner of this skill
See Also:
Ability.canBeTaughtBy(MOB, MOB), Ability.canBeLearnedBy(MOB, MOB)

practice

public void practice(MOB teacher,
                     MOB student)
Description copied from interface: Ability
Causes the student to practice this skill, presumably with the teacher mob. This method assumes that both the teacher and student are authorized. Authorization comes from canBePracticedBy

Specified by:
practice in interface Ability
Parameters:
teacher - the teacher of this skill
student - the practicer of this skill
See Also:
Ability.canBePracticedBy(MOB, MOB)

makeLongLasting

public void makeLongLasting()
Description copied from interface: Ability
If this ability has been added as as temporary effect, like sleep, or trip, or other typical spells, calling this method will make it so thatit will not do so on its own for a long long time. This method does not make it UNinvokable, but only makes it last a long time.

Specified by:
makeLongLasting in interface Ability

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

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()

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

appropriateToMyFactions

public boolean appropriateToMyFactions(MOB mob)
Description copied from interface: Ability
Returns whether there are any Faction reasons why the given mob should not use this skill. Used primarily for alignment checks of Prayers.

Specified by:
appropriateToMyFactions in interface Ability
Parameters:
mob - the mob whose factions to check
Returns:
whether there are any faction reasons not to cast this.
See Also:
Prayer, Faction

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()

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)

getInternalCodeNum

protected int getInternalCodeNum(java.lang.String code)

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()

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)