Removed redundant combat code for handling block effect of Odric Master Tactician.

This commit is contained in:
LevelX2 2014-01-28 15:11:23 +01:00
parent 19679c9f6e
commit bd77e476ee
2 changed files with 134 additions and 135 deletions

View file

@ -142,28 +142,12 @@ class OdricMasterTacticianEffect extends ReplacementEffectImpl<OdricMasterTactic
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player player = game.getPlayer(source.getControllerId());
//20101001 - 509.1c
game.getCombat().checkBlockRequirementsBefore(player, game);
for (UUID defenderId : game.getCombat().getPlayerDefenders(game)) {
boolean choose = true;
while (choose) {
game.getPlayer(source.getControllerId()).selectBlockers(game, defenderId);
if (game.isPaused() || game.isGameOver()) {
return true;
}
if (!game.getCombat().checkBlockRestrictions(game.getPlayer(defenderId), game)) {
// only human player can decide to do the block in another way
if (player.isHuman()) {
continue;
}
}
choose = !game.getCombat().checkBlockRequirementsAfter(game.getPlayer(defenderId), player, game);
}
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.DECLARED_BLOCKERS, defenderId, defenderId));
Player blockController = game.getPlayer(source.getControllerId());
if (blockController != null) {
game.getCombat().selectBlockers(blockController, game);
return true;
}
return true;
return false;
}
@Override