diff --git a/Mage.Common/src/main/java/mage/utils/MageVersion.java b/Mage.Common/src/main/java/mage/utils/MageVersion.java index 61a5b2f3831..b6c288060a4 100644 --- a/Mage.Common/src/main/java/mage/utils/MageVersion.java +++ b/Mage.Common/src/main/java/mage/utils/MageVersion.java @@ -1,4 +1,3 @@ - package mage.utils; import java.io.Serializable; @@ -15,7 +14,7 @@ public class MageVersion implements Serializable, Comparable { public final static int MAGE_VERSION_MAJOR = 1; public final static int MAGE_VERSION_MINOR = 4; public final static int MAGE_VERSION_PATCH = 30; - public final static String MAGE_VERSION_MINOR_PATCH = "V2"; + public final static String MAGE_VERSION_MINOR_PATCH = "V3"; public final static String MAGE_VERSION_INFO = ""; private final int major; diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java index cda1cfd16f8..018ef807a11 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/SimulatedPlayer2.java @@ -132,8 +132,8 @@ public class SimulatedPlayer2 extends ComputerPlayer { if (variableManaCost != null) { int multiplier = variableManaCost.getMultiplier(); - for (int mana = 0; mana <= numAvailable; mana++) { - if (mana % multiplier == 0) { // use only values dependant from muliplier + for (int mana = variableManaCost.getMinX(); mana <= numAvailable; mana++) { + if (mana % multiplier == 0) { // use only values dependant from multiplier int xAmount = mana / multiplier; Ability newAbility = ability.copy(); VariableManaCost varCost = null; diff --git a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java index 75409c91a49..e5dd0c6b0ea 100644 --- a/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.AI/src/main/java/mage/player/ai/ComputerPlayer.java @@ -70,7 +70,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { private static final Logger log = Logger.getLogger(ComputerPlayer.class); - protected int PASSIVITY_PENALTY = 5; // Penalty value for doing nothing if some actions are availble + protected int PASSIVITY_PENALTY = 5; // Penalty value for doing nothing if some actions are available protected boolean ALLOW_INTERRUPT = true; // change this for test to false / debugging purposes to false to switch off interrupts while debugging private transient Map unplayable = new TreeMap<>(); @@ -279,9 +279,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = threats(randomOpponentId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets()); } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(abilityControllerId, permanent.getId(), null, game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.add(permanent.getId(), game); return true; } @@ -312,9 +312,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = opponentTargets; } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(permanent.getId(), game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.add(permanent.getId(), game); return true; } @@ -346,9 +346,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = ownedTargets; } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(permanent.getId(), game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.add(permanent.getId(), game); return true; } @@ -376,11 +376,11 @@ public class ComputerPlayer extends PlayerImpl implements Player { if (target.getOriginalTarget() instanceof TargetCardInYourGraveyard || target.getOriginalTarget() instanceof TargetCardInASingleGraveyard) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); List cards = new ArrayList<>(game.getPlayer(abilityControllerId).getGraveyard().getCards((FilterCard) target.getFilter(), game)); while (!cards.isEmpty()) { Card card = pickTarget(cards, outcome, target, null, game); - if (card != null && alreadyTargetted != null && !alreadyTargetted.contains(card.getId())) { + if (card != null && alreadyTargeted != null && !alreadyTargeted.contains(card.getId())) { target.add(card.getId(), game); if (target.isChosen()) { return true; @@ -396,9 +396,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { for (UUID targetId : targets) { MageObject targetObject = game.getObject(targetId); if (targetObject != null) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(targetObject.getId(), game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(targetObject.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(targetObject.getId())) { target.add(targetObject.getId(), game); return true; } @@ -547,9 +547,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = game.getBattlefield().getActivePermanents(((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), playerId, game); } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(abilityControllerId, permanent.getId(), source, game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.addTarget(permanent.getId(), source, game); return true; } @@ -594,9 +594,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = game.getBattlefield().getActivePermanents(((FilterCreaturePlayerOrPlaneswalker) t.getFilter()).getCreatureFilter(), playerId, game); } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(abilityControllerId, permanent.getId(), source, game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.addTarget(permanent.getId(), source, game); return true; } @@ -641,9 +641,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = game.getBattlefield().getActivePermanents(((FilterPermanentOrPlayer) t.getFilter()).getPermanentFilter(), playerId, game); } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(abilityControllerId, permanent.getId(), source, game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.addTarget(permanent.getId(), source, game); return true; } @@ -676,9 +676,9 @@ public class ComputerPlayer extends PlayerImpl implements Player { targets = game.getBattlefield().getActivePermanents(((TargetPlayerOrPlaneswalker) t.getFilter()).getFilterPermanent(), playerId, game); } for (Permanent permanent : targets) { - List alreadyTargetted = target.getTargets(); + List alreadyTargeted = target.getTargets(); if (t.canTarget(abilityControllerId, permanent.getId(), source, game)) { - if (alreadyTargetted != null && !alreadyTargetted.contains(permanent.getId())) { + if (alreadyTargeted != null && !alreadyTargeted.contains(permanent.getId())) { target.addTarget(permanent.getId(), source, game); return true; } @@ -1382,7 +1382,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { private Abilities getManaAbilitiesSortedByManaCount(MageObject mageObject, final Game game) { Abilities manaAbilities = mageObject.getAbilities().getAvailableActivatedManaAbilities(Zone.BATTLEFIELD, game); if (manaAbilities.size() > 1) { - // Sort mana abilities by numbver of produced manas, to use ability first that produces most mana (maybe also conditional if possible) + // Sort mana abilities by number of produced manas, to use ability first that produces most mana (maybe also conditional if possible) Collections.sort(manaAbilities, new Comparator() { @Override public int compare(ActivatedManaAbilityImpl a1, ActivatedManaAbilityImpl a2) { @@ -1472,18 +1472,25 @@ public class ComputerPlayer extends PlayerImpl implements Player { int numAvailable = getAvailableManaProducers(game).size() - ability.getManaCosts().convertedManaCost(); if (numAvailable < 0) { numAvailable = 0; - } - if (numAvailable > max) { - numAvailable = max; + } else { + if (numAvailable < min) { + numAvailable = min; + } + if (numAvailable > max) { + numAvailable = max; + } } return numAvailable; } @Override public int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variablCost) { - log.debug("announceXMana"); + log.debug("announceXCost"); //TODO: improve this int value = RandomUtil.nextInt(max + 1); + if (value < min) { + value = min; + } if (value < max) { value++; } @@ -1902,7 +1909,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { } double total = mana.getBlack() + mana.getBlue() + mana.getGreen() + mana.getRed() + mana.getWhite(); - // most frequent land is forest by defalt + // most frequent land is forest by default int mostLand = 0; String mostLandName = "Forest"; if (mana.getGreen() > 0) { @@ -1999,7 +2006,7 @@ public class ComputerPlayer extends PlayerImpl implements Player { // but also check it can be targeted betterCard = target.canTarget(getId(), card.getId(), source, game); } else { - // target object wasn't provided, so acceptings it anyway + // target object wasn't provided, so accepting it anyway betterCard = true; } } diff --git a/Mage.Sets/src/mage/cards/a/Aetherspouts.java b/Mage.Sets/src/mage/cards/a/Aetherspouts.java index 9d6bf960fc3..d7988ad0f3d 100644 --- a/Mage.Sets/src/mage/cards/a/Aetherspouts.java +++ b/Mage.Sets/src/mage/cards/a/Aetherspouts.java @@ -49,7 +49,7 @@ public final class Aetherspouts extends CardImpl { of their library. The active player (the player whose turn it is) makes all of their choices first, followed by each other player in turn order. 7/18/2014 If an effect puts two or more cards on the top or bottom of a library at the same time, - the owner of those cards may arrange them in any order. That library’s owner doesn’t reveal + the owner of those cards may arrange them in any order. That library's owner doesn't reveal the order in which the cards go into their library. */ class AetherspoutsEffect extends OneShotEffect { diff --git a/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java b/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java index 9794a5d807c..a35ad846ac8 100644 --- a/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java +++ b/Mage.Sets/src/mage/cards/a/AngrathMinotaurPirate.java @@ -45,7 +45,7 @@ public final class AngrathMinotaurPirate extends CardImpl { Effects effects1 = new Effects(); effects1.add(new DamageTargetEffect(1)); effects1.add(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") + .setText("and each creature that player or that planeswalker's controller controls") ); LoyaltyAbility ability1 = new LoyaltyAbility(effects1, +2); ability1.addTarget(new TargetOpponentOrPlaneswalker()); diff --git a/Mage.Sets/src/mage/cards/a/AntiMagicAura.java b/Mage.Sets/src/mage/cards/a/AntiMagicAura.java index 930c78536e4..9b74e2983d5 100644 --- a/Mage.Sets/src/mage/cards/a/AntiMagicAura.java +++ b/Mage.Sets/src/mage/cards/a/AntiMagicAura.java @@ -53,7 +53,7 @@ public final class AntiMagicAura extends CardImpl { } } -// 9/25/2006 ruling: If Consecrate Land enters the battlefield attached to a land that’s enchanted by other Auras, those Auras are put into their owners’ graveyards. +// 9/25/2006 ruling: If Consecrate Land enters the battlefield attached to a land that's enchanted by other Auras, those Auras are put into their owners' graveyards. class AntiMagicAuraRuleEffect extends ContinuousRuleModifyingEffectImpl { public AntiMagicAuraRuleEffect() { diff --git a/Mage.Sets/src/mage/cards/a/ApexOfPower.java b/Mage.Sets/src/mage/cards/a/ApexOfPower.java new file mode 100644 index 00000000000..81c7222911e --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/ApexOfPower.java @@ -0,0 +1,142 @@ +package mage.cards.a; + +import java.util.Set; +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.mana.AddManaOfAnyColorEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AsThoughEffectType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author TheElk801 + */ +public final class ApexOfPower extends CardImpl { + + public ApexOfPower(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{7}{R}{R}{R}"); + + // Exile the top seven cards of your library. Until end of turn, you may cast nonland cards exiled this way. + this.getSpellAbility().addEffect(new ApexOfPowerSpellEffect()); + + // If this spell was cast from your hand, add ten mana of any one color. + this.getSpellAbility().addEffect(new ApexOfPowerManaEffect()); + } + + public ApexOfPower(final ApexOfPower card) { + super(card); + } + + @Override + public ApexOfPower copy() { + return new ApexOfPower(this); + } +} + +class ApexOfPowerSpellEffect extends OneShotEffect { + + public ApexOfPowerSpellEffect() { + super(Outcome.Benefit); + this.staticText = "exile the top seven cards of your library. Until end of turn, you may cast nonland cards exiled this way"; + } + + public ApexOfPowerSpellEffect(final ApexOfPowerSpellEffect effect) { + super(effect); + } + + @Override + public ApexOfPowerSpellEffect copy() { + return new ApexOfPowerSpellEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller == null || sourceObject == null) { + return false; + } + Set cards = controller.getLibrary().getTopCards(game, 7); + if (cards.isEmpty()) { + return false; + } + controller.moveCards(cards, Zone.EXILED, source, game); + for (Card card : cards) { + if (card.isLand()) { + continue; + } + ContinuousEffect effect = new ApexOfPowerCastFromExileEffect(); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game))); + game.addEffect(effect, source); + } + return true; + } +} + +class ApexOfPowerCastFromExileEffect extends AsThoughEffectImpl { + + public ApexOfPowerCastFromExileEffect() { + super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit); + staticText = "You may play the card from exile"; + } + + public ApexOfPowerCastFromExileEffect(final ApexOfPowerCastFromExileEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public ApexOfPowerCastFromExileEffect copy() { + return new ApexOfPowerCastFromExileEffect(this); + } + + @Override + public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { + return source.getControllerId().equals(affectedControllerId) + && objectId.equals(getTargetPointer().getFirst(game, source)); + } +} + +class ApexOfPowerManaEffect extends OneShotEffect { + + public ApexOfPowerManaEffect() { + super(Outcome.Benefit); + this.staticText = "If this spell was cast from your hand, add ten mana of any one color."; + } + + public ApexOfPowerManaEffect(final ApexOfPowerManaEffect effect) { + super(effect); + } + + @Override + public ApexOfPowerManaEffect copy() { + return new ApexOfPowerManaEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getStack().getSpell(source.getSourceId()); + if (spell == null || spell.getFromZone() != Zone.HAND) { + return false; + } + return new AddManaOfAnyColorEffect(10).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java index d11de09b959..db37a8a4433 100644 --- a/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java +++ b/Mage.Sets/src/mage/cards/a/ApocalypseDemon.java @@ -35,7 +35,7 @@ public final class ApocalypseDemon extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Apocalypse Demon’s power and toughness are each equal to the number of cards in your graveyard. + // Apocalypse Demon's power and toughness are each equal to the number of cards in your graveyard. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new CardsInControllerGraveyardCount(), Duration.EndOfGame))); // At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature. diff --git a/Mage.Sets/src/mage/cards/a/AquaticIncursion.java b/Mage.Sets/src/mage/cards/a/AquaticIncursion.java index 9c75b8cf410..15199eb5b8e 100644 --- a/Mage.Sets/src/mage/cards/a/AquaticIncursion.java +++ b/Mage.Sets/src/mage/cards/a/AquaticIncursion.java @@ -37,7 +37,7 @@ public final class AquaticIncursion extends CardImpl { // When Aquatic Incursion enters the battlefield, create two 1/1 blue Merfolk creature tokens with hexproof. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MerfolkHexproofToken(), 2), false)); - // {3}{U}: Target Merfolk can’t be blocked this turn. + // {3}{U}: Target Merfolk can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{3}{U}")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/ArchfiendOfDespair.java b/Mage.Sets/src/mage/cards/a/ArchfiendOfDespair.java index dc0327fd01d..4d5bc436e43 100644 --- a/Mage.Sets/src/mage/cards/a/ArchfiendOfDespair.java +++ b/Mage.Sets/src/mage/cards/a/ArchfiendOfDespair.java @@ -64,7 +64,7 @@ class ArchfiendOfDespairEffect extends OneShotEffect { public ArchfiendOfDespairEffect() { super(Outcome.LoseLife); - this.staticText = "each opponent loses life equal to the life he or she lost this turn"; + this.staticText = "each opponent loses life equal to the life that player lost this turn"; } public ArchfiendOfDespairEffect(final ArchfiendOfDespairEffect effect) { diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java b/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java index a205ddff478..f8166c4b1e2 100644 --- a/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java +++ b/Mage.Sets/src/mage/cards/a/ArchonOfValorsReach.java @@ -34,7 +34,7 @@ import mage.util.CardUtil; public final class ArchonOfValorsReach extends CardImpl { public ArchonOfValorsReach(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{G}{W}"); this.subtype.add(SubType.ARCHON); this.power = new MageInt(5); diff --git a/Mage.Sets/src/mage/cards/a/AssemblyHall.java b/Mage.Sets/src/mage/cards/a/AssemblyHall.java new file mode 100644 index 00000000000..a495718139e --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AssemblyHall.java @@ -0,0 +1,92 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.cards.SplitCard; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCardInLibrary; + +/** + * + * @author TheElk801 + */ +public final class AssemblyHall extends CardImpl { + + public AssemblyHall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); + + // {4}, {tap}: Reveal a creature card in your hand. Search your library for a card with the same name as that card, reveal it, and put it into your hand. Then shuffle your library. + Ability ability = new SimpleActivatedAbility(new AssemblyHallEffect(), new GenericManaCost(4)); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public AssemblyHall(final AssemblyHall card) { + super(card); + } + + @Override + public AssemblyHall copy() { + return new AssemblyHall(this); + } +} + +class AssemblyHallEffect extends OneShotEffect { + + public AssemblyHallEffect() { + super(Outcome.Benefit); + this.staticText = "reveal a creature card from your hand. " + + "Search your library for a card with the same name as that card, " + + "reveal it, and put it into your hand. Then shuffle your library"; + } + + public AssemblyHallEffect(final AssemblyHallEffect effect) { + super(effect); + } + + @Override + public AssemblyHallEffect copy() { + return new AssemblyHallEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = game.getObject(source.getSourceId()); + if (controller == null || controller.getHand().isEmpty() || sourceObject == null) { + return false; + } + Card cardToReveal = null; + Target target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE); + target.setNotTarget(true); + if (controller.chooseTarget(outcome, target, source, game)) { + cardToReveal = game.getCard(target.getFirstTarget()); + } + if (cardToReveal == null) { + return false; + } + controller.revealCards("from hand :" + sourceObject.getName(), new CardsImpl(cardToReveal), game); + String nameToSearch = cardToReveal.isSplitCard() ? ((SplitCard) cardToReveal).getLeftHalfCard().getName() : cardToReveal.getName(); + FilterCard filterCard = new FilterCard("card named " + nameToSearch); + filterCard.add(new NamePredicate(nameToSearch)); + return new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filterCard), true, true).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/a/AzorTheLawbringer.java b/Mage.Sets/src/mage/cards/a/AzorTheLawbringer.java index 0a7e1d40360..d879c1e609c 100644 --- a/Mage.Sets/src/mage/cards/a/AzorTheLawbringer.java +++ b/Mage.Sets/src/mage/cards/a/AzorTheLawbringer.java @@ -42,7 +42,7 @@ public final class AzorTheLawbringer extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // When Azor, the Lawbringer enters the battlefield, each opponent can’t cast instant or sorcery spells during that player’s next turn. + // When Azor, the Lawbringer enters the battlefield, each opponent can't cast instant or sorcery spells during that player's next turn. this.addAbility(new EntersBattlefieldTriggeredAbility(new AzorTheLawbringerEntersBattlefieldEffect(), false)); // Whenever Azor attacks, you may pay {X}{W}{U}{U}. If you do, you gain X life and draw X cards. diff --git a/Mage.Sets/src/mage/cards/b/BalanWanderingKnight.java b/Mage.Sets/src/mage/cards/b/BalanWanderingKnight.java index 6b80f1088fd..98a1d0978ed 100644 --- a/Mage.Sets/src/mage/cards/b/BalanWanderingKnight.java +++ b/Mage.Sets/src/mage/cards/b/BalanWanderingKnight.java @@ -84,7 +84,7 @@ public final class BalanWanderingKnight extends CardImpl { filter.add(new SubtypePredicate(SubType.EQUIPMENT)); for (Permanent equipment : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(),game)) { if (equipment != null) { - //If an Equipment can’t equip, it isn’t attached, and it doesn’t become unattached (if it’s attached to a creature). + //If an Equipment can't equip, it isn't attached, and it doesn't become unattached (if it's attached to a creature). if (!balan.cantBeAttachedBy(equipment, game)) { balan.addAttachment(equipment.getId(), game); } diff --git a/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java b/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java index ad0aa4279ca..1adf661c5c1 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianWarlord.java @@ -134,7 +134,7 @@ class BalduvianWarlordUnblockEffect extends OneShotEffect { if (chosenGroup != null) { // Relevant ruling for Balduvian Warlord: // 7/15/2006 If an attacking creature has an ability that triggers “When this creature becomes blocked,” - // it triggers when a creature blocks it due to the Warlord’s ability only if it was unblocked at that point. + // it triggers when a creature blocks it due to the Warlord's ability only if it was unblocked at that point. boolean notYetBlocked = chosenGroup.getBlockers().isEmpty(); chosenGroup.addBlockerToGroup(permanent.getId(), controller.getId(), game); game.getCombat().addBlockingGroup(permanent.getId(), chosenPermanent.getId(), controller.getId(), game); // 702.21h diff --git a/Mage.Sets/src/mage/cards/b/BazaarOfWonders.java b/Mage.Sets/src/mage/cards/b/BazaarOfWonders.java new file mode 100644 index 00000000000..f63d0ebc8ad --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BazaarOfWonders.java @@ -0,0 +1,98 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SpellCastAllTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileGraveyardAllPlayersEffect; +import mage.constants.SuperType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SetTargetPointer; +import mage.filter.FilterCard; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public final class BazaarOfWonders extends CardImpl { + + public BazaarOfWonders(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); + + this.addSuperType(SuperType.WORLD); + + // When Bazaar of Wonders enters the battlefield, exile all cards from all graveyards. + this.addAbility(new EntersBattlefieldTriggeredAbility(new ExileGraveyardAllPlayersEffect())); + + // Whenever a player casts a spell, counter it if a card with the same name is in a graveyard or a nontoken permanent with the same name is on the battlefield. + this.addAbility(new SpellCastAllTriggeredAbility(new BazaarOfWondersEffect(), StaticFilters.FILTER_SPELL_A, false, SetTargetPointer.SPELL)); + } + + public BazaarOfWonders(final BazaarOfWonders card) { + super(card); + } + + @Override + public BazaarOfWonders copy() { + return new BazaarOfWonders(this); + } +} + +class BazaarOfWondersEffect extends OneShotEffect { + + public BazaarOfWondersEffect() { + super(Outcome.Benefit); + this.staticText = "counter it if a card with the same name is in a graveyard " + + "or a nontoken permanent with the same name is on the battlefield"; + } + + public BazaarOfWondersEffect(final BazaarOfWondersEffect effect) { + super(effect); + } + + @Override + public BazaarOfWondersEffect copy() { + return new BazaarOfWondersEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getSpell(targetPointer.getFirst(game, source)); + if (spell == null) { + return false; + } + String spellName = spell.getName(); + FilterPermanent filter1 = new FilterPermanent(); + filter1.add(new NamePredicate(spellName)); + filter1.add(Predicates.not(new TokenPredicate())); + if (!game.getBattlefield().getActivePermanents(filter1, source.getControllerId(), game).isEmpty()) { + spell.counter(source.getControllerId(), game); + return true; + } + FilterCard filter2 = new FilterCard(); + filter2.add(new NamePredicate(spellName)); + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { + Player player = game.getPlayer(playerId); + if (player == null) { + continue; + } + if (player.getGraveyard().count(filter2, game) > 0) { + spell.counter(source.getControllerId(), game); + return true; + } + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/b/Blightning.java b/Mage.Sets/src/mage/cards/b/Blightning.java index 6345b97ab89..397629a8d54 100644 --- a/Mage.Sets/src/mage/cards/b/Blightning.java +++ b/Mage.Sets/src/mage/cards/b/Blightning.java @@ -45,7 +45,7 @@ class BlightningEffect extends OneShotEffect { BlightningEffect() { super(Outcome.Benefit); - this.staticText = "That player or that planeswalker’s controller discards two cards."; + this.staticText = "That player or that planeswalker's controller discards two cards."; } BlightningEffect(final BlightningEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BloodFeud.java b/Mage.Sets/src/mage/cards/b/BloodFeud.java index 9fa7427f6bd..e18b5f18656 100644 --- a/Mage.Sets/src/mage/cards/b/BloodFeud.java +++ b/Mage.Sets/src/mage/cards/b/BloodFeud.java @@ -25,7 +25,7 @@ public final class BloodFeud extends CardImpl { target.setTargetTag(1); this.getSpellAbility().addTarget(target); - FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new AnotherTargetPredicate(2)); TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter); target2.setTargetTag(2); diff --git a/Mage.Sets/src/mage/cards/b/BogardanPhoenix.java b/Mage.Sets/src/mage/cards/b/BogardanPhoenix.java new file mode 100644 index 00000000000..e56829c19b6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BogardanPhoenix.java @@ -0,0 +1,93 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.constants.SubType; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.counters.Counters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public final class BogardanPhoenix extends CardImpl { + + public BogardanPhoenix(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}{R}"); + + this.subtype.add(SubType.PHOENIX); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // When Bogardan Phoenix dies, exile it if it had a death counter on it. Otherwise, return it to the battlefield under your control and put a death counter on it. + this.addAbility(new DiesTriggeredAbility(new BogardanPhoenixEffect(), false)); + } + + public BogardanPhoenix(final BogardanPhoenix card) { + super(card); + } + + @Override + public BogardanPhoenix copy() { + return new BogardanPhoenix(this); + } +} + +class BogardanPhoenixEffect extends OneShotEffect { + + public BogardanPhoenixEffect() { + super(Outcome.Benefit); + this.staticText = "exile it if it had a death counter on it. " + + "Otherwise, return it to the battlefield under your control " + + "and put a death counter on it."; + } + + public BogardanPhoenixEffect(final BogardanPhoenixEffect effect) { + super(effect); + } + + @Override + public BogardanPhoenixEffect copy() { + return new BogardanPhoenixEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); + if (permanent == null + || controller == null + || permanent.getZoneChangeCounter(game) + 1 + != source.getSourceObjectZoneChangeCounter()) { + return false; + } + Card card = game.getCard(permanent.getId()); + if (card == null || card.getZoneChangeCounter(game) != source.getSourceObjectZoneChangeCounter()) { + return false; + } + if (permanent.getCounters(game).containsKey(CounterType.DEATH)) { + return controller.moveCards(card, Zone.EXILED, source, game); + } else { + Counters countersToAdd = new Counters(); + countersToAdd.addCounter(CounterType.DEATH.createInstance()); + game.setEnterWithCounters(source.getSourceId(), countersToAdd); + return controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + } +} diff --git a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java index 8409754955a..1b210079345 100644 --- a/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java +++ b/Mage.Sets/src/mage/cards/b/BonfireOfTheDamned.java @@ -50,7 +50,7 @@ class BonfireOfTheDamnedEffect extends OneShotEffect { public BonfireOfTheDamnedEffect() { super(Outcome.Damage); - staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; + staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker's controller controls"; } public BonfireOfTheDamnedEffect(final BonfireOfTheDamnedEffect effect) { diff --git a/Mage.Sets/src/mage/cards/b/BrainPry.java b/Mage.Sets/src/mage/cards/b/BrainPry.java index bcb0a8920d1..2bebd65d8db 100644 --- a/Mage.Sets/src/mage/cards/b/BrainPry.java +++ b/Mage.Sets/src/mage/cards/b/BrainPry.java @@ -5,7 +5,7 @@ import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class BrainPry extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); //Name a nonland card. Target player reveals their hand. That player discards a card with that name. If he or she can't, you draw a card. - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new BrainPryEffect()); } @@ -56,7 +56,7 @@ class BrainPryEffect extends OneShotEffect { Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (targetPlayer != null && controller != null && sourceObject != null && cardName != null) { boolean hasDiscarded = false; for (Card card : targetPlayer.getHand().getCards(game)) { diff --git a/Mage.Sets/src/mage/cards/b/Brightling.java b/Mage.Sets/src/mage/cards/b/Brightling.java index 31d6c7009ba..f99b0544ebd 100644 --- a/Mage.Sets/src/mage/cards/b/Brightling.java +++ b/Mage.Sets/src/mage/cards/b/Brightling.java @@ -1,4 +1,3 @@ - package mage.cards.b; import java.util.UUID; @@ -107,6 +106,7 @@ class BrightlingEffect extends OneShotEffect { return false; } int boost = (player.chooseUse(outcome, "Give +1/-1 or -1/+1?", null, "+1/-1", "-1/+1", source, game) ? 1 : -1); - return new BoostSourceEffect(boost, -1 * boost, Duration.EndOfTurn).apply(game, source); + game.addEffect(new BoostSourceEffect(boost, -1 * boost, Duration.EndOfTurn), source); + return true; } } diff --git a/Mage.Sets/src/mage/cards/b/BrineSeer.java b/Mage.Sets/src/mage/cards/b/BrineSeer.java new file mode 100644 index 00000000000..6035e0b88a3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrineSeer.java @@ -0,0 +1,88 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.target.TargetSpell; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public final class BrineSeer extends CardImpl { + + public BrineSeer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{U}, {tap}: Reveal any number of blue cards in your hand. Counter target spell unless its controller pays {1} for each card revealed this way. + Ability ability = new SimpleActivatedAbility(new BrineSeerEffect(), new ManaCostsImpl("{2}{U}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetSpell()); + this.addAbility(ability); + } + + public BrineSeer(final BrineSeer card) { + super(card); + } + + @Override + public BrineSeer copy() { + return new BrineSeer(this); + } +} + +class BrineSeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("any number of blue cards in your hand"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLUE)); + } + + public BrineSeerEffect() { + super(Outcome.Detriment); + this.staticText = "reveal any number of blue cards in your hand. " + + "Counter target spell unless its controller pays {1} for each card revealed this way"; + } + + public BrineSeerEffect(final BrineSeerEffect effect) { + super(effect); + } + + @Override + public BrineSeerEffect copy() { + return new BrineSeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return false; + } + int xValue = cost.getNumberRevealedCards(); + return new CounterUnlessPaysEffect(new GenericManaCost(xValue)).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/c/CabalTherapy.java b/Mage.Sets/src/mage/cards/c/CabalTherapy.java index 75e691855c9..70d7f7863cb 100644 --- a/Mage.Sets/src/mage/cards/c/CabalTherapy.java +++ b/Mage.Sets/src/mage/cards/c/CabalTherapy.java @@ -1,11 +1,10 @@ - package mage.cards.c; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.keyword.FlashbackAbility; import mage.cards.*; import mage.constants.CardType; @@ -26,10 +25,10 @@ import java.util.UUID; public final class CabalTherapy extends CardImpl { public CabalTherapy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}"); // Name a nonland card. Target player reveals their hand and discards all cards with that name. - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new CabalTherapyEffect()); @@ -53,7 +52,7 @@ class CabalTherapyEffect extends OneShotEffect { public CabalTherapyEffect() { super(Outcome.Discard); - staticText = "Name a nonland card. Target player reveals their hand and discards all cards with that name"; + staticText = "Target player reveals their hand and discards all cards with that name"; } public CabalTherapyEffect(final CabalTherapyEffect effect) { @@ -66,16 +65,15 @@ class CabalTherapyEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (targetPlayer != null && controller != null && sourceObject != null) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); Cards hand = targetPlayer.getHand(); for (Card card : hand.getCards(game)) { - if(card.isSplitCard()){ + if (card.isSplitCard()) { SplitCard splitCard = (SplitCard) card; - if(splitCard.getLeftHalfCard().getName().equals(cardName)){ + if (splitCard.getLeftHalfCard().getName().equals(cardName)) { targetPlayer.discard(card, source, game); - } - else if(splitCard.getRightHalfCard().getName().equals(cardName)){ + } else if (splitCard.getRightHalfCard().getName().equals(cardName)) { targetPlayer.discard(card, source, game); } } diff --git a/Mage.Sets/src/mage/cards/c/CelestialColonnade.java b/Mage.Sets/src/mage/cards/c/CelestialColonnade.java index 1db83f2a875..fb98055c58a 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialColonnade.java +++ b/Mage.Sets/src/mage/cards/c/CelestialColonnade.java @@ -37,7 +37,7 @@ public final class CelestialColonnade extends CardImpl { this.addAbility(new BlueManaAbility()); this.addAbility(new WhiteManaAbility()); - // {3}{W}{U}: Until end of turn, Celestial Colonnade becomes a 4/4 white and blue Elemental creature with flying and vigilance. It’s still a land. + // {3}{W}{U}: Until end of turn, Celestial Colonnade becomes a 4/4 white and blue Elemental creature with flying and vigilance. It's still a land. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect( new CreatureToken(4, 4, "4/4 white and blue Elemental creature with flying and vigilance") .withColor("WU") diff --git a/Mage.Sets/src/mage/cards/c/CelestialConvergence.java b/Mage.Sets/src/mage/cards/c/CelestialConvergence.java index 424f2a8e923..5b8145a9c9a 100644 --- a/Mage.Sets/src/mage/cards/c/CelestialConvergence.java +++ b/Mage.Sets/src/mage/cards/c/CelestialConvergence.java @@ -78,11 +78,11 @@ class CelestialConvergenceEffect extends OneShotEffect { /** * 801.14. If an effect states that a player wins the game, all of - * that player’s opponents within their range of influence lose the + * that player's opponents within their range of influence lose the * game instead. # * * 801.15. If the effect of a spell or ability states that the game - * is a draw, the game is a draw for that spell or ability’s + * is a draw, the game is a draw for that spell or ability's * controller and all players within their range of influence. They * leave the game. All remaining players continue to play the game. * diff --git a/Mage.Sets/src/mage/cards/c/ChainLightning.java b/Mage.Sets/src/mage/cards/c/ChainLightning.java index 01ba69b796d..27492f792fb 100644 --- a/Mage.Sets/src/mage/cards/c/ChainLightning.java +++ b/Mage.Sets/src/mage/cards/c/ChainLightning.java @@ -44,7 +44,7 @@ class ChainLightningEffect extends OneShotEffect { ChainLightningEffect() { super(Outcome.Damage); - this.staticText = "Chain Lightning deals 3 damage to any target. Then that player or that creature's controller may pay {R}{R}. If the player does, he or she may copy this spell and may choose a new target for that copy."; + this.staticText = "{this} deals 3 damage to any target. Then that player or that permanent's controller may pay {R}{R}. If the player does, they may copy this spell and may choose a new target for that copy"; } ChainLightningEffect(final ChainLightningEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java index 2f193dd7147..e2cb272af39 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraNalaar.java +++ b/Mage.Sets/src/mage/cards/c/ChandraNalaar.java @@ -50,7 +50,7 @@ public final class ChandraNalaar extends CardImpl { Effects effects1 = new Effects(); effects1.add(new DamageTargetEffect(10)); effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") + .setText("and each creature that player or that planeswalker's controller controls") ); LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8); ability3.addTarget(new TargetPlayerOrPlaneswalker()); diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java index 5cce457cab8..900ad4bc2b2 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyrogenius.java @@ -45,7 +45,7 @@ public final class ChandraPyrogenius extends CardImpl { Effects effects = new Effects(); effects.add(new DamageTargetEffect(6)); effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") + .setText("and each creature that player or that planeswalker's controller controls") ); ability = new LoyaltyAbility(effects, -10); ability.addTarget(new TargetPlayerOrPlaneswalker()); diff --git a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java index cff315d1578..e2975f6b7d3 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java +++ b/Mage.Sets/src/mage/cards/c/ChandraPyromaster.java @@ -71,7 +71,7 @@ class ChandraPyromasterEffect1 extends OneShotEffect { public ChandraPyromasterEffect1() { super(Outcome.Damage); - staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to up to one target creature that player or that planeswalker’s controller controls. That creature can’t block this turn."; + staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to up to one target creature that player or that planeswalker's controller controls. That creature can't block this turn."; } public ChandraPyromasterEffect1(final ChandraPyromasterEffect1 effect) { diff --git a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java index 33fe592e33e..81a6e6c8613 100644 --- a/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java +++ b/Mage.Sets/src/mage/cards/c/ChandraTorchOfDefiance.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -22,7 +21,6 @@ import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; -import mage.constants.Zone; import mage.game.Game; import mage.game.command.emblems.ChandraTorchOfDefianceEmblem; import mage.players.Library; @@ -92,10 +90,10 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect { Card card = library.getFromTop(game); if (card != null) { boolean exiledCardWasCast = false; - controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true); - if (!card.getManaCost().isEmpty()) { - if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.isLand()) { - exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false, new MageObjectReference(source.getSourceObject(game), game)); + controller.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName()); + if (!card.getManaCost().isEmpty() && !card.isLand()) { + if (controller.chooseUse(Outcome.Benefit, "Cast " + card.getName() + "? (You still pay the costs)", source, game)) { + exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false, new MageObjectReference(sourceObject, game)); } } if (!exiledCardWasCast) { diff --git a/Mage.Sets/src/mage/cards/c/ChandrasFury.java b/Mage.Sets/src/mage/cards/c/ChandrasFury.java index 44e6f4af180..89414b89dfa 100644 --- a/Mage.Sets/src/mage/cards/c/ChandrasFury.java +++ b/Mage.Sets/src/mage/cards/c/ChandrasFury.java @@ -22,7 +22,7 @@ public final class ChandrasFury extends CardImpl { // Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") + .setText("and each creature that player or that planeswalker's controller controls") ); this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); } diff --git a/Mage.Sets/src/mage/cards/c/ChariotOfTheSun.java b/Mage.Sets/src/mage/cards/c/ChariotOfTheSun.java new file mode 100644 index 00000000000..4d6520a3fe8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChariotOfTheSun.java @@ -0,0 +1,82 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class ChariotOfTheSun extends CardImpl { + + public ChariotOfTheSun(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // {2}, {tap}: Until end of turn, target creature you control gains flying and its toughness becomes 1. + Ability ability = new SimpleActivatedAbility( + new GainAbilityTargetEffect( + FlyingAbility.getInstance(), + Duration.EndOfTurn, + "until end of turn, target creature you control gains flying" + ), + new GenericManaCost(2) + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetControlledCreaturePermanent()); + ability.addEffect(new ChariotOfTheSunEffect()); + this.addAbility(ability); + } + + public ChariotOfTheSun(final ChariotOfTheSun card) { + super(card); + } + + @Override + public ChariotOfTheSun copy() { + return new ChariotOfTheSun(this); + } +} + +class ChariotOfTheSunEffect extends ContinuousEffectImpl { + + public ChariotOfTheSunEffect() { + super(Duration.EndOfTurn, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.UnboostCreature); + staticText = "and its toughness becomes 1"; + } + + public ChariotOfTheSunEffect(final ChariotOfTheSunEffect effect) { + super(effect); + } + + @Override + public ChariotOfTheSunEffect copy() { + return new ChariotOfTheSunEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(targetPointer.getFirst(game, source)); + if (permanent == null) { + this.discard(); + return false; + } + permanent.getToughness().setValue(1); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CheeringFanatic.java b/Mage.Sets/src/mage/cards/c/CheeringFanatic.java index 277fa9c6578..e0288f1af83 100644 --- a/Mage.Sets/src/mage/cards/c/CheeringFanatic.java +++ b/Mage.Sets/src/mage/cards/c/CheeringFanatic.java @@ -7,8 +7,8 @@ import mage.abilities.Ability; import mage.abilities.common.AttacksTriggeredAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; -import mage.abilities.effects.common.NameACardEffect.TypeOfName; +import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.abilities.effects.common.ChooseACardNameEffect.TypeOfName; import mage.abilities.effects.common.cost.SpellsCostReductionAllEffect; import mage.constants.SubType; import mage.cards.CardImpl; @@ -65,8 +65,8 @@ class CheeringFanaticEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - new NameACardEffect(TypeOfName.ALL).apply(game, source); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + new ChooseACardNameEffect(TypeOfName.ALL).apply(game, source); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); FilterCard filter = new FilterCard(); filter.add(new NamePredicate(cardName)); ContinuousEffect effect = new SpellsCostReductionAllEffect(filter, 1); diff --git a/Mage.Sets/src/mage/cards/c/ChromeMox.java b/Mage.Sets/src/mage/cards/c/ChromeMox.java index a0a02f20e36..b3b414ee191 100644 --- a/Mage.Sets/src/mage/cards/c/ChromeMox.java +++ b/Mage.Sets/src/mage/cards/c/ChromeMox.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.ArrayList; @@ -127,8 +126,9 @@ class ChromeMoxManaEffect extends ManaEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - checkToFirePossibleEvents(getMana(game, source), game, source); - controller.getManaPool().addMana(getMana(game, source), game, source); + Mana mana = getMana(game, source); + checkToFirePossibleEvents(mana, game, source); + controller.getManaPool().addMana(mana, game, source); return true; } diff --git a/Mage.Sets/src/mage/cards/c/CinderSeer.java b/Mage.Sets/src/mage/cards/c/CinderSeer.java new file mode 100644 index 00000000000..1b520476c43 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CinderSeer.java @@ -0,0 +1,87 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.target.common.TargetAnyTarget; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public final class CinderSeer extends CardImpl { + + public CinderSeer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{R}, {tap}: Reveal any number of red cards in your hand. Cinder Seer deals X damage to any target, where X is the number of cards revealed this way. + Ability ability = new SimpleActivatedAbility(new CinderSeerEffect(), new ManaCostsImpl("{2}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetAnyTarget()); + this.addAbility(ability); + } + + public CinderSeer(final CinderSeer card) { + super(card); + } + + @Override + public CinderSeer copy() { + return new CinderSeer(this); + } +} + +class CinderSeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("any number of red cards in your hand"); + + static { + filter.add(new ColorPredicate(ObjectColor.RED)); + } + + public CinderSeerEffect() { + super(Outcome.Damage); + this.staticText = "reveal any number of red cards in your hand. " + + "{this} deals X damage to any target, where X is the number of cards revealed this way"; + } + + public CinderSeerEffect(final CinderSeerEffect effect) { + super(effect); + } + + @Override + public CinderSeerEffect copy() { + return new CinderSeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return false; + } + int xValue = cost.getNumberRevealedCards(); + return new DamageTargetEffect(xValue).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java b/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java index 729d9b2bc2f..8cd274c678b 100644 --- a/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java +++ b/Mage.Sets/src/mage/cards/c/ConcussiveBolt.java @@ -48,7 +48,7 @@ class ConcussiveBoltEffect extends OneShotEffect { public ConcussiveBoltEffect() { super(Outcome.Benefit); - this.staticText = "Metalcraft - If you control three or more artifacts, creatures controlled by that player or by that planeswalker’s controller can’t block this turn."; + this.staticText = "Metalcraft - If you control three or more artifacts, creatures controlled by that player or by that planeswalker's controller can't block this turn."; } public ConcussiveBoltEffect(final ConcussiveBoltEffect effect) { diff --git a/Mage.Sets/src/mage/cards/c/ConsecrateLand.java b/Mage.Sets/src/mage/cards/c/ConsecrateLand.java index c900726ee83..8ba52ddf806 100644 --- a/Mage.Sets/src/mage/cards/c/ConsecrateLand.java +++ b/Mage.Sets/src/mage/cards/c/ConsecrateLand.java @@ -53,7 +53,7 @@ public final class ConsecrateLand extends CardImpl { } } -// 9/25/2006 ruling: If Consecrate Land enters the battlefield attached to a land that’s enchanted by other Auras, those Auras are put into their owners’ graveyards. +// 9/25/2006 ruling: If Consecrate Land enters the battlefield attached to a land that's enchanted by other Auras, those Auras are put into their owners' graveyards. class ConsecrateLandRuleEffect extends ContinuousRuleModifyingEffectImpl { public ConsecrateLandRuleEffect() { diff --git a/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java b/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java index ae6c87c0950..7349f4100e4 100644 --- a/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java +++ b/Mage.Sets/src/mage/cards/c/CouncilOfTheAbsolute.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -9,7 +8,7 @@ import mage.abilities.SpellAbility; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.cards.Card; import mage.cards.CardImpl; @@ -35,7 +34,7 @@ public final class CouncilOfTheAbsolute extends CardImpl { this.toughness = new MageInt(4); // As Council of the Absolute enters the battlefield, name a card other than a creature or a land card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_AND_NON_CREATURE_NAME))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_AND_NON_CREATURE_NAME))); // Your opponents can't cast the chosen card. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CouncilOfTheAbsoluteReplacementEffect())); // Spells with the chosen name cost 2 less for you to cast. @@ -58,7 +57,7 @@ class CouncilOfTheAbsoluteReplacementEffect extends ContinuousRuleModifyingEffec public CouncilOfTheAbsoluteReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Your opponents can't cast the chosen card"; + staticText = "Your opponents can't cast spells with the chosen name"; } public CouncilOfTheAbsoluteReplacementEffect(final CouncilOfTheAbsoluteReplacementEffect effect) { @@ -79,7 +78,7 @@ class CouncilOfTheAbsoluteReplacementEffect extends ContinuousRuleModifyingEffec public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast a card with that name (" + mageObject.getLogName() + " in play)."; + return "You can't cast a spell with that name (" + mageObject.getLogName() + " in play)."; } return null; } @@ -93,7 +92,7 @@ class CouncilOfTheAbsoluteReplacementEffect extends ContinuousRuleModifyingEffec public boolean applies(GameEvent event, Ability source, Game game) { if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { MageObject object = game.getObject(event.getSourceId()); - if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } @@ -105,7 +104,7 @@ class CouncilOfTheAbsoluteCostReductionEffect extends CostModificationEffectImpl public CouncilOfTheAbsoluteCostReductionEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); - this.staticText = "Spells with the chosen name cost 2 less for you to cast"; + this.staticText = "Spells with the chosen name you cast cost 2 less to cast"; } protected CouncilOfTheAbsoluteCostReductionEffect(CouncilOfTheAbsoluteCostReductionEffect effect) { @@ -123,7 +122,7 @@ class CouncilOfTheAbsoluteCostReductionEffect extends CostModificationEffectImpl if ((abilityToModify instanceof SpellAbility) && abilityToModify.getControllerId().equals(source.getControllerId())) { Card card = game.getCard(abilityToModify.getSourceId()); - return card.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY)); + return card.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY)); } return false; } diff --git a/Mage.Sets/src/mage/cards/c/CursedScroll.java b/Mage.Sets/src/mage/cards/c/CursedScroll.java index cf185e8b836..0278616567f 100644 --- a/Mage.Sets/src/mage/cards/c/CursedScroll.java +++ b/Mage.Sets/src/mage/cards/c/CursedScroll.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -8,7 +7,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; @@ -29,7 +28,7 @@ public final class CursedScroll extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // {3}, {T}: Name a card. Reveal a card at random from your hand. If it's the named card, Cursed Scroll deals 2 damage to any target. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); ability.addEffect(new CursedScrollEffect()); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); @@ -50,7 +49,7 @@ class CursedScrollEffect extends OneShotEffect { public CursedScrollEffect() { super(Outcome.Neutral); - staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to any target"; + staticText = ", then reveal a card at random from your hand. If that card has the chosen name, {this} deals 2 damage to any target"; } public CursedScrollEffect(final CursedScrollEffect effect) { @@ -61,7 +60,7 @@ class CursedScrollEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (sourceObject != null && controller != null && cardName != null && !cardName.isEmpty()) { if (!controller.getHand().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java index e58a15264ce..3bed9903fb9 100644 --- a/Mage.Sets/src/mage/cards/d/DacksDuplicate.java +++ b/Mage.Sets/src/mage/cards/d/DacksDuplicate.java @@ -53,7 +53,7 @@ class DacksDuplicateApplyToPermanent extends ApplyToPermanent { @Override public boolean apply(Game game, Permanent permanent, Ability source, UUID copyToObjectId) { /** - * 29/05/2014 The ability of Dack’s Duplicate doesn’t target the + * 29/05/2014 The ability of Dack's Duplicate doesn't target the * creature. */ permanent.addAbility(new DethroneAbility(), game); diff --git a/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java b/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java index 404963e427e..a237698395f 100644 --- a/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java +++ b/Mage.Sets/src/mage/cards/d/DarksteelJuggernaut.java @@ -31,7 +31,7 @@ public final class DarksteelJuggernaut extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); - // Darksteel Juggernaut’s power and toughness are each equal to the number of artifacts you control. + // Darksteel Juggernaut's power and toughness are each equal to the number of artifacts you control. this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledArtifactPermanent("artifacts you control")), Duration.EndOfGame))); diff --git a/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java b/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java index 89094a3b695..b3f06e02e77 100644 --- a/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java +++ b/Mage.Sets/src/mage/cards/d/DawnbreakReclaimer.java @@ -75,13 +75,13 @@ class DawnbreakReclaimerEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { /** * 04.11.2015 If any opponent has a creature card in their - * graveyard as Dawnbreak Reclaimer’s ability resolves, then you must - * choose one of those cards. You can’t choose a different opponent with + * graveyard as Dawnbreak Reclaimer's ability resolves, then you must + * choose one of those cards. You can't choose a different opponent with * no creature cards in their graveyard to avoid returning one of * those cards. * - * 04.11.2015 If there are no creature cards in any opponent’s graveyard - * as Dawnbreak Reclaimer’s ability resolves, you’ll still have the + * 04.11.2015 If there are no creature cards in any opponent's graveyard + * as Dawnbreak Reclaimer's ability resolves, you'll still have the * option to return a creature card from your graveyard to the * battlefield. You choose which opponent will choose a creature card in * your graveyard. diff --git a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java index 31a5f63eaa1..7fef07ec16a 100644 --- a/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java +++ b/Mage.Sets/src/mage/cards/d/DeclarationOfNaught.java @@ -6,7 +6,7 @@ import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.CounterTargetEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -27,7 +27,7 @@ public final class DeclarationOfNaught extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}"); // As Declaration of Naught enters the battlefield, name a card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL))); // {U}: Counter target spell with the chosen name. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new ManaCostsImpl("{U}")); diff --git a/Mage.Sets/src/mage/cards/d/Deicide.java b/Mage.Sets/src/mage/cards/d/Deicide.java index 19f3886ff0f..3e72df10a88 100644 --- a/Mage.Sets/src/mage/cards/d/Deicide.java +++ b/Mage.Sets/src/mage/cards/d/Deicide.java @@ -63,7 +63,7 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE controller.moveCardToExileWithInfo(targetEnchantment, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true); // 4/26/2014 // Deicide looks at the card in exile, not the permanent that was exiled, to determine - // if it is a God. For each of the Gods in the Theros block, it won’t matter what your + // if it is a God. For each of the Gods in the Theros block, it won't matter what your // devotion to its color(s) was. The card is a God card when not on the battlefield. Card cardInExile = game.getExile().getCard(targetEnchantment.getId(), game); if (cardInExile != null && cardInExile.hasSubtype(SubType.GOD, game)) { diff --git a/Mage.Sets/src/mage/cards/d/DementiaSliver.java b/Mage.Sets/src/mage/cards/d/DementiaSliver.java index b1c1fe3ea81..b6ed7191236 100644 --- a/Mage.Sets/src/mage/cards/d/DementiaSliver.java +++ b/Mage.Sets/src/mage/cards/d/DementiaSliver.java @@ -1,4 +1,3 @@ - package mage.cards.d; import java.util.UUID; @@ -10,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.cards.*; import mage.constants.*; @@ -39,7 +38,7 @@ public final class DementiaSliver extends CardImpl { this.toughness = new MageInt(3); // All Slivers have "{T}: Name a card. Target opponent reveals a card at random from their hand. If it's the named card, that player discards it. Activate this ability only during your turn." - Ability gainedAbility = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new TapSourceCost(), MyTurnCondition.instance); + Ability gainedAbility = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL), new TapSourceCost(), MyTurnCondition.instance); gainedAbility.addEffect(new DementiaSliverEffect()); gainedAbility.addTarget(new TargetOpponent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, @@ -66,7 +65,7 @@ class DementiaSliverEffect extends OneShotEffect { public DementiaSliverEffect() { super(Outcome.Damage); - staticText = "Target opponent reveals a card at random from their hand. If it's the named card, that player discards it"; + staticText = "Target opponent reveals a card at random from their hand. If that card has the chose name, that player discards it"; } public DementiaSliverEffect(final DementiaSliverEffect effect) { @@ -77,7 +76,7 @@ class DementiaSliverEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (opponent != null && sourceObject != null && !cardName.isEmpty()) { if (!opponent.getHand().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/d/DesperateGambit.java b/Mage.Sets/src/mage/cards/d/DesperateGambit.java index 40d2ab333e4..eb79f9d2627 100644 --- a/Mage.Sets/src/mage/cards/d/DesperateGambit.java +++ b/Mage.Sets/src/mage/cards/d/DesperateGambit.java @@ -156,7 +156,7 @@ class TargetControlledSource extends TargetSource { return true; } } - // 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead. + // 108.4a If anything asks for the controller of a card that doesn't have one (because it's not a permanent or spell), use its owner instead. for (Card card : game.getExile().getAllCards(game)) { if (Objects.equals(card.getOwnerId(), sourceControllerId)) { count++; @@ -189,7 +189,7 @@ class TargetControlledSource extends TargetSource { for (Card card : player.getGraveyard().getCards(game)) { possibleTargets.add(card.getId()); } - // 108.4a If anything asks for the controller of a card that doesn’t have one (because it’s not a permanent or spell), use its owner instead. + // 108.4a If anything asks for the controller of a card that doesn't have one (because it's not a permanent or spell), use its owner instead. for (Card card : game.getExile().getAllCards(game)) { if (Objects.equals(card.getOwnerId(), sourceControllerId)) { possibleTargets.add(card.getId()); diff --git a/Mage.Sets/src/mage/cards/d/DesperateResearch.java b/Mage.Sets/src/mage/cards/d/DesperateResearch.java new file mode 100644 index 00000000000..3fc1f6d2ba4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DesperateResearch.java @@ -0,0 +1,76 @@ +package mage.cards.d; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.NamePredicate; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public final class DesperateResearch extends CardImpl { + + public DesperateResearch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + // Choose a card name other than a basic land card name. Reveal the top seven cards of your library and put all of them with that name into your hand. Exile the rest. + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NOT_BASIC_LAND_NAME)); + this.getSpellAbility().addEffect(new DesperateResearchEffect()); + } + + public DesperateResearch(final DesperateResearch card) { + super(card); + } + + @Override + public DesperateResearch copy() { + return new DesperateResearch(this); + } +} + +class DesperateResearchEffect extends OneShotEffect { + + public DesperateResearchEffect() { + super(Outcome.Benefit); + this.staticText = "Reveal the top seven cards of your library and put all of them with that name into your hand. Exile the rest"; + } + + public DesperateResearchEffect(final DesperateResearchEffect effect) { + super(effect); + } + + @Override + public DesperateResearchEffect copy() { + return new DesperateResearchEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); + Player player = game.getPlayer(source.getControllerId()); + if (player == null || cardName == null) { + return false; + } + Cards cardsToExile = new CardsImpl(player.getLibrary().getTopCards(game, 7)); + player.revealCards(source, cardsToExile, game); + FilterCard filter = new FilterCard(); + filter.add(new NamePredicate(cardName)); + Cards cardsToKeep = new CardsImpl(cardsToExile.getCards(filter, game)); + cardsToExile.removeAll(cardsToKeep); + player.moveCards(cardsToKeep, Zone.HAND, source, game); + player.moveCards(cardsToExile, Zone.EXILED, source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/d/Dispossess.java b/Mage.Sets/src/mage/cards/d/Dispossess.java index a0d9ef2a647..58569dcca46 100644 --- a/Mage.Sets/src/mage/cards/d/Dispossess.java +++ b/Mage.Sets/src/mage/cards/d/Dispossess.java @@ -3,7 +3,7 @@ package mage.cards.d; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -21,7 +21,7 @@ public final class Dispossess extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); // Name an artifact card. Search target player's graveyard, hand, and library for any number of cards with that name and exile them. Then that player shuffles their library. - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.ARTIFACT_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ARTIFACT_NAME))); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new DispossessEffect()); } @@ -48,7 +48,7 @@ class DispossessEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi @Override public boolean apply(Game game, Ability source) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return super.applySearchAndExile(game, source, cardName, targetPointer.getFirst(game, source)); } diff --git a/Mage.Sets/src/mage/cards/d/DrainPower.java b/Mage.Sets/src/mage/cards/d/DrainPower.java index 6a21c6cbe1f..e07e7f3c1c5 100644 --- a/Mage.Sets/src/mage/cards/d/DrainPower.java +++ b/Mage.Sets/src/mage/cards/d/DrainPower.java @@ -140,7 +140,7 @@ class DrainPowerEffect extends OneShotEffect { } // 106.12. One card (Drain Power) causes one player to lose unspent mana and another to add “the mana lost this way.” (Note that these may be the same player.) - // This empties the former player’s mana pool and causes the mana emptied this way to be put into the latter player’s mana pool. Which permanents, spells, and/or + // This empties the former player's mana pool and causes the mana emptied this way to be put into the latter player's mana pool. Which permanents, spells, and/or // abilities produced that mana are unchanged, as are any restrictions or additional effects associated with any of that mana. List manaItems = targetPlayer.getManaPool().getManaItems(); targetPlayer.getManaPool().emptyPool(game); diff --git a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java index c08b14c74ec..0d399a8ab4e 100644 --- a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java +++ b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java @@ -102,9 +102,9 @@ class EarthshakerKhenraEffect extends OneShotEffect { if (sourceObject != null) { Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); /* - 27.06.2017 The target creature’s power is checked when you target it with Earthshaker Khenra’s ability - and when that ability resolves. Once the ability resolves, if the creature’s power increases - or Earthshaker Khenra’s power decreases, the target creature will still be unable to block. + 27.06.2017 The target creature's power is checked when you target it with Earthshaker Khenra's ability + and when that ability resolves. Once the ability resolves, if the creature's power increases + or Earthshaker Khenra's power decreases, the target creature will still be unable to block. */ if (targetCreature != null && targetCreature.getPower().getValue() <= sourceObject.getPower().getValue()) { ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn); diff --git a/Mage.Sets/src/mage/cards/e/EndlessSands.java b/Mage.Sets/src/mage/cards/e/EndlessSands.java index 71ba3740534..402bf570a8a 100644 --- a/Mage.Sets/src/mage/cards/e/EndlessSands.java +++ b/Mage.Sets/src/mage/cards/e/EndlessSands.java @@ -32,8 +32,8 @@ public final class EndlessSands extends CardImpl { exileAbility.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(exileAbility); - // {4}, {T}, Sacrifice Endless Sands: Return each creature card exiled with Endless Sands to the battlefield under its owner’s control. - ReturnCreaturesFromExileEffect returnFromExileEffect = new ReturnCreaturesFromExileEffect(this.getId(), true, "Return each creature card exiled with {this} to the battlefield under its owner’s control."); + // {4}, {T}, Sacrifice Endless Sands: Return each creature card exiled with Endless Sands to the battlefield under its owner's control. + ReturnCreaturesFromExileEffect returnFromExileEffect = new ReturnCreaturesFromExileEffect(this.getId(), true, "Return each creature card exiled with {this} to the battlefield under its owner's control."); Ability returnAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, returnFromExileEffect, new ManaCostsImpl("{4}")); returnAbility.addCost(new TapSourceCost()); returnAbility.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/e/EvilTwin.java b/Mage.Sets/src/mage/cards/e/EvilTwin.java index 150e3251b32..339fcdbd071 100644 --- a/Mage.Sets/src/mage/cards/e/EvilTwin.java +++ b/Mage.Sets/src/mage/cards/e/EvilTwin.java @@ -41,7 +41,7 @@ public final class EvilTwin extends CardImpl { // You may have Evil Twin enter the battlefield as a copy of any creature on the battlefield except it gains "{U}{B}, {T}: Destroy target creature with the same name as this creature." Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new EvilTwinApplyToPermanent()); - effect.setText("a copy of any creature on the battlefield except it gains \"{U}{B}, {T}: Destroy target creature with the same name as this creature.\""); + effect.setText("as a copy of any creature on the battlefield except it gains \"{U}{B}, {T}: Destroy target creature with the same name as this creature.\""); this.addAbility(new EntersBattlefieldAbility(effect, true)); } diff --git a/Mage.Sets/src/mage/cards/f/FailureComply.java b/Mage.Sets/src/mage/cards/f/FailureComply.java index 9dfb6e7238f..1dc66399d62 100644 --- a/Mage.Sets/src/mage/cards/f/FailureComply.java +++ b/Mage.Sets/src/mage/cards/f/FailureComply.java @@ -6,7 +6,7 @@ import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.Effect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.abilities.keyword.AftermathAbility; import mage.cards.CardImpl; @@ -38,7 +38,7 @@ public final class FailureComply extends SplitCard { // Comply // Choose a card name. Until your next turn, your opponents can't cast spells with the chosen name ((CardImpl) (getRightHalfCard())).addAbility(new AftermathAbility().setRuleAtTheTop(true)); - Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL); + Effect effect = new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL); effect.setText("Choose a card name"); getRightHalfCard().getSpellAbility().addEffect(effect); getRightHalfCard().getSpellAbility().addEffect(new ComplyCantCastEffect()); @@ -74,7 +74,7 @@ class ComplyCantCastEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return "You may not cast a card named " + cardName + " (" + mageObject.getIdName() + ")."; } return null; @@ -87,7 +87,7 @@ class ComplyCantCastEffect extends ContinuousRuleModifyingEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { MageObject object = game.getObject(event.getSourceId()); if (object != null && object.getName().equals(cardName)) { diff --git a/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java b/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java index 1d4ebb34ab9..b6274936b81 100644 --- a/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java +++ b/Mage.Sets/src/mage/cards/f/FalkenrathGorger.java @@ -32,14 +32,14 @@ public final class FalkenrathGorger extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); /** - * 4/8/2016 Falkenrath Gorger’s ability only applies while it’s on the - * battlefield. If you discard it, it won’t give itself madness. + * 4/8/2016 Falkenrath Gorger's ability only applies while it's on the + * battlefield. If you discard it, it won't give itself madness. * 4/8/2016 If Falkenrath Gorger leaves the battlefield before the * madness trigger has resolved for a Vampire card that gained madness * with its ability, the madness ability will still let you cast that * Vampire card for the appropriate cost even though it no longer has * madness. 4/8/2016 If you discard a Vampire creature card that already - * has a madness ability, you’ll choose which madness ability exiles it. + * has a madness ability, you'll choose which madness ability exiles it. * You may choose either the one it normally has or the one it gains * from Falkenrath Gorger. */ diff --git a/Mage.Sets/src/mage/cards/f/FalseOrders.java b/Mage.Sets/src/mage/cards/f/FalseOrders.java index dd6eb3e2e8d..94d0de7c369 100644 --- a/Mage.Sets/src/mage/cards/f/FalseOrders.java +++ b/Mage.Sets/src/mage/cards/f/FalseOrders.java @@ -156,7 +156,7 @@ class FalseOrdersUnblockEffect extends OneShotEffect { if (chosenGroup != null) { // Relevant ruling for Balduvian Warlord: // 7/15/2006 If an attacking creature has an ability that triggers “When this creature becomes blocked,” - // it triggers when a creature blocks it due to the Warlord’s ability only if it was unblocked at that point. + // it triggers when a creature blocks it due to the Warlord's ability only if it was unblocked at that point. boolean notYetBlocked = chosenGroup.getBlockers().isEmpty(); chosenGroup.addBlockerToGroup(permanent.getId(), controller.getId(), game); game.getCombat().addBlockingGroup(permanent.getId(), chosenPermanent.getId(), controller.getId(), game); // 702.21h diff --git a/Mage.Sets/src/mage/cards/f/Ferocity.java b/Mage.Sets/src/mage/cards/f/Ferocity.java new file mode 100644 index 00000000000..e607d59004c --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Ferocity.java @@ -0,0 +1,96 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.constants.SubType; +import mage.target.common.TargetCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.counter.AddCountersAttachedEffect; +import mage.constants.Outcome; +import mage.target.TargetPermanent; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author TheElk801 + */ +public final class Ferocity extends CardImpl { + + public Ferocity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Whenever enchanted creature blocks or becomes blocked, you may put a +1/+1 counter on it. + this.addAbility(new FerocityTriggeredAbility()); + } + + public Ferocity(final Ferocity card) { + super(card); + } + + @Override + public Ferocity copy() { + return new Ferocity(this); + } +} + +class FerocityTriggeredAbility extends TriggeredAbilityImpl { + + public FerocityTriggeredAbility() { + super(Zone.BATTLEFIELD, new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), true); + } + + public FerocityTriggeredAbility(final FerocityTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.BLOCKER_DECLARED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Permanent aura = game.getPermanent(sourceId); + if (aura == null || aura.getAttachedTo() == null) { + return false; + } + if (event.getSourceId().equals(aura.getAttachedTo())) { + Permanent blocks = game.getPermanent(event.getTargetId()); + return blocks != null; + } + if (event.getTargetId().equals(aura.getAttachedTo())) { + Permanent blockedBy = game.getPermanent(event.getSourceId()); + return blockedBy != null; + } + return false; + } + + @Override + public String getRule() { + return "Whenever enchanted creature blocks or becomes blocked, " + + "you may put a +1/+1 counter on it"; + } + + @Override + public FerocityTriggeredAbility copy() { + return new FerocityTriggeredAbility(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FertileGround.java b/Mage.Sets/src/mage/cards/f/FertileGround.java index d5544513c1d..708bd5d9c05 100644 --- a/Mage.Sets/src/mage/cards/f/FertileGround.java +++ b/Mage.Sets/src/mage/cards/f/FertileGround.java @@ -86,6 +86,6 @@ class FertileGroundTriggeredAbility extends TriggeredManaAbility { @Override public String getRule() { - return "Whenever enchanted land is tapped for mana, its controller adds one mana of any color"; + return "Whenever enchanted land is tapped for mana, its controller adds an additional one mana of any color."; } } diff --git a/Mage.Sets/src/mage/cards/f/FlameWave.java b/Mage.Sets/src/mage/cards/f/FlameWave.java index 955bd71eba1..abfd025d4d6 100644 --- a/Mage.Sets/src/mage/cards/f/FlameWave.java +++ b/Mage.Sets/src/mage/cards/f/FlameWave.java @@ -23,7 +23,7 @@ public final class FlameWave extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker()); this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent()) - .setText("and each creature that player or that planeswalker’s controller controls") + .setText("and each creature that player or that planeswalker's controller controls") ); } diff --git a/Mage.Sets/src/mage/cards/f/ForebearsBlade.java b/Mage.Sets/src/mage/cards/f/ForebearsBlade.java index ba5b8eb1035..19651821925 100644 --- a/Mage.Sets/src/mage/cards/f/ForebearsBlade.java +++ b/Mage.Sets/src/mage/cards/f/ForebearsBlade.java @@ -50,7 +50,7 @@ public final class ForebearsBlade extends CardImpl { ability.addEffect(effect); this.addAbility(ability); - // Whenever equipped creature dies, attach Forebear’s Blade to target creature you control. + // Whenever equipped creature dies, attach Forebear's Blade to target creature you control. ability = new DiesAttachedTriggeredAbility( new AttachEffect(Outcome.Neutral, "attach {this} to target creature you control"), "equipped creature", false); ability.addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/f/Foreshadow.java b/Mage.Sets/src/mage/cards/f/Foreshadow.java index bdb5322e25e..6299ff05b75 100644 --- a/Mage.Sets/src/mage/cards/f/Foreshadow.java +++ b/Mage.Sets/src/mage/cards/f/Foreshadow.java @@ -7,7 +7,7 @@ import mage.abilities.common.delayed.AtTheBeginOfNextUpkeepDelayedTriggeredAbili import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,7 +28,7 @@ public final class Foreshadow extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Choose a card name, then target opponent puts the top card of their library into their graveyard. If that card has the chosen name, you draw a card. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new ForeshadowEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); @@ -67,7 +67,7 @@ class ForeshadowEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(source.getFirstTarget()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { Card card = targetPlayer.getLibrary().getFromTop(game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/g/GemstoneCaverns.java b/Mage.Sets/src/mage/cards/g/GemstoneCaverns.java index 18a15d5ae64..ee2b7c14662 100644 --- a/Mage.Sets/src/mage/cards/g/GemstoneCaverns.java +++ b/Mage.Sets/src/mage/cards/g/GemstoneCaverns.java @@ -1,4 +1,3 @@ - package mage.cards.g; import java.util.UUID; @@ -121,6 +120,7 @@ class GemstoneCavernsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + boolean result = false; Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = game.getCard(source.getSourceId()); @@ -133,13 +133,12 @@ class GemstoneCavernsEffect extends OneShotEffect { if (permanent != null) { Cost cost = new ExileFromHandCost(new TargetCardInHand()); if (cost.canPay(source, source.getSourceId(), source.getControllerId(), game)) { - cost.pay(source, game, source.getSourceId(), source.getControllerId(), true, null); + result = cost.pay(source, game, source.getSourceId(), source.getControllerId(), true, null); } } } } - return true; } - return false; + return result; } } diff --git a/Mage.Sets/src/mage/cards/g/GenerousPatron.java b/Mage.Sets/src/mage/cards/g/GenerousPatron.java index 16be2b30f61..87cefacb22e 100644 --- a/Mage.Sets/src/mage/cards/g/GenerousPatron.java +++ b/Mage.Sets/src/mage/cards/g/GenerousPatron.java @@ -1,4 +1,3 @@ - package mage.cards.g; import java.util.UUID; @@ -63,12 +62,16 @@ class GenerousPatronTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { + if (!getControllerId().equals(game.getControllerId(event.getSourceId()))) { + return false; + } Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId()); - return event.getPlayerId().equals(this.getControllerId()) - && permanent != null + if (permanent == null) { + permanent = game.getPermanentEntering(event.getTargetId()); + } + return permanent != null && permanent.isCreature() - && !permanent.getControllerId().equals(getControllerId()) - && event.getAmount() > 0; + && !permanent.getControllerId().equals(getControllerId()); } @Override diff --git a/Mage.Sets/src/mage/cards/g/GideonsIntervention.java b/Mage.Sets/src/mage/cards/g/GideonsIntervention.java index cbea3ec00ef..1c6d51538f1 100644 --- a/Mage.Sets/src/mage/cards/g/GideonsIntervention.java +++ b/Mage.Sets/src/mage/cards/g/GideonsIntervention.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.PreventionEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -31,7 +31,7 @@ public final class GideonsIntervention extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}{W}"); // As Gideon's Intervention enters the battlefield, choose a card name. - Effect effect = new NameACardEffect(NameACardEffect.TypeOfName.ALL); + Effect effect = new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL); effect.setText("choose a card name"); this.addAbility(new AsEntersBattlefieldAbility(effect)); @@ -72,7 +72,7 @@ class GideonsInterventionCantCastEffect extends ContinuousRuleModifyingEffectImp public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return "You may not cast a card named " + cardName + " (" + mageObject.getIdName() + ")."; } return null; @@ -85,7 +85,7 @@ class GideonsInterventionCantCastEffect extends ContinuousRuleModifyingEffectImp @Override public boolean applies(GameEvent event, Ability source, Game game) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) { MageObject object = game.getObject(event.getSourceId()); if (object != null && object.getName().equals(cardName)) { @@ -137,7 +137,7 @@ class GideonsInterventionPreventAllDamageEffect extends PreventionEffectImpl { if (object != null && (event.getType() == GameEvent.EventType.DAMAGE_PLAYER || targetPerm != null && (event.getType() == GameEvent.EventType.DAMAGE_CREATURE || event.getType() == GameEvent.EventType.DAMAGE_PLANESWALKER))) { - if (object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY)) + if (object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY)) && (event.getTargetId().equals(source.getControllerId()) || targetPerm != null && targetPerm.getControllerId().equals(source.getControllerId()))) { return super.applies(event, source, game); diff --git a/Mage.Sets/src/mage/cards/g/GoblinLyre.java b/Mage.Sets/src/mage/cards/g/GoblinLyre.java index 7842ab62b2d..e06192a2a50 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinLyre.java +++ b/Mage.Sets/src/mage/cards/g/GoblinLyre.java @@ -48,7 +48,7 @@ class GoblinLyreEffect extends OneShotEffect { public GoblinLyreEffect() { super(Outcome.Damage); this.staticText = "Flip a coin. If you win the flip, {this} deals damage to target opponent or planeswalker equal to the number of creatures you control. " - + "If you lose the flip, Goblin Lyre deals damage to you equal to the number of creatures that opponent or that planeswalker’s controller controls"; + + "If you lose the flip, Goblin Lyre deals damage to you equal to the number of creatures that opponent or that planeswalker's controller controls"; } public GoblinLyreEffect(final GoblinLyreEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GormTheGreat.java b/Mage.Sets/src/mage/cards/g/GormTheGreat.java new file mode 100644 index 00000000000..7678dad9dba --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GormTheGreat.java @@ -0,0 +1,52 @@ + +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.MustBeBlockedByAtLeastOneSourceEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.abilities.keyword.PartnerWithAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author L_J + */ +public final class GormTheGreat extends CardImpl { + + public GormTheGreat(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GIANT); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(2); + this.toughness = new MageInt(7); + + // Partner with Virtus the Veiled (When this creature enters the battlefield, target player may put Virtus into their hand from their library, then shuffle.) + this.addAbility(new PartnerWithAbility("Virtus the Veiled", true)); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Gorm the Great must be blocked if able, and Gorm must be blocked by two or more creatures if able. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MustBeBlockedByAtLeastOneSourceEffect(Duration.WhileOnBattlefield, 2) + .setText("{this} must be blocked if able, and {this} must be blocked by two or more creatures if able"))); + } + + public GormTheGreat(final GormTheGreat card) { + super(card); + } + + @Override + public GormTheGreat copy() { + return new GormTheGreat(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GuardiansOfKoilos.java b/Mage.Sets/src/mage/cards/g/GuardiansOfKoilos.java index 3cfd76700ec..792cbaca872 100644 --- a/Mage.Sets/src/mage/cards/g/GuardiansOfKoilos.java +++ b/Mage.Sets/src/mage/cards/g/GuardiansOfKoilos.java @@ -36,7 +36,7 @@ public final class GuardiansOfKoilos extends CardImpl { this.power = new MageInt(4); this.toughness = new MageInt(4); - // When Guardians of Koilos enters the battlefield, you may return another target historic permanent you control to its owner’s hand. + // When Guardians of Koilos enters the battlefield, you may return another target historic permanent you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter) .setText("you may return another target historic permanent you control to its owner's hand. (Artifacts, legendaries, and Sagas are historic.)"), true)); } diff --git a/Mage.Sets/src/mage/cards/h/HallOfGemstone.java b/Mage.Sets/src/mage/cards/h/HallOfGemstone.java index fe8adda60e9..0f825dd8ef7 100644 --- a/Mage.Sets/src/mage/cards/h/HallOfGemstone.java +++ b/Mage.Sets/src/mage/cards/h/HallOfGemstone.java @@ -93,7 +93,7 @@ class HallOfGemstoneEffect extends ReplacementEffectImpl { if (colorChosen != null) { ManaEvent manaEvent = (ManaEvent) event; Mana mana = manaEvent.getMana(); - // 8/23/2016 Colorless mana added to a player’s mana pool isn’t affected. + // 8/23/2016 Colorless mana added to a player's mana pool isn't affected. int genericAmount = mana.getGeneric(); int colorlessAmount = mana.getColorless(); int coloredAmount = mana.countColored(); diff --git a/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java b/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java index 2f356f4cab1..b0f6e54bf0a 100644 --- a/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java +++ b/Mage.Sets/src/mage/cards/h/HaphazardBombardment.java @@ -126,7 +126,7 @@ class HaphazardBombardmentEndOfTurnEffect extends OneShotEffect { // 4/27/2018 If one or more of the permanents with aim counters on them have indestructible, // select the permanent destroyed at random from among the permanents with aim counters - // that don’t have indestructible. + // that don't have indestructible. FilterPermanent filter = new FilterPermanent("if two or more permanents you don't control have an aim counter on them"); filter.add(new ControllerPredicate(TargetController.NOT_YOU)); filter.add(new CounterPredicate(CounterType.AIM)); diff --git a/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java index 56dcfd0c9b4..77562d849d3 100644 --- a/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java +++ b/Mage.Sets/src/mage/cards/h/HeartOfBogardan.java @@ -77,7 +77,7 @@ class HeartOfBogardanTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "When a player doesn't pay {this}'s cumulative upkeep, " + "{this} deals X damage to target player or planeswalker " - + "and each creature that player or that planeswalker’s controller controls," + + "and each creature that player or that planeswalker's controller controls," + " where X is twice the number of age counters on {this} minus 2."; } } @@ -87,7 +87,7 @@ class HeartOfBogardanEffect extends OneShotEffect { public HeartOfBogardanEffect() { super(Outcome.Damage); staticText = "{this} deals X damage to target player or planeswalker " - + "and each creature that player or that planeswalker’s controller controls, " + + "and each creature that player or that planeswalker's controller controls, " + "where X is twice the number of age counters on {this} minus 2"; } diff --git a/Mage.Sets/src/mage/cards/h/Hellrider.java b/Mage.Sets/src/mage/cards/h/Hellrider.java index b80643d47eb..0de939add9a 100644 --- a/Mage.Sets/src/mage/cards/h/Hellrider.java +++ b/Mage.Sets/src/mage/cards/h/Hellrider.java @@ -78,6 +78,6 @@ class HellriderTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature you control attacks, {this} deals 1 damage to the player or planeswalker it’s attacking."; + return "Whenever a creature you control attacks, {this} deals 1 damage to the player or planeswalker it's attacking."; } } diff --git a/Mage.Sets/src/mage/cards/h/HelmOfTheHost.java b/Mage.Sets/src/mage/cards/h/HelmOfTheHost.java index dcfd329c2e1..81a4be8046b 100644 --- a/Mage.Sets/src/mage/cards/h/HelmOfTheHost.java +++ b/Mage.Sets/src/mage/cards/h/HelmOfTheHost.java @@ -31,7 +31,7 @@ public final class HelmOfTheHost extends CardImpl { this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.EQUIPMENT); - // At the beginning of combat on your turn, create a token that’s a copy of equipped creature, except the token isn’t legendary if equipped creature is legendary. That token gains haste. + // At the beginning of combat on your turn, create a token that's a copy of equipped creature, except the token isn't legendary if equipped creature is legendary. That token gains haste. TriggeredAbility ability = new BeginningOfCombatTriggeredAbility( new HelmOfTheHostEffect(), TargetController.YOU, diff --git a/Mage.Sets/src/mage/cards/i/InfernalTutor.java b/Mage.Sets/src/mage/cards/i/InfernalTutor.java index bae25f79701..eb4b152f66a 100644 --- a/Mage.Sets/src/mage/cards/i/InfernalTutor.java +++ b/Mage.Sets/src/mage/cards/i/InfernalTutor.java @@ -1,4 +1,3 @@ - package mage.cards.i; import java.util.UUID; @@ -17,6 +16,7 @@ import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.Outcome; import mage.filter.FilterCard; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.NamePredicate; import mage.game.Game; import mage.players.Player; @@ -37,7 +37,7 @@ public final class InfernalTutor extends CardImpl { this.getSpellAbility().addEffect(new InfernalTutorEffect()); // Hellbent - If you have no cards in hand, instead search your library for a card, put it into your hand, then shuffle your library. Effect effect = new ConditionalOneShotEffect( - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCard()), false, true), + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD), false, true), HellbentCondition.instance, "

Hellbent — If you have no cards in hand, instead search your library for a card, put it into your hand, then shuffle your library"); this.getSpellAbility().addEffect(effect); @@ -78,7 +78,7 @@ class InfernalTutorEffect extends OneShotEffect { if (!controller.getHand().isEmpty()) { Card cardToReveal = null; if (controller.getHand().size() > 1) { - Target target = new TargetCardInHand(new FilterCard()); + Target target = new TargetCardInHand(StaticFilters.FILTER_CARD); target.setNotTarget(true); if (controller.chooseTarget(outcome, target, source, game)) { cardToReveal = game.getCard(target.getFirstTarget()); diff --git a/Mage.Sets/src/mage/cards/i/InnerDemon.java b/Mage.Sets/src/mage/cards/i/InnerDemon.java index 72615de8c56..621e2c52fd6 100644 --- a/Mage.Sets/src/mage/cards/i/InnerDemon.java +++ b/Mage.Sets/src/mage/cards/i/InnerDemon.java @@ -57,7 +57,7 @@ public final class InnerDemon extends CardImpl { effect.setText(", has flying"); ability.addEffect(effect); effect = new AddCardSubtypeAttachedEffect(SubType.DEMON, Duration.WhileOnBattlefield, AttachmentType.AURA); - effect.setText(", and is an Demon in addition to its other types"); + effect.setText(", and is a Demon in addition to its other types"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java b/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java index 780652d79af..f1ca2a9a5ba 100644 --- a/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java +++ b/Mage.Sets/src/mage/cards/i/IsperiaTheInscrutable.java @@ -7,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.Card; @@ -41,7 +41,7 @@ public final class IsperiaTheInscrutable extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever Isperia the Inscrutable deals combat damage to a player, name a card. That player reveals their hand. If he or she reveals the named card, search your library for a creature card with flying, reveal it, put it into your hand, then shuffle your library. - Effect effect1 = new NameACardEffect(NameACardEffect.TypeOfName.ALL); + Effect effect1 = new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL); Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect1, false, true); Effect effect2 = new IsperiaTheInscrutableEffect(); ability.addEffect(effect2); @@ -69,7 +69,7 @@ class IsperiaTheInscrutableEffect extends OneShotEffect { public IsperiaTheInscrutableEffect() { super(Outcome.Neutral); - staticText = "That player reveals their hand. If he or she reveals the named card, search your library for a creature card with flying, reveal it, put it into your hand, then shuffle your library"; + staticText = "That player reveals their hand. If a card with the chosen name is revealed this way, search your library for a creature card with flying, reveal it, put it into your hand, then shuffle your library"; } public IsperiaTheInscrutableEffect(final IsperiaTheInscrutableEffect effect) { @@ -79,7 +79,7 @@ class IsperiaTheInscrutableEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); - Object object = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + Object object = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (player != null && object instanceof String) { player.revealCards(player.getLogName() + " hand", player.getHand(), game, true); String namedCard = (String) object; diff --git a/Mage.Sets/src/mage/cards/i/IvySeer.java b/Mage.Sets/src/mage/cards/i/IvySeer.java new file mode 100644 index 00000000000..0ac2d1288b1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/i/IvySeer.java @@ -0,0 +1,89 @@ +package mage.cards.i; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class IvySeer extends CardImpl { + + public IvySeer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{G}, {tap}: Reveal any number of green cards in your hand. Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way. + Ability ability = new SimpleActivatedAbility(new IvySeerEffect(), new ManaCostsImpl("{2}{G}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public IvySeer(final IvySeer card) { + super(card); + } + + @Override + public IvySeer copy() { + return new IvySeer(this); + } +} + +class IvySeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("any number of green cards in your hand"); + + static { + filter.add(new ColorPredicate(ObjectColor.GREEN)); + } + + public IvySeerEffect() { + super(Outcome.BoostCreature); + this.staticText = "reveal any number of green cards in your hand. " + + "Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way"; + } + + public IvySeerEffect(final IvySeerEffect effect) { + super(effect); + } + + @Override + public IvySeerEffect copy() { + return new IvySeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return false; + } + int xValue = cost.getNumberRevealedCards(); + game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/j/JasmineSeer.java b/Mage.Sets/src/mage/cards/j/JasmineSeer.java new file mode 100644 index 00000000000..ac55a63b3f6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/j/JasmineSeer.java @@ -0,0 +1,85 @@ +package mage.cards.j; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.target.common.TargetCardInHand; + +/** + * + * @author TheElk801 + */ +public final class JasmineSeer extends CardImpl { + + public JasmineSeer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{W}, {tap}: Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way. + Ability ability = new SimpleActivatedAbility(new JasmineSeerEffect(), new ManaCostsImpl("{2}{W}")); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + } + + public JasmineSeer(final JasmineSeer card) { + super(card); + } + + @Override + public JasmineSeer copy() { + return new JasmineSeer(this); + } +} + +class JasmineSeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("any number of white cards"); + + static { + filter.add(new ColorPredicate(ObjectColor.WHITE)); + } + + public JasmineSeerEffect() { + super(Outcome.GainLife); + this.staticText = "reveal any number of white cards in your hand. " + + "You gain 2 life for each card revealed this way"; + } + + public JasmineSeerEffect(final JasmineSeerEffect effect) { + super(effect); + } + + @Override + public JasmineSeerEffect copy() { + return new JasmineSeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return false; + } + int xValue = cost.getNumberRevealedCards(); + return new GainLifeEffect(2 * xValue).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java index 8240592a9e7..b1e6320f946 100644 --- a/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java +++ b/Mage.Sets/src/mage/cards/j/JayasImmolatingInferno.java @@ -24,7 +24,7 @@ public final class JayasImmolatingInferno extends CardImpl { // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) this.addAbility(new LegendarySpellAbility()); - // Jaya’s Immolating Inferno deals X damage to each of up to three targets. + // Jaya's Immolating Inferno deals X damage to each of up to three targets. Effect effect = new DamageTargetEffect(new ManacostVariableValue()); effect.setText("{this} deals X damage to each of up to three targets"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/j/JunglebornPioneer.java b/Mage.Sets/src/mage/cards/j/JunglebornPioneer.java index 5bb0e3b7b1d..a3d495e351f 100644 --- a/Mage.Sets/src/mage/cards/j/JunglebornPioneer.java +++ b/Mage.Sets/src/mage/cards/j/JunglebornPioneer.java @@ -25,7 +25,7 @@ public final class JunglebornPioneer extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); - // When Jungleborn Pioneer enters the battlefield, create a 1/1 blue Merfolk creature token with hexproof. (It can’t be the target of spells or abilities your opponents control.) + // When Jungleborn Pioneer enters the battlefield, create a 1/1 blue Merfolk creature token with hexproof. (It can't be the target of spells or abilities your opponents control.) Ability ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MerfolkHexproofToken()),false); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/k/KarnsTemporalSundering.java b/Mage.Sets/src/mage/cards/k/KarnsTemporalSundering.java index 17a55ab4dbd..01b2b24c50a 100644 --- a/Mage.Sets/src/mage/cards/k/KarnsTemporalSundering.java +++ b/Mage.Sets/src/mage/cards/k/KarnsTemporalSundering.java @@ -29,7 +29,7 @@ public final class KarnsTemporalSundering extends CardImpl { // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) this.addAbility(new LegendarySpellAbility()); - // Target player takes an extra turn after this one. Return up to one target nonland permanent to its owner’s hand. Exile Karn’s Temporal Sundering. + // Target player takes an extra turn after this one. Return up to one target nonland permanent to its owner's hand. Exile Karn's Temporal Sundering. this.getSpellAbility().addEffect(new KarnsTemporalSunderingEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetNonlandPermanent(0, 1, false)); @@ -50,7 +50,7 @@ class KarnsTemporalSunderingEffect extends OneShotEffect { public KarnsTemporalSunderingEffect() { super(Outcome.ExtraTurn); - this.staticText = "Target player takes an extra turn after this one. Return up to one target nonland permanent to its owner’s hand"; + this.staticText = "Target player takes an extra turn after this one. Return up to one target nonland permanent to its owner's hand"; } public KarnsTemporalSunderingEffect(final KarnsTemporalSunderingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KitesailCorsair.java b/Mage.Sets/src/mage/cards/k/KitesailCorsair.java index f80e1624be3..946239c2a5b 100644 --- a/Mage.Sets/src/mage/cards/k/KitesailCorsair.java +++ b/Mage.Sets/src/mage/cards/k/KitesailCorsair.java @@ -27,12 +27,12 @@ public final class KitesailCorsair extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - // Kitesail Corsair has flying as long as it’s attacking. + // Kitesail Corsair has flying as long as it's attacking. ContinuousEffect gainEffect = new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( gainEffect, SourceAttackingCondition.instance, - "{this} has flying as long as it’s attacking." + "{this} has flying as long as it's attacking." ))); } diff --git a/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java b/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java index bd3a63f9187..3749b8b2a24 100644 --- a/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java +++ b/Mage.Sets/src/mage/cards/k/KrosanWayfarer.java @@ -1,4 +1,3 @@ - package mage.cards.k; import java.util.UUID; @@ -28,7 +27,7 @@ public final class KrosanWayfarer extends CardImpl { // Sacrifice Krosan Wayfarer: You may put a land card from your hand onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_BASIC_LAND_A), new SacrificeSourceCost())); + new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A), new SacrificeSourceCost())); } public KrosanWayfarer(final KrosanWayfarer card) { diff --git a/Mage.Sets/src/mage/cards/k/KrovikanElementalist.java b/Mage.Sets/src/mage/cards/k/KrovikanElementalist.java new file mode 100644 index 00000000000..a5df0fb8ddd --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KrovikanElementalist.java @@ -0,0 +1,89 @@ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.SacrificeTargetEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.game.Game; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class KrovikanElementalist extends CardImpl { + + public KrovikanElementalist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{R}: Target creature gets +1/+0 until end of turn. + Ability ability = new SimpleActivatedAbility( + new BoostTargetEffect(1, 0, Duration.EndOfTurn), + new ManaCostsImpl("{2}{R}") + ); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // {U}{U}: Target creature you control gains flying until end of turn. Sacrifice it at the beginning of the next end step. + ability = new SimpleActivatedAbility(new GainAbilityTargetEffect( + FlyingAbility.getInstance(), + Duration.EndOfTurn + ), new ManaCostsImpl("{U}{U}")); + ability.addEffect(new KrovikanElementalistEffect()); + ability.addTarget(new TargetControlledCreaturePermanent()); + this.addAbility(ability); + } + + public KrovikanElementalist(final KrovikanElementalist card) { + super(card); + } + + @Override + public KrovikanElementalist copy() { + return new KrovikanElementalist(this); + } +} + +class KrovikanElementalistEffect extends OneShotEffect { + + public KrovikanElementalistEffect() { + super(Outcome.Sacrifice); + this.staticText = "Sacrifice it at the beginning of the next end step"; + } + + public KrovikanElementalistEffect(final KrovikanElementalistEffect effect) { + super(effect); + } + + @Override + public KrovikanElementalistEffect copy() { + return new KrovikanElementalistEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + return new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility( + new SacrificeTargetEffect("sacrifice it", source.getControllerId()) + )).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/cards/l/LammastideWeave.java b/Mage.Sets/src/mage/cards/l/LammastideWeave.java index 1ba1a2ef624..a67cac45851 100644 --- a/Mage.Sets/src/mage/cards/l/LammastideWeave.java +++ b/Mage.Sets/src/mage/cards/l/LammastideWeave.java @@ -1,11 +1,10 @@ - package mage.cards.l; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -26,7 +25,7 @@ public final class LammastideWeave extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); // Name a card, then target player puts the top card of their library into their graveyard. If that card is the named card, you gain life equal to its converted mana cost. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new LammastideWeaveEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); @@ -50,7 +49,7 @@ class LammastideWeaveEffect extends OneShotEffect { public LammastideWeaveEffect() { super(Outcome.DrawCard); this.staticText = ", then target player puts the top card of their library into their graveyard. " - + "If that card is the named card, you gain life equal to its converted mana cost."; + + "If that card has the chosen name, you gain life equal to its converted mana cost."; } public LammastideWeaveEffect(final LammastideWeaveEffect effect) { @@ -66,7 +65,7 @@ class LammastideWeaveEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(source.getFirstTarget()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { Card card = targetPlayer.getLibrary().getFromTop(game); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/l/Lavalanche.java b/Mage.Sets/src/mage/cards/l/Lavalanche.java index 1fb16052dbc..bbb74ff71da 100644 --- a/Mage.Sets/src/mage/cards/l/Lavalanche.java +++ b/Mage.Sets/src/mage/cards/l/Lavalanche.java @@ -51,7 +51,7 @@ class LavalancheEffect extends OneShotEffect { public LavalancheEffect(DynamicValue amount) { super(Outcome.Damage); this.amount = amount; - staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls"; + staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker's controller controls"; } public LavalancheEffect(final LavalancheEffect effect) { @@ -71,7 +71,7 @@ class LavalancheEffect extends OneShotEffect { return false; } targetPlayer.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true); - FilterPermanent filter = new FilterPermanent("and each creature that player or that planeswalker’s controller controls"); + FilterPermanent filter = new FilterPermanent("and each creature that player or that planeswalker's controller controls"); filter.add(new CardTypePredicate(CardType.CREATURE)); filter.add(new ControllerIdPredicate(targetPlayer.getId())); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); diff --git a/Mage.Sets/src/mage/cards/l/LlanowarScout.java b/Mage.Sets/src/mage/cards/l/LlanowarScout.java index 20b2ef33234..2c529a8ac69 100644 --- a/Mage.Sets/src/mage/cards/l/LlanowarScout.java +++ b/Mage.Sets/src/mage/cards/l/LlanowarScout.java @@ -29,7 +29,7 @@ public final class LlanowarScout extends CardImpl { // {T}: You may put a land card from your hand onto the battlefield. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, - new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_BASIC_LAND_A), new TapSourceCost())); + new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A), new TapSourceCost())); } public LlanowarScout(final LlanowarScout card) { diff --git a/Mage.Sets/src/mage/cards/l/LostLegacy.java b/Mage.Sets/src/mage/cards/l/LostLegacy.java index 6cb6d652549..a2eec689c1d 100644 --- a/Mage.Sets/src/mage/cards/l/LostLegacy.java +++ b/Mage.Sets/src/mage/cards/l/LostLegacy.java @@ -4,7 +4,7 @@ package mage.cards.l; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -25,7 +25,7 @@ public final class LostLegacy extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}{B}"); // Name a nonartifact, nonland card. Search target player's graveyard, hand and library for any number of cards with that name and exile them. That player shuffles their library, then draws a card for each card exiled from hand this way. - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.NON_ARTIFACT_AND_NON_LAND_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_ARTIFACT_AND_NON_LAND_NAME))); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new LostLegacyEffect()); } @@ -52,7 +52,7 @@ class LostLegacyEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi @Override public boolean apply(Game game, Ability source) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetPlayer != null && cardName != null && !cardName.isEmpty()) { FilterCard filter = new FilterCard(); diff --git a/Mage.Sets/src/mage/cards/m/MageSlayer.java b/Mage.Sets/src/mage/cards/m/MageSlayer.java index 46cf27870ea..537e414882c 100644 --- a/Mage.Sets/src/mage/cards/m/MageSlayer.java +++ b/Mage.Sets/src/mage/cards/m/MageSlayer.java @@ -47,7 +47,7 @@ class MageSlayerEffect extends OneShotEffect { public MageSlayerEffect() { super(Outcome.Damage); - staticText = "it deals damage equal to the player or planeswalker it’s attacking"; + staticText = "it deals damage equal to the player or planeswalker it's attacking"; } public MageSlayerEffect(final MageSlayerEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java index e5e17cad40d..cc23294d283 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java @@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -38,7 +38,7 @@ public final class MagusOfTheScroll extends CardImpl { this.toughness = new MageInt(1); // {3}, {tap}: Name a card. Reveal a card at random from your hand. If it's the named card, Magus of the Scroll deals 2 damage to any target. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL), new ManaCostsImpl("{3}")); ability.addEffect(new MagusOfTheScrollEffect()); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetAnyTarget()); @@ -59,7 +59,7 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect() { super(Outcome.Neutral); - staticText = ", then reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to any target"; + staticText = ", then reveal a card at random from your hand. If that card has the chosen name, {this} deals 2 damage to any target"; } public MagusOfTheScrollEffect(final MagusOfTheScrollEffect effect) { @@ -70,7 +70,7 @@ class MagusOfTheScrollEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player you = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (sourceObject != null && you != null && cardName != null && !cardName.isEmpty()) { if (!you.getHand().isEmpty()) { Cards revealed = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/m/ManorGargoyle.java b/Mage.Sets/src/mage/cards/m/ManorGargoyle.java index 1b5ab352d04..848cf88b836 100644 --- a/Mage.Sets/src/mage/cards/m/ManorGargoyle.java +++ b/Mage.Sets/src/mage/cards/m/ManorGargoyle.java @@ -47,13 +47,13 @@ public final class ManorGargoyle extends CardImpl { 613.7. Within a layer or sublayer, determining which order effects are applied in is sometimes done using a dependency system. If a dependency exists, it will override the timestamp system. 613.7a An effect is said to “depend on” another if - (a) it’s applied in the same layer (and, if applicable, sublayer) as the other effect (see rules 613.1 and 613.3); + (a) it's applied in the same layer (and, if applicable, sublayer) as the other effect (see rules 613.1 and 613.3); (b) applying the other would change the text or the existence of the first effect, what it applies to, or what it does to any of the things it applies to; and (c) neither effect is from a characteristic-defining ability or both effects are from characteristic-defining abilities. Otherwise, the effect is considered to be independent of the other effect. 613.7b An effect dependent on one or more other effects waits to apply until just after all of those effects have been applied. - If multiple dependent effects would apply simultaneously in this way, they’re applied in timestamp order relative to each + If multiple dependent effects would apply simultaneously in this way, they're applied in timestamp order relative to each other. If several dependent effects form a dependency loop, then this rule is ignored and the effects in the dependency loop are applied in timestamp order. 613.7c After each effect is applied, the order of remaining effects is reevaluated and may change if an effect that has not yet diff --git a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java index d72311ef87c..e0465716bdd 100644 --- a/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java +++ b/Mage.Sets/src/mage/cards/m/MarkOfSakiko.java @@ -43,9 +43,9 @@ public final class MarkOfSakiko extends CardImpl { Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - // Enchanted creature has "Whenever this creature deals combat damage to a player, add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end." + // Enchanted creature has "Whenever this creature deals combat damage to a player, add that much {G}. Until end of turn, you don't lose this mana as steps and phases end." Effect effect = new GainAbilityAttachedEffect(new MarkOfSakikoTriggeredAbility(), AttachmentType.AURA); - effect.setText("Enchanted creature has \"Whenever this creature deals combat damage to a player, add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end.\""); + effect.setText("Enchanted creature has \"Whenever this creature deals combat damage to a player, add that much {G}. Until end of turn, you don't lose this mana as steps and phases end.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } @@ -87,7 +87,7 @@ class MarkOfSakikoTriggeredAbility extends TriggeredAbilityImpl { this.getEffects().clear(); Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(event.getAmount()), "that player", true); effect.setTargetPointer(new FixedTarget(getControllerId())); - effect.setText("add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end"); + effect.setText("add that much {G}. Until end of turn, you don't lose this mana as steps and phases end"); this.addEffect(effect); return true; } @@ -98,6 +98,6 @@ class MarkOfSakikoTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { return "Whenever this creature deals combat damage to a player, add that much {G}. " - + "Until end of turn, you don’t lose this mana as steps and phases end."; + + "Until end of turn, you don't lose this mana as steps and phases end."; } } diff --git a/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java b/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java index ba482b84461..8a237ea8793 100644 --- a/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java +++ b/Mage.Sets/src/mage/cards/m/MarwynTheNurturer.java @@ -39,7 +39,7 @@ public final class MarwynTheNurturer extends CardImpl { // Whenever another Elf enters the battlefield under your control, put a +1/+1 counter on Marwyn, the Nurturer. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter)); - // {T}: Add an amount of {G} equal to Marwyn’s power. + // {T}: Add an amount of {G} equal to Marwyn's power. this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new SourcePermanentPowerCount(), "Add an amount of {G} equal to {this}'s power")); } diff --git a/Mage.Sets/src/mage/cards/m/MazesEnd.java b/Mage.Sets/src/mage/cards/m/MazesEnd.java index 1a002578e61..d76dbd72717 100644 --- a/Mage.Sets/src/mage/cards/m/MazesEnd.java +++ b/Mage.Sets/src/mage/cards/m/MazesEnd.java @@ -49,7 +49,7 @@ public final class MazesEnd extends CardImpl { // {T}: Add 1. this.addAbility(new ColorlessManaAbility()); - // 3, {T}, Return Maze's End to its owner’s hand: Search your library for a Gate card, put it onto the battlefield, then shuffle your library. If you control ten or more Gates with different names, you win the game. + // 3, {T}, Return Maze's End to its owner's hand: Search your library for a Gate card, put it onto the battlefield, then shuffle your library. If you control ten or more Gates with different names, you win the game. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filterCard)), new GenericManaCost(3)); ability.addEffect(new MazesEndEffect()); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java b/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java index 5cc9b3b3571..b4725877aaf 100644 --- a/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java +++ b/Mage.Sets/src/mage/cards/m/MeanderingTowershell.java @@ -22,19 +22,19 @@ import mage.players.Player; /** * As Meandering Towershell returns to the battlefield because of the delayed - * triggered ability, you choose which opponent or opposing planeswalker it’s - * attacking. It doesn’t have to attack the same opponent or opposing + * triggered ability, you choose which opponent or opposing planeswalker it's + * attacking. It doesn't have to attack the same opponent or opposing * planeswalker that it was when it was exiled. * - * If Meandering Towershell enters the battlefield attacking, it wasn’t declared + * If Meandering Towershell enters the battlefield attacking, it wasn't declared * as an attacking creature that turn. Abilities that trigger when a creature - * attacks, including its own triggered ability, won’t trigger. + * attacks, including its own triggered ability, won't trigger. * * On the turn Meandering Towershell attacks and is exiled, raid abilities will * see it as a creature that attacked. Conversely, on the turn Meandering * Towershell enters the battlefield attacking, raid abilities will not. * - * If you attack with a Meandering Towershell that you don’t own, you’ll control + * If you attack with a Meandering Towershell that you don't own, you'll control * it when it returns to the battlefield. * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/m/MeddlingMage.java b/Mage.Sets/src/mage/cards/m/MeddlingMage.java index b7b7105730b..c2afa5dce53 100644 --- a/Mage.Sets/src/mage/cards/m/MeddlingMage.java +++ b/Mage.Sets/src/mage/cards/m/MeddlingMage.java @@ -1,4 +1,3 @@ - package mage.cards.m; import java.util.UUID; @@ -8,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -27,7 +26,7 @@ import mage.game.events.GameEvent.EventType; public final class MeddlingMage extends CardImpl { public MeddlingMage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); @@ -35,7 +34,7 @@ public final class MeddlingMage extends CardImpl { this.toughness = new MageInt(2); // As Meddling Mage enters the battlefield, name a nonland card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); //The named card can't be cast. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MeddlingMageReplacementEffect())); @@ -55,7 +54,7 @@ class MeddlingMageReplacementEffect extends ContinuousRuleModifyingEffectImpl { public MeddlingMageReplacementEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "The named card can't be cast"; + staticText = "Spells with the chosen name can't be cast"; } public MeddlingMageReplacementEffect(final MeddlingMageReplacementEffect effect) { @@ -76,7 +75,7 @@ class MeddlingMageReplacementEffect extends ContinuousRuleModifyingEffectImpl { public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast a card with that name (" + mageObject.getLogName() + " in play)."; + return "You can't cast a spell with that name (" + mageObject.getLogName() + " in play)."; } return null; } @@ -90,7 +89,7 @@ class MeddlingMageReplacementEffect extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { MageObject object = game.getObject(event.getSourceId()); // fixes issue #1072 - return object != null && !object.isCopy() && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY)); + return object != null && !object.isCopy() && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY)); } } diff --git a/Mage.Sets/src/mage/cards/m/Memoricide.java b/Mage.Sets/src/mage/cards/m/Memoricide.java index fc4d0e8e40c..c38672412f9 100644 --- a/Mage.Sets/src/mage/cards/m/Memoricide.java +++ b/Mage.Sets/src/mage/cards/m/Memoricide.java @@ -1,10 +1,9 @@ - package mage.cards.m; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,11 +18,11 @@ import mage.target.TargetPlayer; public final class Memoricide extends CardImpl { public Memoricide(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); // Name a nonland card. Search target player's graveyard, hand, and library for any number of cards with // that name and exile them. Then that player shuffles their library - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addEffect(new MemoricideEffect()); } @@ -51,7 +50,7 @@ class MemoricideEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi @Override public boolean apply(Game game, Ability source) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return super.applySearchAndExile(game, source, cardName, targetPointer.getFirst(game, source)); } @@ -62,6 +61,6 @@ class MemoricideEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi @Override public String getText(Mode mode) { - return "Name a nonland card. " + super.getText(mode); + return "Search target player's graveyard, hand, and library for any number of cards with that name and exile them. Then that player shuffles their library"; } } diff --git a/Mage.Sets/src/mage/cards/m/MisersCage.java b/Mage.Sets/src/mage/cards/m/MisersCage.java index 828d7987085..9a344eee5dd 100644 --- a/Mage.Sets/src/mage/cards/m/MisersCage.java +++ b/Mage.Sets/src/mage/cards/m/MisersCage.java @@ -78,6 +78,6 @@ class MisersCageTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "at the beginning of each opponent’s upkeep, if that player has five or more cards in hand, {this} deals 2 damage to that player"; + return "at the beginning of each opponent's upkeep, if that player has five or more cards in hand, {this} deals 2 damage to that player"; } } diff --git a/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java b/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java index f7bd25a9567..3dbd7d79dcb 100644 --- a/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java +++ b/Mage.Sets/src/mage/cards/m/MistCloakedHerald.java @@ -22,7 +22,7 @@ public final class MistCloakedHerald extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(1); - // Mist-Cloaked Herald can’t be blocked. + // Mist-Cloaked Herald can't be blocked. this.addAbility(new CantBeBlockedSourceAbility()); } diff --git a/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java b/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java index 45df40b95bf..bc84efc939c 100644 --- a/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java +++ b/Mage.Sets/src/mage/cards/m/MuldrothaTheGravetide.java @@ -115,7 +115,7 @@ class MuldrothaTheGravetideWatcher extends Watcher { final HashMap> sourcePlayedPermanentTypes = new HashMap<>(); // source that played permanent types from graveyard // final HashMap> playerPlayedPermanentTypes = new HashMap<>(); // player that played permanent types from graveyard // 4/27/2018 If multiple effects allow you to play a card from your graveyard, such as those of Gisa and Geralf and Karador, - // Ghost Chieftain, you must announce which permission you’re using as you begin to play the card. + // Ghost Chieftain, you must announce which permission you're using as you begin to play the card. // 4/27/2018: If you play a card from your graveyard and then have a new Muldrotha come under your control in the same turn, // you may play another card of that type from your graveyard that turn. private Zone fromZone; diff --git a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java index 6e5a5022796..8349c70f48a 100644 --- a/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java +++ b/Mage.Sets/src/mage/cards/m/MyrBattlesphere.java @@ -96,7 +96,7 @@ class MyrBattlesphereTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this} attacks, you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it’s attacking."; + return "Whenever {this} attacks, you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it's attacking."; } } @@ -111,7 +111,7 @@ class MyrBattlesphereEffect extends OneShotEffect { public MyrBattlesphereEffect() { super(Outcome.Damage); - staticText = "you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it’s attacking."; + staticText = "you may tap X untapped Myr you control. If you do, {this} gets +X/+0 until end of turn and deals X damage to the player or planeswalker it's attacking."; } public MyrBattlesphereEffect(final MyrBattlesphereEffect effect) { diff --git a/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java b/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java index 71148b1167a..d39e57e989d 100644 --- a/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java +++ b/Mage.Sets/src/mage/cards/n/NajeelaTheBladeBlossom.java @@ -35,7 +35,7 @@ import mage.game.permanent.token.WarriorToken; */ public final class NajeelaTheBladeBlossom extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WARRIOR, "a Warrior"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WARRIOR, "Warrior"); public NajeelaTheBladeBlossom(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); diff --git a/Mage.Sets/src/mage/cards/n/NavigatorsCompass.java b/Mage.Sets/src/mage/cards/n/NavigatorsCompass.java index a5c21620e9b..e8e964b4548 100644 --- a/Mage.Sets/src/mage/cards/n/NavigatorsCompass.java +++ b/Mage.Sets/src/mage/cards/n/NavigatorsCompass.java @@ -25,7 +25,7 @@ public final class NavigatorsCompass extends CardImpl { public NavigatorsCompass(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); - // When Navigator’s Compass enters the battlefield, you gain 3 life. + // When Navigator's Compass enters the battlefield, you gain 3 life. Ability etbAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3)); this.addAbility(etbAbility); // {tap}: Until end of turn, target land you control becomes the basic land type of your choice in addition to its other types. diff --git a/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java b/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java index 9973b8d6fd5..6a9271a242a 100644 --- a/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java +++ b/Mage.Sets/src/mage/cards/n/Nebuchadnezzar.java @@ -1,4 +1,3 @@ - package mage.cards.n; import java.util.UUID; @@ -6,16 +5,14 @@ import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.ActivateIfConditionActivatedAbility; -import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MyTurnCondition; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.*; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.SuperType; import mage.constants.Zone; @@ -38,7 +35,7 @@ public final class Nebuchadnezzar extends CardImpl { this.toughness = new MageInt(3); // {X}, {T}: Choose a card name. Target opponent reveals X cards at random from their hand. Then that player discards all cards with that name revealed this way. Activate this ability only during your turn. - Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new NameACardEffect(NameACardEffect.TypeOfName.ALL), new ManaCostsImpl("{X}"), MyTurnCondition.instance); + Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL), new ManaCostsImpl("{X}"), MyTurnCondition.instance); ability.addCost(new TapSourceCost()); ability.addEffect(new NebuchadnezzarEffect()); ability.addTarget(new TargetOpponent()); @@ -70,7 +67,7 @@ class NebuchadnezzarEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (opponent != null && sourceObject != null && !cardName.isEmpty()) { int costX = source.getManaCostsToPay().getX(); if (costX > 0 && !opponent.getHand().isEmpty()) { diff --git a/Mage.Sets/src/mage/cards/n/Nevermore.java b/Mage.Sets/src/mage/cards/n/Nevermore.java index 1fbd5332fcd..755bf786cd2 100644 --- a/Mage.Sets/src/mage/cards/n/Nevermore.java +++ b/Mage.Sets/src/mage/cards/n/Nevermore.java @@ -1,4 +1,3 @@ - package mage.cards.n; import java.util.UUID; @@ -7,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -25,10 +24,10 @@ import mage.game.events.GameEvent.EventType; public final class Nevermore extends CardImpl { public Nevermore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}"); // As Nevermore enters the battlefield, name a nonland card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); // The named card can't be cast. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new NevermoreEffect2())); @@ -50,7 +49,7 @@ class NevermoreEffect2 extends ContinuousRuleModifyingEffectImpl { public NevermoreEffect2() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "The named card can't be cast"; + staticText = "Spells with the chosen name can't be cast"; } public NevermoreEffect2(final NevermoreEffect2 effect) { @@ -71,7 +70,7 @@ class NevermoreEffect2 extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == EventType.CAST_SPELL) { MageObject object = game.getObject(event.getSourceId()); - if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java index 609163006be..ba43fe13c59 100644 --- a/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java +++ b/Mage.Sets/src/mage/cards/n/NicolBolasPlaneswalker.java @@ -53,7 +53,7 @@ public final class NicolBolasPlaneswalker extends CardImpl { ability = new LoyaltyAbility(new DamageTargetEffect(7), -9); ability.addTarget(new TargetPlayerOrPlaneswalker()); ability.addEffect(new DiscardTargetEffect(7) - .setText("That player or that planeswalker’s controller discards seven cards") + .setText("That player or that planeswalker's controller discards seven cards") ); ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then") .setText("then sacrifices seven permanents") diff --git a/Mage.Sets/src/mage/cards/n/NightshadeSeer.java b/Mage.Sets/src/mage/cards/n/NightshadeSeer.java new file mode 100644 index 00000000000..1c148f177c6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/n/NightshadeSeer.java @@ -0,0 +1,90 @@ +package mage.cards.n; + +import java.util.UUID; +import mage.MageInt; +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.FilterCard; +import mage.filter.predicate.mageobject.ColorPredicate; +import mage.game.Game; +import mage.target.common.TargetCardInHand; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author TheElk801 + */ +public final class NightshadeSeer extends CardImpl { + + public NightshadeSeer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {2}{B}, {tap}: Reveal any number of black cards in your hand. Target creature gets -X/-X until end of turn, where X is the number of cards revealed this way. + Ability ability = new SimpleActivatedAbility(new NightshadeSeerEffect(), new ManaCostsImpl("{2}{B}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public NightshadeSeer(final NightshadeSeer card) { + super(card); + } + + @Override + public NightshadeSeer copy() { + return new NightshadeSeer(this); + } +} + +class NightshadeSeerEffect extends OneShotEffect { + + private static final FilterCard filter = new FilterCard("any number of black cards in your hand"); + + static { + filter.add(new ColorPredicate(ObjectColor.BLACK)); + } + + public NightshadeSeerEffect() { + super(Outcome.Detriment); + this.staticText = "reveal any number of black cards in your hand. " + + "Target creature gets -X/-X until end of turn, " + + "where X is the number of cards revealed this way"; + } + + public NightshadeSeerEffect(final NightshadeSeerEffect effect) { + super(effect); + } + + @Override + public NightshadeSeerEffect copy() { + return new NightshadeSeerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { + return false; + } + int xValue = -1 * cost.getNumberRevealedCards(); + game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/n/NimbusChampion.java b/Mage.Sets/src/mage/cards/n/NimbusChampion.java index 3392d7de1a2..0c656d95bbf 100644 --- a/Mage.Sets/src/mage/cards/n/NimbusChampion.java +++ b/Mage.Sets/src/mage/cards/n/NimbusChampion.java @@ -60,7 +60,7 @@ class NimbusChampionEffect extends OneShotEffect { super(Outcome.Benefit); this.staticText = "return target creature to its owner's hand if " + "that creature's power is less than or equal to " - + "the number of Warriors your team control."; + + "the number of Warriors your team controls"; } NimbusChampionEffect(final NimbusChampionEffect effect) { diff --git a/Mage.Sets/src/mage/cards/n/Nyxathid.java b/Mage.Sets/src/mage/cards/n/Nyxathid.java index 98af32988d3..c38c097e221 100644 --- a/Mage.Sets/src/mage/cards/n/Nyxathid.java +++ b/Mage.Sets/src/mage/cards/n/Nyxathid.java @@ -74,7 +74,7 @@ class CardsInChosenPlayerHandCount implements DynamicValue { @Override public String getMessage() { - return "cards in chosen opponents hand"; + return "card in chosen opponents hand"; } @Override diff --git a/Mage.Sets/src/mage/cards/o/OblivionSower.java b/Mage.Sets/src/mage/cards/o/OblivionSower.java index 87df2ef4d37..8742de4f54a 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionSower.java +++ b/Mage.Sets/src/mage/cards/o/OblivionSower.java @@ -73,8 +73,8 @@ class OblivionSowerEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { /* - 8/25/2015: Oblivion Sower’s ability allows you to put any land cards the player owns from exile onto the battlefield, regardless of how those cards were exiled. - 8/25/2015: Cards that are face down in exile have no characteristics. Such cards can’t be put onto the battlefield with Oblivion Sower’s ability. + 8/25/2015: Oblivion Sower's ability allows you to put any land cards the player owns from exile onto the battlefield, regardless of how those cards were exiled. + 8/25/2015: Cards that are face down in exile have no characteristics. Such cards can't be put onto the battlefield with Oblivion Sower's ability. */ Player controller = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); diff --git a/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java b/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java index aa3ff8341bb..1f73f13cb9b 100644 --- a/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java +++ b/Mage.Sets/src/mage/cards/o/OmnathLocusOfMana.java @@ -52,7 +52,7 @@ class OmnathRuleEffect extends ContinuousEffectImpl { public OmnathRuleEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "You don’t lose unspent green mana as steps and phases end"; + staticText = "You don't lose unspent green mana as steps and phases end"; } public OmnathRuleEffect(final OmnathRuleEffect effect) { diff --git a/Mage.Sets/src/mage/cards/p/PathOfAncestry.java b/Mage.Sets/src/mage/cards/p/PathOfAncestry.java index 3b4289d2876..9e490d07baf 100644 --- a/Mage.Sets/src/mage/cards/p/PathOfAncestry.java +++ b/Mage.Sets/src/mage/cards/p/PathOfAncestry.java @@ -1,4 +1,3 @@ - package mage.cards.p; import java.util.Iterator; @@ -75,7 +74,7 @@ class PathOfAncestryTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getSourceId().equals(getSourceId())) { + if (getSourceId().equals(event.getSourceId())) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(getSourceId()); if (sourcePermanent != null) { boolean found = false; diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java b/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java index 592fc1b0913..a0880af364a 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianRevoker.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -33,7 +33,7 @@ public final class PhyrexianRevoker extends CardImpl { this.toughness = new MageInt(1); // As Phyrexian Revoker enters the battlefield, name a nonland card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); // Activated abilities of sources with the chosen name can't be activated. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PhyrexianRevokerEffect2())); @@ -84,7 +84,7 @@ class PhyrexianRevokerEffect2 extends ContinuousRuleModifyingEffectImpl { public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == EventType.ACTIVATE_ABILITY) { MageObject object = game.getObject(event.getSourceId()); - if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PirsWhim.java b/Mage.Sets/src/mage/cards/p/PirsWhim.java index cba003412b6..09ea5499bbb 100644 --- a/Mage.Sets/src/mage/cards/p/PirsWhim.java +++ b/Mage.Sets/src/mage/cards/p/PirsWhim.java @@ -1,4 +1,3 @@ - package mage.cards.p; import java.util.UUID; @@ -63,7 +62,7 @@ class PirsWhimEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); ChooseFriendsAndFoes choice = new ChooseFriendsAndFoes(); if (!choice.chooseFriendOrFoe(controller, source, game)) { return false; diff --git a/Mage.Sets/src/mage/cards/p/PithingNeedle.java b/Mage.Sets/src/mage/cards/p/PithingNeedle.java index e9b4196bb12..402cfba00d8 100644 --- a/Mage.Sets/src/mage/cards/p/PithingNeedle.java +++ b/Mage.Sets/src/mage/cards/p/PithingNeedle.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -25,7 +25,7 @@ public final class PithingNeedle extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}"); // As Pithing Needle enters the battlefield, name a card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL))); // Activated abilities of sources with the chosen name can't be activated unless they're mana abilities. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PithingNeedleEffect())); @@ -74,7 +74,7 @@ class PithingNeedleEffect extends ContinuousRuleModifyingEffectImpl { if (ability.isPresent() && object != null) { if (game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId()) // controller in range && ability.get().getAbilityType() != AbilityType.MANA - && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/p/PollenRemedy.java b/Mage.Sets/src/mage/cards/p/PollenRemedy.java index 2d7d42b2711..65d52569733 100644 --- a/Mage.Sets/src/mage/cards/p/PollenRemedy.java +++ b/Mage.Sets/src/mage/cards/p/PollenRemedy.java @@ -35,7 +35,7 @@ public final class PollenRemedy extends CardImpl { // Prevent the next 3 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. If Pollen Remedy was kicked, prevent the next 6 damage this way instead. Effect effect = new ConditionalReplacementEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 6), KickedCondition.instance, new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 3)); - effect.setText("Prevent the next 3 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. if this spell was kicked, prevent the next 6 damage this way instead."); + effect.setText("Prevent the next 3 damage that would be dealt this turn to any number of targets, divided as you choose. if this spell was kicked, prevent the next 6 damage this way instead."); this.getSpellAbility().addEffect(effect); originalId = this.getSpellAbility().getOriginalId(); } diff --git a/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java b/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java index 5f95be2611a..6f6b1ca6b6b 100644 --- a/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java +++ b/Mage.Sets/src/mage/cards/p/PolukranosWorldEater.java @@ -25,20 +25,20 @@ import mage.target.common.TargetCreaturePermanentAmount; /** * - * * The value of X in Polukranos’s last ability is equal to the value chosen + * * The value of X in Polukranos's last ability is equal to the value chosen * for X when its activated ability was activated. * * * The number of targets chosen for the triggered ability must be at least one - * (if X wasn’t 0) and at most X. You choose the division of damage as you put + * (if X wasn't 0) and at most X. You choose the division of damage as you put * the ability on the stack, not as it resolves. Each target must be assigned * at least 1 damage. In multiplayer games, you may choose creatures controlled * by different opponents. * - * * If some, but not all, of the ability’s targets become illegal, you can’t change - * the division of damage. Damage that would’ve been dealt to illegal targets - * simply isn’t dealt. + * * If some, but not all, of the ability's targets become illegal, you can't change + * the division of damage. Damage that would've been dealt to illegal targets + * simply isn't dealt. * - * * As Polukranos’s triggered ability resolves, Polukranos deals damage first, then + * * As Polukranos's triggered ability resolves, Polukranos deals damage first, then * the target creatures do. Although no creature will die until after the ability * finishes resolving, the order could matter if Polukranos has wither or infect. * diff --git a/Mage.Sets/src/mage/cards/p/Polyraptor.java b/Mage.Sets/src/mage/cards/p/Polyraptor.java index e88958d2b1a..98d4e06a3b7 100644 --- a/Mage.Sets/src/mage/cards/p/Polyraptor.java +++ b/Mage.Sets/src/mage/cards/p/Polyraptor.java @@ -26,7 +26,7 @@ public final class Polyraptor extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(5); - // Enrage - Whenever Polyraptor is dealt damage, create a token that’s a copy of Polyraptor. + // Enrage - Whenever Polyraptor is dealt damage, create a token that's a copy of Polyraptor. Ability ability = new DealtDamageToSourceTriggeredAbility( Zone.BATTLEFIELD, new CreateTokenCopySourceEffect(), diff --git a/Mage.Sets/src/mage/cards/p/PowerSink.java b/Mage.Sets/src/mage/cards/p/PowerSink.java index 49105eebbb3..a8e51d8e470 100644 --- a/Mage.Sets/src/mage/cards/p/PowerSink.java +++ b/Mage.Sets/src/mage/cards/p/PowerSink.java @@ -29,7 +29,7 @@ public final class PowerSink extends CardImpl { public PowerSink(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}"); - // Counter target spell unless its controller pays {X}. If that player doesn’t, they tap all lands with mana abilities they control and lose all unspent mana. + // Counter target spell unless its controller pays {X}. If that player doesn't, they tap all lands with mana abilities they control and lose all unspent mana. this.getSpellAbility().addEffect(new PowerSinkCounterUnlessPaysEffect()); this.getSpellAbility().addTarget(new TargetSpell()); } @@ -48,7 +48,7 @@ class PowerSinkCounterUnlessPaysEffect extends OneShotEffect { public PowerSinkCounterUnlessPaysEffect() { super(Outcome.Detriment); - this.staticText = "Counter target spell unless its controller pays {X}. If that player doesn’t, they tap all lands with mana abilities they control and lose all unspent mana"; + this.staticText = "Counter target spell unless its controller pays {X}. If that player doesn't, they tap all lands with mana abilities they control and lose all unspent mana"; } public PowerSinkCounterUnlessPaysEffect(final PowerSinkCounterUnlessPaysEffect effect) { diff --git a/Mage.Sets/src/mage/cards/p/Predict.java b/Mage.Sets/src/mage/cards/p/Predict.java index e29d6935864..193ae9b8c0f 100644 --- a/Mage.Sets/src/mage/cards/p/Predict.java +++ b/Mage.Sets/src/mage/cards/p/Predict.java @@ -1,10 +1,9 @@ - package mage.cards.p; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -22,11 +21,10 @@ import mage.target.TargetPlayer; public final class Predict extends CardImpl { public Predict(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Name a card, then target player puts the top card of their library into their graveyard. If that card is the named card, you draw two cards. Otherwise, you draw a card. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new PredictEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -46,9 +44,9 @@ class PredictEffect extends OneShotEffect { public PredictEffect() { super(Outcome.DrawCard); this.staticText = ", then target player puts the top card of their library into their graveyard. " - + "If that card is the named card, you draw two cards. Otherwise, you draw a card."; + + "If that card has the chosen name, you draw two cards. Otherwise, you draw a card."; } - + public PredictEffect(final PredictEffect effect) { super(effect); } @@ -57,25 +55,25 @@ class PredictEffect extends OneShotEffect { public PredictEffect copy() { return new PredictEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Player targetPlayer = game.getPlayer(source.getFirstTarget()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); - if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { - int amount = 1; + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); + if (controller != null && targetPlayer != null && cardName != null && !cardName.isEmpty()) { + int amount = 1; Card card = targetPlayer.getLibrary().getFromTop(game); if (card != null) { controller.moveCards(card, Zone.GRAVEYARD, source, game); if (card.getName().equals(cardName)) { amount = 2; } - } - controller.drawCards(amount, game); + } + controller.drawCards(amount, game); return true; } return false; } - + } diff --git a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java index 3bc2bd9159b..a6e0f5b39c9 100644 --- a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java +++ b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java @@ -77,11 +77,11 @@ class PrizedAmalgamTriggerdAbility extends EntersBattlefieldAllTriggeredAbility @Override public boolean checkTrigger(GameEvent event, Game game) { /** - * 4/8/2016 Prized Amalgam’s ability triggers only if it’s in your + * 4/8/2016 Prized Amalgam's ability triggers only if it's in your * graveyard immediately after a creature enters the battlefield from * your graveyard or you cast a creature from your graveyard. A Prized - * Amalgam that’s already on the battlefield won’t be returned at the - * beginning of the next end step if it’s put into your graveyard later. + * Amalgam that's already on the battlefield won't be returned at the + * beginning of the next end step if it's put into your graveyard later. */ boolean result = false; if (super.checkTrigger(event, game)) { diff --git a/Mage.Sets/src/mage/cards/p/PulseOfMurasa.java b/Mage.Sets/src/mage/cards/p/PulseOfMurasa.java index e6858924a84..f1f541e9932 100644 --- a/Mage.Sets/src/mage/cards/p/PulseOfMurasa.java +++ b/Mage.Sets/src/mage/cards/p/PulseOfMurasa.java @@ -18,7 +18,7 @@ import mage.target.common.TargetCardInGraveyard; */ public final class PulseOfMurasa extends CardImpl { - private static final FilterCard FILTER = new FilterCard("creature or land card in a graveyard"); + private static final FilterCard FILTER = new FilterCard("creature or land card from a graveyard"); static { FILTER.add(Predicates.or( diff --git a/Mage.Sets/src/mage/cards/r/RadiantDestiny.java b/Mage.Sets/src/mage/cards/r/RadiantDestiny.java index f8e3a2473eb..f008dc39c4c 100644 --- a/Mage.Sets/src/mage/cards/r/RadiantDestiny.java +++ b/Mage.Sets/src/mage/cards/r/RadiantDestiny.java @@ -45,12 +45,12 @@ public final class RadiantDestiny extends CardImpl { // As Radiant Destiny enters the battlefield, choose a creature type. this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature))); - // Creatures you control of the chosen type get +1/+1. As long as you have the city’s blessing, they also have vigilance. + // Creatures you control of the chosen type get +1/+1. As long as you have the city's blessing, they also have vigilance. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, filter, true)); ContinuousEffect effect = new ConditionalContinuousEffect( new GainAbilityAllOfChosenSubtypeEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, FILTER_PERMANENT_CREATURES_CONTROLLED), CitysBlessingCondition.instance, - "As long as you have the city’s blessing, they also have vigilance."); + "As long as you have the city's blessing, they also have vigilance."); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RakdossReturn.java b/Mage.Sets/src/mage/cards/r/RakdossReturn.java index 394de5f8e48..257ab43dabf 100644 --- a/Mage.Sets/src/mage/cards/r/RakdossReturn.java +++ b/Mage.Sets/src/mage/cards/r/RakdossReturn.java @@ -46,7 +46,7 @@ class RakdossReturnEffect extends OneShotEffect { RakdossReturnEffect() { super(Outcome.Benefit); - this.staticText = "That player or that planeswalker’s controller discards X cards."; + this.staticText = "That player or that planeswalker's controller discards X cards."; } RakdossReturnEffect(final RakdossReturnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java index 505f07ec9bd..3819a5c581e 100644 --- a/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java +++ b/Mage.Sets/src/mage/cards/r/RavagerOfTheFells.java @@ -114,7 +114,7 @@ class RavagerOfTheFellsAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever this creature transforms into {this}, " + "it deals 2 damage to target opponent or planeswalker " - + "and 2 damage to up to one target creature that player or that planeswalker’s controller controls."; + + "and 2 damage to up to one target creature that player or that planeswalker's controller controls."; } } diff --git a/Mage.Sets/src/mage/cards/r/RecklessRage.java b/Mage.Sets/src/mage/cards/r/RecklessRage.java index 1de5107091c..b39f5a9aed0 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessRage.java +++ b/Mage.Sets/src/mage/cards/r/RecklessRage.java @@ -20,8 +20,8 @@ public final class RecklessRage extends CardImpl { public RecklessRage(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); - // Reckless Rage deals 4 damage to target creature you don’t control and 2 damage to target creature you control. - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don’t control"); + // Reckless Rage deals 4 damage to target creature you don't control and 2 damage to target creature you control. + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you don't control"); filter.add(new ControllerPredicate(TargetController.NOT_YOU)); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new DamageTargetEffect(4).setUseOnlyTargetPointer(true)); diff --git a/Mage.Sets/src/mage/cards/r/RescueFromTheUnderworld.java b/Mage.Sets/src/mage/cards/r/RescueFromTheUnderworld.java index 96d91f8212f..4c975ab58c8 100644 --- a/Mage.Sets/src/mage/cards/r/RescueFromTheUnderworld.java +++ b/Mage.Sets/src/mage/cards/r/RescueFromTheUnderworld.java @@ -31,19 +31,19 @@ import mage.target.common.TargetControlledCreaturePermanent; /** * - * Once you announce you’re casting Rescue from the Underworld, no player may + * Once you announce you're casting Rescue from the Underworld, no player may * attempt to stop you from casting the spell by removing the creature you want * to sacrifice. * * If you sacrifice a creature token to cast Rescue from the Underworld, it - * won’t return to the battlefield, although the target creature card will. + * won't return to the battlefield, although the target creature card will. * * If either the sacrificed creature or the target creature card leaves the * graveyard before the delayed triggered ability resolves during your next - * upkeep, it won’t return. + * upkeep, it won't return. * * However, if the sacrificed creature is put into another public zone instead - * of the graveyard, perhaps because it’s your commander or because of another + * of the graveyard, perhaps because it's your commander or because of another * replacement effect, it will return to the battlefield from the zone it went * to. * @@ -212,7 +212,7 @@ class RescueFromTheUnderworldReturnEffect extends OneShotEffect { } } // However, if the sacrificed creature is put into another public zone instead of the graveyard, - // perhaps because it’s your commander or because of another replacement effect, it will return + // perhaps because it's your commander or because of another replacement effect, it will return // to the battlefield from the zone it went to. if (source.getTargets().get(1) != null) { for (UUID targetId : source.getTargets().get(1).getTargets()) { diff --git a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java index cb01ebdf412..1e82c953cf3 100644 --- a/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java +++ b/Mage.Sets/src/mage/cards/r/ReyhanLastOfTheAbzan.java @@ -1,4 +1,3 @@ - package mage.cards.r; import java.util.UUID; @@ -91,25 +90,25 @@ class ReyhanLastOfTheAbzanTriggeredAbility extends TriggeredAbilityImpl { if (zcEvent.getToZone() != Zone.GRAVEYARD && zcEvent.getToZone() != Zone.COMMAND) { return false; } - + // A creature Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD); if (permanent == null || !permanent.isCreature()) { return false; } - + // You control Player player = game.getPlayer(this.getControllerId()); - if (player == null || !player.getId().equals(this.getControllerId())) { + if (player == null || !permanent.getControllerId().equals(player.getId())) { return false; } - + // If it had one or more +1/+1 counters on it int countersOn = permanent.getCounters(game).getCount(CounterType.P1P1); if (countersOn == 0) { return false; } - + // You may put that may +1/+1 counters on target creature this.getEffects().clear(); this.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(countersOn))); diff --git a/Mage.Sets/src/mage/cards/r/RunedArch.java b/Mage.Sets/src/mage/cards/r/RunedArch.java index bba0a64ba4a..ea9d5642021 100644 --- a/Mage.Sets/src/mage/cards/r/RunedArch.java +++ b/Mage.Sets/src/mage/cards/r/RunedArch.java @@ -42,7 +42,7 @@ public final class RunedArch extends CardImpl { // {X}, {tap}, Sacrifice Runed Arch: X target creatures with power 2 or less are unblockable this turn. Ability ability = new SimpleActivatedAbility( new CantBeBlockedTargetEffect(Duration.EndOfGame) - .setText("X target creatures with power 2 or less can’t be blocked this turn."), + .setText("X target creatures with power 2 or less can't be blocked this turn."), new ManaCostsImpl("{X}") ); ability.addCost(new TapSourceCost()); diff --git a/Mage.Sets/src/mage/cards/r/RunedHalo.java b/Mage.Sets/src/mage/cards/r/RunedHalo.java index 49b871326e4..3800320f377 100644 --- a/Mage.Sets/src/mage/cards/r/RunedHalo.java +++ b/Mage.Sets/src/mage/cards/r/RunedHalo.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.continuous.GainAbilityControllerEffect; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; @@ -37,7 +37,7 @@ public final class RunedHalo extends CardImpl { // As Runed Halo enters the battlefield, name a card. - Ability ability = new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + Ability ability = new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); // You have protection from the chosen name. ability.addEffect(new RunedHaloSetProtectionEffect()); this.addAbility(ability); @@ -67,7 +67,7 @@ class RunedHaloSetProtectionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (controller != null && cardName != null && !cardName.isEmpty()) { FilterObject filter = new FilterObject("the name [" + cardName + ']'); filter.add(new NamePredicate(cardName)); diff --git a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java index 8b0acd0b560..59a3944ea53 100644 --- a/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java +++ b/Mage.Sets/src/mage/cards/s/SakikoMotherOfSummer.java @@ -35,7 +35,7 @@ public final class SakikoMotherOfSummer extends CardImpl { this.power = new MageInt(3); this.toughness = new MageInt(3); - // Whenever a creature you control deals combat damage to a player, add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end. + // Whenever a creature you control deals combat damage to a player, add that much {G}. Until end of turn, you don't lose this mana as steps and phases end. this.addAbility(new SakikoMotherOfSummerTriggeredAbility()); } @@ -78,7 +78,7 @@ class SakikoMotherOfSummerTriggeredAbility extends TriggeredAbilityImpl { this.getEffects().clear(); Effect effect = new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(event.getAmount()), "that player", true); effect.setTargetPointer(new FixedTarget(creature.getControllerId())); - effect.setText("add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end"); + effect.setText("add that much {G}. Until end of turn, you don't lose this mana as steps and phases end"); this.addEffect(effect); return true; } @@ -88,6 +88,6 @@ class SakikoMotherOfSummerTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a creature you control deals combat damage to a player, add that much {G}. Until end of turn, you don’t lose this mana as steps and phases end."; + return "Whenever a creature you control deals combat damage to a player, add that much {G}. Until end of turn, you don't lose this mana as steps and phases end."; } } diff --git a/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java b/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java index 59d71e38dc4..3f0f949571a 100644 --- a/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java +++ b/Mage.Sets/src/mage/cards/s/SakuraTribeSpringcaller.java @@ -28,9 +28,9 @@ public final class SakuraTribeSpringcaller extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(4); - // At the beginning of your upkeep, add {G}. Until end of turn, you don’t lose this mana as steps and phases end. + // At the beginning of your upkeep, add {G}. Until end of turn, you don't lose this mana as steps and phases end. Effect effect = new AddManaToManaPoolTargetControllerEffect(new Mana(Mana.GreenMana(1)), "your", true); - effect.setText("add {G}. Until end of turn, you don’t lose this mana as steps and phases end"); + effect.setText("add {G}. Until end of turn, you don't lose this mana as steps and phases end"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/s/SavageVentmaw.java b/Mage.Sets/src/mage/cards/s/SavageVentmaw.java index b757fb815e1..0461dea80dc 100644 --- a/Mage.Sets/src/mage/cards/s/SavageVentmaw.java +++ b/Mage.Sets/src/mage/cards/s/SavageVentmaw.java @@ -31,9 +31,9 @@ public final class SavageVentmaw extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - // Whenever Savage Ventmaw attacks, add {R}{R}{R}{G}{G}{G}. Until end of turn, you don’t lose this mana as steps and phases end. + // Whenever Savage Ventmaw attacks, add {R}{R}{R}{G}{G}{G}. Until end of turn, you don't lose this mana as steps and phases end. Effect effect = new SavageVentmawManaEffect(new Mana(3, 3, 0, 0, 0, 0, 0, 0), "your", true); - effect.setText("add {R}{R}{R}{G}{G}{G}. Until end of turn, you don’t lose this mana as steps and phases end"); + effect.setText("add {R}{R}{R}{G}{G}{G}. Until end of turn, you don't lose this mana as steps and phases end"); this.addAbility(new AttacksTriggeredAbility(effect, false)); } diff --git a/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java index 95ec2050311..a997bc36508 100644 --- a/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java +++ b/Mage.Sets/src/mage/cards/s/ScentOfJasmine.java @@ -1,21 +1,18 @@ - package mage.cards.s; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; -import mage.abilities.effects.Effect; +import mage.abilities.costs.common.RevealTargetFromHandCost; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; -import mage.players.Player; import mage.target.common.TargetCardInHand; /** @@ -28,9 +25,7 @@ public final class ScentOfJasmine extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way. - Effect effect = new ScentOfJasmineEffect(); - effect.setText("Reveal any number of white cards in your hand. You gain 2 life for each card revealed this way."); - this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addEffect(new ScentOfJasmineEffect()); } public ScentOfJasmine(final ScentOfJasmine card) { @@ -45,7 +40,7 @@ public final class ScentOfJasmine extends CardImpl { class ScentOfJasmineEffect extends OneShotEffect { - private static final FilterCard filter = new FilterCard("white cards"); + private static final FilterCard filter = new FilterCard("any number of white cards"); static { filter.add(new ColorPredicate(ObjectColor.WHITE)); @@ -53,6 +48,8 @@ class ScentOfJasmineEffect extends OneShotEffect { public ScentOfJasmineEffect() { super(Outcome.GainLife); + this.staticText = "reveal any number of white cards in your hand. " + + "You gain 2 life for each card revealed this way"; } public ScentOfJasmineEffect(final ScentOfJasmineEffect effect) { @@ -66,21 +63,11 @@ class ScentOfJasmineEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player == null) { + RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter)); + if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) { return false; } - Cards cards = new CardsImpl(); - if (player.getHand().count(filter, game) > 0) { - TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter); - if (player.choose(Outcome.Benefit, target, source.getSourceId(), game)) { - for (UUID uuid : target.getTargets()) { - cards.add(player.getHand().get(uuid, game)); - } - player.revealCards("cards", cards, game); - player.gainLife(cards.getCards(game).size() * 2, game, source); - } - } - return true; + int xValue = cost.getNumberRevealedCards(); + return new GainLifeEffect(2 * xValue).apply(game, source); } } diff --git a/Mage.Sets/src/mage/cards/s/ScrollRack.java b/Mage.Sets/src/mage/cards/s/ScrollRack.java index 8ad4e5a55b3..dff971eb118 100644 --- a/Mage.Sets/src/mage/cards/s/ScrollRack.java +++ b/Mage.Sets/src/mage/cards/s/ScrollRack.java @@ -1,4 +1,3 @@ - package mage.cards.s; import java.util.UUID; @@ -16,6 +15,7 @@ import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; import mage.filter.FilterCard; +import mage.game.ExileZone; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInHand; @@ -27,7 +27,7 @@ import mage.target.common.TargetCardInHand; public final class ScrollRack extends CardImpl { public ScrollRack(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); // {1}, {tap}: Exile any number of cards from your hand face down. Put that many cards from the top of your library into your hand. Then look at the exiled cards and put them on top of your library in any order. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScrollRackEffect(), new GenericManaCost(1)); @@ -62,7 +62,6 @@ class ScrollRackEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { FilterCard filter = new FilterCard("card in your hand to exile"); -// FilterCard filter2 = new FilterCard("(move the window) card exiled by " + sourceObject.getIdName() + " to put on top of library"); TargetCardInHand target = new TargetCardInHand(0, controller.getHand().size(), filter); target.setRequired(false); int amountExiled = 0; @@ -76,8 +75,11 @@ class ScrollRackEffect extends OneShotEffect { } } controller.moveCardsToExile(new CardsImpl(target.getTargets()).getCards(game), source, game, false, source.getSourceId(), sourceObject.getIdName()); - for (Card card : game.getExile().getExileZone(source.getSourceId()).getCards(game)) { - card.setFaceDown(true, game); + ExileZone exileZone = game.getExile().getExileZone(source.getSourceId()); + if (exileZone != null) { + for (Card card : exileZone.getCards(game)) { + card.setFaceDown(true, game); + } } } } diff --git a/Mage.Sets/src/mage/cards/s/SearingBlaze.java b/Mage.Sets/src/mage/cards/s/SearingBlaze.java index 1bf68abbae3..0deaae3341f 100644 --- a/Mage.Sets/src/mage/cards/s/SearingBlaze.java +++ b/Mage.Sets/src/mage/cards/s/SearingBlaze.java @@ -53,7 +53,7 @@ class SearingBlazeEffect extends OneShotEffect { public SearingBlazeEffect() { super(Outcome.Damage); - staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to target creature that player or that planeswalker’s controller controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player or planeswalker and 3 damage to that creature instead."; + staticText = "{this} deals 1 damage to target player or planeswalker and 1 damage to target creature that player or that planeswalker's controller controls. \nLandfall - If you had a land enter the battlefield under your control this turn, {this} deals 3 damage to that player or planeswalker and 3 damage to that creature instead."; } public SearingBlazeEffect(final SearingBlazeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java b/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java index feabef83284..3522044fb08 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingGhoul.java @@ -16,7 +16,7 @@ import mage.constants.SubType; */ public final class ShamblingGhoul extends CardImpl { - private static final String staticText = "{this} enters the battlefield tapped"; + private static final String staticText = "tapped"; public ShamblingGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); diff --git a/Mage.Sets/src/mage/cards/s/SimicGuildmage.java b/Mage.Sets/src/mage/cards/s/SimicGuildmage.java index 8a69eea82fa..0a5fe6fefd5 100644 --- a/Mage.Sets/src/mage/cards/s/SimicGuildmage.java +++ b/Mage.Sets/src/mage/cards/s/SimicGuildmage.java @@ -171,9 +171,9 @@ class MoveAuraEffect extends OneShotEffect { 5/1/2006 For the second ability, only the Aura is targeted. When the ability resolves, you choose a permanent to move the Aura onto. - It can’t be the permanent the Aura is already attached to, it must be controlled by the player who controls the permanent the Aura is attached to, and it must be able to be enchanted by the Aura. - (It doesn’t matter who controls the Aura or who controls Simic Guildmage.) - If no such permanent exists, the Aura doesn’t move. + It can't be the permanent the Aura is already attached to, it must be controlled by the player who controls the permanent the Aura is attached to, and it must be able to be enchanted by the Aura. + (It doesn't matter who controls the Aura or who controls Simic Guildmage.) + If no such permanent exists, the Aura doesn't move. */ Player controller = game.getPlayer(source.getControllerId()); diff --git a/Mage.Sets/src/mage/cards/s/SkyshroudClaim.java b/Mage.Sets/src/mage/cards/s/SkyshroudClaim.java index a76bfc71737..1828f9646af 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshroudClaim.java +++ b/Mage.Sets/src/mage/cards/s/SkyshroudClaim.java @@ -17,7 +17,7 @@ import mage.target.common.TargetCardInLibrary; */ public final class SkyshroudClaim extends CardImpl { - private static final FilterLandCard filter = new FilterLandCard("Forest"); + private static final FilterLandCard filter = new FilterLandCard("Forest cards"); static { filter.add(new SubtypePredicate(SubType.FOREST)); } diff --git a/Mage.Sets/src/mage/cards/s/SlaughterGames.java b/Mage.Sets/src/mage/cards/s/SlaughterGames.java index bfd58589489..4201ffe68b9 100644 --- a/Mage.Sets/src/mage/cards/s/SlaughterGames.java +++ b/Mage.Sets/src/mage/cards/s/SlaughterGames.java @@ -6,7 +6,7 @@ import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CantBeCounteredSourceEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -32,7 +32,7 @@ public final class SlaughterGames extends CardImpl { this.addAbility(ability); // Name a nonland card. Search target opponent's graveyard, hand, and library for any number of cards with that name and exile them. Then that player shuffles their library. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME)); this.getSpellAbility().addEffect(new SlaughterGamesEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); } @@ -59,7 +59,7 @@ class SlaughterGamesEffect extends SearchTargetGraveyardHandLibraryForCardNameAn @Override public boolean apply(Game game, Ability source) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return super.applySearchAndExile(game, source, cardName, targetPointer.getFirst(game, source)); } diff --git a/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java b/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java index 01df8ffbb3c..1e1735f9a22 100644 --- a/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java +++ b/Mage.Sets/src/mage/cards/s/SorcerousSpyglass.java @@ -8,7 +8,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AbilityType; @@ -47,10 +47,10 @@ public final class SorcerousSpyglass extends CardImpl { } } -class SorcerousSpyglassEntersEffect extends NameACardEffect { +class SorcerousSpyglassEntersEffect extends ChooseACardNameEffect { SorcerousSpyglassEntersEffect() { - super(NameACardEffect.TypeOfName.ALL); + super(ChooseACardNameEffect.TypeOfName.ALL); staticText = "look at an opponent's hand, then choose any card name"; } @@ -114,7 +114,7 @@ class SorcerousSpyglassActivationEffect extends ContinuousRuleModifyingEffectImp if (ability.isPresent() && object != null) { if (game.getState().getPlayersInRange(source.getControllerId(), game).contains(event.getPlayerId()) // controller in range && ability.get().getAbilityType() != AbilityType.MANA - && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java index 560920aa898..f07aae8b715 100644 --- a/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java +++ b/Mage.Sets/src/mage/cards/s/SoulOfShandalar.java @@ -70,7 +70,7 @@ class SoulOfShandalarEffect extends OneShotEffect { public SoulOfShandalarEffect() { super(Outcome.Damage); staticText = "{this} deals 3 damage to target player or planeswalker " - + "and 3 damage to up to one target creature that player or that planeswalker’s controller controls"; + + "and 3 damage to up to one target creature that player or that planeswalker's controller controls"; } public SoulOfShandalarEffect(final SoulOfShandalarEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpectralSearchlight.java b/Mage.Sets/src/mage/cards/s/SpectralSearchlight.java index f3cfc623c7d..4575ce3930f 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralSearchlight.java +++ b/Mage.Sets/src/mage/cards/s/SpectralSearchlight.java @@ -26,9 +26,9 @@ public final class SpectralSearchlight extends CardImpl { public SpectralSearchlight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); - // {T}: Choose a player. That player adds one mana of any color he or she chooses. + // {T}: Choose a player. That player adds one mana of any color they chooses. ManaEffect effect = new SpectralSearchlightManaEffect("chosen player"); - effect.setText("That player adds one mana of any color he or she chooses"); + effect.setText("That player adds one mana of any color they choose"); Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); // choosing player as first effect, before adding mana effect ability.getEffects().add(0, new ChoosePlayerEffect(Outcome.PutManaInPool)); diff --git a/Mage.Sets/src/mage/cards/s/SpoilsOfTheVault.java b/Mage.Sets/src/mage/cards/s/SpoilsOfTheVault.java index d1a377ab461..622bf0c7f37 100644 --- a/Mage.Sets/src/mage/cards/s/SpoilsOfTheVault.java +++ b/Mage.Sets/src/mage/cards/s/SpoilsOfTheVault.java @@ -1,11 +1,10 @@ - package mage.cards.s; import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -27,7 +26,7 @@ public final class SpoilsOfTheVault extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); // Name a card. Reveal cards from the top of your library until you reveal the named card, then put that card into your hand. Exile all other cards revealed this way, and you lose 1 life for each of the exiled cards. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new SpoilsOfTheVaultEffect()); } @@ -45,7 +44,8 @@ class SpoilsOfTheVaultEffect extends OneShotEffect { public SpoilsOfTheVaultEffect() { super(Outcome.Damage); - this.staticText = "Reveal cards from the top of your library until you reveal the named card, then put that card into your hand. Exile all other cards revealed this way, and you lose 1 life for each of the exiled cards"; + this.staticText = "Reveal cards from the top of your library until you reveal a card with that name, " + + "then put that card into your hand. Exile all other cards revealed this way, and you lose 1 life for each of the exiled cards"; } public SpoilsOfTheVaultEffect(final SpoilsOfTheVaultEffect effect) { @@ -61,7 +61,7 @@ class SpoilsOfTheVaultEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { MageObject sourceObject = game.getObject(source.getSourceId()); Player controller = game.getPlayer(source.getControllerId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (sourceObject == null || controller == null || cardName == null || cardName.isEmpty()) { return false; } diff --git a/Mage.Sets/src/mage/cards/s/StainTheMind.java b/Mage.Sets/src/mage/cards/s/StainTheMind.java index 7ba35dcfbb2..509edcca9b1 100644 --- a/Mage.Sets/src/mage/cards/s/StainTheMind.java +++ b/Mage.Sets/src/mage/cards/s/StainTheMind.java @@ -3,7 +3,7 @@ package mage.cards.s; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.effects.common.search.SearchTargetGraveyardHandLibraryForCardNameAndExileEffect; import mage.abilities.keyword.ConvokeAbility; import mage.cards.CardImpl; @@ -24,7 +24,7 @@ public final class StainTheMind extends CardImpl { // Convoke this.addAbility(new ConvokeAbility()); // Name a nonland card. Search target player's graveyard, hand, and library for any number of card's with that name and exile them. Then that player shuffles their library. - this.getSpellAbility().addEffect((new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.getSpellAbility().addEffect((new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); this.getSpellAbility().addEffect(new StainTheMindEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -51,7 +51,7 @@ class StainTheMindEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE @Override public boolean apply(Game game, Ability source) { - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); return super.applySearchAndExile(game, source, cardName, targetPointer.getFirst(game, source)); } diff --git a/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java b/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java index bdf110a1470..8b284496863 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetSprinter.java @@ -26,7 +26,7 @@ public final class StormFleetSprinter extends CardImpl { // Haste this.addAbility(HasteAbility.getInstance()); - // Storm Fleet Sprinter can’t be blocked. + // Storm Fleet Sprinter can't be blocked. this.addAbility(new CantBeBlockedSourceAbility()); } diff --git a/Mage.Sets/src/mage/cards/s/Sunforger.java b/Mage.Sets/src/mage/cards/s/Sunforger.java index 870522a8ec8..f6bc12430a8 100644 --- a/Mage.Sets/src/mage/cards/s/Sunforger.java +++ b/Mage.Sets/src/mage/cards/s/Sunforger.java @@ -92,7 +92,7 @@ class SunforgerEffect extends OneShotEffect { /** * 10/1/2005 Any card you find must be legally castable (for * example, you have to be able to choose a legal target for - * it). If you can’t find a castable card (or choose not to), + * it). If you can't find a castable card (or choose not to), * nothing happens and you shuffle your library. */ diff --git a/Mage.Sets/src/mage/cards/s/SurveyorsScope.java b/Mage.Sets/src/mage/cards/s/SurveyorsScope.java index 51cb6bc1ae6..aa0c1ee5501 100644 --- a/Mage.Sets/src/mage/cards/s/SurveyorsScope.java +++ b/Mage.Sets/src/mage/cards/s/SurveyorsScope.java @@ -75,7 +75,7 @@ class SurveyorsScopeEffect extends OneShotEffect { } } game.informPlayers(new StringBuilder("Surveyor's Scope: X = ").append(numberOfLands).toString()); - // 10/17/2013 If no players control at least two more lands than you when the ability resolves, you’ll still search and shuffle your library. + // 10/17/2013 If no players control at least two more lands than you when the ability resolves, you'll still search and shuffle your library. return new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, numberOfLands, StaticFilters.FILTER_CARD_BASIC_LAND)).apply(game, source); } return false; diff --git a/Mage.Sets/src/mage/cards/t/TeferisProtection.java b/Mage.Sets/src/mage/cards/t/TeferisProtection.java index d6d40476710..32af72c7cd7 100644 --- a/Mage.Sets/src/mage/cards/t/TeferisProtection.java +++ b/Mage.Sets/src/mage/cards/t/TeferisProtection.java @@ -59,11 +59,11 @@ class TeferisProtectionEffect extends OneShotEffect { * * 25.08.2017 If a player has protection from everything, it means three * things: 1) All damage that would be dealt to that player is prevented. 2) - * Auras can’t be attached to that player. 3) That player can’t be the + * Auras can't be attached to that player. 3) That player can't be the * target of spells or abilities. * * 25.08.2017 Nothing other than the specified events are prevented or - * illegal. An effect that doesn’t target you could still cause you to + * illegal. An effect that doesn't target you could still cause you to * discard cards, for example. Creatures can still attack you while you have * protection from everything, although combat damage that they would deal * to you will be prevented. diff --git a/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java b/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java index c8676da8ed7..6db23b4324d 100644 --- a/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java +++ b/Mage.Sets/src/mage/cards/t/TempleOfAclazotz.java @@ -35,7 +35,7 @@ public final class TempleOfAclazotz extends CardImpl { // {T}: Add {B} this.addAbility(new BlackManaAbility()); - // {T}, Sacrifice a creature: You gain life equal to the sacrificed creature’s toughness. + // {T}, Sacrifice a creature: You gain life equal to the sacrificed creature's toughness. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TempleOfAclazotzEffect(), new TapSourceCost()); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TetsukoUmezawaFugitive.java b/Mage.Sets/src/mage/cards/t/TetsukoUmezawaFugitive.java index 8074148df42..7b4c760e121 100644 --- a/Mage.Sets/src/mage/cards/t/TetsukoUmezawaFugitive.java +++ b/Mage.Sets/src/mage/cards/t/TetsukoUmezawaFugitive.java @@ -43,9 +43,9 @@ public final class TetsukoUmezawaFugitive extends CardImpl { this.power = new MageInt(1); this.toughness = new MageInt(3); - // Creatures you control with power or toughness 1 or less can’t be blocked. + // Creatures you control with power or toughness 1 or less can't be blocked. Effect effect = new CantBeBlockedAllEffect(filter, Duration.Custom); - effect.setText("Creatures you control with power or toughness 1 or less can’t be blocked"); + effect.setText("Creatures you control with power or toughness 1 or less can't be blocked"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/t/ThoughtHemorrhage.java b/Mage.Sets/src/mage/cards/t/ThoughtHemorrhage.java index 3b51695df99..bec111276c5 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtHemorrhage.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtHemorrhage.java @@ -1,4 +1,3 @@ - package mage.cards.t; import java.util.LinkedHashSet; @@ -8,7 +7,7 @@ import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -34,7 +33,7 @@ public final class ThoughtHemorrhage extends CardImpl { // Name a nonland card. Target player reveals their hand. Thought Hemorrhage deals 3 damage to that player for each card with that name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles their library. this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME)); this.getSpellAbility().addEffect(new ThoughtHemorrhageEffect()); } @@ -50,7 +49,10 @@ public final class ThoughtHemorrhage extends CardImpl { class ThoughtHemorrhageEffect extends OneShotEffect { - static final String rule = "Target player reveals their hand. {this} deals 3 damage to that player for each card with that name revealed this way. Search that player's graveyard, hand, and library for all cards with that name and exile them. Then that player shuffles their library"; + static final String rule = "Target player reveals their hand. " + + "{this} deals 3 damage to that player for each card with the chosen name revealed this way. " + + "Search that player's graveyard, hand, and library for all cards with that name and exile them. " + + "Then that player shuffles their library"; public ThoughtHemorrhageEffect() { super(Outcome.Exile); @@ -65,7 +67,7 @@ class ThoughtHemorrhageEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (sourceObject != null && controller != null && cardName != null && !cardName.isEmpty()) { Player targetPlayer = game.getPlayer(source.getFirstTarget()); if (targetPlayer != null) { diff --git a/Mage.Sets/src/mage/cards/t/TimeToFeed.java b/Mage.Sets/src/mage/cards/t/TimeToFeed.java index b35dce2746d..71c71441f21 100644 --- a/Mage.Sets/src/mage/cards/t/TimeToFeed.java +++ b/Mage.Sets/src/mage/cards/t/TimeToFeed.java @@ -31,11 +31,11 @@ import mage.target.common.TargetCreaturePermanent; /** * Time to Feed has two targets: a creature an opponent controls and a creature you control. * If only one of those creatures is a legal target when Time to Feed tries to resolve, the - * creatures won’t fight and neither will deal or be dealt damage. However, you’ll still gain - * 3 life when the creature you don’t control dies that turn, even if it was the illegal target as Time to Feed resolved. + * creatures won't fight and neither will deal or be dealt damage. However, you'll still gain + * 3 life when the creature you don't control dies that turn, even if it was the illegal target as Time to Feed resolved. * If neither creature is a legal target when Time to Feed tries to resolve, the spell will * be countered and none of its effects will happen. - * If the first target creature dies that turn, you’ll gain 3 life no matter what caused the creature to die or who controls the creature at that time. + * If the first target creature dies that turn, you'll gain 3 life no matter what caused the creature to die or who controls the creature at that time. * * @author LevelX2 */ diff --git a/Mage.Sets/src/mage/cards/t/TombRobber.java b/Mage.Sets/src/mage/cards/t/TombRobber.java index 9b36f323b0e..284104058d2 100644 --- a/Mage.Sets/src/mage/cards/t/TombRobber.java +++ b/Mage.Sets/src/mage/cards/t/TombRobber.java @@ -33,7 +33,7 @@ public final class TombRobber extends CardImpl { // Menace this.addAbility(new MenaceAbility(false)); - // {1}, Discard a card: Tomb Robber explores. (Reveal the top card of your library. Put that card into your hand if it’s a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.) + // {1}, Discard a card: Tomb Robber explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on this creature, then put the card back or put it into your graveyard.) Effect effect = new ExploreSourceEffect(true, "{this}"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new DiscardCardCost()); ability.addCost(new ManaCostsImpl("{1}")); diff --git a/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java b/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java index 8c84c3077d2..2ed94431b8c 100644 --- a/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java +++ b/Mage.Sets/src/mage/cards/t/TrueNameNemesis.java @@ -21,14 +21,14 @@ import mage.game.stack.StackObject; /** * Protection from a player is a new variant of the protection ability. It means - * the following: -- True-Name Nemesis can’t be the target of spells or - * abilities controlled by the chosen player. -- True-Name Nemesis can’t be + * the following: -- True-Name Nemesis can't be the target of spells or + * abilities controlled by the chosen player. -- True-Name Nemesis can't be * enchanted by Auras or equipped by Equipment controlled by the chosen player. * (The same is true for Fortifications controlled by the chosen player, if - * True-Name Nemesis becomes a land.) -- True-Name Nemesis can’t be blocked by + * True-Name Nemesis becomes a land.) -- True-Name Nemesis can't be blocked by * creatures controlled by the chosen player. -- All damage that would be dealt * to True-Name Nemesis by sources controlled by the chosen player is prevented. - * (The same is true for sources owned by the chosen player that don’t have + * (The same is true for sources owned by the chosen player that don't have * controllers.) * * @author LevelX2 diff --git a/Mage.Sets/src/mage/cards/t/TunnelVision.java b/Mage.Sets/src/mage/cards/t/TunnelVision.java index b3433ed45ea..e7b2e0d9bc2 100644 --- a/Mage.Sets/src/mage/cards/t/TunnelVision.java +++ b/Mage.Sets/src/mage/cards/t/TunnelVision.java @@ -1,10 +1,9 @@ - package mage.cards.t; import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -29,7 +28,7 @@ public final class TunnelVision extends CardImpl { // Name a card. Target player reveals cards from the top of their library until the named card is revealed. // If it is, that player puts the rest of the revealed cards into their graveyard and puts the named card on top of their library. // Otherwise, the player shuffles their library. - this.getSpellAbility().addEffect(new NameACardEffect(NameACardEffect.TypeOfName.ALL)); + this.getSpellAbility().addEffect(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.ALL)); this.getSpellAbility().addEffect(new TunnelVisionEffect()); this.getSpellAbility().addTarget(new TargetPlayer()); } @@ -48,7 +47,11 @@ class TunnelVisionEffect extends OneShotEffect { public TunnelVisionEffect() { super(Outcome.Benefit); - this.staticText = "Target player reveals cards from the top of their library until the named card is revealed. If it is, that player puts the rest of the revealed cards into their graveyard and puts the named card on top of their library. Otherwise, the player shuffles their library."; + this.staticText = "Target player reveals cards from the top of their library " + + "until a card with that name is revealed. If it is, that player puts " + + "the rest of the revealed cards into their graveyard and " + + "puts the card with the chosen name on top of their library. " + + "Otherwise, the player shuffles their library"; } public TunnelVisionEffect(final TunnelVisionEffect effect) { @@ -63,7 +66,7 @@ class TunnelVisionEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY); if (targetPlayer == null || cardName == null || cardName.isEmpty()) { return false; } diff --git a/Mage.Sets/src/mage/cards/u/UndyingFlames.java b/Mage.Sets/src/mage/cards/u/UndyingFlames.java index 15b7ce282c2..acbfe4a5664 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingFlames.java +++ b/Mage.Sets/src/mage/cards/u/UndyingFlames.java @@ -1,4 +1,3 @@ - package mage.cards.u; import java.util.UUID; @@ -64,7 +63,7 @@ class UndyingFlamesEffect extends OneShotEffect { while (controller.getLibrary().hasCards() && controller.isInGame()) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { - controller.moveCards(card, Zone.LIBRARY, source, game); + controller.moveCards(card, Zone.EXILED, source, game); if (!card.isLand()) { new DamageTargetEffect(card.getConvertedManaCost()).apply(game, source); break; diff --git a/Mage.Sets/src/mage/cards/u/Upwelling.java b/Mage.Sets/src/mage/cards/u/Upwelling.java index 16ad1b7dd10..b5711a62121 100644 --- a/Mage.Sets/src/mage/cards/u/Upwelling.java +++ b/Mage.Sets/src/mage/cards/u/Upwelling.java @@ -46,7 +46,7 @@ class UpwellingRuleEffect extends ContinuousEffectImpl { public UpwellingRuleEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Players don’t lose unspent mana as steps and phases end"; + staticText = "Players don't lose unspent mana as steps and phases end"; } public UpwellingRuleEffect(final UpwellingRuleEffect effect) { diff --git a/Mage.Sets/src/mage/cards/u/UrzasRuinousBlast.java b/Mage.Sets/src/mage/cards/u/UrzasRuinousBlast.java index b0e6b9cd20e..969569b7436 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasRuinousBlast.java +++ b/Mage.Sets/src/mage/cards/u/UrzasRuinousBlast.java @@ -19,7 +19,7 @@ import mage.filter.predicate.mageobject.SupertypePredicate; */ public final class UrzasRuinousBlast extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("nonland permanents that aren’t legendary"); + private static final FilterPermanent filter = new FilterPermanent("nonland permanents that aren't legendary"); static { filter.add(Predicates.not(new CardTypePredicate(CardType.LAND))); @@ -33,7 +33,7 @@ public final class UrzasRuinousBlast extends CardImpl { // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) this.addAbility(new LegendarySpellAbility()); - // Exile all nonland permanents that aren’t legendary. + // Exile all nonland permanents that aren't legendary. this.getSpellAbility().addEffect(new ExileAllEffect(filter)); } diff --git a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java index 09c5603dce7..2f6d1d3d3f7 100644 --- a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java +++ b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java @@ -98,7 +98,7 @@ class VialSmasherTheFierceTriggeredAbility extends SpellCastControllerTriggeredA @Override public String getRule() { return "Whenever you cast your first spell each turn, choose an opponent at random. " - + "{this} deals damage equal to that spell’s converted mana cost to that player or a planeswalker that player controls"; + + "{this} deals damage equal to that spell's converted mana cost to that player or a planeswalker that player controls"; } } @@ -106,7 +106,7 @@ class VialSmasherTheFierceEffect extends OneShotEffect { public VialSmasherTheFierceEffect() { super(Outcome.Damage); - this.staticText = "{this} choose an opponent at random. {this} deals damage equal to that spell’s converted mana cost to that player or a planeswalker that player controls"; + this.staticText = "{this} choose an opponent at random. {this} deals damage equal to that spell's converted mana cost to that player or a planeswalker that player controls"; } public VialSmasherTheFierceEffect(final VialSmasherTheFierceEffect effect) { diff --git a/Mage.Sets/src/mage/cards/v/VirtussManeuver.java b/Mage.Sets/src/mage/cards/v/VirtussManeuver.java index 41de39ef5cb..0d02a30405f 100644 --- a/Mage.Sets/src/mage/cards/v/VirtussManeuver.java +++ b/Mage.Sets/src/mage/cards/v/VirtussManeuver.java @@ -1,4 +1,3 @@ - package mage.cards.v; import java.util.ArrayList; @@ -67,7 +66,7 @@ class VirtussManeuverEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); ChooseFriendsAndFoes choice = new ChooseFriendsAndFoes(); if (!choice.chooseFriendOrFoe(controller, source, game)) { return false; diff --git a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java index a538287e177..c2cdda72625 100644 --- a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java +++ b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java @@ -1,4 +1,3 @@ - package mage.cards.v; import java.util.UUID; @@ -8,7 +7,7 @@ import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -28,7 +27,7 @@ import mage.game.events.GameEvent.EventType; public final class VoidstoneGargoyle extends CardImpl { public VoidstoneGargoyle(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}"); this.subtype.add(SubType.GARGOYLE); this.power = new MageInt(3); @@ -37,7 +36,7 @@ public final class VoidstoneGargoyle extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // As Voidstone Gargoyle enters the battlefield, name a nonland card. - this.addAbility(new AsEntersBattlefieldAbility(new NameACardEffect(NameACardEffect.TypeOfName.NON_LAND_NAME))); + this.addAbility(new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NON_LAND_NAME))); // The named card can't be cast. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new VoidstoneGargoyleReplacementEffect1())); // Activated abilities of sources with the chosen name can't be activated. @@ -58,7 +57,7 @@ class VoidstoneGargoyleReplacementEffect1 extends ContinuousRuleModifyingEffectI public VoidstoneGargoyleReplacementEffect1() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "The named card can't be cast"; + staticText = "Spells with the chosen name can't be cast"; } public VoidstoneGargoyleReplacementEffect1(final VoidstoneGargoyleReplacementEffect1 effect) { @@ -79,7 +78,7 @@ class VoidstoneGargoyleReplacementEffect1 extends ContinuousRuleModifyingEffectI public String getInfoMessage(Ability source, GameEvent event, Game game) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { - return "You can't cast a card with that name (" + mageObject.getIdName() + ")."; + return "You can't cast a spell with that name (" + mageObject.getIdName() + ")."; } return null; } @@ -89,7 +88,7 @@ class VoidstoneGargoyleReplacementEffect1 extends ContinuousRuleModifyingEffectI if (event.getType() == GameEvent.EventType.CAST_SPELL) { MageObject object = game.getObject(event.getSourceId()); if (object != null - && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } @@ -132,7 +131,7 @@ class VoidstoneGargoyleRuleModifyingEffect2 extends ContinuousRuleModifyingEffec public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == EventType.ACTIVATE_ABILITY) { MageObject object = game.getObject(event.getSourceId()); - if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY))) { + if (object != null && object.getName().equals(game.getState().getValue(source.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) { return true; } } diff --git a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java index d8c1f81c0f4..4a633939796 100644 --- a/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java +++ b/Mage.Sets/src/mage/cards/v/VorinclexVoiceOfHunger.java @@ -1,19 +1,18 @@ - package mage.cards.v; import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.TapForManaAllTriggeredManaAbility; -import mage.abilities.effects.mana.AddManaOfAnyTypeProducedEffect; import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect; import mage.abilities.effects.common.ManaEffect; +import mage.abilities.effects.mana.AddManaOfAnyTypeProducedEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.SetTargetPointer; +import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.Zone; import mage.filter.common.FilterControlledLandPermanent; @@ -30,7 +29,7 @@ import mage.target.targetpointer.FixedTarget; public final class VorinclexVoiceOfHunger extends CardImpl { public VorinclexVoiceOfHunger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{G}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.PRAETOR); @@ -63,8 +62,6 @@ public final class VorinclexVoiceOfHunger extends CardImpl { class VorinclexTriggeredAbility2 extends TriggeredAbilityImpl { - private static final String staticText = "Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step."; - public VorinclexTriggeredAbility2() { super(Zone.BATTLEFIELD, new DontUntapInControllersNextUntapStepTargetEffect()); } @@ -97,6 +94,6 @@ class VorinclexTriggeredAbility2 extends TriggeredAbilityImpl { @Override public String getRule() { - return staticText; + return "Whenever an opponent taps a land for mana, that land doesn't untap during its controller's next untap step."; } } diff --git a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java index ff55b73e0eb..417f18ace42 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java @@ -69,7 +69,7 @@ public final class VulshokBattlemaster extends CardImpl { filter.add(new SubtypePredicate(SubType.EQUIPMENT)); for (Permanent equipment : game.getBattlefield().getAllActivePermanents(filter, game)) { if (equipment != null) { - //If an Equipment can’t equip Vulshok Battlemaster, it isn’t attached to the Battlemaster, and it doesn’t become unattached (if it’s attached to a creature). (http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=48125) + //If an Equipment can't equip Vulshok Battlemaster, it isn't attached to the Battlemaster, and it doesn't become unattached (if it's attached to a creature). (http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=48125) if (!battlemaster.cantBeAttachedBy(equipment, game)) { battlemaster.addAttachment(equipment.getId(), game); } diff --git a/Mage.Sets/src/mage/cards/w/WordOfUndoing.java b/Mage.Sets/src/mage/cards/w/WordOfUndoing.java index ba8b5c68a52..a249db86de7 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfUndoing.java +++ b/Mage.Sets/src/mage/cards/w/WordOfUndoing.java @@ -27,7 +27,7 @@ public final class WordOfUndoing extends CardImpl { public WordOfUndoing(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); - //Return target creature and all white Auras you own attached to it to their owners’ hands. + //Return target creature and all white Auras you own attached to it to their owners' hands. this.getSpellAbility().addEffect(new WordOfUndoingReturnToHandEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); @@ -47,7 +47,7 @@ class WordOfUndoingReturnToHandEffect extends OneShotEffect { public WordOfUndoingReturnToHandEffect() { super(Outcome.ReturnToHand); - this.staticText = "Return target creature and all white Auras you own attached to it to their owners’ hands."; + this.staticText = "Return target creature and all white Auras you own attached to it to their owners' hands."; } public WordOfUndoingReturnToHandEffect(final WordOfUndoingReturnToHandEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/Worldpurge.java b/Mage.Sets/src/mage/cards/w/Worldpurge.java index 91fb453ae36..5fff60ffe75 100644 --- a/Mage.Sets/src/mage/cards/w/Worldpurge.java +++ b/Mage.Sets/src/mage/cards/w/Worldpurge.java @@ -30,7 +30,7 @@ public final class Worldpurge extends CardImpl { public Worldpurge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{W/U}{W/U}{W/U}{W/U}"); - // Return all permanents to their owners’ hands. Each player chooses up to seven cards in their hand, then shuffles the rest into their library. Each player loses all unspent mana. + // Return all permanents to their owners' hands. Each player chooses up to seven cards in their hand, then shuffles the rest into their library. Each player loses all unspent mana. this.getSpellAbility().addEffect(new WorldpurgeEffect()); } @@ -49,7 +49,7 @@ class WorldpurgeEffect extends OneShotEffect { public WorldpurgeEffect() { super(Outcome.Discard); - this.staticText = "Return all permanents to their owners’ hands. Each player chooses up to seven cards in their hand, then shuffles the rest into their library. Each player loses all unspent mana"; + this.staticText = "Return all permanents to their owners' hands. Each player chooses up to seven cards in their hand, then shuffles the rest into their library. Each player loses all unspent mana"; } public WorldpurgeEffect(final WorldpurgeEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WormfangNewt.java b/Mage.Sets/src/mage/cards/w/WormfangNewt.java index 6f3ec217b7e..ebb66ead46c 100644 --- a/Mage.Sets/src/mage/cards/w/WormfangNewt.java +++ b/Mage.Sets/src/mage/cards/w/WormfangNewt.java @@ -43,7 +43,7 @@ public final class WormfangNewt extends CardImpl { ability1.addTarget(target); this.addAbility(ability1); - // When Wormfang Turtle leaves the battlefield, return the exiled card to the battlefield under its owner’s control. + // When Wormfang Turtle leaves the battlefield, return the exiled card to the battlefield under its owner's control. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/w/WormfangTurtle.java b/Mage.Sets/src/mage/cards/w/WormfangTurtle.java index 13ba83782df..b33bec0c8d8 100644 --- a/Mage.Sets/src/mage/cards/w/WormfangTurtle.java +++ b/Mage.Sets/src/mage/cards/w/WormfangTurtle.java @@ -43,7 +43,7 @@ public final class WormfangTurtle extends CardImpl { ability1.addTarget(target); this.addAbility(ability1); - // When Wormfang Turtle leaves the battlefield, return the exiled card to the battlefield under its owner’s control. + // When Wormfang Turtle leaves the battlefield, return the exiled card to the battlefield under its owner's control. Ability ability2 = new LeavesBattlefieldTriggeredAbility(new ReturnFromExileForSourceEffect(Zone.BATTLEFIELD), false); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java b/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java index 385cfdade83..a1d1d16c90b 100644 --- a/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java +++ b/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java @@ -42,7 +42,7 @@ public final class YawgmothsVileOffering extends CardImpl { this.addAbility(new LegendarySpellAbility()); // Put up to one target creature or planeswalker from a graveyard onto the battlefield under your control. - // Destroy up to one target creature or planeswalker. Exile Yawgmoth’s Vile Offering. + // Destroy up to one target creature or planeswalker. Exile Yawgmoth's Vile Offering. this.getSpellAbility().addEffect(new YawgmothsVileOfferingEffect()); this.getSpellAbility().addTarget(new TargetCardInGraveyard(0, 1, cardFilter)); this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker(0, 1, new FilterCreatureOrPlaneswalkerPermanent(), false)); diff --git a/Mage.Sets/src/mage/sets/Battlebond.java b/Mage.Sets/src/mage/sets/Battlebond.java index cc83734d192..b485fbb218b 100644 --- a/Mage.Sets/src/mage/sets/Battlebond.java +++ b/Mage.Sets/src/mage/sets/Battlebond.java @@ -115,6 +115,7 @@ public final class Battlebond extends ExpansionSet { cards.add(new SetCardInfo("Giant Growth", 200, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); cards.add(new SetCardInfo("Goblin Razerunners", 179, Rarity.RARE, mage.cards.g.GoblinRazerunners.class)); cards.add(new SetCardInfo("Gold-Forged Sentinel", 236, Rarity.UNCOMMON, mage.cards.g.GoldForgedSentinel.class)); + cards.add(new SetCardInfo("Gorm the Great", 8, Rarity.RARE, mage.cards.g.GormTheGreat.class)); cards.add(new SetCardInfo("Greater Good", 201, Rarity.RARE, mage.cards.g.GreaterGood.class)); cards.add(new SetCardInfo("Grotesque Mutation", 145, Rarity.COMMON, mage.cards.g.GrotesqueMutation.class)); cards.add(new SetCardInfo("Grothama, All-Devouring", 71, Rarity.MYTHIC, mage.cards.g.GrothamaAllDevouring.class)); diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index 8ad48668f8f..cbdbb2ba9f5 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -28,6 +28,7 @@ public final class CoreSet2019 extends ExpansionSet { this.maxCardNumberInBooster = 280; cards.add(new SetCardInfo("Act of Treason", 127, Rarity.COMMON, mage.cards.a.ActOfTreason.class)); cards.add(new SetCardInfo("Anticipate", 44, Rarity.COMMON, mage.cards.a.Anticipate.class)); + cards.add(new SetCardInfo("Apex of Power", 129, Rarity.MYTHIC, mage.cards.a.ApexOfPower.class)); cards.add(new SetCardInfo("Cancel", 48, Rarity.COMMON, mage.cards.c.Cancel.class)); cards.add(new SetCardInfo("Catalyst Elemental", 132, Rarity.COMMON, mage.cards.c.CatalystElemental.class)); cards.add(new SetCardInfo("Daybreak Chaplain", 10, Rarity.COMMON, mage.cards.d.DaybreakChaplain.class)); diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index fc91128ae47..fc2e781f9c6 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -1,4 +1,3 @@ - package mage.sets; import mage.cards.ExpansionSet; @@ -191,6 +190,7 @@ public final class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Kjeldoran Skyknight", 40, Rarity.COMMON, mage.cards.k.KjeldoranSkyknight.class)); cards.add(new SetCardInfo("Kjeldoran Warrior", 41, Rarity.COMMON, mage.cards.k.KjeldoranWarrior.class)); cards.add(new SetCardInfo("Knight of Stromgald", 138, Rarity.UNCOMMON, mage.cards.k.KnightOfStromgald.class)); + cards.add(new SetCardInfo("Krovikan Elementalist", 139, Rarity.UNCOMMON, mage.cards.k.KrovikanElementalist.class)); cards.add(new SetCardInfo("Krovikan Fetish", 140, Rarity.COMMON, mage.cards.k.KrovikanFetish.class)); cards.add(new SetCardInfo("Krovikan Sorcerer", 81, Rarity.COMMON, mage.cards.k.KrovikanSorcerer.class)); cards.add(new SetCardInfo("Land Cap", 357, Rarity.RARE, mage.cards.l.LandCap.class)); diff --git a/Mage.Sets/src/mage/sets/Invasion.java b/Mage.Sets/src/mage/sets/Invasion.java index 65a342d2e12..b69da56388a 100644 --- a/Mage.Sets/src/mage/sets/Invasion.java +++ b/Mage.Sets/src/mage/sets/Invasion.java @@ -88,6 +88,7 @@ public final class Invasion extends ExpansionSet { cards.add(new SetCardInfo("Darigaaz's Attendant", 301, Rarity.UNCOMMON, mage.cards.d.DarigaazsAttendant.class)); cards.add(new SetCardInfo("Darigaaz, the Igniter", 243, Rarity.RARE, mage.cards.d.DarigaazTheIgniter.class)); cards.add(new SetCardInfo("Defiling Tears", 99, Rarity.UNCOMMON, mage.cards.d.DefilingTears.class)); + cards.add(new SetCardInfo("Desperate Research", 100, Rarity.RARE, mage.cards.d.DesperateResearch.class)); cards.add(new SetCardInfo("Devouring Strossus", 101, Rarity.RARE, mage.cards.d.DevouringStrossus.class)); cards.add(new SetCardInfo("Dismantling Blow", 14, Rarity.COMMON, mage.cards.d.DismantlingBlow.class)); cards.add(new SetCardInfo("Disrupt", 51, Rarity.UNCOMMON, mage.cards.d.Disrupt.class)); diff --git a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java b/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java index 327bfad93ff..a38fb899972 100644 --- a/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java +++ b/Mage.Sets/src/mage/sets/JiangYangguMuYanling.java @@ -1,8 +1,3 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ package mage.sets; import mage.cards.ExpansionSet; @@ -22,10 +17,20 @@ public final class JiangYangguMuYanling extends ExpansionSet { } private JiangYangguMuYanling() { - super("Global Series: Jiang Yanggu & Mu Yanling", "GS1", ExpansionSet.buildDate(2018, 6, 22), SetType.SUPPLEMENTAL); + super("Global Series: Jiang Yanggu & Mu Yanling", "GS1", ExpansionSet.buildDate(2018, 6, 22), SetType.SUPPLEMENTAL_STANDARD_LEGAL); this.blockName = "Global Series"; - this.hasBasicLands = false; + this.hasBasicLands = true; + cards.add(new SetCardInfo("Brilliant Plan", 17, Rarity.UNCOMMON, mage.cards.b.BrilliantPlan.class)); + cards.add(new SetCardInfo("Cloak of Mists", 13, Rarity.COMMON, mage.cards.c.CloakOfMists.class)); + cards.add(new SetCardInfo("Forest", 40, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Giant Spider", 27, Rarity.COMMON, mage.cards.g.GiantSpider.class)); + cards.add(new SetCardInfo("Island", 21, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Jiang Yanggu", 22, Rarity.MYTHIC, mage.cards.j.JiangYanggu.class)); + cards.add(new SetCardInfo("Meandering River", 19, Rarity.COMMON, mage.cards.m.MeanderingRiver.class)); + cards.add(new SetCardInfo("Mountain", 39, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mu Yanling", 1, Rarity.MYTHIC, mage.cards.m.MuYanling.class)); + cards.add(new SetCardInfo("Plains", 20, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Timber Gorge", 38, Rarity.COMMON, mage.cards.t.TimberGorge.class)); + cards.add(new SetCardInfo("Welkin Tern", 5, Rarity.COMMON, mage.cards.w.WelkinTern.class)); } } diff --git a/Mage.Sets/src/mage/sets/MercadianMasques.java b/Mage.Sets/src/mage/sets/MercadianMasques.java index a4d10d4350f..17e4fd6dcc2 100644 --- a/Mage.Sets/src/mage/sets/MercadianMasques.java +++ b/Mage.Sets/src/mage/sets/MercadianMasques.java @@ -33,6 +33,7 @@ public final class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Armistice", 3, Rarity.RARE, mage.cards.a.Armistice.class)); cards.add(new SetCardInfo("Arms Dealer", 172, Rarity.UNCOMMON, mage.cards.a.ArmsDealer.class)); cards.add(new SetCardInfo("Arrest", 4, Rarity.UNCOMMON, mage.cards.a.Arrest.class)); + cards.add(new SetCardInfo("Assembly Hall", 286, Rarity.RARE, mage.cards.a.AssemblyHall.class)); cards.add(new SetCardInfo("Ballista Squad", 5, Rarity.UNCOMMON, mage.cards.b.BallistaSquad.class)); cards.add(new SetCardInfo("Balloon Peddler", 59, Rarity.COMMON, mage.cards.b.BalloonPeddler.class)); cards.add(new SetCardInfo("Battle Rampart", 173, Rarity.COMMON, mage.cards.b.BattleRampart.class)); @@ -120,6 +121,7 @@ public final class MercadianMasques extends ExpansionSet { cards.add(new SetCardInfo("Extortion", 135, Rarity.RARE, mage.cards.e.Extortion.class)); cards.add(new SetCardInfo("Eye of Ramos", 294, Rarity.RARE, mage.cards.e.EyeOfRamos.class)); cards.add(new SetCardInfo("False Demise", 80, Rarity.UNCOMMON, mage.cards.f.FalseDemise.class)); + cards.add(new SetCardInfo("Ferocity", 245, Rarity.COMMON, mage.cards.f.Ferocity.class)); cards.add(new SetCardInfo("Flailing Manticore", 187, Rarity.RARE, mage.cards.f.FlailingManticore.class)); cards.add(new SetCardInfo("Flailing Ogre", 188, Rarity.UNCOMMON, mage.cards.f.FlailingOgre.class)); cards.add(new SetCardInfo("Flailing Soldier", 189, Rarity.COMMON, mage.cards.f.FlailingSoldier.class)); diff --git a/Mage.Sets/src/mage/sets/Mirage.java b/Mage.Sets/src/mage/sets/Mirage.java index e001805c06b..d17010b89dc 100644 --- a/Mage.Sets/src/mage/sets/Mirage.java +++ b/Mage.Sets/src/mage/sets/Mirage.java @@ -44,6 +44,7 @@ public final class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Barbed Foliage", 207, Rarity.UNCOMMON, mage.cards.b.BarbedFoliage.class)); cards.add(new SetCardInfo("Barbed-Back Wurm", 105, Rarity.UNCOMMON, mage.cards.b.BarbedBackWurm.class)); cards.add(new SetCardInfo("Bay Falcon", 54, Rarity.COMMON, mage.cards.b.BayFalcon.class)); + cards.add(new SetCardInfo("Bazaar of Wonders", 55, Rarity.RARE, mage.cards.b.BazaarOfWonders.class)); cards.add(new SetCardInfo("Benthic Djinn", 257, Rarity.RARE, mage.cards.b.BenthicDjinn.class)); cards.add(new SetCardInfo("Binding Agony", 106, Rarity.COMMON, mage.cards.b.BindingAgony.class)); cards.add(new SetCardInfo("Blighted Shaman", 107, Rarity.UNCOMMON, mage.cards.b.BlightedShaman.class)); @@ -65,6 +66,7 @@ public final class Mirage extends ExpansionSet { cards.add(new SetCardInfo("Chaos Charm", 163, Rarity.COMMON, mage.cards.c.ChaosCharm.class)); cards.add(new SetCardInfo("Chaosphere", 164, Rarity.RARE, mage.cards.c.Chaosphere.class)); cards.add(new SetCardInfo("Charcoal Diamond", 296, Rarity.UNCOMMON, mage.cards.c.CharcoalDiamond.class)); + cards.add(new SetCardInfo("Chariot of the Sun", 262, Rarity.UNCOMMON, mage.cards.c.ChariotOfTheSun.class)); cards.add(new SetCardInfo("Choking Sands", 113, Rarity.COMMON, mage.cards.c.ChokingSands.class)); cards.add(new SetCardInfo("Cinder Cloud", 165, Rarity.UNCOMMON, mage.cards.c.CinderCloud.class)); cards.add(new SetCardInfo("Civic Guildmage", 7, Rarity.COMMON, mage.cards.c.CivicGuildmage.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasDestiny.java b/Mage.Sets/src/mage/sets/UrzasDestiny.java index 479176fbf09..0d1da153d20 100644 --- a/Mage.Sets/src/mage/sets/UrzasDestiny.java +++ b/Mage.Sets/src/mage/sets/UrzasDestiny.java @@ -40,6 +40,7 @@ public final class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Braidwood Cup", 126, Rarity.UNCOMMON, mage.cards.b.BraidwoodCup.class)); cards.add(new SetCardInfo("Braidwood Sextant", 127, Rarity.UNCOMMON, mage.cards.b.BraidwoodSextant.class)); cards.add(new SetCardInfo("Brass Secretary", 128, Rarity.UNCOMMON, mage.cards.b.BrassSecretary.class)); + cards.add(new SetCardInfo("Brine Seer", 28, Rarity.UNCOMMON, mage.cards.b.BrineSeer.class)); cards.add(new SetCardInfo("Bubbling Beebles", 29, Rarity.COMMON, mage.cards.b.BubblingBeebles.class)); cards.add(new SetCardInfo("Bubbling Muck", 54, Rarity.COMMON, mage.cards.b.BubblingMuck.class)); cards.add(new SetCardInfo("Caltrops", 129, Rarity.UNCOMMON, mage.cards.c.Caltrops.class)); @@ -48,6 +49,7 @@ public final class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Capashen Templar", 5, Rarity.COMMON, mage.cards.c.CapashenTemplar.class)); cards.add(new SetCardInfo("Carnival of Souls", 55, Rarity.RARE, mage.cards.c.CarnivalOfSouls.class)); cards.add(new SetCardInfo("Chime of Night", 56, Rarity.COMMON, mage.cards.c.ChimeOfNight.class)); + cards.add(new SetCardInfo("Cinder Seer", 78, Rarity.UNCOMMON, mage.cards.c.CinderSeer.class)); cards.add(new SetCardInfo("Colos Yearling", 79, Rarity.COMMON, mage.cards.c.ColosYearling.class)); cards.add(new SetCardInfo("Compost", 102, Rarity.UNCOMMON, mage.cards.c.Compost.class)); cards.add(new SetCardInfo("Covetous Dragon", 80, Rarity.RARE, mage.cards.c.CovetousDragon.class)); @@ -80,6 +82,8 @@ public final class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Illuminated Wings", 34, Rarity.COMMON, mage.cards.i.IlluminatedWings.class)); cards.add(new SetCardInfo("Impatience", 88, Rarity.RARE, mage.cards.i.Impatience.class)); cards.add(new SetCardInfo("Iridescent Drake", 35, Rarity.UNCOMMON, mage.cards.i.IridescentDrake.class)); + cards.add(new SetCardInfo("Ivy Seer", 110, Rarity.UNCOMMON, mage.cards.i.IvySeer.class)); + cards.add(new SetCardInfo("Jasmine Seer", 10, Rarity.UNCOMMON, mage.cards.j.JasmineSeer.class)); cards.add(new SetCardInfo("Junk Diver", 132, Rarity.RARE, mage.cards.j.JunkDiver.class)); cards.add(new SetCardInfo("Keldon Champion", 90, Rarity.UNCOMMON, mage.cards.k.KeldonChampion.class)); cards.add(new SetCardInfo("Keldon Vandals", 91, Rarity.COMMON, mage.cards.k.KeldonVandals.class)); @@ -97,6 +101,7 @@ public final class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Metathran Soldier", 39, Rarity.COMMON, mage.cards.m.MetathranSoldier.class)); cards.add(new SetCardInfo("Momentum", 113, Rarity.UNCOMMON, mage.cards.m.Momentum.class)); cards.add(new SetCardInfo("Multani's Decree", 114, Rarity.COMMON, mage.cards.m.MultanisDecree.class)); + cards.add(new SetCardInfo("Nightshade Seer", 63, Rarity.UNCOMMON, mage.cards.n.NightshadeSeer.class)); cards.add(new SetCardInfo("Opalescence", 13, Rarity.RARE, mage.cards.o.Opalescence.class)); cards.add(new SetCardInfo("Opposition", 40, Rarity.RARE, mage.cards.o.Opposition.class)); cards.add(new SetCardInfo("Pattern of Rebirth", 115, Rarity.RARE, mage.cards.p.PatternOfRebirth.class)); diff --git a/Mage.Sets/src/mage/sets/Visions.java b/Mage.Sets/src/mage/sets/Visions.java index d2bfc1318e1..d06d7129f73 100644 --- a/Mage.Sets/src/mage/sets/Visions.java +++ b/Mage.Sets/src/mage/sets/Visions.java @@ -34,6 +34,7 @@ public final class Visions extends ExpansionSet { cards.add(new SetCardInfo("Army Ants", 126, Rarity.UNCOMMON, mage.cards.a.ArmyAnts.class)); cards.add(new SetCardInfo("Betrayal", 26, Rarity.COMMON, mage.cards.b.Betrayal.class)); cards.add(new SetCardInfo("Blanket of Night", 52, Rarity.UNCOMMON, mage.cards.b.BlanketOfNight.class)); + cards.add(new SetCardInfo("Bogardan Phoenix", 76, Rarity.RARE, mage.cards.b.BogardanPhoenix.class)); cards.add(new SetCardInfo("Brass-Talon Chimera", 142, Rarity.UNCOMMON, mage.cards.b.BrassTalonChimera.class)); cards.add(new SetCardInfo("Breathstealer's Crypt", 127, Rarity.RARE, mage.cards.b.BreathstealersCrypt.class)); cards.add(new SetCardInfo("Breezekeeper", 27, Rarity.COMMON, mage.cards.b.Breezekeeper.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/BloodMoonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/BloodMoonTest.java index 2d3d3f2779c..9fa648f4387 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/BloodMoonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/BloodMoonTest.java @@ -315,8 +315,8 @@ public class BloodMoonTest extends CardTestPlayerBase { * If Blood Moon is on the battlefield, Flagstones of Trokair will enter the * battlefield as a legendary non-basic Mountain. If Flagstones of Trokair * is put into the graveyard due to “Legends rule” or because it was - * destroyed, its ability doesn’t trigger, because it doesn’t exist: it - * won’t fetch you a Plains. + * destroyed, its ability doesn't trigger, because it doesn't exist: it + * won't fetch you a Plains. */ @Test public void testBloodMoonFlagstonesOfTrokair() { @@ -350,13 +350,13 @@ public class BloodMoonTest extends CardTestPlayerBase { } /** - * Because Blood Moon’s static ability operates only when it’s on the + * Because Blood Moon's static ability operates only when it's on the * battlefield and begins affecting any nonbasic lands immediately. In fact, - * Blood Moon’s effect is so quick that once a non-basic land hits the - * battlefield it’s going to be affected. Therefore: + * Blood Moon's effect is so quick that once a non-basic land hits the + * battlefield it's going to be affected. Therefore: * - * If a nonbasic land’s has EtB triggered abilities, these will not trigger - * because the ability isn’t there (it’s gone). Effects that modify the way + * If a nonbasic land's has EtB triggered abilities, these will not trigger + * because the ability isn't there (it's gone). Effects that modify the way * the land enters the battlefield are replacement effects. They are applied * before the permanent enters the battlefield and taking into account * continuous effects that already exist and would apply to the permanent. diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/SkylineCascadeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/SkylineCascadeTest.java index 3f8e8bda75b..93974d8ee32 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/SkylineCascadeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/enters/SkylineCascadeTest.java @@ -49,8 +49,8 @@ public class SkylineCascadeTest extends CardTestPlayerBase { /** * Reported bug on Skyline Cascade not working properly. * - * "Skyline Cascade’s triggered ability doesn't tap the creature. It can target any creature, tapped or untapped. - * If that creature is already untapped at the beginning of its controller’s next untap step, the effect won’t do anything." + * "Skyline Cascade's triggered ability doesn't tap the creature. It can target any creature, tapped or untapped. + * If that creature is already untapped at the beginning of its controller's next untap step, the effect won't do anything." * http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=402038 * * An untapped creature will remain untapped. diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/flicker/CloudshiftTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/flicker/CloudshiftTest.java index 87473214f4f..c43846eda9b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/flicker/CloudshiftTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/flicker/CloudshiftTest.java @@ -339,7 +339,7 @@ public class CloudshiftTest extends CardTestPlayerBase { * of the end step even if Flickerwisp is no longer on the battlefield. * 8/1/2008 If the permanent that returns to the battlefield has any * abilities that trigger at the beginning of the end step, those abilities - * won’t trigger that turn. + * won't trigger that turn. */ @Test public void testDoubleFlickerwisp() { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java index 1cd269f6f3d..c0fea22a22a 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/AfflictTest.java @@ -52,7 +52,7 @@ public class AfflictTest extends CardTestPlayerBase { // {T}: Add {C}. // {2}, {T}: Exile target creature you control. - // {4}, {T}, Sacrifice Endless Sands: Return each creature card exiled with Endless Sands to the battlefield under its owner’s control. + // {4}, {T}, Sacrifice Endless Sands: Return each creature card exiled with Endless Sands to the battlefield under its owner's control. addCard(Zone.BATTLEFIELD, playerA, "Endless Sands"); // Deathtouch diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ChampionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ChampionTest.java index 0989c155de6..d597ebdac92 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ChampionTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ChampionTest.java @@ -18,7 +18,7 @@ public class ChampionTest extends CardTestPlayerBase { * 702.71a Champion represents two triggered abilities. “Champion an [object]” means “When this * permanent enters the battlefield, sacrifice it unless you exile another [object] you control” and * “When this permanent leaves the battlefield, return the exiled card to the battlefield under its - * owner’s control.” + * owner's control.” * * 702.71b The two abilities represented by champion are linked. See rule 607, “Linked Abilities.” * diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConspireTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConspireTest.java index 9db84082bba..7239f96223c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConspireTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConspireTest.java @@ -20,7 +20,7 @@ public class ConspireTest extends CardTestPlayerBase { * “As an additional cost to cast this spell, you may tap two untapped * creatures you control that each share a color with it” and “When you cast * this spell, if its conspire cost was paid, copy it. If the spell has any - * targets, you may choose new targets for the copy.” Paying a spell’s + * targets, you may choose new targets for the copy.” Paying a spell's * conspire cost follows the rules for paying additional costs in rules * 601.2b and 601.2e–g. * diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java index a7c55a1cae0..0d81d1ae662 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ConstellationTest.java @@ -15,8 +15,8 @@ import org.mage.test.serverside.base.CardTestPlayerBase; public class ConstellationTest extends CardTestPlayerBase { /** - * Daxos's Torment {3}{B} Constellation — Whenever Daxos’s Torment or - * another enchantment enters the battlefield under your control, Daxos’s + * Daxos's Torment {3}{B} Constellation — Whenever Daxos's Torment or + * another enchantment enters the battlefield under your control, Daxos's * Torment becomes a 5/5 Demon creature with flying and haste in addition to * its other types until end of turn. */ @@ -135,10 +135,11 @@ public class ConstellationTest extends CardTestPlayerBase { @Test public void test_DaxosGotBoostWithLoseFlyAndGotItAgain() { // 112.10c If two or more effects add and remove the same ability, in general the most recent one prevails. - addCard(Zone.HAND, playerA, daxosCard, 1); - addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); - addCard(Zone.HAND, playerA, "Gravity Sphere", 1); // All creatures lose flying. - addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + addCard(Zone.HAND, playerA, daxosCard, 1); // {3}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + // All creatures lose flying. + addCard(Zone.HAND, playerA, "Gravity Sphere", 1); // World Enchantment {2}{R} + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6); // got fly on enter, lose on gravity, got fly on gravity enter castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, daxosCard); @@ -192,12 +193,12 @@ public class ConstellationTest extends CardTestPlayerBase { // 613.7 -- dependacy effects (Mephidross Vampire must ALWAYS wait Daxos effect, not timestamp) addCard(Zone.HAND, playerA, daxosCard, 1); addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); + // Each creature you control is a Vampire in addition to its other creature types + addCard(Zone.HAND, playerA, "Mephidross Vampire", 1); // {4}{B}{B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 8); // - addCard(Zone.HAND, playerA, "Mephidross Vampire", 1); // Each creature you control is a Vampire in addition to its other creature types - addCard(Zone.BATTLEFIELD, playerA, "Swamp", 6); - // - addCard(Zone.HAND, playerA, "Archetype of Courage", 1); // Enchantment to trigger Daxos - addCard(Zone.BATTLEFIELD, playerA, "Plains", 4); + addCard(Zone.HAND, playerA, "Archetype of Courage", 1); // Enchantment {1}{W}{W} to trigger Daxos + addCard(Zone.BATTLEFIELD, playerA, "Plains", 2); // dax cast castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, daxosCard); @@ -222,7 +223,7 @@ public class ConstellationTest extends CardTestPlayerBase { @Test public void test_DaxosGotBoostAndNewTypeByDependencyEffects() { - playDaxosAndVampire(false); + playDaxosAndVampire(false); // sfails sometimes playDaxosAndVampire(true); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CyclingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CyclingTest.java index 53e3e42c6f6..74583de4629 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CyclingTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/CyclingTest.java @@ -14,16 +14,16 @@ public class CyclingTest extends CardTestPlayerBase { /** * 702.28. Cycling 702.28a Cycling is an activated ability that functions - * only while the card with cycling is in a player’s hand. “Cycling [cost]” + * only while the card with cycling is in a player's hand. “Cycling [cost]” * means “[Cost], Discard this card: Draw a card.” 702.28b Although the - * cycling ability is playable only if the card is in a player’s hand, it + * cycling ability is playable only if the card is in a player's hand, it * continues to exist while the object is in play and in all other zones. * Therefore objects with cycling will be affected by effects that depend on * objects having one or more activated abilities. 702.28c Some cards with - * cycling have abilities that trigger when they’re cycled. “When you cycle + * cycling have abilities that trigger when they're cycled. “When you cycle * [this card]” means “When you discard [this card] to pay a cycling cost.” * These abilities trigger from whatever zone the card winds up in after - * it’s cycled. 702.28d Typecycling is a variant of the cycling ability. + * it's cycled. 702.28d Typecycling is a variant of the cycling ability. * “[Type]cycling [cost]” means “[Cost], Discard this card: Search your * library for a [type] card, reveal it, and put it into your hand. Then * shuffle your library.” This type is usually a subtype (as in @@ -32,7 +32,7 @@ public class CyclingTest extends CardTestPlayerBase { * abilities are cycling abilities, and typecycling costs are cycling costs. * Any cards that trigger when a player cycles a card will trigger when a * card is discarded to pay a typecycling cost. Any effect that stops - * players from cycling cards will stop players from activating cards’ + * players from cycling cards will stop players from activating cards' * typecycling abilities. Any effect that increases or reduces a cycling * cost will increase or reduce a typecycling cost. */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DashTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DashTest.java index 74607e2c447..90cf0d8bd90 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DashTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DashTest.java @@ -19,10 +19,10 @@ public class DashTest extends CardTestPlayerBase { * which may create a delayed triggered ability, and a static ability that * functions while the object with dash is on the battlefield. “Dash [cost]” * means “You may cast this card by paying [cost] rather that its mana - * cost,” “If this spell’s dash cost was paid, return the permanent this - * spell becomes to its owner’s hand at the beginning of the next end step,” - * and “As long as this permanent’s dash cost was paid, it has haste.” - * Paying a card’s dash cost follows the rules for paying alternative costs + * cost,” “If this spell's dash cost was paid, return the permanent this + * spell becomes to its owner's hand at the beginning of the next end step,” + * and “As long as this permanent's dash cost was paid, it has haste.” + * Paying a card's dash cost follows the rules for paying alternative costs * in rules 601.2b and 601.2e–g. * */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExploitTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExploitTest.java index c0570e45ae9..152bc50c776 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExploitTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ExploitTest.java @@ -21,8 +21,8 @@ public class ExploitTest extends CardTestPlayerBase { * 702.109b A creature with exploit “exploits a creature” when the controller of the exploit ability sacrifices a creature as that ability resolves. * * You choose whether to sacrifice a creature and which creature to sacrifice as the exploit ability resolves. - * You can sacrifice the creature with exploit if it’s still on the battlefield. This will cause its other ability to trigger. - * You can’t sacrifice more than one creature to any one exploit ability. + * You can sacrifice the creature with exploit if it's still on the battlefield. This will cause its other ability to trigger. + * You can't sacrifice more than one creature to any one exploit ability. * */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FadingTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FadingTest.java index 304a9adad1d..276b655c6c4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FadingTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/FadingTest.java @@ -18,7 +18,7 @@ public class FadingTest extends CardTestPlayerBase { * 702.31. Fading * 702.31a Fading is a keyword that represents two abilities. “Fading N” means “This permanent * enters the battlefield with N fade counters on it” and “At the beginning of your upkeep, remove - * a fade counter from this permanent. If you can’t, sacrifice the permanent.” + * a fade counter from this permanent. If you can't, sacrifice the permanent.” */ /** diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HideawayTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HideawayTest.java index 51b6ac6a58f..6a4db4e04f6 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HideawayTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/HideawayTest.java @@ -22,7 +22,7 @@ public class HideawayTest extends CardTestPlayerBase { * at the top four cards of your library. Exile one of them face down and * put the rest on the bottom of your library in any order. The exiled card * gains ‘Any player who has controlled the permanent that exiled this card - * may look at this card in the exile zone.’” + * may look at this card in the exile zone.'” * */ /** diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java index f573b48cc3a..afe24632fc2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/InfectTest.java @@ -17,10 +17,10 @@ public class InfectTest extends CardTestPlayerBase { /** * * 702.89. Infect 702.89a Infect is a static ability. 702.89b Damage dealt - * to a player by a source with infect doesn’t cause that player to lose + * to a player by a source with infect doesn't cause that player to lose * life. Rather, it causes the player to get that many poison counters. See * rule 119.3. 702.89c Damage dealt to a creature by a source with infect - * isn’t marked on that creature. Rather, it causes that many -1/-1 counters + * isn't marked on that creature. Rather, it causes that many -1/-1 counters * to be put on that creature. See rule 119.3. 702.89d If a permanent leaves * the battlefield before an effect causes it to deal damage, its last known * information is used to determine whether it had infect. 702.89e The diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java index 99c54e77637..77d0fbe911e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/KickerTest.java @@ -17,14 +17,14 @@ public class KickerTest extends CardTestPlayerBase { /** * 702.32. Kicker 702.32a Kicker is a static ability that functions while * the spell with kicker is on the stack. “Kicker [cost]” means “You may pay - * an additional [cost] as you cast this spell.” Paying a spell’s kicker + * an additional [cost] as you cast this spell.” Paying a spell's kicker * cost(s) follows the rules for paying additional costs in rules 601.2b and * 601.2e–g. 702.32b The phrase “Kicker [cost 1] and/or [cost 2]” means the * same thing as “Kicker [cost 1], kicker [cost 2].” 702.32c Multikicker is * a variant of the kicker ability. “Multikicker [cost]” means “You may pay * an additional [cost] any number of times as you cast this spell.” A - * multikicker cost is a kicker cost. 702.32d If a spell’s controller - * declares the intention to pay any of that spell’s kicker costs, that + * multikicker cost is a kicker cost. 702.32d If a spell's controller + * declares the intention to pay any of that spell's kicker costs, that * spell has been “kicked.” If a spell has two kicker costs or has * multikicker, it may be kicked multiple times. See rule 601.2b. 702.32e * Objects with kicker or multikicker have additional abilities that specify @@ -36,9 +36,9 @@ public class KickerTest extends CardTestPlayerBase { * “if it was kicked with its [A] kicker” and “if it was kicked with its [B] * kicker,” where A and B are the first and second kicker costs listed on * the card, respectively. Each of those abilities is linked to the - * appropriate kicker ability. 702.32g If part of a spell’s ability has its + * appropriate kicker ability. 702.32g If part of a spell's ability has its * effect only if that spell was kicked, and that part of the ability - * includes any targets, the spell’s controller chooses those targets only + * includes any targets, the spell's controller chooses those targets only * if that spell was kicked. Otherwise, the spell is cast as if it did not * have those targets. See rule 601.2c. * diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MadnessTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MadnessTest.java index e4d958812e6..b556c46b835 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MadnessTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/MadnessTest.java @@ -16,12 +16,12 @@ public class MadnessTest extends CardTestPlayerBase { /** * 702.34. Madness 702.34a Madness is a keyword that represents two * abilities. The first is a static ability that functions while the card - * with madness is in a player’s hand. The second is a triggered ability + * with madness is in a player's hand. The second is a triggered ability * that functions when the first ability is applied. “Madness [cost]” means * “If a player would discard this card, that player discards it, but may * exile it instead of putting it into their graveyard” and “When this * card is exiled this way, its owner may cast it by paying [cost] rather - * than paying its mana cost. If that player doesn’t, he or she puts this + * than paying its mana cost. If that player doesn't, he or she puts this * card into their graveyard.” 702.34b Casting a spell using its * madness ability follows the rules for paying alternative costs in rules * 601.2b and 601.2e–g. diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RecoverTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RecoverTest.java index 47bc383735b..4fec8bfe4d5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RecoverTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/RecoverTest.java @@ -14,7 +14,7 @@ public class RecoverTest extends CardTestPlayerBase { /** * 702.58a Recover is a triggered ability that functions only while the card - * with recover is in a player’s graveyard. “Recover [cost]” means “When a + * with recover is in a player's graveyard. “Recover [cost]” means “When a * creature is put into your graveyard from the battlefield, you may pay * [cost]. If you do, return this card from your graveyard to your hand. * Otherwise, exile this card.” diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ReplicateTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ReplicateTest.java index 2047814d48e..a347456ec9c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ReplicateTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ReplicateTest.java @@ -20,7 +20,7 @@ public class ReplicateTest extends CardTestPlayerBase { * functions while the spell with replicate is on the stack. “Replicate [cost]” means “As an * additional cost to cast this spell, you may pay [cost] any number of times” and “When you cast * this spell, if a replicate cost was paid for it, copy it for each time its replicate cost was paid. If - * the spell has any targets, you may choose new targets for any of the copies.” Paying a spell’s + * the spell has any targets, you may choose new targets for any of the copies.” Paying a spell's * replicate cost follows the rules for paying additional costs in rules 601.2b and 601.2e–g. * 702.55b If a spell has multiple instances of replicate, each is paid separately and triggers based on * the payments made for it, not any other instance of replicate. diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ScavengeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ScavengeTest.java index e07080e0244..b71c2fd51c2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ScavengeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ScavengeTest.java @@ -21,7 +21,7 @@ public class ScavengeTest extends CardTestPlayerBase { // // 702.95a Scavenge is an activated ability that functions only while the card // with scavenge is in a graveyard. "Scavenge [cost]" means "[Cost], Exile this -// card from your graveyard: Put a number of +1/+1 counters equal to this card’s +// card from your graveyard: Put a number of +1/+1 counters equal to this card's // power on target creature. Activate this ability only any time you could cast // a sorcery." // diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java index f0c44e83b9f..0a103a6885d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/TransmuteTest.java @@ -11,14 +11,14 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * 702.52. Transmute * * 702.52a Transmute is an activated ability that functions only while the card - * with transmute is in a player’s hand. “Transmute [cost]” means “[Cost], + * with transmute is in a player's hand. “Transmute [cost]” means “[Cost], * Discard this card: Search your library for a card with the same converted * mana cost as the discarded card, reveal that card, and put it into your hand. * Then shuffle your library. Play this ability only any time you could play a * sorcery.” * * 702.52b Although the transmute ability is playable only if the card is in a - * player’s hand, it continues to exist while the object is in play and in all + * player's hand, it continues to exist while the object is in play and in all * other zones. Therefore objects with transmute will be affected by effects * that depend on objects having one or more activated abilities. * diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java new file mode 100644 index 00000000000..7668806acfd --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/library/PutToLibraryTest.java @@ -0,0 +1,44 @@ +package org.mage.test.cards.abilities.oneshot.library; + +import java.util.ArrayList; +import mage.cards.Card; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Assert; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class PutToLibraryTest extends CardTestPlayerBase { + + @Test + public void testPutSecondFromTop() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + // Put target creature into its owner's library second from the top. Its controller gains 3 life. + addCard(Zone.HAND, playerA, "Oust"); // Sorcery {W} + + addCard(Zone.BATTLEFIELD, playerB, "Dread Wanderer"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Oust", "Dread Wanderer"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, "Oust", 1); + assertLibraryCount(playerB, "Dread Wanderer", 1); + + assertLife(playerA, 20); + assertLife(playerB, 23); + + ArrayList cardArray = new ArrayList<>(playerB.getLibrary().getCards(currentGame)); + Assert.assertTrue("Library has no cards but should have", cardArray.size() > 1); + Card secondCard = cardArray.get(1); + Assert.assertTrue("Second card from top should be Dread Wanderer, bnut it isn't", + secondCard != null && secondCard.getName().equals("Dread Wanderer")); + + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/AuratouchedMageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/AuratouchedMageTest.java index 932e71a8b8b..1d45c86ac01 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/AuratouchedMageTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/AuratouchedMageTest.java @@ -25,7 +25,7 @@ public class AuratouchedMageTest extends CardTestPlayerBase { //If someone knows the way to elegantly handle the test mechanism in regards to no valid targets, please modify. The test works fine in practice. @Ignore public void testAuratouchedMageEffectHasMadeIntoTypeArtifact() { - //Any Aura card you find must be able to enchant Auratouched Mage as it currently exists, or as it most recently existed on the battlefield if it’s no + //Any Aura card you find must be able to enchant Auratouched Mage as it currently exists, or as it most recently existed on the battlefield if it's no //longer on the battlefield. If an effect has made the Mage an artifact, for example, you could search for an Aura with “enchant artifact.” //Expected result: An effect has made Auratouched Mage into an artifact upon entering the battlefield. An aura that only works on artifacts should work. addCard(Zone.BATTLEFIELD, playerA, "Plains", 7); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/conditional/LegendarySorceryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/conditional/LegendarySorceryTest.java index f9e7c56dab3..68936f22903 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/conditional/LegendarySorceryTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/conditional/LegendarySorceryTest.java @@ -15,7 +15,7 @@ public class LegendarySorceryTest extends CardTestPlayerBase { @Test public void testCastSuccessful() { // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) - // Exile all nonland permanents that aren’t legendary. + // Exile all nonland permanents that aren't legendary. addCard(Zone.HAND, playerA, "Urza's Ruinous Blast"); // Sorcery Legendary {4}{W} addCard(Zone.BATTLEFIELD, playerA, "Plains", 5); addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // non Legendary @@ -46,7 +46,7 @@ public class LegendarySorceryTest extends CardTestPlayerBase { @Test public void testCastNotSuccessful() { // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) - // Exile all nonland permanents that aren’t legendary. + // Exile all nonland permanents that aren't legendary. addCard(Zone.HAND, playerA, "Urza's Ruinous Blast"); // Sorcery Legendary {4}{W} addCard(Zone.BATTLEFIELD, playerA, "Plains", 5); addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); // non Legendary @@ -88,7 +88,7 @@ public class LegendarySorceryTest extends CardTestPlayerBase { // Flying, first strike, vigilance, trample, haste, protection from black and from red addCard(Zone.BATTLEFIELD, playerB, "Akroma, Angel of Wrath", 1); // Legendary // (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) - // Exile all nonland permanents that aren’t legendary. + // Exile all nonland permanents that aren't legendary. addCard(Zone.GRAVEYARD, playerB, "Urza's Ruinous Blast"); // Sorcery Legendary {4}{W} castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dire Fleet Daredevil"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureAttachedTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureAttachedTest.java index 6aa25a080c8..1752370723b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureAttachedTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/BecomesCreatureAttachedTest.java @@ -41,7 +41,7 @@ public class BecomesCreatureAttachedTest extends CardTestPlayerBase { @Test public void test_AttachToLandWithColorReplace() { - // Enchanted land is a 2/2 blue Elemental creature with flying. It’s still a land. + // Enchanted land is a 2/2 blue Elemental creature with flying. It's still a land. addCard(Zone.HAND, playerA, "Wind Zendikon", 1); addCard(Zone.BATTLEFIELD, playerA, "Island", 1); @@ -64,7 +64,7 @@ public class BecomesCreatureAttachedTest extends CardTestPlayerBase { @Test public void test_AttachToLandWithColorAdd() { - // Enchanted land is a 2/2 blue Elemental creature with flying. It’s still a land. + // Enchanted land is a 2/2 blue Elemental creature with flying. It's still a land. addCard(Zone.HAND, playerA, "Deep Freeze", 1); addCard(Zone.BATTLEFIELD, playerA, "Island", 3); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ImprisonedInTheMoonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ImprisonedInTheMoonTest.java index abd863a4b7e..8583715ed7c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ImprisonedInTheMoonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/ImprisonedInTheMoonTest.java @@ -21,7 +21,7 @@ public class ImprisonedInTheMoonTest extends CardTestPlayerBase { * * Card ruling: http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=414360 * If the enchanted permanent is a land and has land types, it retains those types even though it loses any intrinsic mana abilities associated with them. - * For example, a Plains enchanted by Imprisoned in the Moon is still a Plains, but it can’t tap for {W}, only for {C}. + * For example, a Plains enchanted by Imprisoned in the Moon is still a Plains, but it can't tap for {W}, only for {C}. */ @Test public void testEnchantUrzaLand() { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/MetallicMiminTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/MetallicMiminTest.java index 50f9d823ba7..04cdf394457 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/MetallicMiminTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/MetallicMiminTest.java @@ -19,7 +19,7 @@ public class MetallicMiminTest extends CardTestPlayerBase { * be getting a counter as long as you name the same type as the first one. * * 611.3c Continuous effects that modify characteristics of permanents do so - * simultaneously with the permanent entering the battlefield. They don’t + * simultaneously with the permanent entering the battlefield. They don't * wait until the permanent is on the battlefield and then change it. * Because such effects apply as the permanent enters the battlefield, they * are applied before determining whether the permanent will cause an @@ -28,7 +28,7 @@ public class MetallicMiminTest extends CardTestPlayerBase { * Example: A permanent with the static ability “All white creatures get * +1/+1” is on the battlefield. A creature spell that would normally create * a 1/1 white creature instead creates a 2/2 white creature. The creature - * doesn’t enter the battlefield as 1/1 and then change to 2/2. + * doesn't enter the battlefield as 1/1 and then change to 2/2. * */ @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java index 6f2953e071f..2ec1c261ed3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CopySpellTest.java @@ -138,16 +138,16 @@ public class CopySpellTest extends CardTestPlayerBase { * * 702.46a Splice is a static ability that functions while a card is in your * hand. “Splice onto [subtype] [cost]” means “You may reveal this card from - * your hand as you cast a [subtype] spell. If you do, copy this card’s text + * your hand as you cast a [subtype] spell. If you do, copy this card's text * box onto that spell and pay [cost] as an additional cost to cast that - * spell.” Paying a card’s splice cost follows the rules for paying + * spell.” Paying a card's splice cost follows the rules for paying * additional costs in rules 601.2b and 601.2e–g. 601.2b If the spell is * modal the player announces the mode choice (see rule 700.2). If the * player wishes to splice any cards onto the spell (see rule 702.46), he or * she reveals those cards in their hand. 706.10. To copy a spell, * activated ability, or triggered ability means to put a copy of it onto - * the stack; a copy of a spell isn’t cast and a copy of an activated - * ability isn’t activated. A copy of a spell or ability copies both the + * the stack; a copy of a spell isn't cast and a copy of an activated + * ability isn't activated. A copy of a spell or ability copies both the * characteristics of the spell or ability and all decisions made for it, * including modes, targets, the value of X, and additional or alternative * costs. (See rule 601, “Casting Spells.”) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/HelmOfTheHostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/HelmOfTheHostTest.java index 91d54cc9624..6de47b9fdbf 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/HelmOfTheHostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/HelmOfTheHostTest.java @@ -27,7 +27,7 @@ public class HelmOfTheHostTest extends CardTestPlayerBase { // 0: Until end of turn, Gideon of the Trials becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn. // 0: You get an emblem with "As long as you control a Gideon planeswalker, you can't lose the game and your opponent can't win the game." addCard(Zone.BATTLEFIELD, playerA, "Gideon of the Trials", 1); - // At the beginning of combat on your turn, create a token that’s a copy of equipped creature, except the token isn’t legendary if equipped creature is legendary. That token gains haste. + // At the beginning of combat on your turn, create a token that's a copy of equipped creature, except the token isn't legendary if equipped creature is legendary. That token gains haste. // Equip {5} addCard(Zone.BATTLEFIELD, playerA, "Helm of the Host", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java index 3953a7bec09..4cb9d4a3cdc 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/PhantasmalImageTest.java @@ -450,8 +450,8 @@ public class PhantasmalImageTest extends CardTestPlayerBase { * Example: Two creatures are on the battlefield along with an artifact that * has the ability “Whenever a creature dies, you gain 1 life.” Someone * plays a spell that destroys all artifacts, creatures, and enchantments. - * The artifact’s ability triggers twice, even though the artifact goes to - * its owner’s graveyard at the same time as the creatures. + * The artifact's ability triggers twice, even though the artifact goes to + * its owner's graveyard at the same time as the creatures. * */ @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java index 48a358dc8db..f1e04d3ffec 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SpreadingSeasTest.java @@ -18,12 +18,12 @@ public class SpreadingSeasTest extends CardTestPlayerBase { * activated it on response, seas resolves but the manland loses creature * type what should not happened. * - * 305.7. If an effect changes a land’s subtype to one or more of the basic + * 305.7. If an effect changes a land's subtype to one or more of the basic * land types, the land no longer has its old land type. It loses all * abilities generated from its rules text and its old land types, and it * gains the appropriate mana ability for each new basic land type. Note - * that this doesn’t remove any abilities that were granted to the land by - * other effects. Changing a land’s subtype doesn’t add or remove any card + * that this doesn't remove any abilities that were granted to the land by + * other effects. Changing a land's subtype doesn't add or remove any card * types (such as creature) or supertypes (such as basic, legendary, and * snow) the land may have. If a land gains one or more land types in * addition to its own, it keeps its land types and rules text, and it gains diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NagaVitalistTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NagaVitalistTest.java index a16e293090e..e979dad8041 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NagaVitalistTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NagaVitalistTest.java @@ -1,12 +1,14 @@ package org.mage.test.cards.mana; +import mage.abilities.mana.ManaOptions; import mage.constants.ManaType; import mage.constants.PhaseStep; import mage.constants.Zone; import org.junit.Assert; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; -import static org.mage.test.utils.ManaOptionsTestUtils.manaOptionsContain; +import static org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions; +import static org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions; /** * @@ -47,7 +49,14 @@ public class NagaVitalistTest extends CardTestPlayerBase { setStopAt(1, PhaseStep.PRECOMBAT_MAIN); execute(); - Assert.assertTrue("playerA must cast {Any}{Any}", manaOptionsContain(playerA.getManaAvailable(currentGame), "{Any}{Any}")); + ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame); + assertDuplicatedManaOptions(manaOptions); + Assert.assertEquals("mana variations don't fit", 5, manaOptions.size()); + assertManaOptions("{B}{B}", manaOptions); + assertManaOptions("{W}{W}", manaOptions); + assertManaOptions("{U}{U}", manaOptions); + assertManaOptions("{R}{R}", manaOptions); + assertManaOptions("{G}{G}", manaOptions); } public void nagaVitalist_GiftOfParadisesLandCanGiveAnyColorToNaga_Setup(int giftCastTurn, int nagaManaTapTurn, String nagaManaTapColor) { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/RiverOfTearsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/RiverOfTearsTest.java new file mode 100644 index 00000000000..6faaf0f6ad3 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/RiverOfTearsTest.java @@ -0,0 +1,61 @@ +package org.mage.test.cards.mana; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class RiverOfTearsTest extends CardTestPlayerBase { + + /** + * River of Tears doesn't produce black mana any time. Gatherer says: + * + * 17/11/2017 The turn you play River of Tears, it will produce Black when + * tapped for mana. + * + * 17/11/2017 River of Tears produces Black only after you've played a land, + * not after you've put a land onto the battlefield (such as with Evolving + * Wilds). + */ + @Test + public void testBlackAfterPlayed() { + // {T}: Add {U}. If you played a land this turn, add {B} instead. + addCard(Zone.HAND, playerA, "River of Tears", 1); // Land + + addCard(Zone.HAND, playerA, "Nightshade Stinger", 1); // Creature {B} + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "River of Tears"); + + castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Nightshade Stinger"); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerA, "River of Tears", 1); + assertTapped("River of Tears", true); + assertPermanentCount(playerA, "Nightshade Stinger", 1); + } + + @Test + public void testBlueInSecondTurn() { + // {T}: Add {U}. If you played a land this turn, add {B} instead. + addCard(Zone.HAND, playerA, "River of Tears", 1); // Land + + addCard(Zone.HAND, playerA, "Aven Envoy", 1); // Creature {B} + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "River of Tears"); + + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Aven Envoy"); + + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "River of Tears", 1); + assertTapped("River of Tears", true); + assertPermanentCount(playerA, "Aven Envoy", 1); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java index dca08309a03..d6ec862b443 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/VorinclexVoiceOfHungerTest.java @@ -1,4 +1,3 @@ - package org.mage.test.cards.mana; import mage.constants.ManaType; @@ -41,7 +40,6 @@ public class VorinclexVoiceOfHungerTest extends CardTestPlayerBase { * Vorinclex, Voice of Hunger is not mana doubling River of Tears. */ @Test - // @Ignore // TODO: need to fix Vorinclex, Voice of Hunger -- it's double fireup mana tap event public void testVorinclexVoiceofHungerRiverOfTearsManaMultiplier() { // Mana pools don't empty as steps and phases end. addCard(Zone.BATTLEFIELD, playerA, "Upwelling", 1); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java index 2d99e0ab1c6..1d428a30a08 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/DoublingSeasonTest.java @@ -196,7 +196,7 @@ public class DoublingSeasonTest extends CardTestPlayerBase { /** * Gatherer Ruling: * 10/1/2005: Planeswalkers will enter the battlefield with double the normal amount of loyalty counters. However, - * if you activate an ability whose cost has you put loyalty counters on a planeswalker, the number you put on isn’t doubled. + * if you activate an ability whose cost has you put loyalty counters on a planeswalker, the number you put on isn't doubled. * This is because those counters are put on as a cost, not as an effect. */ @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java index d29ae947e0d..3da3b7cefa0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java @@ -100,8 +100,8 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { } /* - "Leyline of the Void’s second ability doesn’t affect token permanents that would be put into an opponent’s graveyard from the battlefield. - They’ll be put into that graveyard as normal (causing any applicable triggered abilities to trigger), then they’ll cease to exist." + "Leyline of the Void's second ability doesn't affect token permanents that would be put into an opponent's graveyard from the battlefield. + They'll be put into that graveyard as normal (causing any applicable triggered abilities to trigger), then they'll cease to exist." http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=107682 */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java index adc26769e73..028e5596100 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java @@ -321,7 +321,7 @@ public class ZoneChangeReplacementTest extends CardTestPlayerBase { } /** - * Jace, Vryn’s Prodigy – Jace, Telepath Unbound + * Jace, Vryn's Prodigy – Jace, Telepath Unbound * * You can't whip him back with Whip of Erebos , flip him and then keep him. * I think he is considered a new object after being exiled by his own diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/EntersTheBattlefieldTappedTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/EntersTheBattlefieldTappedTest.java new file mode 100644 index 00000000000..ddd643e27f7 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/EntersTheBattlefieldTappedTest.java @@ -0,0 +1,66 @@ +package org.mage.test.cards.replacement.entersBattlefield; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class EntersTheBattlefieldTappedTest extends CardTestPlayerBase { + + /** + * Creatures that enter the battlefield tapped, like Dread Wanderer, if you + * bring them back from graveyard to the battlefield they enter untapped!! + */ + @Test + public void testTappedFromHand() { + + // Dread Wanderer enters the battlefield tapped. + // {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. + // Activate this ability only any time you could cast a sorcery and only if you have one or fewer cards in hand. + addCard(Zone.HAND, playerA, "Dread Wanderer"); // Creature {B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Dread Wanderer"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Dread Wanderer", 1); + assertTapped("Dread Wanderer", true); + } + + @Test + public void testTappedFromGraveyard() { + + // Dread Wanderer enters the battlefield tapped. + // {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. + // Activate this ability only any time you could cast a sorcery and only if you have one or fewer cards in hand. + addCard(Zone.GRAVEYARD, playerA, "Dread Wanderer"); // Creature {B} + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}{B}: Return "); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Dread Wanderer", 1); + assertTapped("Dread Wanderer", true); + } + + @Test + public void testScryLandEntersTapped() { + // Temple of Enlightenment enters the battlefield tapped. + // When Temple of Enlightenment enters the battlefield, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) + addCard(Zone.HAND, playerA, "Temple of Enlightenment"); // Land + + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Temple of Enlightenment"); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPermanentCount(playerA, "Temple of Enlightenment", 1); + assertTapped("Temple of Enlightenment", true); + } + +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/rules/WorldEnchantmentsRuleTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/rules/WorldEnchantmentsRuleTest.java index 334c6c5e595..0d8fa4034a3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/rules/WorldEnchantmentsRuleTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/rules/WorldEnchantmentsRuleTest.java @@ -15,8 +15,8 @@ public class WorldEnchantmentsRuleTest extends CardTestPlayerBase { /** * 704.5m If two or more permanents have the supertype world, all except the one that has had - * the world supertype for the shortest amount of time are put into their owners’ graveyards. - * In the event of a tie for the shortest amount of time, all are put into their owners’ graveyards. + * the world supertype for the shortest amount of time are put into their owners' graveyards. + * In the event of a tie for the shortest amount of time, all are put into their owners' graveyards. * This is called the “world rule. * */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/CullingScalesTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/CullingScalesTest.java index 1080c5feea6..002fc3d92dd 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/CullingScalesTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/CullingScalesTest.java @@ -41,8 +41,8 @@ public class CullingScalesTest extends CardTestPlayerBase { @Test public void testCullingScalesFizzleByMakingLowerCostedPermanent() { - // Gatherer ruling: If the targeted permanent doesn’t have the lowest converted mana cost - // when the ability resolves, the ability is countered and the permanent isn’t destroyed. + // Gatherer ruling: If the targeted permanent doesn't have the lowest converted mana cost + // when the ability resolves, the ability is countered and the permanent isn't destroyed. addCard(Zone.HAND, playerB, "Raise the Alarm"); // Make 2 tokens addCard(Zone.BATTLEFIELD, playerB, "Elvish Visionary"); // CMC = 2 diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/TreeOfPerditionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/TreeOfPerditionTest.java index dc342355c18..3075bf0f8d1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/TreeOfPerditionTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/emn/TreeOfPerditionTest.java @@ -26,7 +26,7 @@ public class TreeOfPerditionTest extends CardTestPlayerBase { /* Tree of Perdition - {3}{B} - Creature Plant - 0/13 - {T}: Exchange target opponent’s life total with Tree of Perdition’s toughness. + {T}: Exchange target opponent's life total with Tree of Perdition's toughness. Defender Tap: Exchange target opponent's life total with Tree of Perdition's toughness. */ diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/fut/MuragandaPetroglyphsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/fut/MuragandaPetroglyphsTest.java index c8263589cbb..713ea046c00 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/fut/MuragandaPetroglyphsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/fut/MuragandaPetroglyphsTest.java @@ -21,7 +21,7 @@ public class MuragandaPetroglyphsTest extends CardTestPlayerBase { * This includes true vanilla creatures (such as Grizzly Bears), face-down creatures, * many tokens, and creatures that have lost their abilities (due to Ovinize, for example). * Any ability of any kind, whether or not the ability functions in the on the battlefield zone, - * including things like “Cycling 2” means the creature doesn’t get the bonus. + * including things like “Cycling 2” means the creature doesn't get the bonus. */ @Test public void trueVanillaCardsTest() { @@ -116,7 +116,7 @@ public class MuragandaPetroglyphsTest extends CardTestPlayerBase { } /** - * Animated basic lands have mana abilities, so they won’t get the bonus. + * Animated basic lands have mana abilities, so they won't get the bonus. */ @Test @@ -139,8 +139,8 @@ public class MuragandaPetroglyphsTest extends CardTestPlayerBase { * Some Auras and Equipment grant abilities to creatures, meaning the affected creature would no longer * get the +2/+2 bonus. For example, Flight grants flying to the enchanted creature. Other Auras and Equipment * do not, meaning the affected creature would continue to get the +2/+2 bonus. For example, Dehydration states - * something now true about the enchanted creature, but doesn’t give it any abilities. Auras and Equipment that - * grant abilities will use the words “gains” or “has,” and they’ll list a keyword ability or an ability in + * something now true about the enchanted creature, but doesn't give it any abilities. Auras and Equipment that + * grant abilities will use the words “gains” or “has,” and they'll list a keyword ability or an ability in * quotation marks. */ @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java index 3fcfd21c844..cbd16da4cc0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java @@ -40,7 +40,7 @@ public class HivestoneTest extends CardTestPlayerBase { /** * Turns only your creatures on the battlefield, not in other zones, into - * Slivers. It won’t allow you to have Root Sliver on the battlefield and + * Slivers. It won't allow you to have Root Sliver on the battlefield and * make your Grizzly Bears uncounterable, for example. */ @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/combat/CanBlockMultipleCreaturesTest.java b/Mage.Tests/src/test/java/org/mage/test/combat/CanBlockMultipleCreaturesTest.java index 86a6d381335..bc7b9b0bbdb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/combat/CanBlockMultipleCreaturesTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/combat/CanBlockMultipleCreaturesTest.java @@ -92,7 +92,7 @@ public class CanBlockMultipleCreaturesTest extends CardTestPlayerBase { public void testCanOnlyBlockSingle() { // Hundred-Handed One {2}{W}{W} - // Monstrosity 3. {3}{W}{W}{W} (If this creature isn’t monstrous, put three +1/+1 counters on it and it becomes monstrous.) + // Monstrosity 3. {3}{W}{W}{W} (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) //As long as Hundred-Handed One is monstrous, it has reach and can block an additional ninety-nine creatures each combat. addCard(Zone.BATTLEFIELD, playerA, "Hundred-Handed One", 1); @@ -121,7 +121,7 @@ public class CanBlockMultipleCreaturesTest extends CardTestPlayerBase { public void testCanBlockMultiple() { // Hundred-Handed One {2}{W}{W} - // Monstrosity 3. {3}{W}{W}{W} (If this creature isn’t monstrous, put three +1/+1 counters on it and it becomes monstrous.) + // Monstrosity 3. {3}{W}{W}{W} (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) // As long as Hundred-Handed One is monstrous, it has reach and can block an additional ninety-nine creatures each combat. addCard(Zone.BATTLEFIELD, playerA, "Hundred-Handed One", 1); // For monstrosity diff --git a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java index 872c1a3996e..29d51f0ab89 100644 --- a/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java +++ b/Mage.Tests/src/test/java/org/mage/test/stub/PlayerStub.java @@ -890,12 +890,12 @@ public class PlayerStub implements Player { @Override public int announceXMana(int min, int max, String message, Game game, Ability ability) { - return 0; + return min; } @Override public int announceXCost(int min, int max, String message, Game game, Ability ability, VariableCost variableCost) { - return 0; + return min; } @Override diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index a08f421cf62..4f63e57609a 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -460,7 +460,7 @@ public abstract class AbilityImpl implements Ability { // controller specific alternate spell costs if (!noMana && !alternativeCostisUsed) { if (this.getAbilityType() == AbilityType.SPELL - // 117.9a Only one alternative cost can be applied to any one spell as it’s being cast. + // 117.9a Only one alternative cost can be applied to any one spell as it's being cast. // So an alternate spell ability can't be paid with Omniscience && ((SpellAbility) this).getSpellAbilityType() != SpellAbilityType.BASE_ALTERNATE) { for (AlternativeSourceCosts alternativeSourceCosts : controller.getAlternativeSourceCosts()) { diff --git a/Mage/src/main/java/mage/abilities/Modes.java b/Mage/src/main/java/mage/abilities/Modes.java index f521276d7e2..712dba5b529 100644 --- a/Mage/src/main/java/mage/abilities/Modes.java +++ b/Mage/src/main/java/mage/abilities/Modes.java @@ -198,8 +198,8 @@ public class Modes extends LinkedHashMap { // 700.2d // Some spells and abilities specify that a player other than their controller chooses a mode for it. - // In that case, the other player does so when the spell or ability’s controller normally would do so. - // If there is more than one other player who could make such a choice, the spell or ability’s controller decides which of those players will make the choice. + // In that case, the other player does so when the spell or ability's controller normally would do so. + // If there is more than one other player who could make such a choice, the spell or ability's controller decides which of those players will make the choice. UUID playerId = null; if (modeChooser == TargetController.OPPONENT) { TargetOpponent targetOpponent = new TargetOpponent(); diff --git a/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java index 901ac407fb2..e341ee74be2 100644 --- a/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java @@ -141,7 +141,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge * fail to do anything. The ability could be unable to find the object * because the object never entered the specified zone, because it left * the zone before the ability resolved, or because it is in a zone that - * is hidden from a player, such as a library or an opponent’s hand. + * is hidden from a player, such as a library or an opponent's hand. * (This rule applies even if the object leaves the zone and returns * again before the ability resolves.) The most common zone-change * triggers are enters-the-battlefield triggers and diff --git a/Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java index 71ae888c954..81483eea7f8 100644 --- a/Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BeginningOfCombatTriggeredAbility.java @@ -77,11 +77,11 @@ public class BeginningOfCombatTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { switch (targetController) { case YOU: - return "At the beginning of combat on your turn, " + generateZoneString() + getEffects().getText(modes.getMode()); + return "At the beginning of combat on your turn, " + generateZoneString() + super.getRule(); case OPPONENT: - return "At the beginning of each opponent's combat step, " + generateZoneString() + getEffects().getText(modes.getMode()); + return "At the beginning of each opponent's combat step, " + generateZoneString() + super.getRule(); case ANY: - return "At the beginning of each combat, " + generateZoneString() + getEffects().getText(modes.getMode()); + return "At the beginning of each combat, " + generateZoneString() + super.getRule(); } return ""; } diff --git a/Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java index e8f89f36198..b59492ab8c0 100644 --- a/Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/SpellCastAllTriggeredAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; @@ -6,6 +5,7 @@ import mage.abilities.effects.Effect; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.filter.FilterSpell; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.stack.Spell; @@ -17,13 +17,12 @@ import mage.target.targetpointer.FixedTarget; */ public class SpellCastAllTriggeredAbility extends TriggeredAbilityImpl { - private static final FilterSpell spellCard = new FilterSpell("a spell"); protected FilterSpell filter; protected String rule; protected SetTargetPointer setTargetPointer; public SpellCastAllTriggeredAbility(Effect effect, boolean optional) { - this(Zone.BATTLEFIELD, effect, spellCard, optional, SetTargetPointer.NONE); + this(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL_A, optional, SetTargetPointer.NONE); } public SpellCastAllTriggeredAbility(Effect effect, FilterSpell filter, boolean optional) { diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java index 9b88cad032e..ef07db5c289 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java @@ -1,4 +1,3 @@ - package mage.abilities.costs.common; import java.util.ArrayList; diff --git a/Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java b/Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java index cfbd0fbbe3b..55ea9f43f85 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/PayLoyaltyCost.java @@ -41,7 +41,7 @@ public class PayLoyaltyCost extends CostImpl { * Gatherer Ruling: 10/1/2005: Planeswalkers will enter the battlefield with * double the normal amount of loyalty counters. However, if you activate an * ability whose cost has you put loyalty counters on a planeswalker, the - * number you put on isn’t doubled. This is because those counters are put + * number you put on isn't doubled. This is because those counters are put * on as a cost, not as an effect. * */ diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java index bc4c67000cf..7d2f3a75fe8 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalManaEffect.java @@ -1,6 +1,6 @@ - package mage.abilities.decorator; +import java.util.List; import mage.Mana; import mage.abilities.Ability; import mage.abilities.condition.Condition; @@ -47,7 +47,11 @@ public class ConditionalManaEffect extends ManaEffect { if (controller == null) { return false; } - controller.getManaPool().addMana(getMana(game, source), game, source); + Mana mana = getMana(game, source); + if (produceMana(true, game, source).getAny() > 0) { + checkToFirePossibleEvents(mana, game, source); + } + controller.getManaPool().addMana(mana, game, source); return true; } @@ -56,6 +60,21 @@ public class ConditionalManaEffect extends ManaEffect { return new ConditionalManaEffect(this); } + @Override + public Mana getMana(Game game, Ability source) { + return produceMana(false, game, source); + } + + @Override + public List getNetMana(Game game, Ability source) { + if (condition.apply(game, source)) { + return effect.getNetMana(game, source); + } else if (otherwiseEffect != null) { + return otherwiseEffect.getNetMana(game, source); + } + return null; + } + @Override public Mana produceMana(boolean netMana, Game game, Ability source) { Mana mana = new Mana(); @@ -75,7 +94,6 @@ public class ConditionalManaEffect extends ManaEffect { mana.setAny(0); mana.add(choice.getMana(amount)); } - checkToFirePossibleEvents(mana, game, source); } return mana; } diff --git a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java index 7c170cc5f6a..c0427d341ed 100644 --- a/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java +++ b/Mage/src/main/java/mage/abilities/effects/ContinuousEffects.java @@ -570,7 +570,7 @@ public class ContinuousEffects implements Serializable { * the mana cost or alternative cost (as determined in rule 601.2b), plus * all additional costs and cost increases, and minus all cost reductions. * If the mana component of the total cost is reduced to nothing by cost - * reduction effects, it is considered to be {0}. It can’t be reduced to + * reduction effects, it is considered to be {0}. It can't be reduced to * less than {0}. Once the total cost is determined, any effects that * directly affect the total cost are applied. Then the resulting total cost * becomes “locked in.” If effects would change the total cost after this diff --git a/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java b/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java index 5d3fa062c82..a0ea8297392 100644 --- a/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/RequirementEffect.java @@ -76,6 +76,10 @@ public abstract class RequirementEffect extends ContinuousEffectImpl { return null; } + public int getMinNumberOfBlockers() { + return 0; + } + /** * Player related check The player returned or controlled planeswalker must * be attacked with at least one attacker diff --git a/Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java index 2ae6968b89d..ab6f7d5c28c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/AmplifyEffect.java @@ -33,7 +33,7 @@ import java.util.List; * 702.37. Amplify 702.37a Amplify is a static ability. “Amplify N” means “As * this object enters the battlefield, reveal any number of cards from your hand * that share a creature type with it. This permanent enters the battlefield - * with N +1/+1 counters on it for each card revealed this way. You can’t reveal + * with N +1/+1 counters on it for each card revealed this way. You can't reveal * this card or any other cards that are entering the battlefield at the same * time as this card.” 702.37b If a creature has multiple instances of amplify, * each one works separately. diff --git a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java similarity index 86% rename from Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java index 66b2d4e276b..f0439a01cf9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ChooseACardNameEffect.java @@ -1,4 +1,3 @@ - package mage.abilities.effects.common; import mage.MageObject; @@ -17,13 +16,14 @@ import mage.util.CardUtil; * * @author LevelX2 */ -public class NameACardEffect extends OneShotEffect { +public class ChooseACardNameEffect extends OneShotEffect { public static String INFO_KEY = "NAMED_CARD"; public enum TypeOfName { ALL, + NOT_BASIC_LAND_NAME, NON_ARTIFACT_AND_NON_LAND_NAME, NON_LAND_NAME, NON_LAND_AND_NON_CREATURE_NAME, @@ -33,13 +33,13 @@ public class NameACardEffect extends OneShotEffect { private final TypeOfName typeOfName; - public NameACardEffect(TypeOfName typeOfName) { + public ChooseACardNameEffect(TypeOfName typeOfName) { super(Outcome.Detriment); this.typeOfName = typeOfName; staticText = setText(); } - public NameACardEffect(final NameACardEffect effect) { + public ChooseACardNameEffect(final ChooseACardNameEffect effect) { super(effect); this.typeOfName = effect.typeOfName; } @@ -58,6 +58,10 @@ public class NameACardEffect extends OneShotEffect { cardChoice.setChoices(CardRepository.instance.getNames()); cardChoice.setMessage("Choose a card name"); break; + case NOT_BASIC_LAND_NAME: + cardChoice.setChoices(CardRepository.instance.getNotBasicLandNames()); + cardChoice.setMessage("Choose a card name other than a basic land card name"); + break; case NON_ARTIFACT_AND_NON_LAND_NAME: cardChoice.setChoices(CardRepository.instance.getNonArtifactAndNonLandNames()); cardChoice.setMessage("Choose a nonartifact, nonland card name"); @@ -96,8 +100,8 @@ public class NameACardEffect extends OneShotEffect { } @Override - public NameACardEffect copy() { - return new NameACardEffect(this); + public ChooseACardNameEffect copy() { + return new ChooseACardNameEffect(this); } private String setText() { @@ -106,6 +110,9 @@ public class NameACardEffect extends OneShotEffect { case ALL: sb.append("card"); break; + case NOT_BASIC_LAND_NAME: + sb.append("card name other than a basic land card"); + break; case NON_ARTIFACT_AND_NON_LAND_NAME: sb.append("nonartifact, nonland card"); break; diff --git a/Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java index a47a2345999..8ab62eee6dd 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DetainTargetEffect.java @@ -24,8 +24,8 @@ import mage.util.CardUtil; // 701.26. Detain // // 701.26a Certain spells and abilities can detain a permanent. Until the next -// turn of the controller of that spell or ability, that permanent can’t attack -// or block and its activated abilities can’t be activated. +// turn of the controller of that spell or ability, that permanent can't attack +// or block and its activated abilities can't be activated. // public class DetainTargetEffect extends OneShotEffect { diff --git a/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java index 39c3b8711a6..26fa8a8a177 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/DrawDiscardTargetEffect.java @@ -28,10 +28,10 @@ public class DrawDiscardTargetEffect extends OneShotEffect { this.cardsToDiscard = cardsToDiscard; staticText = new StringBuilder("Target player draws ") .append(cardsToDraw == 1?"a": CardUtil.numberToText(cardsToDraw)) - .append(" card").append(cardsToDraw == 1?" ": "s") + .append(" card").append(cardsToDraw == 1?"": "s") .append(", then discards ") .append(cardsToDiscard == 1?"a": CardUtil.numberToText(cardsToDiscard)) - .append(" card").append(cardsToDiscard == 1?" ": "s").toString(); + .append(" card").append(cardsToDiscard == 1?"": "s").toString(); } public DrawDiscardTargetEffect(final DrawDiscardTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java b/Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java index 0433c9723ba..eb54beb178d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/EpicEffect.java @@ -26,10 +26,10 @@ import mage.players.Player; * * 702.49. Epic 702.49a Epic represents two spell abilities, one of which * creates a delayed triggered ability. “Epic” means “For the rest of the game, - * you can’t cast spells,” and “At the beginning of each of your upkeeps for the + * you can't cast spells,” and “At the beginning of each of your upkeeps for the * rest of the game, copy this spell except for its epic ability. If the spell * has any targets, you may choose new targets for the copy.” See rule 706.10. - * 702.49b A player can’t cast spells once a spell with epic he or she controls + * 702.49b A player can't cast spells once a spell with epic he or she controls * resolves, but effects (such as the epic ability itself) can still put copies * of spells onto the stack. * */ diff --git a/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java index d1b21c2e862..d8a79bfc80f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GainLifeTargetEffect.java @@ -60,7 +60,7 @@ public class GainLifeTargetEffect extends OneShotEffect { String message = life.getMessage(); if (!mode.getTargets().isEmpty()) { - sb.append("Target ").append(mode.getTargets().get(0).getTargetName()); + sb.append("target ").append(mode.getTargets().get(0).getTargetName()); } else { sb.append("that player"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java index 64151380763..6711b025212 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PopulateEffect.java @@ -24,10 +24,10 @@ import mage.target.targetpointer.FixedTarget; // 701.27. Populate // // 701.27a To populate means to choose a creature token you control and put a -// token onto the battlefield that’s a copy of that creature token. +// token onto the battlefield that's a copy of that creature token. // // 701.27b If you control no creature tokens when instructed to populate, you -// won’t put a token onto the battlefield. +// won't put a token onto the battlefield. // public class PopulateEffect extends OneShotEffect { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java index 96df3d277a5..b72b54d01cf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetMultiAmountEffect.java @@ -1,5 +1,3 @@ - - package mage.abilities.effects.common; import java.util.HashMap; @@ -15,13 +13,12 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.Target; -import mage.target.common.TargetCreatureOrPlayerAmount; +import mage.target.TargetAmount; /** * * @author LevelX2 */ - public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl { private final Map targetAmountMap = new HashMap<>(); @@ -44,9 +41,9 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl super.init(source, game); Target target = source.getTargets().get(0); MageObject sourceObject = game.getObject(source.getSourceId()); - if (target instanceof TargetCreatureOrPlayerAmount && sourceObject != null) { - TargetCreatureOrPlayerAmount multiTarget = (TargetCreatureOrPlayerAmount) target; - for (UUID targetId: multiTarget.getTargets()) { + if (target instanceof TargetAmount && sourceObject != null) { + TargetAmount multiTarget = (TargetAmount) target; + for (UUID targetId : multiTarget.getTargets()) { Player player = null; Permanent permanent = game.getPermanent(targetId); if (permanent == null) { @@ -107,7 +104,7 @@ public class PreventDamageToTargetMultiAmountEffect extends PreventionEffectImpl if (duration == Duration.EndOfTurn) { sb.append("this turn "); } - sb.append("to any number of target creatures and/or players, divided as you choose"); + sb.append("to any number of targets, divided as you choose"); return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java index f07636b3b5c..7375856341d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneSourceEffect.java @@ -35,18 +35,26 @@ import mage.game.permanent.Permanent; * @author LevelX2 */ public class MustBeBlockedByAtLeastOneSourceEffect extends RequirementEffect { + + private int minNumberOfBlockers; public MustBeBlockedByAtLeastOneSourceEffect() { this(Duration.EndOfTurn); } public MustBeBlockedByAtLeastOneSourceEffect(Duration duration) { + this(duration, 1); + } + + public MustBeBlockedByAtLeastOneSourceEffect(Duration duration, int minNumberOfBlockers) { super(duration); + this.minNumberOfBlockers = minNumberOfBlockers; staticText = "{this} must be blocked " + (duration == Duration.EndOfTurn ? "this turn " : "") + "if able"; } public MustBeBlockedByAtLeastOneSourceEffect(final MustBeBlockedByAtLeastOneSourceEffect effect) { super(effect); + this.minNumberOfBlockers = effect.minNumberOfBlockers; } @Override @@ -69,6 +77,11 @@ public class MustBeBlockedByAtLeastOneSourceEffect extends RequirementEffect { return source.getSourceId(); } + @Override + public int getMinNumberOfBlockers() { + return minNumberOfBlockers; + } + @Override public MustBeBlockedByAtLeastOneSourceEffect copy() { return new MustBeBlockedByAtLeastOneSourceEffect(this); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java index d49b6d7e7ff..bf9e508a8b5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java @@ -147,7 +147,7 @@ public class BoostAllEffect extends ContinuousEffectImpl { protected void setText() { StringBuilder sb = new StringBuilder(); if (excludeSource) { - sb.append("Other "); + sb.append("other "); } sb.append(filter.getMessage()).append(" get "); String p = power.toString(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java index 09c6d6c75a6..749c7813b6e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java @@ -21,9 +21,9 @@ import mage.players.Player; */ //20130711 /* - * 903.11. If a commander would be put into its owner’s graveyard from anywhere, that player may put it into the command zone instead. + * 903.11. If a commander would be put into its owner's graveyard from anywhere, that player may put it into the command zone instead. * 903.12. If a commander would be put into the exile zone from anywhere, its owner may put it into the command zone instead. - * 903.9. If a commander would be exiled from anywhere or put into its owner’s hand, graveyard, or + * 903.9. If a commander would be exiled from anywhere or put into its owner's hand, graveyard, or library from anywhere, its owner may put it into the command zone instead. This replacement effect may apply more than once to the same event. This is an exception to rule 614.5. */ @@ -35,7 +35,7 @@ public class CommanderReplacementEffect extends ReplacementEffectImpl { public CommanderReplacementEffect(UUID commanderId, boolean alsoHand, boolean alsoLibrary) { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "If a commander would be put into its owner’s graveyard from anywhere, that player may put it into the command zone instead. If a commander would be put into the exile zone from anywhere, its owner may put it into the command zone instead."; + staticText = "If a commander would be put into its owner's graveyard from anywhere, that player may put it into the command zone instead. If a commander would be put into the exile zone from anywhere, its owner may put it into the command zone instead."; this.commanderId = commanderId; this.duration = Duration.EndOfGame; this.alsoHand = alsoHand; diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java index 833badab0f4..944262e9acc 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/TargetsHaveToTargetPermanentIfAbleEffect.java @@ -23,8 +23,8 @@ import mage.players.Player; import mage.target.Target; /** - * 6/8/2016 If a spell or ability’s targets are changed, or if a copy of a spell - * or ability is put onto the stack and has new targets chosen, it doesn’t have + * 6/8/2016 If a spell or ability's targets are changed, or if a copy of a spell + * or ability is put onto the stack and has new targets chosen, it doesn't have * to target a Flagbearer. * * 3/16/2017 A Flagbearer only requires targeting of itself when choosing targets diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java index 1128fd4550e..2a4f1f90cca 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java @@ -26,7 +26,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect protected String searchForText; /* Slaughter Games - * 10/1/2012: You can leave any cards with that name in the zone they are in. You don’t have to exile them. + * 10/1/2012: You can leave any cards with that name in the zone they are in. You don't have to exile them. * * Sowing Salt * 2/1/2005: The copies must be found if they are in publicly viewable zones. Finding copies while searching private zones is optional. diff --git a/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java index 8170ed8ebe8..72c2284a204 100644 --- a/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/mana/AddManaOfAnyColorEffect.java @@ -1,6 +1,7 @@ - package mage.abilities.effects.mana; +import java.util.ArrayList; +import java.util.List; import mage.Mana; import mage.abilities.Ability; import mage.choices.ChoiceColor; @@ -13,25 +14,28 @@ import mage.util.CardUtil; */ public class AddManaOfAnyColorEffect extends BasicManaEffect { - protected int amount; + protected final int amount; + protected final ArrayList netMana = new ArrayList<>(); public AddManaOfAnyColorEffect() { this(1); } - public AddManaOfAnyColorEffect(final int amount) { + public AddManaOfAnyColorEffect(int amount) { super(new Mana(0, 0, 0, 0, 0, 0, amount, 0)); this.amount = amount; - this.staticText = new StringBuilder("add ") - .append(CardUtil.numberToText(amount)) - .append(" mana of any ") - .append(amount > 1 ? "one " : "") - .append("color").toString(); + netMana.add(Mana.GreenMana(amount)); + netMana.add(Mana.BlueMana(amount)); + netMana.add(Mana.BlackMana(amount)); + netMana.add(Mana.WhiteMana(amount)); + netMana.add(Mana.RedMana(amount)); + this.staticText = "add " + CardUtil.numberToText(amount) + " mana of any " + (amount > 1 ? "one " : "") + "color"; } public AddManaOfAnyColorEffect(final AddManaOfAnyColorEffect effect) { super(effect); this.amount = effect.amount; + this.netMana.addAll(effect.netMana); } @Override @@ -41,23 +45,33 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect { @Override public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + checkToFirePossibleEvents(getMana(game, source), game, source); + controller.getManaPool().addMana(getMana(game, source), game, source); + return true; + } + return false; + } + + @Override + public List getNetMana(Game game, Ability source) { + return netMana; + } + + @Override + public Mana produceMana(boolean netMana, Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { String mes = String.format("Select color of %d mana to add it", this.amount); ChoiceColor choice = new ChoiceColor(true, mes, game.getObject(source.getSourceId())); if (controller.choose(outcome, choice, game)) { - if (choice.getColor() == null) { - return false; + if (choice.getColor() != null) { + return choice.getMana(amount); } - Mana createdMana = choice.getMana(amount); - if (createdMana != null) { - checkToFirePossibleEvents(createdMana, game, source); - controller.getManaPool().addMana(createdMana, game, source); - } - return true; } } - return false; + return null; } public int getAmount() { diff --git a/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java index 406498f5a36..212d940a9fa 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ConspireAbility.java @@ -42,7 +42,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate; * you may tap two untapped creatures you control that each share a color with it" * and "When you cast this spell, if its conspire cost was paid, copy it. * If the spell has any targets, you may choose new targets for the copy." - * Paying a spell’s conspire cost follows the rules for paying additional costs in rules 601.2b and 601.2e–g. + * Paying a spell's conspire cost follows the rules for paying additional costs in rules 601.2b and 601.2e–g. * 702.77b If a spell has multiple instances of conspire, each is paid separately and triggers * based on its own payment, not any other instance of conspire. * * diff --git a/Mage/src/main/java/mage/abilities/keyword/DelveAbility.java b/Mage/src/main/java/mage/abilities/keyword/DelveAbility.java index 0639f19bbfd..68055acec90 100644 --- a/Mage/src/main/java/mage/abilities/keyword/DelveAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DelveAbility.java @@ -27,20 +27,20 @@ import mage.util.CardUtil; /** * 702.65. Delve 702.65a Delve is a static ability that functions while the * spell with delve is on the stack. “Delve” means “For each generic mana in - * this spell’s total cost, you may exile a card from your graveyard rather than + * this spell's total cost, you may exile a card from your graveyard rather than * pay that mana.” The delve ability isn't an additional or alternative cost and * applies only after the total cost of the spell with delve is determined. * 702.65b Multiple instances of delve on the same spell are redundant. * * The rules for delve have changed slightly since it was last in an expansion. * Previously, delve reduced the cost to cast a spell. Under the current rules, - * you exile cards from your graveyard at the same time you pay the spell’s + * you exile cards from your graveyard at the same time you pay the spell's * cost. Exiling a card this way is simply another way to pay that cost. * Delve - * doesn't change a spell’s mana cost or converted mana cost. For example, Dead - * Drop’s converted mana cost is 10 even if you exiled three cards to cast it. * - * You can’t exile cards to pay for the colored mana requirements of a spell - * with delve. * You can’t exile more cards than the generic mana requirement of - * a spell with delve. For example, you can’t exile more than nine cards from + * doesn't change a spell's mana cost or converted mana cost. For example, Dead + * Drop's converted mana cost is 10 even if you exiled three cards to cast it. * + * You can't exile cards to pay for the colored mana requirements of a spell + * with delve. * You can't exile more cards than the generic mana requirement of + * a spell with delve. For example, you can't exile more than nine cards from * your graveyard to cast Dead Drop. * Because delve isn't an alternative cost, * it can be used in conjunction with alternative costs. * diff --git a/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java index 2a8ec6fc76f..9bc38f8a203 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java @@ -15,7 +15,7 @@ import mage.game.permanent.Permanent; /* * 702.31. Fading * - * 702.31a Fading is a keyword that represents two abilities. “Fading N” means “This permanent enters the battlefield with N fade counters on it” and “At the beginning of your upkeep, remove a fade counter from this permanent. If you can’t, sacrifice the permanent.” + * 702.31a Fading is a keyword that represents two abilities. “Fading N” means “This permanent enters the battlefield with N fade counters on it” and “At the beginning of your upkeep, remove a fade counter from this permanent. If you can't, sacrifice the permanent.” * */ public class FadingAbility extends EntersBattlefieldAbility { @@ -28,7 +28,7 @@ public class FadingAbility extends EntersBattlefieldAbility { ability.setRuleVisible(false); addSubAbility(ability); ruleText = "Fading " + fadeCounter + " (This permanent enters the battlefield with " + fadeCounter + " fade counters on it." - + " At the beginning of your upkeep, remove a fade counter from this permanent. If you can’t, sacrifice the permanent."; + + " At the beginning of your upkeep, remove a fade counter from this permanent. If you can't, sacrifice the permanent."; } public FadingAbility(final FadingAbility ability) { @@ -51,7 +51,7 @@ class FadingEffect extends OneShotEffect { FadingEffect() { super(Outcome.Sacrifice); - staticText = "remove a fade counter from this permanent. If you can’t, sacrifice the permanent"; + staticText = "remove a fade counter from this permanent. If you can't, sacrifice the permanent"; } FadingEffect(final FadingEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java b/Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java index f613b88586d..d194f74e974 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MonstrosityAbility.java @@ -21,23 +21,23 @@ import mage.util.CardUtil; * * 701.28. Monstrosity * - * 701.28a “Monstrosity N” means “If this permanent isn’t monstrous, put N +1/+1 counters on it + * 701.28a “Monstrosity N” means “If this permanent isn't monstrous, put N +1/+1 counters on it * and it becomes monstrous.” Monstrous is a condition of that permanent that can be * referred to by other abilities. * - * 701.28b If a permanent’s ability instructs a player to “monstrosity X,” other abilities of + * 701.28b If a permanent's ability instructs a player to “monstrosity X,” other abilities of * that permanent may also refer to X. The value of X in those abilities is equal to * the value of X as that permanent became monstrous. * - * * Once a creature becomes monstrous, it can’t become monstrous again. If the creature + * * Once a creature becomes monstrous, it can't become monstrous again. If the creature * is already monstrous when the monstrosity ability resolves, nothing happens. * - * * Monstrous isn’t an ability that a creature has. It’s just something true about that + * * Monstrous isn't an ability that a creature has. It's just something true about that * creature. If the creature stops being a creature or loses its abilities, it will * continue to be monstrous. * - * * An ability that triggers when a creature becomes monstrous won’t trigger if that creature - * isn’t on the battlefield when its monstrosity ability resolves. + * * An ability that triggers when a creature becomes monstrous won't trigger if that creature + * isn't on the battlefield when its monstrosity ability resolves. * * @author LevelX2 */ diff --git a/Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java b/Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java index c8e5a4d6be6..12bf54f5aac 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RecoverAbility.java @@ -18,7 +18,7 @@ import mage.players.Player; /** * 702.58a Recover is a triggered ability that functions only while the card - * with recover is in a player’s graveyard. “Recover [cost]” means “When a + * with recover is in a player's graveyard. “Recover [cost]” means “When a * creature is put into your graveyard from the battlefield, you may pay [cost]. * If you do, return this card from your graveyard to your hand. Otherwise, * exile this card.” diff --git a/Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java b/Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java index dc5f28fdc18..a83256e7743 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ScavengeAbility.java @@ -28,7 +28,7 @@ import mage.target.common.TargetCreaturePermanent; // // 702.95a Scavenge is an activated ability that functions only while the card // with scavenge is in a graveyard. "Scavenge [cost]" means "[Cost], Exile this -// card from your graveyard: Put a number of +1/+1 counters equal to this card’s +// card from your graveyard: Put a number of +1/+1 counters equal to this card's // power on target creature. Activate this ability only any time you could cast // a sorcery." // diff --git a/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java index a84782d2b4d..e9289e3b8e2 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulbondAbility.java @@ -48,9 +48,9 @@ import mage.util.GameLog; * 702.94d A creature can be paired with only one other creature. * * 702.94e A paired creature becomes unpaired if any of the following occur: - * another player gains control of it or the creature it’s paired with; it or - * the creature it’s paired with stops being a creature; or it or the creature - * it’s paired with leaves the battlefield. + * another player gains control of it or the creature it's paired with; it or + * the creature it's paired with stops being a creature; or it or the creature + * it's paired with leaves the battlefield. * * @author LevelX2 */ diff --git a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java index fd817165fdf..159e761634e 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java @@ -82,7 +82,7 @@ import mage.target.targetpointer.FixedTarget; * play the spell if possible, even if that player doesn't want to. Normal * timing considerations for the spell are ignored (for example, if the * suspended card is a creature and this ability resolves during your upkeep, - * you’re able to play the card), but other play restrictions are not ignored. + * you're able to play the card), but other play restrictions are not ignored. * * If the second triggered ability of suspend resolves and the suspended card * can't be played due to a lack of legal targets or a play restriction, for diff --git a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java index fc6f979b3bf..f0143e4f0fc 100644 --- a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java @@ -23,14 +23,14 @@ import mage.target.common.TargetCardInLibrary; * 702.52. Transmute * * 702.52a Transmute is an activated ability that functions only while the card - * with transmute is in a player’s hand. “Transmute [cost]” means “[Cost], + * with transmute is in a player's hand. “Transmute [cost]” means “[Cost], * Discard this card: Search your library for a card with the same converted * mana cost as the discarded card, reveal that card, and put it into your hand. * Then shuffle your library. Play this ability only any time you could play a * sorcery.” * * 702.52b Although the transmute ability is playable only if the card is in a - * player’s hand, it continues to exist while the object is in play and in all + * player's hand, it continues to exist while the object is in play and in all * other zones. Therefore objects with transmute will be affected by effects * that depend on objects having one or more activated abilities. * diff --git a/Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java b/Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java index 38aaf03e4b7..271f8db3ffd 100644 --- a/Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/UnleashAbility.java @@ -22,7 +22,7 @@ import mage.players.Player; // // 702.96a Unleash is a keyword that represents two static abilities. // "Unleash" means "You may have this permanent enter the battlefield with an additional +1/+1 counter on it" -// and "This permanent can’t block as long as it has a +1/+1 counter on it." +// and "This permanent can't block as long as it has a +1/+1 counter on it." public class UnleashAbility extends SimpleStaticAbility { public UnleashAbility() { diff --git a/Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java index 8ae3ad06895..06c2919d175 100644 --- a/Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ConditionalManaAbility.java @@ -1,5 +1,3 @@ - - package mage.abilities.mana; import java.util.ArrayList; @@ -14,7 +12,6 @@ import mage.game.Game; * * @author LevelX2 */ - public class ConditionalManaAbility extends ActivatedManaAbilityImpl { ConditionalManaEffect conditionalManaEffect; @@ -37,7 +34,7 @@ public class ConditionalManaAbility extends ActivatedManaAbilityImpl { @Override public List getNetMana(Game game) { List newNetMana = new ArrayList<>(); - newNetMana.add(conditionalManaEffect.getMana(game, this)); + newNetMana.addAll(conditionalManaEffect.getNetMana(game, this)); return newNetMana; } } diff --git a/Mage/src/main/java/mage/cards/CardImpl.java b/Mage/src/main/java/mage/cards/CardImpl.java index 8b6e87a77d2..d9283e95d79 100644 --- a/Mage/src/main/java/mage/cards/CardImpl.java +++ b/Mage/src/main/java/mage/cards/CardImpl.java @@ -12,7 +12,7 @@ import mage.abilities.*; import mage.abilities.costs.Cost; import mage.abilities.costs.VariableCost; import mage.abilities.costs.common.RemoveVariableCountersTargetCost; -import mage.abilities.effects.common.NameACardEffect; +import mage.abilities.effects.common.ChooseACardNameEffect; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.repository.PluginClassloaderRegistery; import mage.constants.*; @@ -401,7 +401,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card { case CHOSEN_NAME: //Declaration of Naught only ability.getTargets().clear(); FilterSpell filterSpell = new FilterSpell("spell with the chosen name"); - filterSpell.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + NameACardEffect.INFO_KEY))); + filterSpell.add(new NamePredicate((String) game.getState().getValue(ability.getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))); TargetSpell target = new TargetSpell(1, filterSpell); ability.addTarget(target); break; diff --git a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java index 33ed4d5946d..23777e60a0f 100644 --- a/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java +++ b/Mage/src/main/java/mage/cards/decks/importer/TxtDeckImporter.java @@ -83,7 +83,7 @@ public class TxtDeckImporter extends DeckImporter { return; } String lineNum = line.substring(0, delim).trim(); - String lineName = line.substring(delim).replace("’", "\'").trim(); + String lineName = line.substring(delim).replace("'", "\'").trim(); lineName = lineName .replace("&", "//") .replace("Æ", "Ae") diff --git a/Mage/src/main/java/mage/cards/repository/CardRepository.java b/Mage/src/main/java/mage/cards/repository/CardRepository.java index 41098b83bc7..e7aa5bc344f 100644 --- a/Mage/src/main/java/mage/cards/repository/CardRepository.java +++ b/Mage/src/main/java/mage/cards/repository/CardRepository.java @@ -1,4 +1,3 @@ - package mage.cards.repository; import com.j256.ormlite.dao.Dao; @@ -17,6 +16,7 @@ import java.util.*; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SetType; +import mage.constants.SuperType; import mage.util.RandomUtil; import org.apache.log4j.Logger; @@ -32,7 +32,7 @@ public enum CardRepository { // raise this if db structure was changed private static final long CARD_DB_VERSION = 51; // raise this if new cards were added to the server - private static final long CARD_CONTENT_VERSION = 112; + private static final long CARD_CONTENT_VERSION = 113; private Dao cardDao; private Set classNames; @@ -153,6 +153,29 @@ public enum CardRepository { return names; } + public Set getNotBasicLandNames() { + Set names = new TreeSet<>(); + try { + QueryBuilder qb = cardDao.queryBuilder(); + qb.distinct().selectColumns("name"); + qb.where().not().like("supertypes", new SelectArg('%' + SuperType.BASIC.name() + '%')); + List results = cardDao.query(qb.prepare()); + for (CardInfo card : results) { + int result = card.getName().indexOf(" // "); + if (result > 0) { + names.add(card.getName().substring(0, result)); + names.add(card.getName().substring(result + 4)); + } else { + names.add(card.getName()); + } + } + } catch (SQLException ex) { + Logger.getLogger(CardRepository.class).error("Error getting non-land names from DB : " + ex); + + } + return names; + } + public Set getCreatureNames() { Set names = new TreeSet<>(); try { diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index b859ad613bf..d671afc263a 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -25,6 +25,7 @@ public enum CounterType { CRYSTAL("crystal"), CUBE("cube"), CURRENCY("currency"), + DEATH("death"), DELAY("delay"), DEPLETION("depletion"), DESPAIR("despair"), diff --git a/Mage/src/main/java/mage/designations/Monarch.java b/Mage/src/main/java/mage/designations/Monarch.java index d6e783fe02d..b911345a940 100644 --- a/Mage/src/main/java/mage/designations/Monarch.java +++ b/Mage/src/main/java/mage/designations/Monarch.java @@ -27,7 +27,7 @@ public class Monarch extends Designation { } } -// At the beginning of the monarch’s end step, that player draws a card +// At the beginning of the monarch's end step, that player draws a card class MonarchDrawTriggeredAbility extends BeginningOfEndStepTriggeredAbility { public MonarchDrawTriggeredAbility() { @@ -60,7 +60,7 @@ class MonarchDrawTriggeredAbility extends BeginningOfEndStepTriggeredAbility { @Override public String getRule() { - return "At the beginning of the monarch’s end step, that player draws a card."; + return "At the beginning of the monarch's end step, that player draws a card."; } } diff --git a/Mage/src/main/java/mage/filter/FilterCard.java b/Mage/src/main/java/mage/filter/FilterCard.java index cd26cea65f4..7a873eab6f5 100644 --- a/Mage/src/main/java/mage/filter/FilterCard.java +++ b/Mage/src/main/java/mage/filter/FilterCard.java @@ -1,4 +1,3 @@ - package mage.filter; import java.util.ArrayList; @@ -68,6 +67,9 @@ public class FilterCard extends FilterObject { } public void add(ObjectPlayerPredicate predicate) { + if (isLockedFilter()) { + throw new UnsupportedOperationException("You may not modify a locked filter"); + } extraPredicates.add(predicate); } diff --git a/Mage/src/main/java/mage/filter/FilterImpl.java b/Mage/src/main/java/mage/filter/FilterImpl.java index a077c1e6ad4..7ab6e9964ff 100644 --- a/Mage/src/main/java/mage/filter/FilterImpl.java +++ b/Mage/src/main/java/mage/filter/FilterImpl.java @@ -1,4 +1,3 @@ - package mage.filter; import java.util.ArrayList; @@ -17,13 +16,14 @@ public abstract class FilterImpl implements Filter { protected List> predicates = new ArrayList<>(); protected String message; - protected boolean lockedFilter = false; // Helps to prevent to "accidently" modify the StaticFilters objects + protected boolean lockedFilter; // Helps to prevent to "accidently" modify the StaticFilters objects @Override public abstract FilterImpl copy(); public FilterImpl(String name) { this.message = name; + this.lockedFilter = false; } public FilterImpl(final FilterImpl filter) { diff --git a/Mage/src/main/java/mage/filter/FilterPermanent.java b/Mage/src/main/java/mage/filter/FilterPermanent.java index 06530a5140e..963334c1870 100644 --- a/Mage/src/main/java/mage/filter/FilterPermanent.java +++ b/Mage/src/main/java/mage/filter/FilterPermanent.java @@ -1,4 +1,3 @@ - package mage.filter; import java.util.ArrayList; @@ -27,11 +26,6 @@ public class FilterPermanent extends FilterObject implements FilterIn super("permanent"); } - public FilterPermanent(final FilterPermanent filter) { - super(filter); - this.extraPredicates = new ArrayList<>(filter.extraPredicates); - } - public FilterPermanent(String name) { super(name); } @@ -43,11 +37,16 @@ public class FilterPermanent extends FilterObject implements FilterIn public FilterPermanent(Set subtypesList, String name) { super(name); - for (SubType subtype: subtypesList) { + for (SubType subtype : subtypesList) { this.add(new SubtypePredicate(subtype)); } } + public FilterPermanent(final FilterPermanent filter) { + super(filter); + this.extraPredicates = new ArrayList<>(filter.extraPredicates); + } + @Override public boolean checkObjectClass(Object object) { return object instanceof Permanent; @@ -63,6 +62,9 @@ public class FilterPermanent extends FilterObject implements FilterIn } public void add(ObjectPlayerPredicate predicate) { + if (isLockedFilter()) { + throw new UnsupportedOperationException("You may not modify a locked filter"); + } extraPredicates.add(predicate); } diff --git a/Mage/src/main/java/mage/filter/FilterPlayer.java b/Mage/src/main/java/mage/filter/FilterPlayer.java index 323180e1b9d..907dfb34340 100644 --- a/Mage/src/main/java/mage/filter/FilterPlayer.java +++ b/Mage/src/main/java/mage/filter/FilterPlayer.java @@ -1,4 +1,3 @@ - package mage.filter; import java.util.ArrayList; @@ -34,6 +33,9 @@ public class FilterPlayer extends FilterImpl { } public void add(ObjectPlayerPredicate predicate) { + if (isLockedFilter()) { + throw new UnsupportedOperationException("You may not modify a locked filter"); + } extraPredicates.add(predicate); } diff --git a/Mage/src/main/java/mage/filter/FilterStackObject.java b/Mage/src/main/java/mage/filter/FilterStackObject.java index dc180df68d1..f7627c2f751 100644 --- a/Mage/src/main/java/mage/filter/FilterStackObject.java +++ b/Mage/src/main/java/mage/filter/FilterStackObject.java @@ -1,4 +1,3 @@ - package mage.filter; import java.util.ArrayList; @@ -42,6 +41,9 @@ public class FilterStackObject extends FilterObject { } public void add(ObjectPlayerPredicate predicate) { + if (isLockedFilter()) { + throw new UnsupportedOperationException("You may not modify a locked filter"); + } extraPredicates.add(predicate); } diff --git a/Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java b/Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java index 810def1d91e..f1598666111 100644 --- a/Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java +++ b/Mage/src/main/java/mage/filter/predicate/mageobject/MulticoloredPredicate.java @@ -16,7 +16,7 @@ public class MulticoloredPredicate implements Predicate { @Override public boolean apply(MageObject input, Game game) { // 708.3. Each split card that consists of two halves with different colored mana symbols in their mana costs - // is a multicolored card while it’s not a spell on the stack. While it’s a spell on the stack, it’s only the + // is a multicolored card while it's not a spell on the stack. While it's a spell on the stack, it's only the // color or colors of the half or halves being cast. # if (input instanceof SplitCardHalf && game.getState().getZone(input.getId()) != Zone.STACK) { return 1 < ((SplitCardHalf) input).getMainCard().getColor(game).getColorCount(); diff --git a/Mage/src/main/java/mage/game/GameCommanderImpl.java b/Mage/src/main/java/mage/game/GameCommanderImpl.java index fc20ad69ed6..f6c2e6779de 100644 --- a/Mage/src/main/java/mage/game/GameCommanderImpl.java +++ b/Mage/src/main/java/mage/game/GameCommanderImpl.java @@ -147,7 +147,7 @@ public abstract class GameCommanderImpl extends GameImpl { } /* 20130711 - *903.14a A player that’s been dealt 21 or more combat damage by the same commander + *903.14a A player that's been dealt 21 or more combat damage by the same commander * over the course of the game loses the game. (This is a state-based action. See rule 704.) * */ diff --git a/Mage/src/main/java/mage/game/GameImpl.java b/Mage/src/main/java/mage/game/GameImpl.java index 259d7e53358..ae94942ac2d 100644 --- a/Mage/src/main/java/mage/game/GameImpl.java +++ b/Mage/src/main/java/mage/game/GameImpl.java @@ -2007,7 +2007,7 @@ public abstract class GameImpl implements Game, Serializable { } } // 704.5s If the number of lore counters on a Saga permanent is greater than or equal to its final chapter number - // and it isn’t the source of a chapter ability that has triggered but not yet left the stack, that Saga’s controller sacrifices it. + // and it isn't the source of a chapter ability that has triggered but not yet left the stack, that Saga's controller sacrifices it. if (perm.hasSubtype(SubType.SAGA, this)) { for (Ability sagaAbility : perm.getAbilities()) { if (sagaAbility instanceof SagaAbility) { diff --git a/Mage/src/main/java/mage/game/combat/Combat.java b/Mage/src/main/java/mage/game/combat/Combat.java index c6478382bee..65dad771621 100644 --- a/Mage/src/main/java/mage/game/combat/Combat.java +++ b/Mage/src/main/java/mage/game/combat/Combat.java @@ -695,6 +695,7 @@ public class Combat implements Serializable, Copyable { //20101001 - 509.1c // map with attackers (UUID) that must be blocked by at least one blocker and a set of all creatures that can block it and don't block yet Map> mustBeBlockedByAtLeastOne = new HashMap<>(); + Map minNumberOfBlockersMap = new HashMap<>(); // check mustBlock requirements of creatures from opponents of attacking player for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, player.getId(), game)) { @@ -710,6 +711,7 @@ public class Combat implements Serializable, Copyable { for (Ability ability : entry.getValue()) { UUID toBeBlockedCreature = effect.mustBlockAttackerIfElseUnblocked(ability, game); if (toBeBlockedCreature != null) { + minNumberOfBlockersMap.put(toBeBlockedCreature, effect.getMinNumberOfBlockers()); Set potentialBlockers; if (mustBeBlockedByAtLeastOne.containsKey(toBeBlockedCreature)) { potentialBlockers = mustBeBlockedByAtLeastOne.get(toBeBlockedCreature); @@ -804,6 +806,7 @@ public class Combat implements Serializable, Copyable { for (Ability ability : entry.getValue()) { UUID toBeBlockedCreature = effect.mustBlockAttackerIfElseUnblocked(ability, game); if (toBeBlockedCreature != null) { + minNumberOfBlockersMap.put(toBeBlockedCreature, effect.getMinNumberOfBlockers()); Set potentialBlockers; if (mustBeBlockedByAtLeastOne.containsKey(toBeBlockedCreature)) { potentialBlockers = mustBeBlockedByAtLeastOne.get(toBeBlockedCreature); @@ -898,6 +901,7 @@ public class Combat implements Serializable, Copyable { break; } } + requirementFulfilled &= (combatGroup.getBlockers().size() >= Math.min(minNumberOfBlockersMap.get(toBeBlockedCreatureId), mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId).size())); if (!requirementFulfilled) { // creature is not blocked but has possible blockers if (controller.isHuman()) { @@ -906,6 +910,9 @@ public class Combat implements Serializable, Copyable { // check if all possible blocker block other creatures they are forced to block // read through all possible blockers for (UUID possibleBlockerId : mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId)) { + if (combatGroup.getBlockers().contains(possibleBlockerId)) { + continue; + } String blockRequiredMessage = isCreatureDoingARequiredBlock( possibleBlockerId, toBeBlockedCreatureId, mustBeBlockedByAtLeastOne, game); if (blockRequiredMessage != null) { // message means not required @@ -931,7 +938,9 @@ public class Combat implements Serializable, Copyable { } defender.declareBlocker(defender.getId(), possibleBlockerId, toBeBlockedCreatureId, game); } - break; + if (combatGroup.getBlockers().size() >= minNumberOfBlockersMap.get(toBeBlockedCreatureId)) { + break; + } } } } diff --git a/Mage/src/main/java/mage/game/combat/CombatGroup.java b/Mage/src/main/java/mage/game/combat/CombatGroup.java index cf414b96e0a..235b2e774cb 100644 --- a/Mage/src/main/java/mage/game/combat/CombatGroup.java +++ b/Mage/src/main/java/mage/game/combat/CombatGroup.java @@ -869,7 +869,7 @@ public class CombatGroup implements Serializable, Copyable { // for handling Butcher Orgg if (creature.getAbilities().containsKey(ControllerDivideCombatDamageAbility.getInstance().getId())) { Player player = game.getPlayer(defenderAssignsCombatDamage(game) ? defendingPlayerId : (!isAttacking && attackerAssignsCombatDamage(game) ? game.getCombat().getAttackingPlayerId() : playerId)); - // 10/4/2004 If it is blocked but then all of its blockers are removed before combat damage is assigned, then it won’t be able to deal combat damage and you won’t be able to use its ability. + // 10/4/2004 If it is blocked but then all of its blockers are removed before combat damage is assigned, then it won't be able to deal combat damage and you won't be able to use its ability. // (same principle should apply if it's blocking and its blocked attacker is removed from combat) if (!((blocked && blockers.isEmpty() && isAttacking) || (attackers.isEmpty() && !isAttacking)) && canDamage(creature, first)) { if (player.chooseUse(Outcome.Damage, "Do you wish to assign " + creature.getLogName() + "'s combat damage divided among defending player and/or any number of defending creatures?", null, game)) { diff --git a/Mage/src/main/java/mage/game/command/emblems/RowanKenrithEmblem.java b/Mage/src/main/java/mage/game/command/emblems/RowanKenrithEmblem.java index 8a34621a24f..5243df4bc1e 100644 --- a/Mage/src/main/java/mage/game/command/emblems/RowanKenrithEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/RowanKenrithEmblem.java @@ -1,19 +1,18 @@ - package mage.game.command.emblems; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.mana.ManaAbility; +import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.constants.Outcome; import mage.constants.Zone; import mage.game.Game; import mage.game.command.Emblem; import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; import mage.game.stack.StackAbility; -import mage.game.stack.StackObject; import mage.players.Player; -import mage.target.targetpointer.FixedTarget; /** * @@ -30,14 +29,19 @@ public class RowanKenrithEmblem extends Emblem { class RowanKenrithEmblemTriggeredAbility extends TriggeredAbilityImpl { - public RowanKenrithEmblemTriggeredAbility() { - super(Zone.COMMAND, new RowanKenrithEmblemCopyEffect(), false); + RowanKenrithEmblemTriggeredAbility() { + super(Zone.BATTLEFIELD, new RowanKenrithEmblemEffect(), false); } - public RowanKenrithEmblemTriggeredAbility(final RowanKenrithEmblemTriggeredAbility ability) { + RowanKenrithEmblemTriggeredAbility(final RowanKenrithEmblemTriggeredAbility ability) { super(ability); } + @Override + public RowanKenrithEmblemTriggeredAbility copy() { + return new RowanKenrithEmblemTriggeredAbility(this); + } + @Override public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY; @@ -45,10 +49,11 @@ class RowanKenrithEmblemTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getPlayerId().equals(this.getControllerId())) { - StackObject ability = game.getStack().getStackObject(event.getTargetId()); - if (ability != null && !(ability instanceof ManaAbility)) { - this.getEffects().get(0).setTargetPointer(new FixedTarget(ability.getId())); + if (event.getPlayerId().equals(getControllerId())) { + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getSourceId()); + if (stackAbility != null && !(stackAbility.getStackAbility() instanceof ActivatedManaAbilityImpl)) { + Effect effect = this.getEffects().get(0); + effect.setValue("stackAbility", stackAbility); return true; } } @@ -59,40 +64,38 @@ class RowanKenrithEmblemTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "Whenever you activate an ability that isn't a mana ability, copy it. You may choose new targets for the copy."; } - - @Override - public RowanKenrithEmblemTriggeredAbility copy() { - return new RowanKenrithEmblemTriggeredAbility(this); - } } -class RowanKenrithEmblemCopyEffect extends OneShotEffect { +class RowanKenrithEmblemEffect extends OneShotEffect { - public RowanKenrithEmblemCopyEffect() { - super(Outcome.Copy); - this.staticText = "copy it. You may choose new targets for the copy."; + RowanKenrithEmblemEffect() { + super(Outcome.Benefit); + this.staticText = ", copy it. You may choose new targets for the copy."; } - public RowanKenrithEmblemCopyEffect(final RowanKenrithEmblemCopyEffect effect) { + RowanKenrithEmblemEffect(final RowanKenrithEmblemEffect effect) { super(effect); } @Override - public boolean apply(Game game, Ability source) { - StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(targetPointer.getFirst(game, source)); - if (stackAbility != null) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - stackAbility.createCopyOnStack(game, source, source.getControllerId(), true); - return true; - } - } - return false; - + public RowanKenrithEmblemEffect copy() { + return new RowanKenrithEmblemEffect(this); } @Override - public RowanKenrithEmblemCopyEffect copy() { - return new RowanKenrithEmblemCopyEffect(this); + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + StackAbility ability = (StackAbility) getValue("stackAbility"); + Player controller = game.getPlayer(source.getControllerId()); + Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (ability != null && controller != null && sourcePermanent != null) { + ability.createCopyOnStack(game, source, source.getControllerId(), true); + game.informPlayers(sourcePermanent.getIdName() + ": " + controller.getLogName() + " copied activated ability"); + return true; + } + return false; } } diff --git a/Mage/src/main/java/mage/game/permanent/PermanentCard.java b/Mage/src/main/java/mage/game/permanent/PermanentCard.java index d089ee06d91..eef81055552 100644 --- a/Mage/src/main/java/mage/game/permanent/PermanentCard.java +++ b/Mage/src/main/java/mage/game/permanent/PermanentCard.java @@ -178,7 +178,7 @@ public class PermanentCard extends PermanentImpl { @Override public int getConvertedManaCost() { if (isTransformed()) { - // 711.4b While a double-faced permanent’s back face is up, it has only the characteristics of its back face. + // 711.4b While a double-faced permanent's back face is up, it has only the characteristics of its back face. // However, its converted mana cost is calculated using the mana cost of its front face. This is a change from previous rules. // If a permanent is copying the back face of a double-faced card (even if the card representing that copy // is itself a double-faced card), the converted mana cost of that permanent is 0. diff --git a/Mage/src/main/java/mage/players/ManaPool.java b/Mage/src/main/java/mage/players/ManaPool.java index cb099ddebd9..e66b118a8b1 100644 --- a/Mage/src/main/java/mage/players/ManaPool.java +++ b/Mage/src/main/java/mage/players/ManaPool.java @@ -1,4 +1,3 @@ - package mage.players; import java.io.Serializable; @@ -366,25 +365,27 @@ public class ManaPool implements Serializable { } public void addMana(Mana manaToAdd, Game game, Ability source, boolean emptyOnTurnsEnd) { - Mana mana = manaToAdd.copy(); - if (!game.replaceEvent(new ManaEvent(EventType.ADD_MANA, source.getId(), source.getSourceId(), playerId, mana))) { - if (mana instanceof ConditionalMana) { - ManaPoolItem item = new ManaPoolItem((ConditionalMana) mana, source.getSourceObject(game), - ((ConditionalMana) mana).getManaProducerOriginalId() != null ? ((ConditionalMana) mana).getManaProducerOriginalId() : source.getOriginalId()); - if (emptyOnTurnsEnd) { - item.setDuration(Duration.EndOfTurn); + if (manaToAdd != null) { + Mana mana = manaToAdd.copy(); + if (!game.replaceEvent(new ManaEvent(EventType.ADD_MANA, source.getId(), source.getSourceId(), playerId, mana))) { + if (mana instanceof ConditionalMana) { + ManaPoolItem item = new ManaPoolItem((ConditionalMana) mana, source.getSourceObject(game), + ((ConditionalMana) mana).getManaProducerOriginalId() != null ? ((ConditionalMana) mana).getManaProducerOriginalId() : source.getOriginalId()); + if (emptyOnTurnsEnd) { + item.setDuration(Duration.EndOfTurn); + } + this.manaItems.add(item); + } else { + ManaPoolItem item = new ManaPoolItem(mana.getRed(), mana.getGreen(), mana.getBlue(), mana.getWhite(), mana.getBlack(), mana.getGeneric() + mana.getColorless(), source.getSourceObject(game), source.getOriginalId(), mana.getFlag()); + if (emptyOnTurnsEnd) { + item.setDuration(Duration.EndOfTurn); + } + this.manaItems.add(item); } - this.manaItems.add(item); - } else { - ManaPoolItem item = new ManaPoolItem(mana.getRed(), mana.getGreen(), mana.getBlue(), mana.getWhite(), mana.getBlack(), mana.getGeneric() + mana.getColorless(), source.getSourceObject(game), source.getOriginalId(), mana.getFlag()); - if (emptyOnTurnsEnd) { - item.setDuration(Duration.EndOfTurn); - } - this.manaItems.add(item); + ManaEvent manaEvent = new ManaEvent(EventType.MANA_ADDED, source.getId(), source.getSourceId(), playerId, mana); + manaEvent.setData(mana.toString()); + game.fireEvent(manaEvent); } - ManaEvent manaEvent = new ManaEvent(EventType.MANA_ADDED, source.getId(), source.getSourceId(), playerId, mana); - manaEvent.setData(mana.toString()); - game.fireEvent(manaEvent); } } diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 871bcdd0256..72ec976a510 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1,4 +1,3 @@ - package mage.players; import java.io.Serializable; @@ -492,18 +491,22 @@ public abstract class PlayerImpl implements Player, Serializable { PlayerList players = game.getState().getPlayerList(playerId); for (int i = 0; i < range.getRange(); i++) { Player player = players.getNext(game); - while (player.hasLeft()) { - player = players.getNext(game); + if (player != null) { + while (player.hasLeft()) { + player = players.getNext(game); + } + inRange.add(player.getId()); } - inRange.add(player.getId()); } players = game.getState().getPlayerList(playerId); for (int i = 0; i < range.getRange(); i++) { Player player = players.getPrevious(game); - while (player.hasLeft()) { - player = players.getPrevious(game); + if (player != null) { + while (player.hasLeft()) { + player = players.getPrevious(game); + } + inRange.add(player.getId()); } - inRange.add(player.getId()); } } } diff --git a/Mage/src/main/java/mage/target/TargetObject.java b/Mage/src/main/java/mage/target/TargetObject.java index 6936f78acd6..575ad44873d 100644 --- a/Mage/src/main/java/mage/target/TargetObject.java +++ b/Mage/src/main/java/mage/target/TargetObject.java @@ -1,21 +1,19 @@ - - package mage.target; -import mage.constants.Zone; +import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; +import mage.constants.Zone; import mage.game.Game; -import java.util.UUID; - /** * * @author BetaSteward_at_googlemail.com */ public abstract class TargetObject extends TargetImpl { - protected TargetObject() {} + protected TargetObject() { + } public TargetObject(Zone zone) { this(1, 1, zone, false); @@ -40,7 +38,7 @@ public abstract class TargetObject extends TargetImpl { @Override public String getTargetedName(Game game) { StringBuilder sb = new StringBuilder(); - for (UUID targetId: getTargets()) { + for (UUID targetId : getTargets()) { MageObject object = game.getObject(targetId); if (object != null) { sb.append(object.getLogName()).append(' '); @@ -52,7 +50,9 @@ public abstract class TargetObject extends TargetImpl { @Override public boolean canTarget(UUID id, Game game) { MageObject object = game.getObject(id); - return object != null && game.getState().getZone(id).match(zone) && getFilter().match(object, game); + return object != null + && zone != null && zone.match(game.getState().getZone(id)) + && getFilter() != null && getFilter().match(object, game); } @Override diff --git a/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java b/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java index 9eb50d187fa..71ae125321f 100644 --- a/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java +++ b/Mage/src/main/java/mage/target/common/TargetCardInLibrary.java @@ -41,8 +41,8 @@ public class TargetCardInLibrary extends TargetCard { public TargetCardInLibrary(int minNumTargets, int maxNumTargets, FilterCard filter) { super(minNumTargets, maxNumTargets, Zone.LIBRARY, filter); // 701.15b If a player is searching a hidden zone for cards with a stated quality, such as a card - // with a certain card type or color, that player isn’t required to find some or all of those cards - // even if they’re present in that zone. + // with a certain card type or color, that player isn't required to find some or all of those cards + // even if they're present in that zone. this.setRequired(!filter.hasPredicates()); this.setNotTarget(true); this.librarySearchLimit = Integer.MAX_VALUE; diff --git a/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java b/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java index 14c22b7f5a8..22f3fc3ba59 100644 --- a/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java +++ b/Mage/src/main/java/mage/watchers/common/CommanderInfoWatcher.java @@ -16,7 +16,7 @@ import mage.players.Player; import mage.watchers.Watcher; /* 20130711 - *903.14a A player that’s been dealt 21 or more combat damage by the same commander + *903.14a A player that's been dealt 21 or more combat damage by the same commander * over the course of the game loses the game. (This is a state-based action. See rule 704.) * * diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 80ec6b76bd5..069bd368801 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -30874,7 +30874,7 @@ Djeru's Resolve|Amonkhet|11|C|{W}|Instant|||Untap target creature. Prevent all d Fan Bearer|Amonkhet|12|C|{W}|Creature - Zombie|1|2|{2}, {T}: Tap target creature.| Forsake the Worldly|Amonkhet|13|C|{2}{W}|Instant|||Exile target artifact or enchantment.$Cycling {2}| Gideon of the Trials|Amonkhet|14|M|{1}{W}{W}|Legendary Planeswalker - Gideon|||+1: Until your next turn, prevent all damage target permanent would deal.$0: Until end of turn, Gideon of the Trials becomes a 4/4 Human Soldier creature with indestructible that's still a planeswalker. Prevent all damage that would be dealt to him this turn.$0: You get an emblem with "As long as you control a Gideon planeswalker, you can't lose the game and your opponent can't win the game."| -Gideon's Intervention|Amonkhet|15|R|{2}{W}{W}|Enchantment|||As Gideon’s Intervention enters the battlefield, choose a card name.$Your opponents can’t cast spells with the chosen name.$Prevent all damage that would be dealt to you and permanents you control by sources with the chosen name.| +Gideon's Intervention|Amonkhet|15|R|{2}{W}{W}|Enchantment|||As Gideon's Intervention enters the battlefield, choose a card name.$Your opponents can't cast spells with the chosen name.$Prevent all damage that would be dealt to you and permanents you control by sources with the chosen name.| Glory-Bound Initiate|Amonkhet|16|R|{1}{W}|Creature - Human Warrior|3|1|You may exert Glory-Bound Initiate as it attacks. When you do, it gets +1/+3 and gains lifelink until end of turn.| Gust Walker|Amonkhet|17|C|{1}{W}|Creature - Human Wizard|2|2|You may exert Gust Walker as it attacks. When you do, it gets +1/+1 and gains flying until end of turn.| Impeccable Timing|Amonkhet|18|C|{1}{W}|Instant|||Impeccable Timing deals 3 damage to target attacking or blocking creature.| @@ -33622,3 +33622,44 @@ Sure Strike|Core Set 2019|161|C|{1}{R}|Instant|||Target creature gets +3/+0 and Tormenting Voice|Core Set 2019|164|C|{1}{R}|Sorcery|||As an additional cost to cast this spell, discard a card.$Draw two cards.| Trumpet Blast|Core Set 2019|165|C|{2}{R}|Instant|||Attacking creatures get +2/+0 until end of turn.| Skyscanner|Core Set 2019|245|C|{3}|Artifact Creature - Thopter|1|1|Flying$When Skyscanner enters the battlefield, draw a card.| +Mu Yanling|Global Series Jiang Yanggu & Mu Yanling|1|M|{4}{U}{U}|Legendary Planeswalker - Yanling|||+2: Target creature can't be blocked this turn.$−3: Draw two cards.$−10: Tap all creatures your opponents control. You take an extra turn after this one.| +Colorful Feiyi Sparrow|Global Series Jiang Yanggu & Mu Yanling|2|C|{1}{W}|Creature - Bird|1|3|Flying| +Purple-Crystal Crab|Global Series Jiang Yanggu & Mu Yanling|3|C|{1}{U}|Creature - Crab|1|1|When Purple-Crystal Crab dies, draw card.| +Vivid Flying Fish|Global Series Jiang Yanggu & Mu Yanling|4|C|{1}{U}|Creature - Fish Lizard|1|1|Vivid Flying Fish has flying as long as it's attacking.| +Welkin Tern|Global Series Jiang Yanggu & Mu Yanling|5|C|{1}{U}|Creature - Bird|2|1|Flying$Welkin Tern can block only creatures with flying.| +Heavenly Qilin|Global Series Jiang Yanggu & Mu Yanling|6|C|{2}{W}|Creature - Kirin|2|2|Flying$Whenenver Heavenly Qilin attacks, another target creature you control gains flying until end of turn.| +Armored Whirl Turtle|Global Series Jiang Yanggu & Mu Yanling|7|C|{2}{U}|Creature - Turtle|0|5|| +Nine-Tail White Fox|Global Series Jiang Yanggu & Mu Yanling|8|C|{2}{U}|Creature - Fox Spirit|2|2|Whenever Nine-Tail White Fox deals combat damage to a player, draw a card.| +Earth-Origin Yak|Global Series Jiang Yanggu & Mu Yanling|9|C|{3}{W}|Creature - Ox|2|4|When Earth-Origin Yak enters the battlefield, creatures you control get +1/+1 until end of turn.| +Moon-Eating Dog|Global Series Jiang Yanggu & Mu Yanling|10|U|{3}{U}|Creature - Hound|3|3|As long as you control a Yanling planeswalker, Moon-Eating Dog has flying.| +Stormcloud Spirit|Global Series Jiang Yanggu & Mu Yanling|11|U|{3}{U}{U}|Creature - Spirit|4|4|Flying| +Ancestor Dragon|Global Series Jiang Yanggu & Mu Yanling|12|R|{4}{W}{W}|Creature - Dragon|5|6|Flying$Whenever one or more creatures you control attack, you gain 1 life for each attacking creature.| +Cloak of Mists|Global Series Jiang Yanggu & Mu Yanling|13|C|{1}{U}|Enchantment - Aura|||Enchant creature$Enchanted creature can't be blocked.| +Qilin's Blessing|Global Series Jiang Yanggu & Mu Yanling|14|C|{W}|Instant|||Target creature gets +2/+2 until end of turn.| +Drown in Shapelessness|Global Series Jiang Yanggu & Mu Yanling|15|C|{1}{U}|Instant|||Return target creature to its owner's hand.| +Dragon's Presence|Global Series Jiang Yanggu & Mu Yanling|16|C|{2}{W}|Instant|||Dragon's Presence deals 5 damage to target attacking or blocking creature.| +Brilliant Plan|Global Series Jiang Yanggu & Mu Yanling|17|U|{4}{U}|Sorcery|||Draw three cards.| +Rhythmic Water Vortex|Global Series Jiang Yanggu & Mu Yanling|18|R|{3}{U}{U}|Sorcery|||Return up to two target creatures to their owner's hand.$Search your library and/or graveyard for a card named Mu Yanling, reveal it, and put it into your hand. If you searched your library this way, shuffle it.| +Meandering River|Global Series Jiang Yanggu & Mu Yanling|19|C||Land|||Meandering River enters the battlefield tapped.${T}: Add {W} or {U}.| +Plains|Global Series Jiang Yanggu & Mu Yanling|20|C||Basic Land - Plains|||({T}: Add {W}.)| +Island|Global Series Jiang Yanggu & Mu Yanling|21|C||Basic Land - Island|||({T}: Add {U}.)| +Jiang Yanggu|Global Series Jiang Yanggu & Mu Yanling|22|M|{4}{G}|Legendary Planeswalker - Yanggu|||+1: Target creature gets +2/+2 until end of turn.$−1: If you don't control a creature named Mowu, create a legendary 3/3 green Hound creature token named Mowu.$−5: Until end of turn, target creature gains trample and gets +X/+X, where X is the number of lands you control.| +Leopard-Spotted Jiao|Global Series Jiang Yanggu & Mu Yanling|23|C|{1}{R}|Creature - Beast|3|1|| +Feiyi Snake|Global Series Jiang Yanggu & Mu Yanling|24|C|{1}{G}|Creature - Snake|2|1|Reach| +Sacred White Deer|Global Series Jiang Yanggu & Mu Yanling|25|U|{1}{G}|Creature - Elk|2|2|{3}{G}, {T}: You gain 4 life. Activate this ability only if you control a Yanggu planeswalker.| +Reckless Pangolin|Global Series Jiang Yanggu & Mu Yanling|26|C|{2}{G}|Creature - Pangolin|2|2|Whenever Reckless Pangolin attacks, it gets +1/+1 until end of turn.| +Giant Spider|Global Series Jiang Yanggu & Mu Yanling|27|C|{3}{G}|Creature - Spider|2|4|Reach| +Ferocious Zheng|Global Series Jiang Yanggu & Mu Yanling|28|C|{2}{G}{G}|Creature - Cat Beast|4|4|| +Fire-Omen Crane|Global Series Jiang Yanggu & Mu Yanling|29|U|{3}{R}{R}|Creature - Bird Spirit|3|3|Flying$Whenever Fire-Omen Crane attacks, it deals 1 damage to target creature an opponent controls.| +Screeching Phoenix|Global Series Jiang Yanggu & Mu Yanling|30|R|{4}{R}{R}|Creature - Phoenix|4|4|Flying${2}{R}: Creatures you control get +1/+0 until end of turn.| +Earthshaking Si|Global Series Jiang Yanggu & Mu Yanling|31|C|{5}{G}|Creature - Beast|5|5|Trample| +Hardened-Scale Armor|Global Series Jiang Yanggu & Mu Yanling|32|C|{2}{G}|Enchantment - Aura|||Enchant creature$Enchanted creature gets +3/3.| +Breath of Fire|Global Series Jiang Yanggu & Mu Yanling|33|C|{1}{R}|Instant|||Breath of Fire deals 2 damage to target creature.| +Aggressive Instinct|Global Series Jiang Yanggu & Mu Yanling|34|C|{1}{G}|Sorcery|||Target creature you control deals damage equal to its power to target creature you don't control.| +Confidence from Strength|Global Series Jiang Yanggu & Mu Yanling|35|C|{2}{G}|Sorcery|||Target creature gets +4/+4 until and gains trample until end of turn.| +Journey for the Elixir|Global Series Jiang Yanggu & Mu Yanling|36|R|{2}{G}|Sorcery|||Search your library and graveyard for a basic land card and a card named Jiang Yanggu, reveal them, put them into your hand, then shuffle your library.| +Cleansing Screech|Global Series Jiang Yanggu & Mu Yanling|37|C|{4}{R}|Sorcery|||Cleansing Screech deals 4 damage to any target.| +Timber Gorge|Global Series Jiang Yanggu & Mu Yanling|38|C||Land|||Timber Gorge enters the battlefield tapped.${T}: Add {R} or {G}.| +Mountain|Global Series Jiang Yanggu & Mu Yanling|39|C||Basic Land - Mountain|||({T}: Add {R}.)| +Forest|Global Series Jiang Yanggu & Mu Yanling|40|C||Basic Land - Forest|||({T}: Add {G}.)| +