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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetamagicFeat
public MetamagicFeat()
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.