|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Custom attacks like poisoning, paralysis, and petrification use this interface to implement their special damage effects.
Method Summary | |
void |
performDamage(Commandable attacker,
GameObject defender,
CommandEvent event)
Tells the attack to perform its special damage effect. |
Methods inherited from interface wyvern.lib.Attack |
didDamage, getToHit, getWC, getWeaponSkill, recomputeWCs, setShowAttackerMessage, setToHit, setWC, showAttackerMessage |
Method Detail |
public void performDamage(Commandable attacker, GameObject defender, CommandEvent event)
The CustomAttack implementation has two options for handling this method. If it's ultimately doing physical damage (i.e., hit points), then it should probably enqueue one or more DamageEvents in the agent's combat queue. This will handle resistance/vulnerability checks, damage messages, and the defender getting killed. However, if the special attack is different enough (e.g. petrification), then the performDamage method can simply perform the effect without enqueuing any events.
attacker
- the agent performing the attackdefender
- the thing being damagedevent
- the CommandEvent, if this went through the
"normal" channels. It could be null, if this method is
being invoked by someone who wants to skip the standard
attacking sequence and just have the damage get done, so
the CustomAttack should robustly handle a null value here. If non-null, the event will have various useful properties set, such as the hit location.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |