dlg.setVisible(true);
if (dlg.getAnswer()) {
disableButtons();
switch (dlg.getChoice()) {
case 0:
attacks.addElement(new BrushOffAttackAction(cen, target
.getTargetType(), target.getTargetId(),
BrushOffAttackAction.LEFT));
break;
case 1:
attacks.addElement(new BrushOffAttackAction(cen, target
.getTargetType(), target.getTargetId(),
BrushOffAttackAction.RIGHT));
break;
case 2:
attacks.addElement(new BrushOffAttackAction(cen, target
.getTargetType(), target.getTargetId(),
BrushOffAttackAction.BOTH));
break;
}
ready();
} // End not-cancel
} // End choose-attack(s)
// If only the left arm is available, confirm that choice.
else if (canHitLeft) {
choices = new String[1];
choices[0] = left;
dlg = new SingleChoiceDialog(clientgui.frame, title, warn
.toString(), choices);
dlg.setVisible(true);
if (dlg.getAnswer()) {
disableButtons();
attacks.addElement(new BrushOffAttackAction(cen, target
.getTargetType(), target.getTargetId(),
BrushOffAttackAction.LEFT));
ready();
} // End not-cancel
} // End confirm-left
// If only the right arm is available, confirm that choice.
else if (canHitRight) {
choices = new String[1];
choices[0] = right;
dlg = new SingleChoiceDialog(clientgui.frame, title, warn
.toString(), choices);
dlg.setVisible(true);
if (dlg.getAnswer()) {
disableButtons();
attacks.addElement(new BrushOffAttackAction(cen, target
.getTargetType(), target.getTargetId(),
BrushOffAttackAction.RIGHT));
ready();
} // End not-cancel