wyvern.lib.monsters
Class ShriekAttack
java.lang.Object
wyvern.lib.monsters.AbstractCounterAttack
wyvern.lib.monsters.ShriekAttack
- All Implemented Interfaces:
- CounterAttack
- public class ShriekAttack
- extends AbstractCounterAttack
Monster shrieks or shouts when attacked, waking up other
monsters. If monster has an "alarm-msg", then the message
will be broadcast when the monster is attacked. The alarm
is only sounded if the getChance() succeeds; otherwise
the monster doesn't sound the alarm.
If the monster has no "alarm-msg" property, then it will
still wake up monsters in the map, but it won't broadcast
any message that it has done so.
If the monster has an "alarm-chance" message, then it will
only emit the shriek message if it rolls less than the
(int) percentage value in the property. It will still always
wake up the monster. This is to make it slightly more
realistic for intelligent monsters, who won't call for
help every time you hit them.
- Version:
- 1.0, May 13, 2003
- Author:
- Steve Yegge
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShriekAttack
public ShriekAttack()
notifyAttacked
public void notifyAttacked(GameObject attacker,
GameObject defender,
Attack attack)
- Triggers the counter-attack.
- Parameters:
attacker
- the attacker (can be null)defender
- the defender (the one with this counterattack)attack
- the weapon (can be null)