OGS Java API Spec

ogs.magic
Class Component

java.lang.Object
  |
  +--ogs.magic.Component
Direct Known Subclasses:
ExperienceCost, PhysicalComponent

public class Component
extends Object

An element required for the preparation or casting of a spell. A spell component can be one of several different types. The standard types are Verbal, Somantic, Material, Focus, Divine Focus, and Experience Cost. This class represents the simple types Verbal, Somantic, and Divine Focus. The remaining types Material, Focus, and Experience Cost are represented by the PhysicalComponent and ExperienceCost classes.


Field Summary
static int DIVINE_FOCUS
          A holy symbol or other religous object.
static int EXPERIENCE_COST
          A loss of experience points.
static int FOCUS
          A reusable substance or object.
static int MATERIAL
          An expendible substance or object.
static int SOMANTIC
          A bodily movement or gesture.
static int VERBAL
          A spoken or audible incantation.
 
Constructor Summary
protected Component(int type)
          Create a new component.
 
Method Summary
static Component DivineFocus()
          Create a new Divine Focus spell component.
 String getAbbreviation()
          Determine the abbreviation for this type of component.
 int getType()
          Determine the type of component.
static Component Somantic()
          Create a new Somantic spell component.
static Component Verbal()
          Create a new Verbal spell component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBAL

public static final int VERBAL
A spoken or audible incantation. This componenet requires that the caster be able to speak or sound out the proper vocalizations.

See Also:
Constant Field Values

SOMANTIC

public static final int SOMANTIC
A bodily movement or gesture. Somantic components require that the caster is not hindered and has freedom of movement.

See Also:
Constant Field Values

MATERIAL

public static final int MATERIAL
An expendible substance or object. Material components are consumed during spell preparation or casting.

See Also:
Constant Field Values

FOCUS

public static final int FOCUS
A reusable substance or object. Focus components are not consumed during spell preparation or casting.

See Also:
Constant Field Values

DIVINE_FOCUS

public static final int DIVINE_FOCUS
A holy symbol or other religous object. Divine focus components are required for most divine spells.

See Also:
Constant Field Values

EXPERIENCE_COST

public static final int EXPERIENCE_COST
A loss of experience points. Experience cost components are usually required in more powerful spells.

See Also:
Constant Field Values
Constructor Detail

Component

protected Component(int type)
Create a new component.

Parameters:
type - Type of component (VERBAL, SOMANTIC, MATERIAL, etc.)
Throws:
IllegalArgumentException - If type is not a valid component type.
Method Detail

Verbal

public static Component Verbal()
Create a new Verbal spell component.

Returns:
Verbal spell component.

Somantic

public static Component Somantic()
Create a new Somantic spell component.

Returns:
Somantic spell component.

DivineFocus

public static Component DivineFocus()
Create a new Divine Focus spell component.

Returns:
Spell component with Divine Focus type.

getType

public int getType()
Determine the type of component.

Returns:
Type of component (VERBAL, SOMANTIC, MATERIAL, etc.)

getAbbreviation

public String getAbbreviation()
Determine the abbreviation for this type of component.

Returns:
Abbreviation for this type of component.

OGS Java API Spec