|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for having a counter-attack when a monster is hit (such as an acid splash).
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 |
public void notifyAttacked(GameObject attacker, GameObject defender, Attack weapon)
attacker
- the attacker (can be null)defender
- the defender (the one with this counterattack)weapon
- the weapon (can be null)public int getChance()
public void setChance(int chance)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |