wyvern.lib.monsters
Class StealGoldAttack

java.lang.Object
  extended bywyvern.lib.monsters.DefaultCustomAttack
      extended bywyvern.lib.monsters.StealAttack
          extended bywyvern.lib.monsters.StealGoldAttack
All Implemented Interfaces:
Attack, CustomAttack

public class StealGoldAttack
extends StealAttack

A custom attack in which the monster tries to take some of your money, then teleport away.

Version:
1.0, May 20, 2002
Author:
Steve Yegge

Field Summary
 
Fields inherited from class wyvern.lib.monsters.StealAttack
FAILED_DROPPED, FAILED_RESTORED, SUCCESS, TOO_HEAVY
 
Fields inherited from class wyvern.lib.monsters.DefaultCustomAttack
DEFAULT_HIT_CHANCE
 
Constructor Summary
StealGoldAttack()
           
 
Method Summary
 void performDamage(Commandable attacker, GameObject defender, CommandEvent event)
          Tells the attack to perform its special damage effect.
 void stealCoins(GameObject coins, java.lang.String type, Inventory src, Inventory dest)
          Steals some coins from the defender.
 void stealPurse(GameObject purse, Inventory src, Inventory dest)
          Steals a coin purse from the defender.
 
Methods inherited from class wyvern.lib.monsters.StealAttack
stealObject, teleport, transferObject
 
Methods inherited from class wyvern.lib.monsters.DefaultCustomAttack
didDamage, getToHit, getWC, getWeaponSkill, recomputeWCs, setShowAttackerMessage, setToHit, setWC, showAttackerMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StealGoldAttack

public StealGoldAttack()
Method Detail

performDamage

public void performDamage(Commandable attacker,
                          GameObject defender,
                          CommandEvent event)
Tells the attack to perform its special damage effect. Called if the attack's to-hit was successful and the attack wasn't vetoed.

Parameters:
attacker - the leprechaun or whoever
defender - the player being attacked
event - the HitCommand event

stealCoins

public void stealCoins(GameObject coins,
                       java.lang.String type,
                       Inventory src,
                       Inventory dest)
Steals some coins from the defender.


stealPurse

public void stealPurse(GameObject purse,
                       Inventory src,
                       Inventory dest)
Steals a coin purse from the defender.