mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Cards like Winter Orb and Stoic Angel will no longer allow players to untap permanents that could not untap otherwise.
This commit is contained in:
@@ -175,13 +175,6 @@ public class PhaseUtil {
|
|||||||
} else c.untap();
|
} else c.untap();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Remove temporary keywords
|
|
||||||
list = player.getCardsIn(Zone.Battlefield);
|
|
||||||
for (Card c : list) {
|
|
||||||
c.removeExtrinsicKeyword("This card doesn't untap during your next untap step.");
|
|
||||||
c.removeExtrinsicKeyword("HIDDEN This card doesn't untap during your next untap step.");
|
|
||||||
}
|
|
||||||
|
|
||||||
//opponent untapping during your untap phase
|
//opponent untapping during your untap phase
|
||||||
CardList opp = player.getOpponent().getCardsIn(Zone.Battlefield);
|
CardList opp = player.getOpponent().getCardsIn(Zone.Battlefield);
|
||||||
for (Card oppCard : opp)
|
for (Card oppCard : opp)
|
||||||
@@ -193,7 +186,12 @@ public class PhaseUtil {
|
|||||||
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
||||||
//search for lands the computer has and only untap 1
|
//search for lands the computer has and only untap 1
|
||||||
CardList landList = AllZoneUtil.getPlayerLandsInPlay(AllZone.getComputerPlayer());
|
CardList landList = AllZoneUtil.getPlayerLandsInPlay(AllZone.getComputerPlayer());
|
||||||
landList = landList.filter(CardListFilter.tapped);
|
landList = landList.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (landList.size() > 0) {
|
if (landList.size() > 0) {
|
||||||
landList.get(0).untap();
|
landList.get(0).untap();
|
||||||
}
|
}
|
||||||
@@ -211,14 +209,19 @@ public class PhaseUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
public void selectCard(Card c, PlayerZone zone) {
|
||||||
if (c.isLand() && zone.is(Constant.Zone.Battlefield) && c.isTapped()) {
|
if (c.isLand() && zone.is(Constant.Zone.Battlefield) && c.isTapped() && canUntap(c)) {
|
||||||
c.untap();
|
c.untap();
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
}//selectCard()
|
}//selectCard()
|
||||||
};//Input
|
};//Input
|
||||||
CardList landList = AllZoneUtil.getPlayerLandsInPlay(AllZone.getHumanPlayer());
|
CardList landList = AllZoneUtil.getPlayerLandsInPlay(AllZone.getHumanPlayer());
|
||||||
landList = landList.filter(CardListFilter.tapped);
|
landList = landList.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (landList.size() > 0) {
|
if (landList.size() > 0) {
|
||||||
AllZone.getInputControl().setInput(target);
|
AllZone.getInputControl().setInput(target);
|
||||||
}
|
}
|
||||||
@@ -228,7 +231,12 @@ public class PhaseUtil {
|
|||||||
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
||||||
CardList artList = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
CardList artList = AllZone.getComputerPlayer().getCardsIn(Zone.Battlefield);
|
||||||
artList = artList.filter(CardListFilter.artifacts);
|
artList = artList.filter(CardListFilter.artifacts);
|
||||||
artList = artList.filter(CardListFilter.tapped);
|
artList = artList.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (artList.size() > 0) {
|
if (artList.size() > 0) {
|
||||||
CardFactoryUtil.AI_getBestArtifact(artList).untap();
|
CardFactoryUtil.AI_getBestArtifact(artList).untap();
|
||||||
}
|
}
|
||||||
@@ -247,7 +255,7 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
public void selectCard(Card c, PlayerZone zone) {
|
||||||
if (c.isArtifact() && zone.is(Constant.Zone.Battlefield)
|
if (c.isArtifact() && zone.is(Constant.Zone.Battlefield)
|
||||||
&& c.getController().isHuman()) {
|
&& c.getController().isHuman() && canUntap(c)) {
|
||||||
c.untap();
|
c.untap();
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
@@ -255,7 +263,12 @@ public class PhaseUtil {
|
|||||||
};//Input
|
};//Input
|
||||||
CardList artList = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield);
|
CardList artList = AllZone.getHumanPlayer().getCardsIn(Zone.Battlefield);
|
||||||
artList = artList.filter(CardListFilter.artifacts);
|
artList = artList.filter(CardListFilter.artifacts);
|
||||||
artList = artList.filter(CardListFilter.tapped);
|
artList = artList.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (artList.size() > 0) {
|
if (artList.size() > 0) {
|
||||||
AllZone.getInputControl().setInput(target);
|
AllZone.getInputControl().setInput(target);
|
||||||
}
|
}
|
||||||
@@ -264,7 +277,12 @@ public class PhaseUtil {
|
|||||||
if ((AllZoneUtil.isCardInPlay("Smoke") || AllZoneUtil.isCardInPlay("Stoic Angel"))) {
|
if ((AllZoneUtil.isCardInPlay("Smoke") || AllZoneUtil.isCardInPlay("Stoic Angel"))) {
|
||||||
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
if (AllZone.getPhase().getPlayerTurn().isComputer()) {
|
||||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getComputerPlayer());
|
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getComputerPlayer());
|
||||||
creatures = creatures.filter(CardListFilter.tapped);
|
creatures = creatures.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (creatures.size() > 0) {
|
if (creatures.size() > 0) {
|
||||||
creatures.get(0).untap();
|
creatures.get(0).untap();
|
||||||
}
|
}
|
||||||
@@ -283,19 +301,31 @@ public class PhaseUtil {
|
|||||||
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
public void selectCard(Card c, PlayerZone zone) {
|
||||||
if (c.isCreature() && zone.is(Constant.Zone.Battlefield)
|
if (c.isCreature() && zone.is(Constant.Zone.Battlefield)
|
||||||
&& c.getController().isHuman()) {
|
&& c.getController().isHuman() && canUntap(c)) {
|
||||||
c.untap();
|
c.untap();
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
}//selectCard()
|
}//selectCard()
|
||||||
};//Input
|
};//Input
|
||||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer());
|
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer());
|
||||||
creatures = creatures.filter(CardListFilter.tapped);
|
creatures = creatures.filter(CardListFilter.tapped).filter(new CardListFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean addCard(Card c) {
|
||||||
|
return canUntap(c);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (creatures.size() > 0) {
|
if (creatures.size() > 0) {
|
||||||
AllZone.getInputControl().setInput(target);
|
AllZone.getInputControl().setInput(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Remove temporary keywords
|
||||||
|
list = player.getCardsIn(Zone.Battlefield);
|
||||||
|
for (Card c : list) {
|
||||||
|
c.removeExtrinsicKeyword("This card doesn't untap during your next untap step.");
|
||||||
|
c.removeExtrinsicKeyword("HIDDEN This card doesn't untap during your next untap step.");
|
||||||
|
}
|
||||||
}//end doUntap
|
}//end doUntap
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user