com.planet_ink.coffee_mud.Common.interfaces
Interface Faction.FAbilityUsage

All Known Implementing Classes:
DefaultFaction.DefaultFactionAbilityUsage
Enclosing interface:
Faction

public static interface Faction.FAbilityUsage

A Faction Ability Usage object represents a set of criterium that can be used to determine whether this faction allows a mob or player to use a particular ability, or class of abilities.

See Also:
Faction.addAbilityUsage(String), Faction.abilityUsages()

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
 

Method Detail

abilityFlags

java.lang.String abilityFlags()
The unconverted ability mask, denoting ability ids, domains, flags, etc. Is parsed for benefit of other methods below

Returns:
the unconverted ability mask
See Also:
setAbilityFlag(String)

setAbilityFlag

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. Parses the string sent to set many of the methods below.

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:
abilityFlags(), notflag(), possibleAbilityID(), type(), domain(), flag()

notflag

int notflag()
A bitmask of ability flags that must NOT be set for this usage to apply to an ability

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

flag

int flag()
A bitmask of ability flags that MUST be set for this usage to apply to an ability

Returns:
a bitmask of Ability flags that must be set by the ability
See Also:
abilityFlags(), notflag(), Ability.FLAG_DESCS

possibleAbilityID

boolean possibleAbilityID()
Whether the abilityFlags() method is possibly a specific Ability ID

Returns:
true if the abilityFlags() string is an Ability ID()
See Also:
abilityFlags(), CMObject.ID()

type

int type()
An ability code that an ability must be in order for this usage to apply, or -1

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

domain

int domain()
An ability domain that an ability must be in order for this usage to apply, or -1

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

low

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.

Returns:
a minimum faction value
See Also:
abilityFlags(), setLow(int)

setLow

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.

Parameters:
newVal - a new minimum faction value
See Also:
abilityFlags(), low()

high

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.

Returns:
a maximum faction value
See Also:
abilityFlags(), setHigh(int)

setHigh

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.

Parameters:
newVal - a new maximum faction value
See Also:
abilityFlags(), high()

toString

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.

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