com.planet_ink.coffee_mud.core.interfaces
Interface AbilityContainer

All Known Subinterfaces:
Deity, MOB
All Known Implementing Classes:
Alligator, AngryCitizen, Ape, Assassin, Beaver, Bee, BlackBear, BlackDragon, BlueDragon, BrassDragon, BronzeDragon, BrownBear, BrownSnake, Buck, Buffalo, Bugbear, Bull, Cat, Centaur, Centipede, Cheetah, Chicken, Chimp, Citizen, Cobra, CommonBat, CopperDragon, Cougar, Cow, Coyote, Crocodile, Deer, DireWolf, Doe, Dog, Dolphin, Doppleganger, Dragon, DrowElf, DrowPriestess, DrowWarrior, DrowWizard, Duck, Elephant, Falcon, FireGiant, FlyingInsect, Fox, Frog, FrostGiant, GardenSnake, GenAuctioneer, GenBanker, GenCow, GenDeity, GenHorse, GenLibrarian, GenMob, GenPostman, GenRideable, GenShopkeeper, GenUndead, GiantBat, GiantScorpion, Gnoll, Goat, GoatDoe, Goblin, GoldDragon, Gorilla, GreenDragon, Hawk, HeavenlyServent, HillGiant, Hornet, Horse, InvisibleStalker, Jaguar, Kitten, LargeBat, Lion, Lizard, LizardMan, LizardManShaman, Minotaur, Monkey, MountainLion, Mouse, Naga, Ogre, Orc, Owl, Panther, Parakeet, Pegasus, PegasusGreater, Penguin, Pig, Prop_FightSpellCast, Prop_HaveEnabler, Prop_HaveSpellCast, Prop_HereEnabler, Prop_HereSpellCast, Prop_ItemSlotFiller, Prop_RideEnabler, Prop_RideSpellCast, Prop_SpellAdder, Prop_UseSpellCast, Prop_UseSpellCast2, Prop_WearEnabler, Prop_WearSpellCast, Puppy, Python, Rabbit, Rat, Rattlesnake, Raven, RedDragon, Scorpion, Seal, Shark, Sheep, SilverDragon, Skeleton, Snake, Spider, Squirrel, StdAuctioneer, StdBanker, StdDeity, StdFactoryMOB, StdLibrarian, StdMOB, StdPostman, StdRideable, StdShopKeeper, StoneGiant, StoneGolem, Studying, Swordfish, Teacher, Tiger, Toad, Troll, Turtle, UmberHulk, Undead, Vulture, Walrus, Whale, WhiteBear, WhiteDragon, WildEagle, Wolf, Wolverine, Worm, Wyvern, Zombie

public interface AbilityContainer

Something that can know or contain abilities for use.


Method Summary
 java.util.Enumeration<Ability> abilities()
          Returns an enumerator of the Ability objects in this container.
 void addAbility(Ability to)
          Adds a new ability to this for use.
 java.util.Enumeration<Ability> allAbilities()
          Returns an enumerator of the Ability objects in this container.
 void delAbility(Ability to)
          Removes the exact given ability object from here.
 void delAllAbilities()
          Removes all owned abilities from this container.
 Ability fetchAbility(int index)
          Returns the Ability object at that index in this container.
 Ability fetchAbility(java.lang.String ID)
          If contained herein, this will return the ability from this container of the given ID.
 Ability fetchRandomAbility()
          Returns a random ability from this container.
 int numAbilities()
          Returns the number of abilities contained herein this object.
 int numAllAbilities()
          Returns the number of all abilities in this container.
 

Method Detail

addAbility

void addAbility(Ability to)
Adds a new ability to this for use. No ability with the same ID can be contained twice.

Parameters:
to - the Ability to add.
See Also:
Ability

delAbility

void delAbility(Ability to)
Removes the exact given ability object from here.

Parameters:
to - the exact Ability to remove
See Also:
Ability

numAbilities

int numAbilities()
Returns the number of abilities contained herein this object. Any extraneous abilities bestowed from other sources will NOT be returned -- only the exact abilities owned herein.

Returns:
the number of owned abilities
See Also:
Ability

fetchAbility

Ability fetchAbility(int index)
Returns the Ability object at that index in this container. Any extraneous abilities bestowed from other sources MAY be returned, so long as index > numAbilities.

Parameters:
index - the index of the Ability object to return
Returns:
the Ability object
See Also:
Ability

fetchAbility

Ability fetchAbility(java.lang.String ID)
If contained herein, this will return the ability from this container of the given ID. Any extraneous abilities bestowed from other sources MAY be returned by this method.

Parameters:
ID - the ID of the ability to return.
Returns:
the Ability object
See Also:
Ability

fetchRandomAbility

Ability fetchRandomAbility()
Returns a random ability from this container. Any extraneous abilities bestowed from other sources MAY be returned by this method.

Returns:
a random Ability
See Also:
Ability

abilities

java.util.Enumeration<Ability> abilities()
Returns an enumerator of the Ability objects in this container. Any extraneous abilities bestowed from other sources will NOT be returned -- only the exact abilities owned herein.

Returns:
An enumerator for abilities

delAllAbilities

void delAllAbilities()
Removes all owned abilities from this container. Any extraneous abilities bestowed from other sources will NOT be removed.


numAllAbilities

int numAllAbilities()
Returns the number of all abilities in this container. Any extraneous abilities bestowed from other sources WILL be counted by this.

Returns:
the number of all abilities in this container

allAbilities

java.util.Enumeration<Ability> allAbilities()
Returns an enumerator of the Ability objects in this container. Any extraneous abilities bestowed from other sources WILL ALSO be returned.

Returns:
An enumerator for all abilities, both in the container and not