com.planet_ink.coffee_mud.core.interfaces
Interface FactionMember

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, 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, Swordfish, Teacher, Tiger, Toad, Troll, Turtle, UmberHulk, Undead, Vulture, Walrus, Whale, WhiteBear, WhiteDragon, WildEagle, Wolf, Wolverine, Worm, Wyvern, Zombie

public interface FactionMember

Something that can belong to one or more factions, and have rank (also called "faction") with it.

See Also:
Faction

Method Summary
 void addFaction(java.lang.String of, int start)
          Adds a new faction to this member, with the given initial rank
 void adjustFaction(java.lang.String of, int amount)
          If this is already a member of the given faction, then the value or rank in that faction will be adjusted by the given amount.
 void copyFactions(FactionMember source)
          Copies the factions that the given member belongs to into this.
 java.util.Enumeration<java.lang.String> factions()
          Returns an enumeration of all the faction id this is a member of.
 int fetchFaction(java.lang.String which)
          Returns the faction rank/value that this member has in the given faction id.
 Faction.FData fetchFactionData(java.lang.String which)
          Returns the complete contextual faction data for this member.
 java.util.List<java.lang.String> fetchFactionRanges()
          Returns an enumeration of the faction range ids that represent the rank that this member has in each of their factions.
 java.lang.String getFactionListing()
          Returns a friendly viewable list of all the factions that this is a member of, along with the rank/value this member has in that faction.
 boolean hasFaction(java.lang.String which)
          Returns whether this is a member of the given faction and has some rank.
 void removeFaction(java.lang.String which)
          Removes this as a member of the given faction, losing all rank.
 

Method Detail

addFaction

void addFaction(java.lang.String of,
                int start)
Adds a new faction to this member, with the given initial rank

Parameters:
of - the facton ID to add to this
start - the initial rank/value in the new faction
See Also:
FactionMember

adjustFaction

void adjustFaction(java.lang.String of,
                   int amount)
If this is already a member of the given faction, then the value or rank in that faction will be adjusted by the given amount. If this is NOT yet a member of the given faction, then the faction is added with the amount as an initial value.

Parameters:
of - the facton ID to add or alter
amount - the amount to alter the faction by, or initial value
See Also:
FactionMember

factions

java.util.Enumeration<java.lang.String> factions()
Returns an enumeration of all the faction id this is a member of.

Returns:
an enumeration of all the faction id this is a member of.
See Also:
FactionMember

fetchFactionRanges

java.util.List<java.lang.String> fetchFactionRanges()
Returns an enumeration of the faction range ids that represent the rank that this member has in each of their factions. So there is one range returned per faction.

Returns:
an enumeration of the faction ranges
See Also:
FactionMember

hasFaction

boolean hasFaction(java.lang.String which)
Returns whether this is a member of the given faction and has some rank.

Parameters:
which - the faction id to search for
Returns:
true if this is a member of the given faction, false otherwise
See Also:
FactionMember

fetchFaction

int fetchFaction(java.lang.String which)
Returns the faction rank/value that this member has in the given faction id.

Parameters:
which - the faction id to return rank/value in
Returns:
the rank value, or Integer.MAX_VALUE if no value found
See Also:
FactionMember

fetchFactionData

Faction.FData fetchFactionData(java.lang.String which)
Returns the complete contextual faction data for this member.

Parameters:
which - the faction id to return rank/value in
Returns:
the faction data
See Also:
Faction.FData

getFactionListing

java.lang.String getFactionListing()
Returns a friendly viewable list of all the factions that this is a member of, along with the rank/value this member has in that faction. The list is semicolon-delimited.

Returns:
friendly viewable list of all the factions
See Also:
FactionMember

removeFaction

void removeFaction(java.lang.String which)
Removes this as a member of the given faction, losing all rank.

Parameters:
which - the faction id to remove
See Also:
FactionMember

copyFactions

void copyFactions(FactionMember source)
Copies the factions that the given member belongs to into this.

Parameters:
source - the source of the factions to copy
See Also:
FactionMember