wyvern.lib.classes.magic
Class SummonSpell

java.lang.Object
  extended bywyvern.kernel.properties.PList
      extended bywyvern.kernel.maps.MapObject
          extended bywyvern.kernel.commands.AbstractCommandable
              extended bywyvern.lib.classes.magic.Spell
                  extended bywyvern.lib.classes.magic.SummonSpell
All Implemented Interfaces:
Broadcaster, Commandable, Dispellable, GameObject, Hookable, HookCallback, MethodHookable, PropertyList, RemoteAudio, Targetable
Direct Known Subclasses:
Spawn, SummonAirElemental, SummonAnimal, SummonDemon, SummonEarthElemental, SummonElemental, SummonFireElemental, SummonGolem, SummonInsect, SummonMonster, SummonUndead, SummonWaterElemental

public abstract class SummonSpell
extends Spell
implements HookCallback

Abstract superclass of the various summoning spells.

Version:
1.0, Oct 13, 2001
Author:
Steve Yegge

Nested Class Summary
 
Nested classes inherited from class wyvern.lib.classes.magic.Spell
Spell.DamageVisitor, Spell.UsableReagentPredicate
 
Field Summary
 
Fields inherited from class wyvern.lib.classes.magic.Spell
AIR, AIR_AND_DEATH, AIR_AND_LIFE, AIR_AND_MIND, AIR_AND_SPIRIT, ART_MANA_REDUCTIONS, bitmaps_, CONJURATION, damager_, DEATH, DEATH_AND_MIND, DEATH_AND_SPIRIT, EARTH, EARTH_AND_AIR, EARTH_AND_DEATH, EARTH_AND_LIFE, EARTH_AND_MIND, EARTH_AND_SPIRIT, ENCHANTMENT, EVOCATION, FIRE, FIRE_AND_AIR, FIRE_AND_DEATH, FIRE_AND_EARTH, FIRE_AND_LIFE, FIRE_AND_MIND, FIRE_AND_SPIRIT, FIRE_AND_WATER, INCANTATION, LIFE, LIFE_AND_DEATH, LIFE_AND_MIND, LIFE_AND_SPIRIT, MIND, MIND_AND_SPIRIT, SELF_DAMAGE_CHANCE, SPIRIT, WATER, WATER_AND_AIR, WATER_AND_DEATH, WATER_AND_EARTH, WATER_AND_LIFE, WATER_AND_MIND, WATER_AND_SPIRIT
 
Fields inherited from class wyvern.kernel.commands.AbstractCommandable
hookList_, queue_, started_
 
Fields inherited from class wyvern.kernel.maps.MapObject
IN_MAP_EDITOR, listenerList_
 
Fields inherited from class wyvern.kernel.properties.PList
readOnly_
 
Fields inherited from interface wyvern.lib.PropertyList
PROPERTY_PACKAGE
 
Fields inherited from interface wyvern.common.net.RemoteAudio
DEFAULT_ALERT_GAIN, DEFAULT_ALERT_REPEAT_DELAY, DEFAULT_ALERT_REPEATS, DEFAULT_GAIN, DEFAULT_REPEAT_DELAY, DEFAULT_REPEATS
 
Constructor Summary
SummonSpell()
           
 
Method Summary
 void dispel()
          Dispels the spell.
 Art getArt()
          Returns the Art for this spell.
 Monster getMonster()
          Returns a monster.
abstract  java.lang.String getMonsterType()
          Subclasses should use this to figure out what to summon.
 void hookEvent(java.lang.String hookName, CommandEvent event)
          Called when the monster dies.
 void initialize()
          Adds the default properties for a Spell object.
 void modifyMonster(Monster mon)
          Affords the subclass an opportunity to make changes to the summoned monster after it's been instantiated.
 void start()
          Starts the spell.
 
Methods inherited from class wyvern.lib.classes.magic.Spell
addReagent, canDamageSelf, canEnter, canEnter, castingOnSelf, cloneSpell, consumeReagents, damageMonster, damageMonsters, destroy, ensureAI, ensureDirection, ensureReagents, findTargetObject, findTargetObject, fireDirection, fireLocation, getAgent, getAnimationFrames, getBlockingPredicate, getCastingDelay, getCommand, getDescString, getElement, getLevel, getLoreCost, getMagicItem, getPoints, getReagents, getRequiredMana, getSpeed, getSpellArgs, getSpellDescription, getSpellName, getTarget, getTargetName, getTargetPoint, isBlessed, isConjuration, isCursed, isEnchantment, isEvocation, isIncantation, isPotion, logUsage, makeDispellable, reloadSpells, removeFromActiveListIfPresent, setAgent, setLevel, setMagicItem, setSpeed, setSpellArgs, setTarget, setTargetName, setTargetPoint, tellCaster
 
Methods inherited from class wyvern.kernel.commands.AbstractCommandable
addAttack, addHook, addMessageListener, addMethodHook, checkAnimated, command, command, commandNow, ensureEventQueue, fireMessageReceived, getAI, getCapName, getCombatQueue, getEncumbrance, getFiringPoint, getHookList, getHooks, getInventory, getName, getQueue, isCommandable, isStarted, isTelnet, message, message, message, pauseSound, playAlert, playAlert, playDefaultMusic, playPriorityMusic, playPriorityMusic, playSound, playSound, registerCommand, removeAttack, removeHook, removeMessageListener, removeMethodHook, resumeSound, runFailedPostHook, runMethodHook, runPostHook, runPreHook, sendPicture, sendPicture, setAI, setEncumbrance, setMusicGain, setName, setSoundGain, stop, stopAllSounds, stopMusic, stopSound, unregisterCommand
 
Methods inherited from class wyvern.kernel.maps.MapObject
addContainerChangeListener, addDefaultProperty, addMapChangeListener, addMapMotionListener, addMotionTracker, addObjectTracker, addPrefix, addSuffix, addToMap, bless, broadcast, broadcast, broadcast, broadcast, broadcast, canEnterBlockedBy, canMove, canMove, canMoveBlockedBy, canMoveBlockedBy, canMoveTo, canMoveToBlockedBy, checkDrop, curse, cycleFrame, ensureListenerList, ensureWeight, externalize, fireContainerEntered, fireContainerExited, fireEnteredMap, fireExitedMap, fireMovedInMap, getAlpha, getAppearance, getArchetype, getBaseName, getBaseWeight, getBitmap, getBounds, getCanonicalClassName, getCategory, getContainer, getCreator, getDamagedDescription, getDescription, getDirection, getGenderPossessive, getGenderPronoun, getImage, getImageDescriptor, getImageDescriptors, getLayer, getLocations, getMap, getMapLink, getMaterial, getMaterialDescription, getMover, getOwningPlayer, getParentMap, getPrefixes, getQuantity, getReferenceLoc, getRelativeLocs, getShortDesc, getSuffixes, getTile, getTile, getValue, getWeight, groupString, inContainer, initLocs, inMapEditor, invalidate, invalidateImage, invalidateParent, invalidateText, isAnimated, isAttackable, isDamned, isGroupable, isIdentified, isMonster, isMonsterOrPlayer, isPlayer, isTerrain, isUncursed, isUnpaid, isWizard, makeClone, markPaid, markUnpaid, move, occupies, positionAt, positionAtMap, remove, removeContainerChangeListener, removeFromMap, removeMapChangeListener, removeMapMotionListener, removeMotionTracker, removeObjectTracker, removePrefix, removeSuffix, setAlpha, setAnimated, setBitmap, setCategory, setContainer, setDefaultBitmap, setDefaultCategory, setDefaultDesc, setDefaultImage, setDefaultIntProperty, setDefaultLayer, setDefaultMaterial, setDefaultProperty, setDefaultShortDesc, setDirection, setImage, setImage, setLayer, setLocations, setMap, setMapLink, setQuantity, setShape, setSize, setTransientSize, setWeight, setWeight, teleport, toString, updateMapLocation
 
Methods inherited from class wyvern.kernel.properties.PList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, debugProperties, dismantlePropertyList, getDoubleProperty, getInheritedProperty, getInteger, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProfilingInfo, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wyvern.lib.GameObject
addContainerChangeListener, addMapChangeListener, addMapMotionListener, addMotionTracker, addObjectTracker, addPrefix, addSuffix, bless, canEnterBlockedBy, canMove, canMove, canMoveBlockedBy, canMoveBlockedBy, canMoveTo, canMoveToBlockedBy, checkDrop, curse, cycleFrame, externalize, getAlpha, getAppearance, getArchetype, getBaseWeight, getBitmap, getBounds, getCanonicalClassName, getCategory, getContainer, getCreator, getDamagedDescription, getDescription, getDirection, getGenderPossessive, getGenderPronoun, getImage, getImageDescriptor, getImageDescriptors, getLayer, getLocations, getMap, getMapLink, getMaterial, getMaterialDescription, getMover, getOwningPlayer, getParentMap, getPrefixes, getQuantity, getReferenceLoc, getRelativeLocs, getShortDesc, getSuffixes, getTile, getTile, getValue, getWeight, inContainer, inMapEditor, invalidate, invalidateImage, invalidateParent, invalidateText, isAnimated, isAttackable, isDamned, isGroupable, isIdentified, isMonster, isMonsterOrPlayer, isPlayer, isTerrain, isUncursed, isUnpaid, isWizard, makeClone, markPaid, markUnpaid, move, occupies, positionAt, positionAtMap, remove, removeContainerChangeListener, removeMapChangeListener, removeMapMotionListener, removeMotionTracker, removeObjectTracker, removePrefix, removeSuffix, setAlpha, setAnimated, setBitmap, setCategory, setContainer, setDirection, setImage, setImage, setLayer, setLocations, setMap, setMapLink, setQuantity, setShape, setSize, setTransientSize, setWeight, setWeight, teleport
 
Methods inherited from interface wyvern.lib.PropertyList
addProperty, addTransientProperty, adjustDoubleProperty, adjustIntProperty, adjustLongProperty, adjustTransientDoubleProperty, adjustTransientIntProperty, adjustTransientLongProperty, countLocalProperties, getDoubleProperty, getInheritedProperty, getIntProperty, getLocalProperties, getLocalProperty, getLongProperty, getParent, getPersistentDoubleProperty, getPersistentIntProperty, getPersistentLocalProperties, getPersistentLongProperty, getPersistentProperty, getProperties, getProperties, getPropertiesIncludingTransients, getPropertiesIncludingTransients, getProperty, getSerializableProperties, getSerializableProperty, getStringProperty, getTransientDoubleProperty, getTransientIntProperty, getTransientLongProperty, getTransientProperties, getTransientProperty, hasLocalProperty, hasPersistentProperty, hasProperty, hasTransientProperty, inheritProperty, isReadOnly, isRemoved, isTransientlyRemoved, printLocalProperties, printProperties, printProperties, printTransientProperties, removeProperty, removeTransientProperty, setDoubleProperty, setIntProperty, setLongProperty, setParent, setProperty, setReadOnly, setTransientDoubleProperty, setTransientIntProperty, setTransientLongProperty, setTransientProperty, toString, transientlyRemoveProperty
 
Methods inherited from interface wyvern.lib.Broadcaster
broadcast, broadcast, broadcast, broadcast, broadcast
 

Constructor Detail

SummonSpell

public SummonSpell()
Method Detail

initialize

public void initialize()
Description copied from class: Spell
Adds the default properties for a Spell object.

Specified by:
initialize in interface GameObject
Overrides:
initialize in class Spell

getArt

public Art getArt()
Returns the Art for this spell. Default is conjuration.

Overrides:
getArt in class Spell

start

public void start()
Starts the spell.

Specified by:
start in interface Commandable
Overrides:
start in class Spell

getMonsterType

public abstract java.lang.String getMonsterType()
Subclasses should use this to figure out what to summon.


modifyMonster

public void modifyMonster(Monster mon)
Affords the subclass an opportunity to make changes to the summoned monster after it's been instantiated. Subclass doesn't have to override this method.


getMonster

public Monster getMonster()
Returns a monster. Subclasses should override this if they want to instantiate their own creature, rather than just returning an archetype in getMonsterType() for the superclass to instantiate. In other words, if you return null in getMonsterType(), you should return something from this method (and vice-versa).


hookEvent

public void hookEvent(java.lang.String hookName,
                      CommandEvent event)
Called when the monster dies.

Specified by:
hookEvent in interface HookCallback
Parameters:
hookName - the name of the hook, such as "movePreHook".
event - the CommandEvent encapsulating the event parameters

dispel

public void dispel()
Dispels the spell.

Specified by:
dispel in interface Dispellable
Overrides:
dispel in class Spell