mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[WOE][WOC] Fixed card texts, fixed Free the Fae (#11098)
* fix name compare when both full and small name are used * fix Free the Fae, it is mandatory
This commit is contained in:
parent
24315460fe
commit
344ff81a37
10 changed files with 38 additions and 24 deletions
|
|
@ -44,7 +44,7 @@ public final class EidolonOfCountlessBattles extends CardImpl {
|
|||
// Eidolon of Countless Battles and enchanted creature get +1/+1 for each creature you control and +1/+1 for each Aura you control.
|
||||
PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(filter, 1);
|
||||
Effect effect = new BoostSourceEffect(amount, amount, Duration.WhileOnBattlefield);
|
||||
effect.setText("{this} and enchanted creature get +1/+1 for each creature you control");
|
||||
effect.setText("{this} and enchanted creature each get +1/+1 for each creature you control");
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect);
|
||||
effect = new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield);
|
||||
effect.setText("and +1/+1 for each Aura you control");
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public final class EllivereOfTheWildCourt extends CardImpl {
|
|||
|
||||
// Whenever Ellivere of the Wild Court enters the battlefield or attacks, create a Virtuous Role token attached to another target creature you control.
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new CreateRoleAttachedTargetEffect(RoleType.VIRTUOUS));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever an enchanted creature you control deals combat damage to a player, draw a card.
|
||||
|
|
|
|||
|
|
@ -46,7 +46,10 @@ public final class GiantInheritance extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// When Giant Inheritance is put into a graveyard from the battlefield, return it to its owner's hand.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new ReturnToHandSourceEffect()));
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(
|
||||
new ReturnToHandSourceEffect()
|
||||
.setText("return it to its owner's hand")
|
||||
));
|
||||
}
|
||||
|
||||
private GiantInheritance(final GiantInheritance card) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ public final class KorvoldGleefulGlutton extends CardImpl {
|
|||
|
||||
// Whenever Korvold deals combat damage to a player, put X +1/+1 counters on Korvold and draw X cards, where X is the number of permanent types among cards in your graveyard.
|
||||
Ability combatDamageAbility = new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), PermanentTypesInGraveyardCount.instance, true),
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), PermanentTypesInGraveyardCount.instance, true)
|
||||
.setText("put X +1/+1 counters on {this}"),
|
||||
false
|
||||
);
|
||||
combatDamageAbility.addEffect(new DrawCardSourceControllerEffect(PermanentTypesInGraveyardCount.instance).setText("and draw X cards, where X is the number of permanent types among cards in your graveyard"));
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ public final class NymrisOonasTrickster extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you cast your first spell during each opponent's turn, look at the top two cards of your library.
|
||||
// Put one of those cards into your hand and the other into your graveyard.
|
||||
// Whenever you cast your first spell during each opponent's turn, look at the top two cards of your library. Put one of those cards into your hand and the other into your graveyard.
|
||||
this.addAbility(new FirstSpellOpponentsTurnTriggeredAbility(
|
||||
new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.GRAVEYARD),
|
||||
new LookLibraryAndPickControllerEffect(2, 1, PutCards.HAND, PutCards.GRAVEYARD)
|
||||
.setText("look at the top two cards of your library. Put one of those cards into your hand and the other into your graveyard"),
|
||||
false));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class PicklockPrankster extends AdventureCard {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("instant, sorcery, or Faerie card");
|
||||
private static final FilterCard filter = new FilterCard("an instant, sorcery, or Faerie card");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
|
@ -44,7 +44,7 @@ public final class PicklockPrankster extends AdventureCard {
|
|||
|
||||
// Free the Fae
|
||||
// Mill four cards. Then put an instant, sorcery, or Faerie card from among the milled cards into your hand.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new MillThenPutInHandEffect(4, filter));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new MillThenPutInHandEffect(4, filter, true));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class TaintedIsle extends CardImpl {
|
||||
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("you control a swamp");
|
||||
private static final FilterLandPermanent filter = new FilterLandPermanent("you control a Swamp");
|
||||
static {
|
||||
filter.add(SubType.SWAMP.getPredicate());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public final class TimelyWard extends CardImpl {
|
|||
|
||||
// You may cast this spell as though it had flash if it targets a commander.
|
||||
this.addAbility(new CastAsThoughItHadFlashIfConditionAbility(condition,
|
||||
"You may cast this spell as though it had flash if it targets a commander."
|
||||
"You may cast {this} as though it had flash if it targets a commander."
|
||||
));
|
||||
|
||||
// Enchant creature
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class VerifyCardDataTest {
|
|||
|
||||
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
|
||||
|
||||
private static final String FULL_ABILITIES_CHECK_SET_CODES = "WOE"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all
|
||||
private static final String FULL_ABILITIES_CHECK_SET_CODES = "WOE;WOC"; // check ability text due mtgjson, can use multiple sets like MAT;CMD or * for all
|
||||
private static final boolean CHECK_ONLY_ABILITIES_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages
|
||||
|
||||
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run
|
||||
|
|
@ -2153,8 +2153,10 @@ public class VerifyCardDataTest {
|
|||
}*/
|
||||
private static boolean compareText(String cardText, String refText, String name) {
|
||||
return cardText.equals(refText)
|
||||
|| cardText.replace(name, name.split(", ")[0]).equals(refText)
|
||||
|| cardText.replace(name, name.split(" ")[0]).equals(refText);
|
||||
|| cardText.replace(name, name.split(", ")[0])
|
||||
.equals(refText.replace(name, name.split(", ")[0]))
|
||||
|| cardText.replace(name, name.split(" ")[0])
|
||||
.equals(refText.replace(name, name.split(" ")[0]));
|
||||
}
|
||||
|
||||
private static boolean checkForEffect(Card card, Class<? extends Effect> effectClazz) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import mage.util.CardUtil;
|
|||
public class MillThenPutInHandEffect extends OneShotEffect {
|
||||
|
||||
private final int amount;
|
||||
private final boolean mandatory; // If true, putting a card in hand is mandatory if possible.
|
||||
private final FilterCard filter;
|
||||
private final Effect otherwiseEffect;
|
||||
|
||||
|
|
@ -28,16 +29,26 @@ public class MillThenPutInHandEffect extends OneShotEffect {
|
|||
this(amount, filter, null);
|
||||
}
|
||||
|
||||
public MillThenPutInHandEffect(int amount, FilterCard filter, boolean mandatory) {
|
||||
this(amount, filter, null, mandatory);
|
||||
}
|
||||
|
||||
public MillThenPutInHandEffect(int amount, FilterCard filter, Effect otherwiseEffect) {
|
||||
this(amount, filter, otherwiseEffect, false);
|
||||
}
|
||||
|
||||
public MillThenPutInHandEffect(int amount, FilterCard filter, Effect otherwiseEffect, boolean mandatory) {
|
||||
super(Outcome.Benefit);
|
||||
this.amount = amount;
|
||||
this.filter = filter;
|
||||
this.mandatory = mandatory;
|
||||
this.otherwiseEffect = otherwiseEffect;
|
||||
}
|
||||
|
||||
private MillThenPutInHandEffect(final MillThenPutInHandEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount;
|
||||
this.mandatory = effect.mandatory;
|
||||
this.filter = effect.filter;
|
||||
this.otherwiseEffect = effect.otherwiseEffect;
|
||||
}
|
||||
|
|
@ -57,7 +68,7 @@ public class MillThenPutInHandEffect extends OneShotEffect {
|
|||
if (cards.isEmpty()) {
|
||||
return applyOtherwiseEffect(game, source);
|
||||
}
|
||||
TargetCard target = new TargetCard(0, 1, Zone.ALL, filter);
|
||||
TargetCard target = new TargetCard(this.mandatory ? 1 : 0, 1, Zone.ALL, filter);
|
||||
player.choose(Outcome.DrawCard, cards, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card == null) {
|
||||
|
|
@ -82,15 +93,12 @@ public class MillThenPutInHandEffect extends OneShotEffect {
|
|||
if (staticText == null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder("mill ");
|
||||
sb.append(CardUtil.numberToText(amount));
|
||||
sb.append(" cards. You may put ");
|
||||
sb.append(filter.getMessage());
|
||||
sb.append(" from among the milled cards into your hand");
|
||||
String text = "mill " + CardUtil.numberToText(amount) + " cards. ";
|
||||
text += this.mandatory ? "Then " : "You may ";
|
||||
text += "put " + filter.getMessage() + " from among the milled cards into your hand";
|
||||
if (otherwiseEffect != null) {
|
||||
sb.append(". If you don't, ");
|
||||
sb.append(otherwiseEffect.getText(mode));
|
||||
text += ". If you don't, " + otherwiseEffect.getText(mode);
|
||||
}
|
||||
return sb.toString();
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue