- Fixed being able to block with your opponents creatures.

This commit is contained in:
Sloth
2012-02-15 12:55:11 +00:00
parent 62aeb53617
commit 60dd4a0254
2 changed files with 6 additions and 7 deletions

View File

@@ -252,7 +252,7 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
*/
@Override
public final boolean is(final Constant.Zone zone, final Player player) {
return (zone.equals(this.zoneName) && player.isPlayer(player));
return (zone.equals(this.zoneName) && this.player.isPlayer(player));
}
/**

View File

@@ -83,7 +83,7 @@ public class InputBlock extends Input {
sb.append("To cancel a block right-click on your blocker");
Singletons.getControl().getMatchControl().showMessage(sb.toString());
}
CombatUtil.showCombat();
}
@@ -105,13 +105,12 @@ public class InputBlock extends Input {
if (CardUtil.toList(AllZone.getCombat().getAttackers()).contains(card)) {
this.currentAttacker = card;
} else if (zone.is(Constant.Zone.Battlefield, AllZone.getHumanPlayer()) && card.isCreature()
&& CombatUtil.canBlock(this.currentAttacker, card, AllZone.getCombat())) {
if ((this.currentAttacker != null) && (!this.allBlocking.contains(card))) {
&& CombatUtil.canBlock(this.currentAttacker, card, AllZone.getCombat())
&& this.currentAttacker != null && !this.allBlocking.contains(card)
&& card.getController().isHuman()) {
this.allBlocking.add(card);
AllZone.getCombat().addBlocker(this.currentAttacker, card);
}
}
else {
} else {
Singletons.getControl().getMatchControl().getMessageControl().remind();
}
this.showMessage();