|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.properties.PList wyvern.kernel.maps.MapObject wyvern.kernel.commands.AbstractCommandable wyvern.lib.classes.magic.Spell wyvern.lib.spells.FlameShield
Creates a ring of flames around the caster.
Nested Class Summary |
Nested classes inherited from class wyvern.lib.classes.magic.Spell |
Spell.DamageVisitor, Spell.UsableReagentPredicate |
Field Summary | |
protected static int[] |
bitmaps_
|
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, 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 | |
FlameShield()
|
Method Summary | |
protected int |
chooseRandomTile()
Returns a random image for one of our locations. |
CommandEvent |
createEvent(CommandEvent initial)
Creates the propagation event. |
void |
dispel()
Dispels the spell. |
boolean |
execute(CommandEvent event)
Propagates the spell. |
void |
getAnimationFrames()
Preloads the animation tiles for this spell. |
Rectangle |
getBounds()
The default implementation for non-rectangular objects is to compute the bounds from the location list on each call, so we can speed it up by figuring it out ourselves when we move. |
int |
getDuration()
Returns the duration for the spell. |
int[] |
getImageDescriptors()
Have to manage our appearance manually since we're non-rectangular. |
java.util.List |
getLocations()
We keep track of our own locations (don't use superclass). |
java.util.Set |
getPoints()
Required for spells that occupy area, for damageMonster(). |
int |
getTile(int x,
int y)
Choose a random tile. |
java.lang.String |
getWCType()
Returns "wc-fire", the damage type this spell does. |
void |
initialize()
Adds the default properties for a Spell object. |
protected void |
initLocs()
Don't do this. |
boolean |
knowsCommand(java.lang.String command)
Command implementation. |
void |
methodCalled(java.lang.String hookName,
MethodHookable target,
java.lang.Object data)
Updates our position when the caster moves. |
void |
removeFromMap()
Removes the spell from all points we currently occupy. |
void |
setSpellWC()
Sets the spell's weapon class based on its level. |
void |
start()
Starts the spell. |
void |
targetEnteredMap(MapChangeEvent event)
Notification that the target object has entered a map. |
void |
targetLeftMap(MapChangeEvent event)
Notification that the target object has left its map. |
void |
targetMoved(MapMotionEvent event)
Notification that the target object has moved in its map. |
void |
teleport(int x,
int y)
Don't do anything - we don't need this method. |
void |
updatePosition(Commandable agent)
Positions the spell in all squares adjacent to the caster. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Field Detail |
protected static int[] bitmaps_
Constructor Detail |
public FlameShield()
Method Detail |
public void initialize()
Spell
initialize
in interface GameObject
initialize
in class Spell
public void start()
Spell
start
in interface Commandable
start
in class Spell
public int getDuration()
public void setSpellWC()
public java.lang.String getWCType()
public void updatePosition(Commandable agent)
public int getTile(int x, int y)
getTile
in interface GameObject
getTile
in class MapObject
public Rectangle getBounds()
getBounds
in interface GameObject
getBounds
in class MapObject
public int[] getImageDescriptors()
getImageDescriptors
in interface GameObject
getImageDescriptors
in class MapObject
public void getAnimationFrames()
protected int chooseRandomTile()
public java.util.List getLocations()
getLocations
in interface GameObject
getLocations
in class MapObject
protected void initLocs()
initLocs
in class MapObject
public java.util.Set getPoints()
getPoints
in class Spell
public void methodCalled(java.lang.String hookName, MethodHookable target, java.lang.Object data)
public void targetEnteredMap(MapChangeEvent event)
MapChangeListener
targetEnteredMap
in interface MapChangeListener
public void targetLeftMap(MapChangeEvent event)
MapChangeListener
targetLeftMap
in interface MapChangeListener
public void targetMoved(MapMotionEvent event)
MapMotionListener
targetMoved
in interface MapMotionListener
public boolean knowsCommand(java.lang.String command)
knowsCommand
in interface Command
command
- the entire command string, including arguments
public CommandEvent createEvent(CommandEvent initial)
createEvent
in interface Command
initial
- a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent event)
execute
in interface Command
event
- the CommandEvent to execute
public void dispel()
dispel
in interface Dispellable
dispel
in class Spell
public void removeFromMap()
public void teleport(int x, int y)
teleport
in interface GameObject
teleport
in class MapObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |