net.sf.freecol.server.control
Class ChangeSet.AttackChange
java.lang.Object
net.sf.freecol.server.control.ChangeSet.Change
net.sf.freecol.server.control.ChangeSet.AttackChange
- Enclosing class:
- ChangeSet
private static class ChangeSet.AttackChange
- extends ChangeSet.Change
Encapsulate an attack.
|
Method Summary |
boolean |
isPerhapsNotifiable(ServerPlayer serverPlayer)
Should a player perhaps be notified of this attack? |
int |
sortPriority()
The sort priority. |
org.w3c.dom.Element |
toElement(ServerPlayer serverPlayer,
org.w3c.dom.Document doc)
Specialize a AttackChange into an "animateAttack" element
for a particular player. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
attacker
private Unit attacker
defender
private Unit defender
success
private boolean success
ChangeSet.AttackChange
ChangeSet.AttackChange(ChangeSet.See see,
Unit attacker,
Unit defender,
boolean success)
- Build a new AttackChange.
- Parameters:
see - The visibility of this change.attacker - The Unit that is attacking.defender - The Unit that is defending.success - Did the attack succeed.
sortPriority
public int sortPriority()
- The sort priority.
- Specified by:
sortPriority in class ChangeSet.Change
- Returns:
- "CHANGE_ANIMATION".
isPerhapsNotifiable
public boolean isPerhapsNotifiable(ServerPlayer serverPlayer)
- Should a player perhaps be notified of this attack?
- Overrides:
isPerhapsNotifiable in class ChangeSet.Change
- Parameters:
serverPlayer - The ServerPlayer to notify.
- Returns:
- True if the player should be notified.
toElement
public org.w3c.dom.Element toElement(ServerPlayer serverPlayer,
org.w3c.dom.Document doc)
- Specialize a AttackChange into an "animateAttack" element
for a particular player.
- Specified by:
toElement in class ChangeSet.Change
- Parameters:
serverPlayer - The ServerPlayer to update.doc - The owner Document.
- Returns:
- An "animateAttack" element.