mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Undo attack - Fixed a bug that prevented to work undo attack correctly.
This commit is contained in:
parent
4d6e818490
commit
d0c0a7391d
1 changed files with 4 additions and 3 deletions
|
@ -194,15 +194,16 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.DECLARING_ATTACKERS, attackerId, attackerId))) {
|
||||
Player player = game.getPlayer(attackerId);
|
||||
//20101001 - 508.1d
|
||||
checkAttackRequirements(player, game);
|
||||
game.getCombat().checkAttackRequirements(player, game);
|
||||
if (!game.getPlayer(game.getActivePlayerId()).getAvailableAttackers(game).isEmpty()) {
|
||||
player.selectAttackers(game, attackerId);
|
||||
}
|
||||
if (game.isPaused() || game.gameOver(null)) {
|
||||
return;
|
||||
}
|
||||
checkAttackRestrictions(player, game);
|
||||
resumeSelectAttackers(game);
|
||||
// because of possible undo during declare attackers it's neccassary to call here the methods with "game.getCombat()." to get the valid combat object!!!
|
||||
game.getCombat().checkAttackRestrictions(player, game);
|
||||
game.getCombat().resumeSelectAttackers(game);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue