com.planet_ink.coffee_mud.core.interfaces
Interface Affectable

All Known Subinterfaces:
Ammunition, Area, Armor, CagedAnimal, ClanItem, Coins, Container, DeadBody, DeckOfCards, Deity, DoorKey, Drink, Electronics, Exit, Food, GridLocale, HandOfCards, InnKey, Item, ItemPossessor, Light, MagicDust, MiscMagic, MOB, MusicalInstrument, PackagedItems, Physical, PhysicalAgent, Pill, PlayingCard, Potion, RawMaterial, Readable, Recipe, Rideable, Rider, Room, RoomMap, Scroll, Shield, ShipComponent, ShipComponent.ShipEngine, ShipComponent.ShipEnviroControl, ShipComponent.ShipPanel, ShipComponent.ShipPowerSource, ShipComponent.ShipSensor, ShipComponent.ShipWeapon, Software, SpellHolder, Wand, Weapon
All Known Implementing Classes:
AngryCitizen, Ape, ArchonJournal, ArchonStaff, Arquebus, Assassin, Backpack, BagOfEndlessness, BagOfHolding, BandedArmor, BardMap, BattleAxe, Bed, Bee, BlackBear, BlackDragon, BlueDragon, Boat, BrassDragon, BronzeDragon, Broom, BrownBear, Buck, Buffalo, Bugbear, Bull, Cat, CaveGrid, CaveMaze, CaveRoom, CaveSurface, Centaur, Cestus, ChainMailArmor, ChainMailVest, Chair, Cheetah, Chicken, Chimp, Citizen, CityStreet, Claymore, ClimbableExit, ClimbableLedge, ClimbableSurface, CloseableContainer, Cobra, CommonBat, CopperDragon, Corpse, Cow, Dagger, DaggerOfVenom, Deer, Desert, DesertGrid, DesertMaze, DesertThinGrid, Dirk, Doe, Dog, Door, Doppleganger, Dragon, DragonClaw, Dress, DrowChainMailArmor, DrowDagger, DrowElf, DrowMace, DrowPriestess, DrowQuarterstaff, DrowSword, DrowWarrior, DrowWizard, DruidicMonument, Duck, EndlessOcean, EndlessSky, EndlessThinOcean, EndlessThinSky, EternityBarkArmor, EternityLeafArmor, EternityLeafShield, EternityQuarterstaff, Falcon, FieldPlate, FireGiant, FlamingSword, FlyingExit, Fox, FrozenMountains, FrozenPlains, FullPlate, GapExit, GardenSnake, Gate, Gem, GenAirLock, GenAmmunition, GenArmor, GenAuctioneer, GenBanker, GenBattery, GenBed, GenBelt, GenBoat, GenBoffWeapon, GenBook, GenBow, GenCage, GenCaged, GenCageRideable, GenChair, GenCigar, GenClanApron, GenClanCard, GenClanCommonContainer, GenClanCommonItem, GenClanContainer, GenClanDonationList, GenClanFlag, GenClanItem, GenClanPamphlet, GenClanSpecialItem, GenCloak, GenCoins, GenContainer, GenCorpse, GenDeity, GenDoor, GenDress, GenDrink, GenElecContainer, GenElecItem, GenExit, GenFatWallpaper, GenFood, GenFoodResource, GenFountain, GenHandBow, GenInstrument, GenItem, GenJournal, GenKey, GenLantern, GenLasso, GenLawBook, GenLightSource, GenLimb, GenLiquidResource, GenMap, GenMirror, GenMob, GenMobilePortal, GenMultiPotion, GenNet, GenPackagedItems, GenPants, GenPerfume, GenPiano, GenPill, GenPipe, GenPortal, GenPostman, GenPotion, GenPowder, GenReadable, GenRecipe, GenResource, GenRideable, GenRideable, GenScroll, GenShield, GenShipComponent, GenShipContainer, GenShipItem, GenShirt, GenShoes, GenShopkeeper, GenSling, GenSpear, GenSSBattery, GenSSConsole, GenSSEngine, GenSSEnviro, GenSSPanel, GenSSPortal, GenStaff, GenSuperPill, GenTable, GenTitle, GenTub, GenUndead, GenWallpaper, GenWand, GenWater, GenWeapon, GiantBat, GiantScorpion, Glaive, GlovesSpeed, GlowingMageArmor, Gnoll, Goblin, GoldDragon, GoodyBag, Gorilla, Grate, GreatHelm, GreatLake, GreatThinLake, GreenDragon, Halberd, Hat, Hat_Intelligence, HeavenlyServent, Helmet, HerbChest, HiddenClosedDoorway, HiddenWalkway, HideArmor, HillGiant, Hills, HillsGrid, HillsThinGrid, HolyAvenger, Hood, Horse, HorseCart, HotRoom, IceRoom, Impassable, IndoorInTheAir, IndoorShallowWater, IndoorUnderWater, IndoorWaterSurface, Ingredients, InTheAir, InvisibleStalker, Jaguar, Javelin, Jungle, JungleGrid, JungleThinGrid, Katana, Kitten, Lantern, LargeBat, LargeCaveRoom, LargeChest, LargeSack, LargeStoneRoom, LargeWoodRoom, LeatherArmor, LeatherBoots, LeatherBracers, LeatherCap, LeatherGauntlets, LifeFountain, LightSource, Lion, Lizard, LizardMan, LizardManShaman, LockableContainer, LockedDoor, LockedGate, Longsword, Mace, MagicFreeRoom, MagicShelter, ManualAdvancement, ManualArchon, ManualClasses, MetalBracers, MetalRoom, MichaelsMithrilChain, Minotaur, Monkey, Mountains, MountainsGrid, MountainsMaze, MountainsThinGrid, MountainSurface, MountainSurfaceGrid, MountainSurfaceThinGrid, Mouse, Natural, NeedleChest, NeedleDoor, Ogre, OilFlask, Open, OpenDescriptable, OpenNameable, Orc, OverTheLedge, PaddedArmor, Pan, Panther, Pants, Parakeet, Parchment, Pegasus, PegasusGreater, Pig, PitOpen, Plains, PlainsGrid, PlainsThinGrid, PortableHole, Pot, PracticePoint, Puppy, Python, Quarterstaff, QuestPoint, Rabbit, Rapier, Rat, Ration, Rattlesnake, Raven, RedDragon, Ring, Ring_Ornamental, Ring_Protection, RingMail, RingOfColdProtection, RingOfElectricity, RingOfFortitude, RingOfJustice, RingOfMagicResistance, Road, RoadGrid, RoadThinGrid, Robes, Ruler, Sabre, SaltWaterSurface, SaltWaterThinSurface, ScaleMail, Scimitar, ScrollSpell, SewerMaze, SewerRoom, ShallowWater, Sheep, ShieldWeapon, Shirt, Shoes, Shore, Shortsword, Sickle, SilverDragon, Skeleton, SmallChest, SmallDagger, SmallMace, SmallSack, SpacePort, SplintMail, Spring, Staff, StdArea, StdArmor, StdAuctioneer, StdBanker, StdBoffWeapon, StdBook, StdBow, StdCage, StdCageRideable, StdClanApron, StdClanCard, StdClanCommonContainer, StdClanCommonItem, StdClanContainer, StdClanDonationList, StdClanFlag, StdClanItem, StdClanPamphlet, StdClanSpecialItem, StdClosedDoorway, StdCoins, StdContainer, StdDeckOfCards, StdDeity, StdDrink, StdElecContainer, StdElecItem, StdExit, StdFood, StdGrid, StdGridArea, StdHandOfCards, StdInnKey, StdItem, StdJournal, StdKey, StdLasso, StdLawBook, StdLimb, StdLockedDoorway, StdMap, StdMaze, StdMOB, StdNet, StdOpenDoorway, StdPerfume, StdPill, StdPlanet, StdPlayingCard, StdPortal, StdPostman, StdPotion, StdPowder, StdProgram, StdRideable, StdRideable, StdRoom, StdScroll, StdShield, StdShipComponent, StdShipConsole, StdShipContainer, StdShipItem, StdShopKeeper, StdSling, StdSmokable, StdSpaceShip, StdSpear, StdThinArea, StdThinGrid, StdThinGridArea, StdThinInstance, StdTimeZone, StdTitle, StdTub, StdWand, StdWeapon, SteelGauntlets, Stiletto, StoneGiant, StoneGolem, StoneGrid, StoneMaze, StoneRoom, StoneThinGrid, StuddedLeatherArmor, Swamp, SwampGrid, SwampThinGrid, Sword, Teacher, ThinRoom, ThreadbareRobes, ThrowingStone, Tiger, Torch, TrainingSession, TrappedChest, TrappedDoor, TrappedLockedDoor, TreeSurface, Troll, Turtle, TwoHandedSword, UmberHulk, Undead, UnderSaltWater, UnderSaltWaterGrid, UnderSaltWaterMaze, UnderSaltWaterThinGrid, UnderWater, UnderWaterGrid, UnderWaterMaze, UnderWaterThinGrid, UnseenWalkway, WalkingBoots, Wand_Advancement, Wand_Fire, Wand_Nourishment, WandArchon, WarHammer, Waterskin, WaterSurface, WaterThinSurface, WetCaveGrid, WetCaveMaze, WetCaveRoom, Whip, WhiteDragon, WildEagle, Wineskin, Wolf, WoodRoom, WoodRoomGrid, WoodRoomMaze, WoodRoomThinGrid, Woods, WoodsGrid, WoodsMaze, WoodsThinGrid, Wyvern, Zombie

public interface Affectable

Something that can be affected, and has environmental stats that can be affected as well.


Method Summary
 void addEffect(Ability to)
          Add a new effect to this object, whether permanent or temporary.
 void addNonUninvokableEffect(Ability to)
          Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked.
 PhyStats basePhyStats()
          Object containing a set of base, unmodified, mostly numeric fields.
 void delEffect(Ability to)
          Delete an effect from this object, whether permanent or temporary.
 java.util.Enumeration<Ability> effects()
          Returns an enumerator of abilities listed as effects on this object.
 Ability fetchEffect(int index)
          Returns an ability object listed as an effect on this object.
 Ability fetchEffect(java.lang.String ID)
          Returns an ability object listed as an effect on this object.
 int numEffects()
          Returns the number of ability objects listed as effects on this object.
 PhyStats phyStats()
          Object containing a set of current, modified, usable, mostly numeric fields.
 void recoverPhyStats()
          This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to all surrounding objects with affectPhyStats(Environmental,PhyStats) method.
 void setBasePhyStats(PhyStats newStats)
          Re-sets the object containing a set of base, unmodified, mostly numeric fields.
 

Method Detail

basePhyStats

PhyStats basePhyStats()
Object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Returns:
a set of state fields
See Also:
phyStats(), recoverPhyStats(), PhyStats

setBasePhyStats

void setBasePhyStats(PhyStats newStats)
Re-sets the object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein. This method is rarely called -- the fields therein are usually set using setter methods from the PhyStats interface on the object itself.

Parameters:
newStats - a set of state fields
See Also:
phyStats(), recoverPhyStats(), PhyStats

phyStats

PhyStats phyStats()
Object containing a set of current, modified, usable, mostly numeric fields. This object is based on the object from basePhyStats() and then updated and modified by the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Returns:
the current set of state fields
See Also:
basePhyStats(), recoverPhyStats(), PhyStats

recoverPhyStats

void recoverPhyStats()
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to all surrounding objects with affectPhyStats(Environmental,PhyStats) method. Surrounding objects include the room where the object is located, the Ability objects in the Effects list, the Behaviors in the behaviors list, and race/charclass/area if applicable. Those methods will then make all necessary adjustments to the values in the new phyStats() object. When it returns, phyStats() will have a totally updated object. This method must be called in code whenever the object is placed on the map, or when anything changes in its environment, such as location, effects, or other states.

See Also:
basePhyStats(), phyStats(), addEffect(Ability), Behavable.addBehavior(Behavior), PhyStats

addEffect

void addEffect(Ability to)
Add a new effect to this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modifies the stats. An Ability with a given ID() can only be added once per object.

Parameters:
to - The ability object to add as an effect.
See Also:
Ability, recoverPhyStats()

addNonUninvokableEffect

void addNonUninvokableEffect(Ability to)
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. recoverPhyStats() method should be called next. An Ability with a given ID() can only be added once per object.

Parameters:
to - The ability object to add as an effect.
See Also:
Ability, recoverPhyStats()

delEffect

void delEffect(Ability to)
Delete an effect from this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modified the stats.

Parameters:
to - The ability object to remove as an effect on this object
See Also:
Ability, recoverPhyStats()

numEffects

int numEffects()
Returns the number of ability objects listed as effects on this object.

Returns:
the number of effects this object has
See Also:
Ability

fetchEffect

Ability fetchEffect(int index)
Returns an ability object listed as an effect on this object. May return null even if the index is correct to mark a race condition.

Parameters:
index - which object to return
Returns:
the ability object effecting this object
See Also:
Ability, numEffects()

fetchEffect

Ability fetchEffect(java.lang.String ID)
Returns an ability object listed as an effect on this object. The object will be the one with the same ID() string as passed in.

Returns:
the ability object effecting this object
See Also:
Ability, CMObject.ID()

effects

java.util.Enumeration<Ability> effects()
Returns an enumerator of abilities listed as effects on this object.

Returns:
the enumerator of ability objects effecting this object
See Also:
Ability