isCardInPlayerGraveyard no longer there.

This commit is contained in:
Maxmtg
2011-09-20 03:23:21 +00:00
parent 165b6eb47e
commit 7fc425fb0a
6 changed files with 9 additions and 22 deletions

View File

@@ -114,19 +114,6 @@ public abstract class AllZoneUtil {
/**
* answers the question "is a certain, specific card in this player's graveyard?".
*
* @param player the player's hand to check
* @param card the specific card to look for
* @return true if the card is present in this player's hand; false otherwise
*/
public static boolean isCardInPlayerGraveyard(final Player player, final Card card) {
return player.getZone(Constant.Zone.Graveyard).contains(card);
}
//////// HAND
/**
* answers the question "is the given card in any exile zone?".
*

View File

@@ -325,7 +325,7 @@ public final class GameActionUtil {
if (controller.isComputer()
|| GameActionUtil.showYesNoDialog(card, "Return Vengevine from the graveyard?"))
{
if (AllZoneUtil.isCardInPlayerGraveyard(controller, card)) {
if (controller.getZone(Zone.Graveyard).contains(card)) {
AllZone.getGameAction().moveTo(play, card);
}
}
@@ -921,7 +921,7 @@ public final class GameActionUtil {
public void resolve() {
Card target = getTargetCard();
if (target != null) {
if (AllZoneUtil.isCardInPlayerGraveyard(src.getController(), target)) {
if (src.getController().getZone(Zone.Graveyard).contains(target)) {
PlayerZone hand = src.getController().getZone(Constant.Zone.Hand);
AllZone.getGameAction().moveTo(hand, target);
}

View File

@@ -184,7 +184,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
public void resolve() {
if (crd.getController().isHuman()) {
if (GameActionUtil.showYesNoDialog(crd, "Attach " + crd + " to " + c + "?")) {
if (AllZoneUtil.isCardInPlayerGraveyard(player, crd)
if (player.getZone(Zone.Graveyard).contains(crd)
&& AllZoneUtil.isCardInPlay(c) && c.isCreature()
&& c.getNetAttack() == 1 && c.getNetDefense() == 1)
{
@@ -195,7 +195,7 @@ public class PlayerZone_ComesIntoPlay extends DefaultPlayerZone {
}
} else {
if (AllZoneUtil.isCardInPlayerGraveyard(player, crd)
if (player.getZone(Zone.Graveyard).contains(crd)
&& AllZoneUtil.isCardInPlay(c) && c.isCreature()
&& c.getNetAttack() == 1 && c.getNetDefense() == 1)
{

View File

@@ -863,7 +863,7 @@ public class CardFactoryUtil {
public boolean canPlay() {
Card sourceCard = this.getSourceCard();
return AllZoneUtil.isCardInPlayerGraveyard(sourceCard.getController(), sourceCard)
return sourceCard.getController().getZone(Zone.Graveyard).contains(sourceCard)
&& (sourceCard.isInstant() || Phase.canCastSorcery(sourceCard.getController()));
}

View File

@@ -974,7 +974,7 @@ public class CardFactory_Creatures {
c = getAIElemental();
}
if (AllZoneUtil.isCardInPlayerGraveyard(card.getController(), c)) {
if (card.getController().getZone(Zone.Graveyard).contains(c)) {
PlayerZone play = c.getController().getZone(Constant.Zone.Battlefield);
AllZone.getGameAction().moveTo(play, c);
}

View File

@@ -2243,12 +2243,12 @@ public class CardFactory_Sorceries {
Card c = getTargetCard();
if (threshold.size() >= 7) {
if (AllZoneUtil.isCardInPlayerGraveyard(card.getController(), c)) {
if (card.getController().getZone(Zone.Graveyard).contains(c)) {
PlayerZone play = card.getController().getZone(Constant.Zone.Battlefield);
AllZone.getGameAction().moveTo(play, c);
}
} else {
if (AllZoneUtil.isCardInPlayerGraveyard(card.getController(), c)) {
if (card.getController().getZone(Zone.Graveyard).contains(c)) {
PlayerZone hand = card.getController().getZone(Constant.Zone.Hand);
AllZone.getGameAction().moveTo(hand, c);
}
@@ -2827,7 +2827,7 @@ public class CardFactory_Sorceries {
if (userChoice.contains(cardChoice[1]) || card.getChoices().contains(cardChoice[1])) {
Card c = ab1card[0];
if (c != null) {
if (AllZoneUtil.isCardInPlayerGraveyard(card.getController(), c) && CardFactoryUtil.canTarget(card, c)) {
if (card.getController().getZone(Zone.Graveyard).contains(c) && CardFactoryUtil.canTarget(card, c)) {
AllZone.getGameAction().moveToPlay(c);
}
}