OGS Java API Spec

ogs.magic
Class Range

java.lang.Object
  |
  +--ogs.magic.Range
Direct Known Subclasses:
AbsoluteRange

public class Range
extends Object

Maximum distance from caster that a spell affect can occur. A spell range can be one of several different types. The standard types are Personal, Touch, Absolute, Close, Medium, Long, and Unlimited. This class represents the simple types Personal, Touch, and Unlimited. The Absolute, Close, Medium, and Long types are represented by the AbsoluteRange and LevelRange classes.


Field Summary
static int ABSOLUTE
          Absolute range is limited to an absolute distance.
static int CLOSE
          Close range reaches 25 feet plus 5 feet per 2 caster levels.
static int LONG
          Long range reaches 400 feet plus 40 feet per caster level.
static int MEDIUM
          Medium range reaches 100 feet plus 10 feet per caster level.
static int PERSONAL
          Personal range affects the caster only.
static int TOUCH
          Touch range is limited to arm's reach.
static int UNLIMITED
          Unlimited range reaches anywhere on the same plane of existance.
 
Constructor Summary
protected Range(int type)
          Create a new range.
 
Method Summary
 int getType()
          Determine the type of range.
static Range Personal()
          Create a new Personal spell range.
static Range Touch()
          Create a new Touch spell range.
static Range Unlimited()
          Create a new Unlimited spell range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSONAL

public static final int PERSONAL
Personal range affects the caster only.

See Also:
Constant Field Values

TOUCH

public static final int TOUCH
Touch range is limited to arm's reach.

See Also:
Constant Field Values

ABSOLUTE

public static final int ABSOLUTE
Absolute range is limited to an absolute distance.

See Also:
Constant Field Values

CLOSE

public static final int CLOSE
Close range reaches 25 feet plus 5 feet per 2 caster levels.

See Also:
Constant Field Values

MEDIUM

public static final int MEDIUM
Medium range reaches 100 feet plus 10 feet per caster level.

See Also:
Constant Field Values

LONG

public static final int LONG
Long range reaches 400 feet plus 40 feet per caster level.

See Also:
Constant Field Values

UNLIMITED

public static final int UNLIMITED
Unlimited range reaches anywhere on the same plane of existance.

See Also:
Constant Field Values
Constructor Detail

Range

protected Range(int type)
Create a new range.

Parameters:
type - Type of range (PERSONAL, TOUCH, ABSOLUTE, etc.)
Throws:
IllegalArgumentException - If type is not a valid range type.
Method Detail

Personal

public static Range Personal()
Create a new Personal spell range.

Returns:
Spell range with Personal type.

Touch

public static Range Touch()
Create a new Touch spell range.

Returns:
Spell range with Touch type.

Unlimited

public static Range Unlimited()
Create a new Unlimited spell range.

Returns:
Spell range with Unlimited type.

getType

public int getType()
Determine the type of range.

Returns:
Type of range (PERSONAL, TOUCH, ABSOLUTE, etc.)

OGS Java API Spec