com.planet_ink.coffee_mud.Common
Class DefaultFaction.DefaultFactionAbilityUsage

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultFaction.DefaultFactionAbilityUsage
All Implemented Interfaces:
Faction.FactionAbilityUsage
Enclosing class:
DefaultFaction

public class DefaultFaction.DefaultFactionAbilityUsage
extends java.lang.Object
implements Faction.FactionAbilityUsage


Field Summary
 int domain
           
 int flag
           
 int high
           
 java.lang.String ID
           
 int low
           
 int notflag
           
 boolean possibleAbilityID
           
 int type
           
 
Constructor Summary
DefaultFaction.DefaultFactionAbilityUsage()
           
DefaultFaction.DefaultFactionAbilityUsage(java.lang.String key)
           
 
Method Summary
 java.lang.String abilityFlags()
          The unconverted ability mask, denoting ability ids, domains, flags, etc.
 int domain()
          An ability domain that an ability must be in order for this usage to apply, or -1
 int flag()
          A bitmask of ability flags that MUST be set for this usage to apply to an ability
 int high()
          Returns the maximum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.
 int low()
          The minimum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.
 int notflag()
          A bitmask of ability flags that must NOT be set for this usage to apply to an ability
 boolean possibleAbilityID()
          Whether the abilityFlags() method is possibly a specific Ability ID
 java.util.List<java.lang.String> setAbilityFlag(java.lang.String str)
          Sets the ability usage masks and methods from an ability id, domain, flags, etc.
 void setHigh(int newVal)
          Sets the maximum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.
 void setLow(int newVal)
          Sets the minimum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.
 java.lang.String toString()
          Returns a semicolon-delimited string of the values of this ability usage, suitable for using to create a new one later.
 int type()
          An ability code that an ability must be in order for this usage to apply, or -1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public java.lang.String ID

possibleAbilityID

public boolean possibleAbilityID

type

public int type

domain

public int domain

flag

public int flag

low

public int low

high

public int high

notflag

public int notflag
Constructor Detail

DefaultFaction.DefaultFactionAbilityUsage

public DefaultFaction.DefaultFactionAbilityUsage()

DefaultFaction.DefaultFactionAbilityUsage

public DefaultFaction.DefaultFactionAbilityUsage(java.lang.String key)
Method Detail

abilityFlags

public java.lang.String abilityFlags()
Description copied from interface: Faction.FactionAbilityUsage
The unconverted ability mask, denoting ability ids, domains, flags, etc. Is parsed for benefit of other methods below

Specified by:
abilityFlags in interface Faction.FactionAbilityUsage
Returns:
the unconverted ability mask
See Also:
Faction.FactionAbilityUsage.setAbilityFlag(String)

possibleAbilityID

public boolean possibleAbilityID()
Description copied from interface: Faction.FactionAbilityUsage
Whether the abilityFlags() method is possibly a specific Ability ID

Specified by:
possibleAbilityID in interface Faction.FactionAbilityUsage
Returns:
true if the abilityFlags() string is an Ability ID()
See Also:
Faction.FactionAbilityUsage.abilityFlags(), CMObject.ID()

type

public int type()
Description copied from interface: Faction.FactionAbilityUsage
An ability code that an ability must be in order for this usage to apply, or -1

Specified by:
type in interface Faction.FactionAbilityUsage
Returns:
an ability code that an ability must be in order for this usage to apply, or -1
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Ability.ACODE_DESCS

domain

public int domain()
Description copied from interface: Faction.FactionAbilityUsage
An ability domain that an ability must be in order for this usage to apply, or -1

Specified by:
domain in interface Faction.FactionAbilityUsage
Returns:
an ability domain that an ability must be in order for this usage to apply, or -1
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Ability.DOMAIN_DESCS

flag

public int flag()
Description copied from interface: Faction.FactionAbilityUsage
A bitmask of ability flags that MUST be set for this usage to apply to an ability

Specified by:
flag in interface Faction.FactionAbilityUsage
Returns:
a bitmask of Ability flags that must be set by the ability
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.notflag(), Ability.FLAG_DESCS

low

public int low()
Description copied from interface: Faction.FactionAbilityUsage
The minimum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.

Specified by:
low in interface Faction.FactionAbilityUsage
Returns:
a minimum faction value
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.setLow(int)

high

public int high()
Description copied from interface: Faction.FactionAbilityUsage
Returns the maximum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.

Specified by:
high in interface Faction.FactionAbilityUsage
Returns:
a maximum faction value
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.setHigh(int)

notflag

public int notflag()
Description copied from interface: Faction.FactionAbilityUsage
A bitmask of ability flags that must NOT be set for this usage to apply to an ability

Specified by:
notflag in interface Faction.FactionAbilityUsage
Returns:
a bitmask of Ability flags that must not be set by the ability
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.flag(), Ability.FLAG_DESCS

setLow

public void setLow(int newVal)
Description copied from interface: Faction.FactionAbilityUsage
Sets the minimum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.

Specified by:
setLow in interface Faction.FactionAbilityUsage
Parameters:
newVal - a new minimum faction value
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.low()

setHigh

public void setHigh(int newVal)
Description copied from interface: Faction.FactionAbilityUsage
Sets the maximum value that a player must have in the faction to be able to use the selected ability referred to by the ability flags of this usage criterium.

Specified by:
setHigh in interface Faction.FactionAbilityUsage
Parameters:
newVal - a new maximum faction value
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.high()

toString

public java.lang.String toString()
Description copied from interface: Faction.FactionAbilityUsage
Returns a semicolon-delimited string of the values of this ability usage, suitable for using to create a new one later.

Specified by:
toString in interface Faction.FactionAbilityUsage
Overrides:
toString in class java.lang.Object
Returns:
a semicolon-delimited string of the values of this ability usage
See Also:
Faction.addAbilityUsage(String)

setAbilityFlag

public java.util.List<java.lang.String> setAbilityFlag(java.lang.String str)
Description copied from interface: Faction.FactionAbilityUsage
Sets the ability usage masks and methods from an ability id, domain, flags, etc. Parses the string sent to set many of the methods below.

Specified by:
setAbilityFlag in interface Faction.FactionAbilityUsage
Parameters:
str - the ability usage mask
Returns:
A vector of words inside the given string that are not valid or were not understood.
See Also:
Faction.FactionAbilityUsage.abilityFlags(), Faction.FactionAbilityUsage.notflag(), Faction.FactionAbilityUsage.possibleAbilityID(), Faction.FactionAbilityUsage.type(), Faction.FactionAbilityUsage.domain(), Faction.FactionAbilityUsage.flag()