mirror of
https://github.com/correl/mage.git
synced 2025-01-14 03:00:10 +00:00
* Fixed a problem were Menace restriction could be bypassed by using Undo Block action.
This commit is contained in:
parent
121e55f1d7
commit
cb4f996bce
1 changed files with 6 additions and 6 deletions
|
@ -399,7 +399,7 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
public void selectBlockers(Player blockController, Game game) {
|
public void selectBlockers(Player blockController, Game game) {
|
||||||
Player attacker = game.getPlayer(attackerId);
|
Player attacker = game.getPlayer(attackerId);
|
||||||
//20101001 - 509.1c
|
//20101001 - 509.1c
|
||||||
this.retrieveMustBlockAttackerRequirements(attacker, game);
|
game.getCombat().retrieveMustBlockAttackerRequirements(attacker, game);
|
||||||
Player controller;
|
Player controller;
|
||||||
for (UUID defenderId : getPlayerDefenders(game)) {
|
for (UUID defenderId : getPlayerDefenders(game)) {
|
||||||
Player defender = game.getPlayer(defenderId);
|
Player defender = game.getPlayer(defenderId);
|
||||||
|
@ -415,26 +415,26 @@ public class Combat implements Serializable, Copyable<Combat> {
|
||||||
if (game.isPaused() || game.gameOver(null) || game.executingRollback()) {
|
if (game.isPaused() || game.gameOver(null) || game.executingRollback()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.checkBlockRestrictions(defender, game)) {
|
if (!game.getCombat().checkBlockRestrictions(defender, game)) {
|
||||||
if (controller.isHuman()) { // only human player can decide to do the block in another way
|
if (controller.isHuman()) { // only human player can decide to do the block in another way
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
choose = !this.checkBlockRequirementsAfter(defender, controller, game);
|
choose = !game.getCombat().checkBlockRequirementsAfter(defender, controller, game);
|
||||||
if (!choose) {
|
if (!choose) {
|
||||||
choose = !this.checkBlockRestrictionsAfter(defender, controller, game);
|
choose = !game.getCombat().checkBlockRestrictionsAfter(defender, controller, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, defenderId, defenderId));
|
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, defenderId, defenderId));
|
||||||
|
|
||||||
// add info about attacker blocked by blocker to the game log
|
// add info about attacker blocked by blocker to the game log
|
||||||
if (!game.isSimulation()) {
|
if (!game.isSimulation()) {
|
||||||
this.logBlockerInfo(defender, game);
|
game.getCombat().logBlockerInfo(defender, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// tool to catch the bug about flyers blocked by non flyers or intimidate blocked by creatures with other colors
|
// tool to catch the bug about flyers blocked by non flyers or intimidate blocked by creatures with other colors
|
||||||
TraceUtil.traceCombatIfNeeded(game, this);
|
TraceUtil.traceCombatIfNeeded(game, game.getCombat());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue