com.planet_ink.coffee_mud.core.interfaces
Interface Affectable

All Known Subinterfaces:
Ammunition, AmmunitionWeapon, Area, Armor, AutoGenArea, Book, CagedAnimal, ClanItem, CloseableLockable, Coins, Combatant, Computer, Container, DeadBody, DeckOfCards, Deity, DoorKey, ElecPanel, Electronics, Exit, FalseLimb, Followable<T>, Food, FuelConsumer, GridLocale, HandOfCards, InnKey, Item, ItemPossessor, Light, LocationRoom, MagicDust, MiscMagic, MOB, MusicalInstrument, PackagedItems, Physical, PhysicalAgent, Pill, Places, PlayingCard, Potion, PowerGenerator, PowerSource, PrepositionExit, RawMaterial, Readable, Recipe, Rideable, Rider, Room, RoomMap, SailingShip, Scroll, Shield, ShipEngine, ShipWarComponent, Software, SpellHolder, TechComponent, Technical, Wand, Weapon
All Known Implementing Classes:
AjarDoor, Alligator, AngryCitizen, Ape, Apple, ArchonJournal, ArchonStaff, Arquebus, Assassin, Asteroid, Backpack, BagOfEndlessness, BagOfHolding, BandedArmor, BardMap, BattleAxe, Beaver, Bed, Bee, BlackBear, BlackDragon, BlueDragon, Boat, BrassDragon, BronzeDragon, Broom, BrownBear, BrownSnake, Buck, Buffalo, Bugbear, Bull, Cat, CaveGrid, CaveMaze, CaveRoom, CaveSurface, Centaur, Centipede, Cestus, ChainMailArmor, ChainMailVest, Chair, Cheetah, Chicken, Chimp, Citizen, CityStreet, Claymore, ClimbableExit, ClimbableLedge, ClimbableSurface, CloseableContainer, Cobra, CommonBat, CopperDragon, Corpse, Cougar, Cow, Coyote, Crocodile, Dagger, DaggerOfVenom, Deer, Desert, DesertGrid, DesertMaze, DesertThinGrid, DireWolf, Dirk, Doe, Dog, Dolphin, Door, Doppleganger, Dragon, DragonClaw, Dress, DrowChainMailArmor, DrowDagger, DrowElf, DrowMace, DrowPriestess, DrowQuarterstaff, DrowSword, DrowWarrior, DrowWizard, DruidicMonument, Duck, DwarfStar, Elephant, EmissionScanProgram, EndlessOcean, EndlessSky, EndlessThinOcean, EndlessThinSky, EternityBarkArmor, EternityLeafArmor, EternityLeafShield, EternityQuarterstaff, Falcon, FieldPlate, FireGiant, FlamingSword, FlyingExit, FlyingInsect, Fox, Frog, FrostGiant, FrozenMountains, FrozenPlains, FullPlate, GapExit, GardenSnake, GasGiant, Gate, Gem, GenAbsorbantShield, GenAirLock, GenAmmunition, GenArmor, GenAuctioneer, GenBagOfEndlessness, GenBanker, GenBed, GenBelt, GenBlaster, GenBoat, GenBoffWeapon, GenBook, GenBow, GenBussardCollector, GenCage, GenCaged, GenCageRideable, GenChair, GenCigar, GenClanApron, GenClanCard, GenClanCommonContainer, GenClanCommonItem, GenClanContainer, GenClanDonationList, GenClanFlag, GenClanItem, GenClanPamphlet, GenClanSpecialItem, GenCloak, GenCoins, GenCompBattery, GenCompEnviroSystem, GenCompGenerator, GenComputerConsole, GenContainer, GenCorpse, GenCow, GenCurtain, GenDeflectionShield, GenDeity, GenDice, GenDisruptor, GenDisruptor2, GenDissertation, GenDoor, GenDress, GenDrink, GenEarring, GenEclipseField, GenElecCompItem, GenElecCompSensor, GenElecContainer, GenElecItem, GenElecPanel, GenElecWeapon, GenEmptyDrink, GenEnergyShield, GenExit, GenFatWallpaper, GenFood, GenFoodResource, GenFountain, GenFuellessGenerator, GenGrapples, GenGraviticSensor, GenHandBow, GenHorse, GenInstrument, GenIntegrityShield, GenItem, GenJournal, GenKey, GenKineticField, GenLantern, GenLaserGun, GenLasso, GenLawBook, GenLibrarian, GenLightSource, GenLightSwitch, GenLimb, GenLiquidResource, GenMap, GenMirror, GenMob, GenMobilePortal, GenMultiPotion, GenMutingField, GenNet, GenPackagedItems, GenPackagedStack, GenPackagedVariety, GenPants, GenPaper, GenPerfume, GenPersonalShield, GenPhaser, GenPhaser2, GenPiano, GenPill, GenPipe, GenPlayerBook, GenPlayingCard, GenPortal, GenPostman, GenPotion, GenPowder, GenReadable, GenRecipe, GenReflectionShield, GenResource, GenRideable, GenRideable, GenRuinedItem, GenSailingShip, GenScroll, GenShield, GenShipDampener, GenShipEngine, GenShipGravityGen, GenShipPanel, GenShipProgram, GenShipShieldGenerator, GenShipThruster, GenShipWeapon, GenShirt, GenShoes, GenShopkeeper, GenSiegeWeapon, GenSling, GenSoftware, GenSolarGenerator, GenSonicGun, GenSpaceBody, GenSpaceDrive, GenSpaceShip, GenSpaceTech, GenSpear, GenStaff, GenStealthShield, GenSuperPill, GenTable, GenTechItem, GenThinArmor, GenTickerShield, GenTitle, GenTriCorder, GenTub, GenUndead, GenWallpaper, GenWand, GenWater, GenWaterPowerGenerator, GenWeapon, GenWindGenerator, GiantBat, GiantScorpion, Glaive, GlovesSpeed, GlowingMageArmor, Gnoll, Goat, GoatDoe, Goblin, GoldDragon, GoodyBag, Gorilla, Grate, GreatHelm, GreatLake, GreatThinLake, GreenDragon, Halberd, Hat, Hat_Intelligence, Hawk, HealthScanProgram, HeavenlyServent, Helmet, HerbChest, HiddenClosedDoorway, HiddenWalkway, HideArmor, HideoutShelter, HillGiant, Hills, HillsGrid, HillsThinGrid, HoleInTheGround, HolyAvenger, Hood, Hornet, Horse, HorseCart, HotRoom, IcePlains, IceRoom, Impassable, IndoorInTheAir, IndoorShallowWater, IndoorUnderWater, IndoorUnderWaterColumnGrid, IndoorUnderWaterGrid, IndoorUnderWaterThinGrid, IndoorWaterSurface, IndoorWaterSurfaceColumn, IndoorWaterThinSurface, Ingredients, InTheAir, InvisibleStalker, Jaguar, Javelin, Jungle, JungleGrid, JungleThinGrid, Katana, Kitten, Lantern, LargeBat, LargeCaveRoom, LargeChest, LargeSack, LargeStoneRoom, LargeWoodRoom, LeatherArmor, LeatherBoots, LeatherBracers, LeatherCap, LeatherGauntlets, LifeFountain, LifeScanProgram, LightSource, Lion, Lizard, LizardMan, LizardManShaman, LockableContainer, LockedDoor, LockedGate, LongerRoad, LongestRoad, LongRoad, Longsword, Mace, MagicFreeRoom, MagicShelter, ManualAdvancement, ManualArchon, ManualClasses, MassiveStar, MetalBracers, MetalRoom, MetalRoomMaze, MichaelsMithrilChain, Minotaur, Monkey, Moon, Moonlet, MountainLion, Mountains, MountainsGrid, MountainsMaze, MountainsThinGrid, MountainSurface, MountainSurfaceGrid, MountainSurfaceThinGrid, Mouse, Naga, Natural, NeedleChest, NeedleDoor, OceanGrid, OceanThinGrid, Ogre, OilFlask, Open, OpenDescriptable, OpenNameable, OpenPrepositional, Orc, OverTheLedge, Owl, PaddedArmor, Pan, Panther, Pants, Parakeet, Parchment, Pegasus, PegasusGreater, Penguin, Pig, PitOpen, Plains, PlainsGrid, PlainsThinGrid, Planet, 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, RocketShipProgram, Ruler, Sabre, SaltWaterSurface, SaltWaterSurfaceColumn, SaltWaterThinSurface, ScaleMail, Scimitar, Scorpion, ScrollSpell, Seal, SeaMap, SeaPort, SewerMaze, SewerRoom, ShallowWater, Shark, Sheep, ShieldWeapon, ShipTelnetProgram, Shirt, Shoes, Shore, Shortsword, Sickle, SilverDragon, Skeleton, SmallChest, SmallDagger, SmallMace, SmallSack, Snake, SpacePort, Spider, SplintMail, Spring, Squirrel, Staff, Star, StdArea, StdArmor, StdAuctioneer, StdAutoGenInstance, StdBanker, StdBoardable, StdBoardableShip, StdBoffWeapon, StdBook, StdBow, StdCage, StdCageRideable, StdClanApron, StdClanCard, StdClanCommonContainer, StdClanCommonItem, StdClanContainer, StdClanDonationList, StdClanFlag, StdClanItem, StdClanPamphlet, StdClanSpecialItem, StdClosedDoorway, StdCoins, StdCompBattery, StdCompFuelConsumer, StdCompFuellessGenerator, StdCompGenerator, StdCompPanel, StdComputerConsole, StdContainer, StdDeckOfCards, StdDeity, StdDice, StdDissertation, StdDrink, StdElecCompContainer, StdElecCompItem, StdElecCompSensor, StdElecContainer, StdElecItem, StdElecPanel, StdElecWeapon, StdExit, StdFactoryMOB, StdFood, StdGrapples, StdGrid, StdGridArea, StdHandOfCards, StdInnKey, StdItem, StdJournal, StdKey, StdLasso, StdLawBook, StdLibrarian, StdLimb, StdLockedDoorway, StdMap, StdMaze, StdMOB, StdNet, StdOpenDoorway, StdPaper, StdPerfume, StdPersonalShield, StdPill, StdPlanet, StdPlayerBook, StdPlayingCard, StdPortal, StdPostman, StdPotion, StdPowder, StdProgram, StdRideable, StdRideable, StdRoom, StdScroll, StdShield, StdShipDampener, StdShipEngine, StdShipFuellessThruster, StdShipGravityGen, StdShipShieldGenerator, StdShipThruster, StdShipWeapon, StdShopKeeper, StdSiegeWeapon, StdSling, StdSmokable, StdSpaceBody, StdSpaceShip, StdSpaceTech, StdSpear, StdTechItem, StdThinArea, StdThinArmor, StdThinGrid, StdThinGridArea, StdThinInstance, StdThinPlanet, StdTimeZone, StdTitle, StdTriCorder, StdTub, StdWand, StdWeapon, SteelGauntlets, Stiletto, StoneGiant, StoneGolem, StoneGrid, StoneMaze, StoneRoom, StoneThinGrid, StuddedLeatherArmor, SubThinInstance, Swamp, SwampGrid, SwampThinGrid, Sword, Swordfish, Teacher, ThinRoom, ThreadbareRobes, ThrowingStone, Tiger, Toad, Torch, TrainingSession, TrappedChest, TrappedDoor, TrappedLockedDoor, TreeSurface, Trident, Troll, Turtle, TwoHandedSword, UmberHulk, Undead, UnderSaltWater, UnderSaltWaterColumnGrid, UnderSaltWaterGrid, UnderSaltWaterMaze, UnderSaltWaterThinGrid, UnderWater, UnderWaterColumnGrid, UnderWaterGrid, UnderWaterMaze, UnderWaterThinGrid, UnseenWalkway, Vulture, WalkingBoots, Walrus, Wand_Advancement, Wand_Fire, Wand_Nourishment, WandArchon, WarHammer, Waterskin, WaterSurface, WaterSurfaceColumn, WaterThinSurface, WetCaveGrid, WetCaveMaze, WetCaveRoom, Whale, Whip, Whirlpool, WhiteBear, WhiteDragon, WildEagle, Wineskin, Wolf, Wolverine, WoodenDeck, WoodRoom, WoodRoomGrid, WoodRoomMaze, WoodRoomThinGrid, Woods, WoodsGrid, WoodsMaze, WoodsThinGrid, Worm, 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 delAllEffects(boolean unInvoke)
          Optionally uninvokes and then certainly removes all effects from this object.
 void delEffect(Ability to)
          Delete an effect from this object, whether permanent or temporary.
 void eachEffect(EachApplicable<Ability> applier)
          Applies the given code to each effect on this object
 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.

Parameters:
ID - the Ability ID to look for in effects
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

delAllEffects

void delAllEffects(boolean unInvoke)
Optionally uninvokes and then certainly removes all effects from this object.

Parameters:
unInvoke - send true to uninvoke before deleting

eachEffect

void eachEffect(EachApplicable<Ability> applier)
Applies the given code to each effect on this object

Parameters:
applier - code to execute against each object