OGS Java API Spec

ogs.feats
Class ArmorProficiency

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.Feature
              |
              +--ogs.core.Feat
                    |
                    +--ogs.feats.ArmorProficiency
All Implemented Interfaces:
EventListener

public class ArmorProficiency
extends Feat

A feat that allows the effective use of armor. A creature that uses armor without begin proficient with it suffers the armor check penalty to attack rolls and skill checks that involve moving including Ride. A creature must be proficient with light armor before the creature can be proficient with medium armor. (The Light Armor Proficiency feat is a prerequisite for the Medium Armor Proficiency feat.) A creature must be proficient with medium armor before the creature can be proficient with heavy armor.


Field Summary
 
Fields inherited from class ogs.core.Feat
COMBAT, CUMULATIVE, EXCLUSIVE, GENERAL, MAGIC, REPEATABLE, SPECIAL
 
Fields inherited from class ogs.support.Object
listeners
 
Constructor Summary
protected ArmorProficiency(int proficiency)
          Create a new armor proficiency feat.
 
Method Summary
protected  boolean canAttach(Object object)
          Determine if this feat can be attached to an object.
static ArmorProficiency createHeavy()
          Create a new Heavy Armor Proficiency feat.
static ArmorProficiency createLight()
          Create a new Light Armor Proficiency feat.
static ArmorProficiency createMedium()
          Create a new Medium Armor Proficiency feat.
 int getCompatibility()
          Determine the compatibility of this type of feat.
 int getGroup()
          Determine the group that this feat belongs to.
 int getProficiency()
          Determine the proficiency of this feat.
 boolean isProficient(Armor armor)
          Determine if armor is proficient armor.
 
Methods inherited from class ogs.core.Feat
findFeat, getSlots, getSlotsLevel
 
Methods inherited from class ogs.core.Feature
attachObject, canDetach, detachObject, getObject
 
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
 

Constructor Detail

ArmorProficiency

protected ArmorProficiency(int proficiency)
Create a new armor proficiency feat.

Parameters:
proficiency - Proficiency of armor: LIGHT, MEDIUM, or HEAVY.
Method Detail

createLight

public static ArmorProficiency createLight()
Create a new Light Armor Proficiency feat.

Returns:
A new Light Armor Proficiency feat.

createMedium

public static ArmorProficiency createMedium()
Create a new Medium Armor Proficiency feat.

Returns:
A new Medium Armor Proficiency feat.

createHeavy

public static ArmorProficiency createHeavy()
Create a new Heavy Armor Proficiency feat.

Returns:
A new Heavy Armor Proficiency feat.

getCompatibility

public int getCompatibility()
Determine the compatibility of this type of feat. Armor proficiency feats are exclusive feats: only one instance of each armor proficiency feat can be attached to a creature at one time.

Specified by:
getCompatibility in class Feat
Returns:
Feat.EXCLUSIVE.

getGroup

public int getGroup()
Determine the group that this feat belongs to. Armor proficiency feats are general feats.

Specified by:
getGroup in class Feat
Returns:
Feat.GENERAL

getProficiency

public int getProficiency()
Determine the proficiency of this feat.

Returns:
Type of armor proficiency: LIGHT, MEDIUM, or HEAVY.

canAttach

protected boolean canAttach(Object object)
Determine if this feat can be attached to an object. An armor proficiency feat can be attached to a creature if the creature does not already have this type of armor proficiency feat and already has the prerequisite feats (if any).

Overrides:
canAttach in class Feat
Parameters:
object - Object to attach this feat to.
Returns:
True if this feat is attached to object.

isProficient

public boolean isProficient(Armor armor)
Determine if armor is proficient armor. Proficient armor is armor that a creature is proficient with. If this armor proficiency feat is not attached to a creature, then the armor is not proficient armor.

Parameters:
armor - A suit of armor.
Returns:
True if armor is proficient armor.

OGS Java API Spec