mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed being able to block with your opponents creatures.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user