wyvern.lib.properties
Interface CounterAttack

All Known Implementing Classes:
AbstractCounterAttack

public interface CounterAttack

Interface for having a counter-attack when a monster is hit (such as an acid splash).

Version:
1.0, Jun 14, 2001
Author:
Steve Yegge

Method Summary
 int getChance()
          Returns the chance that this attack will be triggered when the defender is hit.
 void notifyAttacked(GameObject attacker, GameObject defender, Attack weapon)
          Triggers the counter-attack.
 void setChance(int chance)
          Sets the chance (in 100) that this attack will be triggered when the defender is hit.
 

Method Detail

notifyAttacked

public void notifyAttacked(GameObject attacker,
                           GameObject defender,
                           Attack weapon)
Triggers the counter-attack.

Parameters:
attacker - the attacker (can be null)
defender - the defender (the one with this counterattack)
weapon - the weapon (can be null)

getChance

public int getChance()
Returns the chance that this attack will be triggered when the defender is hit.


setChance

public void setChance(int chance)
Sets the chance (in 100) that this attack will be triggered when the defender is hit.