|
||||||||||
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.classes.magic.TimedSpell wyvern.lib.spells.CharmMonster
Allows the caster to command a monster for a while.
Nested Class Summary |
Nested classes inherited from class wyvern.lib.classes.magic.Spell |
Spell.DamageVisitor, Spell.UsableReagentPredicate |
Field Summary | |
protected Commandable |
agent_
|
protected AI |
ai_
|
protected Monster |
monster_
|
Fields inherited from class wyvern.lib.classes.magic.TimedSpell |
timer_ |
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 | |
CharmMonster()
|
Method Summary | |
CommandEvent |
createEvent(CommandEvent initial)
Creates the command-monster event. |
boolean |
execute(CommandEvent event)
Executes the event, by passing the typed command on to the monster. |
AI |
getAi()
Returns the monster's AI before we took control |
Monster |
getMonster()
Returns the monster we've charmed, if any |
boolean |
knowsCommand(java.lang.String command)
Returns true if we know the command. |
void |
removeEffects()
The spell wore off, either from timing out or being explicitly dispelled. |
void |
setAi(AI ai)
Sets the monster's AI before we took control |
void |
setMonster(Monster monster)
Sets the monster we've charmed, if any |
void |
start()
Starts the spell. |
Methods inherited from class wyvern.lib.classes.magic.TimedSpell |
dispel, killTimer, setTimer, timerExpired |
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 Monster monster_
protected AI ai_
protected Commandable agent_
Constructor Detail |
public CharmMonster()
Method Detail |
public Monster getMonster()
public void setMonster(Monster monster)
monster
- the monster we've charmed, if anypublic AI getAi()
public void setAi(AI ai)
ai
- the monster's AI before we took controlpublic void start()
Spell
start
in interface Commandable
start
in class Spell
public void removeEffects()
removeEffects
in class TimedSpell
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |