mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Added Right clicking to remove a creature as a Blocker during the Declare Blockers step
This commit is contained in:
@@ -380,10 +380,16 @@ public class Combat {
|
||||
}
|
||||
else// card is a blocker
|
||||
{
|
||||
for (int i = 0; i < att.size(); i++)
|
||||
if (getBlockers(att.get(i)).contains(c))
|
||||
getList(att.get(i)).remove(c);
|
||||
for(Card a : att)
|
||||
if (getBlockers(a).contains(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()
|
||||
|
||||
public void verifyCreaturesInPlay() {
|
||||
|
||||
@@ -406,15 +406,12 @@ public class GuiDisplay3 extends JFrame implements CardContainer, Display, NewCo
|
||||
AllZone.Combat.removeFromCombat(cardPanel.getCard());
|
||||
}
|
||||
|
||||
/*
|
||||
// won't work yet:
|
||||
else if (block.contains(cardPanel.getCard()) && inputControl.input instanceof Input_Block)
|
||||
{
|
||||
else if (inputControl.input instanceof Input_Block){
|
||||
|
||||
Card crd = cardPanel.getCard();
|
||||
AllZone.Combat.removeFromCombat(crd);
|
||||
if(crd.getController().isHuman())
|
||||
AllZone.Combat.removeFromCombat(crd);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
else inputControl.selectCard(cardPanel.getCard(), AllZone.Human_Battlefield);
|
||||
|
||||
@@ -407,6 +407,10 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
|
||||
c.untap();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user