OGS Java API Spec

ogs.magic
Class Descriptors

java.lang.Object
  |
  +--java.util.BitSet
        |
        +--ogs.magic.Descriptors
All Implemented Interfaces:
Cloneable, Serializable

public class Descriptors
extends BitSet

A descriptor indicates the nature of a spell. Descriptors are used mainly when determining immunitites or resistances to certain types of spells. This class represents a standard set of descriptors. The bit set methods provided by the super class are used to manipulate and check individual descriptors. This class can also be extended to add user-defined descriptors if needed. Descriptor values ranging from 1 to 20 are reserved for future use by this class.

See Also:
Serialized Form

Field Summary
static int ACID
          Spells with acidic effects.
static int CHAOTIC
          Spells dealing with chaotic natures.
static int COLD
          Spells with freezing effects.
static int DARKNESS
          Spells with darkening effects.
static int DEATH
          Spells that deal with death.
static int ELECTRICITY
          Spells with shocking effects.
static int EVIL
          Spells dealing with evil natures.
static int FEAR
          Spells that instill fright, terror, and dread.
static int FIRE
          Spells with burning effects.
static int FORCE
          Spells that employ invisible forces.
static int GOOD
          Spells dealing with good natures.
static int LANGUAGE_DEPENDENT
          Spells that depend on language barriers.
static int LAWFUL
          Spells dealing with lawful natures.
static int LIGHT
          Spells with brightening effects.
static int MIND_AFFECTING
          Spells that affect the mind.
static int SONIC
          Spells dealing with tremors, resonances, and vibrations.
static int TELEPORTATION
          Spells that instantly transport objects.
 
Constructor Summary
Descriptors()
          Create an empty set of descriptors.
 
Method Summary
static String getName(int descriptor)
          Determine the name of a descriptor.
protected static boolean isValid(int value)
          Determine if an integer value is a valid descriptor.
 
Methods inherited from class java.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, set, set, set, set, size, toString, xor
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ACID

public static final int ACID
Spells with acidic effects.

See Also:
Constant Field Values

CHAOTIC

public static final int CHAOTIC
Spells dealing with chaotic natures.

See Also:
Constant Field Values

COLD

public static final int COLD
Spells with freezing effects.

See Also:
Constant Field Values

DARKNESS

public static final int DARKNESS
Spells with darkening effects.

See Also:
Constant Field Values

DEATH

public static final int DEATH
Spells that deal with death.

See Also:
Constant Field Values

ELECTRICITY

public static final int ELECTRICITY
Spells with shocking effects.

See Also:
Constant Field Values

EVIL

public static final int EVIL
Spells dealing with evil natures.

See Also:
Constant Field Values

FEAR

public static final int FEAR
Spells that instill fright, terror, and dread.

See Also:
Constant Field Values

FIRE

public static final int FIRE
Spells with burning effects.

See Also:
Constant Field Values

FORCE

public static final int FORCE
Spells that employ invisible forces.

See Also:
Constant Field Values

GOOD

public static final int GOOD
Spells dealing with good natures.

See Also:
Constant Field Values

LANGUAGE_DEPENDENT

public static final int LANGUAGE_DEPENDENT
Spells that depend on language barriers.

See Also:
Constant Field Values

LAWFUL

public static final int LAWFUL
Spells dealing with lawful natures.

See Also:
Constant Field Values

LIGHT

public static final int LIGHT
Spells with brightening effects.

See Also:
Constant Field Values

MIND_AFFECTING

public static final int MIND_AFFECTING
Spells that affect the mind.

See Also:
Constant Field Values

SONIC

public static final int SONIC
Spells dealing with tremors, resonances, and vibrations.

See Also:
Constant Field Values

TELEPORTATION

public static final int TELEPORTATION
Spells that instantly transport objects.

See Also:
Constant Field Values
Constructor Detail

Descriptors

public Descriptors()
Create an empty set of descriptors.

Method Detail

getName

public static String getName(int descriptor)
Determine the name of a descriptor. An empty string is returned if the descriptor is not one of the standard descriptors.

Parameters:
descriptor - One of the standard descriptors (ACID, COLD, etc.)
Returns:
"Acid", "Cold", etc. or "".

isValid

protected static boolean isValid(int value)
Determine if an integer value is a valid descriptor.

Parameters:
value - An integer value.
Returns:
True if value is a valid descriptor.

OGS Java API Spec