OGS Java API Spec

ogs.magic
Class MetamagicFeat

java.lang.Object
  |
  +--ogs.support.Object
        |
        +--ogs.core.Feature
              |
              +--ogs.core.Feat
                    |
                    +--ogs.magic.MetamagicFeat
All Implemented Interfaces:
EventListener
Direct Known Subclasses:
EmpowerSpell, EnlargeSpell, ExtendSpell, HeightenSpell, MaximizeSpell, QuickenSpell, SilentSpell, StillSpell

public abstract class MetamagicFeat
extends Feat

A feat used to improve or enhance a spell in some way at the cost of higher spell slots.


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
MetamagicFeat()
           
 
Method Summary
 boolean attachobject(Object object)
          Attach this feat to a spell.
abstract  int getAddedLevels()
          Determine number of levels added to normal spell level.
 int getCompatibility()
          Determine the compatibility of this type of feat.
 int getGroup()
          Determine the group that this feat belongs to.
 
Methods inherited from class ogs.core.Feat
canAttach, 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

MetamagicFeat

public MetamagicFeat()
Method Detail

attachobject

public boolean attachobject(Object object)
Attach this feat to a spell. If the object is not an instance of a class derived from Spell, this method will return false. This method should always be called first by derived classes that override this method.

Parameters:
object - An instance of a class derived from Spell.
Returns:
True if this feat is attached to the spell.

getCompatibility

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

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

getGroup

public int getGroup()
Determine the group that this feat belongs to. Metamagic feats feats are magic feats.

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

getAddedLevels

public abstract int getAddedLevels()
Determine number of levels added to normal spell level. Metamagic feats use up spell slots higher than a spell's normal level. These added spell levels are used only when filling spell slots.

Returns:
Number of added levels.

OGS Java API Spec