mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38: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
|
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() {
|
||||||
|
|||||||
@@ -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();
|
Card crd = cardPanel.getCard();
|
||||||
|
if(crd.getController().isHuman())
|
||||||
AllZone.Combat.removeFromCombat(crd);
|
AllZone.Combat.removeFromCombat(crd);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else inputControl.selectCard(cardPanel.getCard(), AllZone.Human_Battlefield);
|
else inputControl.selectCard(cardPanel.getCard(), AllZone.Human_Battlefield);
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user