mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Myriad Landscape cannot search up lands without a land type
This commit is contained in:
@@ -53,8 +53,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
* changeHiddenOriginStackDescription.
|
* changeHiddenOriginStackDescription.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param af
|
|
||||||
* a {@link forge.game.ability.AbilityFactory} object.
|
|
||||||
* @param sa
|
* @param sa
|
||||||
* a {@link forge.game.spellability.SpellAbility} object.
|
* a {@link forge.game.spellability.SpellAbility} object.
|
||||||
* @return a {@link java.lang.String} object.
|
* @return a {@link java.lang.String} object.
|
||||||
@@ -171,7 +169,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
} else if (origin.equals("Hand")) {
|
} else if (origin.equals("Hand")) {
|
||||||
sb.append(chooserNames);
|
sb.append(chooserNames);
|
||||||
if (!chooserNames.equals(fetcherNames)) {
|
if (!chooserNames.equals(fetcherNames)) {
|
||||||
sb.append(" looks at " + fetcherNames + "'s hand and ");
|
sb.append(" looks at ").append(fetcherNames).append("'s hand and ");
|
||||||
sb.append(destination.equals("Exile") ? "exiles " : "puts ");
|
sb.append(destination.equals("Exile") ? "exiles " : "puts ");
|
||||||
sb.append(num).append(" of those ").append(type).append(" card(s)");
|
sb.append(num).append(" of those ").append(type).append(" card(s)");
|
||||||
} else {
|
} else {
|
||||||
@@ -219,8 +217,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
* changeKnownOriginStackDescription.
|
* changeKnownOriginStackDescription.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param af
|
|
||||||
* a {@link forge.game.ability.AbilityFactory} object.
|
|
||||||
* @param sa
|
* @param sa
|
||||||
* a {@link forge.game.spellability.SpellAbility} object.
|
* a {@link forge.game.spellability.SpellAbility} object.
|
||||||
* @return a {@link java.lang.String} object.
|
* @return a {@link java.lang.String} object.
|
||||||
@@ -338,8 +334,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
* </p>
|
* </p>
|
||||||
* @param sa
|
* @param sa
|
||||||
* a {@link forge.game.spellability.SpellAbility} object.
|
* a {@link forge.game.spellability.SpellAbility} object.
|
||||||
* @param af
|
|
||||||
* a {@link forge.game.ability.AbilityFactory} object.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -424,7 +418,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final String prompt = String.format("Do you want to move %s from %s to %s?", tgtC, origin, destination);
|
final String prompt = String.format("Do you want to move %s from %s to %s?", tgtC, origin, destination);
|
||||||
if (optional && false == player.getController().confirmAction(sa, null, prompt) )
|
if (optional && !player.getController().confirmAction(sa, null, prompt) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
final Zone originZone = game.getZoneOf(tgtC);
|
final Zone originZone = game.getZoneOf(tgtC);
|
||||||
@@ -570,8 +564,6 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
* changeHiddenOriginResolve.
|
* changeHiddenOriginResolve.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param af
|
|
||||||
* a {@link forge.game.ability.AbilityFactory} object.
|
|
||||||
* @param sa
|
* @param sa
|
||||||
* a {@link forge.game.spellability.SpellAbility} object.
|
* a {@link forge.game.spellability.SpellAbility} object.
|
||||||
*/
|
*/
|
||||||
@@ -774,8 +766,16 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sa.hasParam("ShareLandType")) {
|
if (sa.hasParam("ShareLandType")) {
|
||||||
|
if (chosenCards.size() == 0) {
|
||||||
|
// If no cards have been chosen yet, the first card must have a land type
|
||||||
|
fetchList = CardLists.filter(fetchList, new Predicate<Card>() {
|
||||||
|
@Override
|
||||||
|
public boolean apply(final Card c) {
|
||||||
|
return c.hasALandType();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
for (final Card card : chosenCards) {
|
for (final Card card : chosenCards) {
|
||||||
|
|
||||||
fetchList = CardLists.filter(fetchList, new Predicate<Card>() {
|
fetchList = CardLists.filter(fetchList, new Predicate<Card>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(final Card c) {
|
public boolean apply(final Card c) {
|
||||||
@@ -785,6 +785,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (totalcmc != null) {
|
if (totalcmc != null) {
|
||||||
if (totcmc >= 0) {
|
if (totcmc >= 0) {
|
||||||
fetchList = CardLists.getValidCards(fetchList, "Card.cmcLE" + Integer.toString(totcmc), source.getController(), source);
|
fetchList = CardLists.getValidCards(fetchList, "Card.cmcLE" + Integer.toString(totcmc), source.getController(), source);
|
||||||
|
|||||||
@@ -5351,6 +5351,15 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final boolean hasALandType() {
|
||||||
|
for (final String type : getType().getSubtypes()) {
|
||||||
|
if (forge.card.CardType.isALandType(type)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public final boolean isUsedToPay() {
|
public final boolean isUsedToPay() {
|
||||||
return usedToPayCost;
|
return usedToPayCost;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user