fix regression on The End

This commit is contained in:
xenohedron 2024-07-09 23:04:38 -04:00
parent aeb9c514d8
commit 122df0d6fb
2 changed files with 5 additions and 5 deletions

View file

@ -28,8 +28,8 @@ public final class TheEnd extends CardImpl {
.setText("This spell costs {2} less to cast if your life total is 5 or less.")
).setRuleAtTheTop(true));
// Exile target creature or planeswalker. Search its controller's graveyard, hand, and library for any number of cards with the same name as that permanent and exile them. That player shuffles, then draws card for each card exiled from their hand this way.
this.getSpellAbility().addEffect(new ExileTargetAndSearchGraveyardHandLibraryEffect(true, "its controller's", "any number of cards with the same name as that permanent"));
// Exile target creature or planeswalker. Search its controller's graveyard, hand, and library for any number of cards with the same name as that permanent and exile them. That player shuffles, then draws a card for each card exiled from their hand this way.
this.getSpellAbility().addEffect(new ExileTargetAndSearchGraveyardHandLibraryEffect(true, "its controller's", "any number of cards with the same name as that permanent", true));
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
}

View file

@ -14,8 +14,7 @@ import mage.players.Player;
public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
public ExileTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
super(graveyardExileOptional, searchWhatText, searchForText);
this.staticText = ""; // since parent class overrides static text but we need to use a target
this(graveyardExileOptional, searchWhatText, searchForText, false);
}
public ExileTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText, boolean drawForEachHandCard) {
@ -50,6 +49,7 @@ public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTarget
return staticText;
}
return "exile " + getTargetPointer().describeTargets(mode.getTargets(), "that permanent")
+ ". Search " + searchWhatText + " graveyard, hand, and library for " + searchForText + " and exile them. Then that player shuffles";
+ ". Search " + searchWhatText + " graveyard, hand, and library for " + searchForText + " and exile them. "
+ (drawForEachHandCard ? "That player shuffles, then draws a card for each card exiled from their hand this way" : "Then that player shuffles");
}
}