|
OGS Java API Spec | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ogs.magic.SpellList
A spell list associates spells with cclasses and domains. The association between a spell and a cclass or domain determines the spell level. A spell level is an integer value that can range from 0 to 9.
CClass,
Domain| Field Summary | |
protected HashMap |
casterMap
Maps cclasses and domains to spells. |
| Constructor Summary | |
protected |
SpellList()
Create an empty spell list. |
| Method Summary | |
Integer |
getLevel(Class spellClass,
Class casterClass)
Determine the spell level for a class of spell and caster. |
Integer |
getLevel(Spell spell,
Class casterClass)
Determine the spell level for a spell and a class of caster. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected HashMap casterMap
Integer.
Derived classes must build the caster map and spell maps.
| Constructor Detail |
protected SpellList()
| Method Detail |
public Integer getLevel(Class spellClass,
Class casterClass)
CClass
or Domain.
spellClass - A class derived from Spell.casterClass - A class derived from CClass or Domain.
ClassCastException - If the spell or caster class is not
derived from the appropriate class.
public Integer getLevel(Spell spell,
Class casterClass)
CClass or Domain.
spell - A spell object.casterClass - A class derived from CClass or Domain.
ClassCastException - If the spell or caster class is not
derived from the appropriate class.
|
OGS Java API Spec | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||