OGS Java API Spec

ogs.items
Class Weapon

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.Entity
              |
              +--ogs.core.Item
                    |
                    +--ogs.items.Weapon
All Implemented Interfaces:
EventListener
Direct Known Subclasses:
RangedWeapon

public abstract class Weapon
extends Item

An item used in combat to damage opponents.


Field Summary
static int BASHING
          Inflicts bashing damage.
protected static Die damage
          Die used to roll damage inflicted by weapon.
protected static int[] damageType
          Type of damage inflicted by weapon.
static int EXOTIC
          Requires exotic weapon proficiency.
static int MARTIAL
          Requires martial weapon proficiency.
protected static int normalThreatRange
          Threat range of a normal weapon of this class.
static int PIERCING
          Inflicts piercing damage.
static int SIMPLE
          Requires simple weapon proficiency.
static int SLASHING
          Inflicts slashing damage.
protected  int threatRange
          Threat range of this particular weapon.
 
Fields inherited from class ogs.core.Item
GLASS, IRON, PAPER, STONE, UNKNOWN, WOOD
 
Fields inherited from class ogs.core.Entity
currentHealth, defense, maximumHealth, size, weight
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
Weapon()
           
 
Method Summary
static int[] getDamageType()
          Determine type of damage inflicted by weapon.
static int getNormalThreatRange()
          Determine threat range of a normal weapon.
static int getProficiency()
          Determine proficiency of weapon.
 int getThreatRange()
          Determine threat range of this weapon.
 
Methods inherited from class ogs.core.Item
getDensity, getHardness, getMaterial, getThickness, getWorth, setDensity, setHardness, setMaterial, setThickness, setWorth, updateHealthPoints
 
Methods inherited from class ogs.core.Entity
getCurrentHealth, getDefense, getMaximumHealth, getSize, getWeight, setCurrentHealth, setMaximumHealth, setWeight
 
Methods inherited from class ogs.support.Object
addListener, handleEvent, notifyListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLE

public static final int SIMPLE
Requires simple weapon proficiency.

See Also:
Constant Field Values

MARTIAL

public static final int MARTIAL
Requires martial weapon proficiency.

See Also:
Constant Field Values

EXOTIC

public static final int EXOTIC
Requires exotic weapon proficiency.

See Also:
Constant Field Values

BASHING

public static final int BASHING
Inflicts bashing damage.

See Also:
Constant Field Values

PIERCING

public static final int PIERCING
Inflicts piercing damage.

See Also:
Constant Field Values

SLASHING

public static final int SLASHING
Inflicts slashing damage.

See Also:
Constant Field Values

damageType

protected static int[] damageType
Type of damage inflicted by weapon.


damage

protected static Die damage
Die used to roll damage inflicted by weapon.


normalThreatRange

protected static int normalThreatRange
Threat range of a normal weapon of this class.


threatRange

protected int threatRange
Threat range of this particular weapon. Certain feats and magical properties can alter the threat range of a weapon.

Constructor Detail

Weapon

public Weapon()
Method Detail

getProficiency

public static int getProficiency()
Determine proficiency of weapon. Subclasses must override this method and return one of the values SIMPLE, MARTIAL, or EXOTIC.

Returns:
Zero (0).

getDamageType

public static int[] getDamageType()
Determine type of damage inflicted by weapon. A weapon may inflict more than one type of damage.

Returns:
SLASHING, BASHING, PIERCING, or combination thereof.

getNormalThreatRange

public static int getNormalThreatRange()
Determine threat range of a normal weapon.

Returns:
Threat range of a normal weapon.

getThreatRange

public int getThreatRange()
Determine threat range of this weapon.

Returns:
Threat range of this weapon.

OGS Java API Spec