- 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 @Override
public final boolean is(final Constant.Zone zone, final Player player) { 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

@@ -105,13 +105,12 @@ public class InputBlock extends Input {
if (CardUtil.toList(AllZone.getCombat().getAttackers()).contains(card)) { if (CardUtil.toList(AllZone.getCombat().getAttackers()).contains(card)) {
this.currentAttacker = card; this.currentAttacker = card;
} else if (zone.is(Constant.Zone.Battlefield, AllZone.getHumanPlayer()) && card.isCreature() } else if (zone.is(Constant.Zone.Battlefield, AllZone.getHumanPlayer()) && card.isCreature()
&& CombatUtil.canBlock(this.currentAttacker, card, AllZone.getCombat())) { && CombatUtil.canBlock(this.currentAttacker, card, AllZone.getCombat())
if ((this.currentAttacker != null) && (!this.allBlocking.contains(card))) { && this.currentAttacker != null && !this.allBlocking.contains(card)
&& card.getController().isHuman()) {
this.allBlocking.add(card); this.allBlocking.add(card);
AllZone.getCombat().addBlocker(this.currentAttacker, card); AllZone.getCombat().addBlocker(this.currentAttacker, card);
} } else {
}
else {
Singletons.getControl().getMatchControl().getMessageControl().remind(); Singletons.getControl().getMatchControl().getMessageControl().remind();
} }
this.showMessage(); this.showMessage();