com.planet_ink.coffee_mud.core.interfaces
Interface Behavable

All Known Subinterfaces:
Ammunition, AmmunitionWeapon, Area, Armor, AutoGenArea, Book, CagedAnimal, ClanItem, Coins, Combatant, Computer, Container, DeadBody, DeckOfCards, Deity, DoorKey, ElecPanel, Electronics, Exit, FalseLimb, Food, FuelConsumer, GridLocale, HandOfCards, InnKey, Item, ItemPossessor, Light, LocationRoom, MagicDust, MiscMagic, MOB, MusicalInstrument, PackagedItems, PhysicalAgent, Pill, Places, PlayingCard, Potion, PowerGenerator, PowerSource, PrepositionExit, RawMaterial, 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 Behavable

Something that can behave -- means almost everything!


Method Summary
 void addBehavior(Behavior to)
          Add a new behavior to this object.
 void addScript(ScriptingEngine s)
          Add a new runnable script to this object.
 java.util.Enumeration<Behavior> behaviors()
          Returns an enumerator of all the behaviors on this object.
 void delAllBehaviors()
          Removes all behaviors from this object.
 void delAllScripts()
          Removes all executing scripts from this object.
 void delBehavior(Behavior to)
          Delete a behavior from this object.
 void delScript(ScriptingEngine s)
          Remove a running script from this object.
 void eachBehavior(EachApplicable<Behavior> applier)
          Applies the given code to each behavior on this object
 void eachScript(EachApplicable<ScriptingEngine> applier)
          Applies the given code to each scripting engine on this object
 Behavior fetchBehavior(int index)
          Returns a behavior object on this object.
 Behavior fetchBehavior(java.lang.String ID)
          Returns a behavior object listed on this object.
 ScriptingEngine fetchScript(int x)
          Retrieve one of the enumerated scripts running on this object
 int numBehaviors()
          The number of behaviors this object has.
 int numScripts()
          Return the number of scripts running on this object
 java.util.Enumeration<ScriptingEngine> scripts()
          Returns an enumerator of all the scripts on this object.
 

Method Detail

addBehavior

void addBehavior(Behavior to)
Add a new behavior to this object. After calling this method, recoverPhyStats() should be called next in case this behavior object modifies the stats. A Behavior with a given ID() can only be added once per object.

Parameters:
to - The behavior object to add.
See Also:
Behavior, Affectable.recoverPhyStats()

delBehavior

void delBehavior(Behavior to)
Delete a behavior from this object. After calling this method, recoverPhyStats() should be called next in case this behavior object modified the stats.

Parameters:
to - The behavior object to remove.
See Also:
Behavior, Affectable.recoverPhyStats()

numBehaviors

int numBehaviors()
The number of behaviors this object has.

Returns:
the number of behaviors
See Also:
Behavior

fetchBehavior

Behavior fetchBehavior(int index)
Returns a behavior object 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 behavior object
See Also:
Behavior, numBehaviors()

fetchBehavior

Behavior fetchBehavior(java.lang.String ID)
Returns a behavior object listed on this object. The object will be the one with the same ID() string as passed in.

Parameters:
ID - the Behavior ID to look for
Returns:
the behavior object
See Also:
Behavior, CMObject.ID()

behaviors

java.util.Enumeration<Behavior> behaviors()
Returns an enumerator of all the behaviors on this object.

Returns:
an enumerator of all the behaviors on this object.
See Also:
Behavior

eachBehavior

void eachBehavior(EachApplicable<Behavior> applier)
Applies the given code to each behavior on this object

Parameters:
applier - code to execute against each object

addScript

void addScript(ScriptingEngine s)
Add a new runnable script to this object. Objects which are not mobs or areas will gain a temporary tick service for this script.

Parameters:
s - the scripting engine, fully populated, to add
See Also:
ScriptingEngine

delAllBehaviors

void delAllBehaviors()
Removes all behaviors from this object.


delScript

void delScript(ScriptingEngine s)
Remove a running script from this object.

Parameters:
s - the specific scripting engine to remove
See Also:
ScriptingEngine

delAllScripts

void delAllScripts()
Removes all executing scripts from this object.


numScripts

int numScripts()
Return the number of scripts running on this object

Returns:
number of scripts

fetchScript

ScriptingEngine fetchScript(int x)
Retrieve one of the enumerated scripts running on this object

Parameters:
x - which script to return
Returns:
the scripting engine
See Also:
ScriptingEngine

scripts

java.util.Enumeration<ScriptingEngine> scripts()
Returns an enumerator of all the scripts on this object.

Returns:
an enumerator of all the scripts on this object.
See Also:
ScriptingEngine

eachScript

void eachScript(EachApplicable<ScriptingEngine> applier)
Applies the given code to each scripting engine on this object

Parameters:
applier - code to execute against each object