|
||||||||||
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.lib.classes.weapons.WeaponImpl wyvern.lib.classes.weapons.Missile
This is the class used for arrows, darts, sling stones, and any other object that flies through the air.
Field Summary | |
protected Weapon |
rangeWeapon_
The weapon that fired this missile. |
protected java.lang.String[] |
skills_
|
Fields inherited from class wyvern.lib.classes.weapons.WeaponImpl |
DEFAULT_WEAPON_HP, wcs_ |
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 |
Constructor Summary | |
Missile()
|
Method Summary | |
boolean |
canEnter(GameMap map,
Point loc)
Returns true if the missile can enter the specified square. |
CommandEvent |
checkHit(Monster m)
Returns true if we should hit the specified monster. |
void |
ensureAI()
We have no AI. |
Commandable |
getAgent()
Returns the agent who fired this missile. |
Predicate |
getBlockingPredicate()
Gets a Predicate used to decide whether the missile is blocked by a given object. |
java.lang.String |
getName()
Returns the name of this missile type, such as "arrow". |
java.lang.String |
getPluralName()
Returns the name + "s": subclasses need to override if they have a plural name that doesn't fit this form |
Weapon |
getRangeWeapon()
Returns the range-weapon that fired this missile, if any. |
int |
getToHit()
Returns the base chance to hit for the weapon, against all attackers. |
java.lang.String |
getWeaponSkill()
Returns weapon-skill for this weapon. |
void |
initialize()
Initializes the object's default properties. |
void |
setAgent(Commandable agent)
Sets the agent who fired this missile. |
void |
setRangeWeapon(Weapon weapon)
Sets the range weapon used to fire this missile. |
Methods inherited from class wyvern.lib.classes.weapons.WeaponImpl |
addSlayWC, adjustHP, apply, canReady, canUnready, checkDrop, destroy, didDamage, dropped, forceUnwield, getDescription, getHP, getMaxHP, getRequiredSlots, getWC, hitMonster, isReadied, isWielded, kill, notifyReady, notifyUnready, pickedUp, recomputeWCs, setDefaultHP, setShowAttackerMessage, setToHit, setWC, setWielded, shouldStop, showAttackerMessage, toString, tryGettingCaught |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wyvern.lib.properties.Movable |
shouldStop |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Field Detail |
protected java.lang.String[] skills_
protected Weapon rangeWeapon_
Constructor Detail |
public Missile()
Method Detail |
public void initialize()
GameObject
initialize
in interface GameObject
initialize
in class WeaponImpl
public void ensureAI()
public java.lang.String getName()
public java.lang.String getPluralName()
public boolean canEnter(GameMap map, Point loc)
canEnter
in interface GameObject
canEnter
in class MapObject
public CommandEvent checkHit(Monster m)
checkHit
in class WeaponImpl
m
- the monster to shoot at
public Predicate getBlockingPredicate()
public Commandable getAgent()
public void setAgent(Commandable agent)
public java.lang.String getWeaponSkill()
getWeaponSkill
in interface Attack
public Weapon getRangeWeapon()
public void setRangeWeapon(Weapon weapon)
public int getToHit()
getToHit
in interface Attack
getToHit
in class WeaponImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |