|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Wieldable weapon interface. The three primary classes that derive from Weapon are MeleeWeapon, RangeWeapon and HurledWeapon.
Field Summary |
Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
Method Summary | |
void |
forceUnwield()
Forcibly unwields the weapon, even if it's cursed. |
java.lang.Class[] |
getRequiredSlots()
Returns a list of the slots that this armor requires in order to be worn. |
boolean |
isWielded()
Returns true if the weapon has the "wielded" property |
boolean |
setWielded(boolean wielded,
Commandable agent)
Notifies the weapon it's being wielded. |
Methods inherited from interface wyvern.lib.MethodHookable |
addMethodHook, removeMethodHook, runMethodHook |
Methods inherited from interface wyvern.lib.Broadcaster |
broadcast, broadcast, broadcast, broadcast, broadcast |
Methods inherited from interface wyvern.lib.Attack |
didDamage, getToHit, getWC, getWeaponSkill, recomputeWCs, setShowAttackerMessage, setToHit, setWC, showAttackerMessage |
Methods inherited from interface wyvern.lib.properties.Damageable |
adjustHP, getHP, getMaxHP, kill |
Methods inherited from interface wyvern.lib.properties.Readyable |
canReady, canUnready, isReadied, notifyReady, notifyUnready |
Methods inherited from interface wyvern.lib.properties.Movable |
shouldStop |
Method Detail |
public boolean setWielded(boolean wielded, Commandable agent)
NOTE: don't call this to try to wield a weapon. You should command the agent to wield the weapon - this will invoke the WieldCommand and make sure the agent has enough body parts available to wield the weapon. This setWielded() function will be called automatically by the WieldCommand. Don't use it to unwield a weapon either - use forceUnwield().
This method runs a method hook called "setWielded". It passes the wielder as the data parameter. You can call isWielded() on the weapon in the method hook to see if it was being wielded or unwielded. If isWielded() returns false, it was being unwielded. The setWielded method-hook is run *after* this method executes, right before the return statement, so all the bonuses are already applied.
wielded
- true if it's wielded, else false
public boolean isWielded()
public java.lang.Class[] getRequiredSlots()
public void forceUnwield()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |