- Added Right clicking to remove a creature as a Blocker during the Declare Blockers step

This commit is contained in:
jendave
2011-08-06 16:23:44 +00:00
parent 322f026cca
commit b24ca0e30b
3 changed files with 17 additions and 10 deletions

View File

@@ -380,10 +380,16 @@ public class Combat {
} }
else// card is a blocker else// card is a blocker
{ {
for (int i = 0; i < att.size(); i++) for(Card a : att)
if (getBlockers(att.get(i)).contains(c)) if (getBlockers(a).contains(c)){
getList(att.get(i)).remove(c); getList(a).remove(c);
// TODO if Declare Blockers and Declare Blockers (Abilities) merge this logic needs to be tweaked
if (getBlockers(a).size() == 0 && AllZone.Phase.is(Constant.Phase.Combat_Declare_Blockers))
blocked.remove(a);
}
} }
// update combat
CombatUtil.showCombat();
}// removeFromCombat() }// removeFromCombat()
public void verifyCreaturesInPlay() { public void verifyCreaturesInPlay() {

View File

@@ -406,15 +406,12 @@ public class GuiDisplay3 extends JFrame implements CardContainer, Display, NewCo
AllZone.Combat.removeFromCombat(cardPanel.getCard()); AllZone.Combat.removeFromCombat(cardPanel.getCard());
} }
/* else if (inputControl.input instanceof Input_Block){
// won't work yet:
else if (block.contains(cardPanel.getCard()) && inputControl.input instanceof Input_Block)
{
Card crd = cardPanel.getCard();
AllZone.Combat.removeFromCombat(crd);
}
*/
Card crd = cardPanel.getCard();
if(crd.getController().isHuman())
AllZone.Combat.removeFromCombat(crd);
}
} }
else inputControl.selectCard(cardPanel.getCard(), AllZone.Human_Battlefield); else inputControl.selectCard(cardPanel.getCard(), AllZone.Human_Battlefield);

View File

@@ -407,6 +407,10 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
c.untap(); c.untap();
AllZone.Combat.removeFromCombat(c); AllZone.Combat.removeFromCombat(c);
} }
else if (inputControl.input instanceof Input_Block) {
if(c.getController().isHuman())
AllZone.Combat.removeFromCombat(c);
}
} else inputControl.selectCard(c, AllZone.Human_Battlefield); } else inputControl.selectCard(c, AllZone.Human_Battlefield);
} }
} }