diff --git a/Mage.Sets/src/mage/cards/a/ArachnePsionicWeaver.java b/Mage.Sets/src/mage/cards/a/ArachnePsionicWeaver.java index d80351d2164..7e628aab485 100644 --- a/Mage.Sets/src/mage/cards/a/ArachnePsionicWeaver.java +++ b/Mage.Sets/src/mage/cards/a/ArachnePsionicWeaver.java @@ -4,6 +4,7 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotNonTargetEffect; import mage.abilities.effects.common.ChooseCardTypeEffect; import mage.abilities.effects.common.LookAtTargetPlayerHandEffect; import mage.abilities.effects.common.cost.SpellsCostIncreasingAllEffect; @@ -45,14 +46,14 @@ public final class ArachnePsionicWeaver extends CardImpl { // Web-slinging {W} this.addAbility(new WebSlingingAbility(this, "{W}")); - // As Arachne enters, look at target opponent's hand, then choose a noncreature card type. + // As Arachne enters, look at an opponent’s hand, then choose a card type other than creature. List types = Arrays.stream(CardType.values()).filter(cardType -> cardType != CardType.CREATURE) .collect(Collectors.toList()); - Ability ability = new AsEntersBattlefieldAbility(new LookAtTargetPlayerHandEffect()); + Ability ability = new AsEntersBattlefieldAbility(new OneShotNonTargetEffect( + new LookAtTargetPlayerHandEffect().setText("look at an opponent's hand"), new TargetOpponent())); ability.addEffect(new ChooseCardTypeEffect(Outcome.Benefit, types) - .setText("choose a noncreature card type") + .setText("choose a card type other than creature") .concatBy(", then")); - ability.addTarget(new TargetOpponent()); this.addAbility(ability); // Spells of the chosen type cost {1} more to cast. diff --git a/Mage.Sets/src/mage/cards/b/BeholdTheSinisterSix.java b/Mage.Sets/src/mage/cards/b/BeholdTheSinisterSix.java index a37ca39c4bb..62fb9f4a996 100644 --- a/Mage.Sets/src/mage/cards/b/BeholdTheSinisterSix.java +++ b/Mage.Sets/src/mage/cards/b/BeholdTheSinisterSix.java @@ -69,7 +69,7 @@ class BeholdTheSinisterSixTarget extends TargetCardInYourGraveyard { .filter(Objects::nonNull) .collect(Collectors.toSet()); Card card = game.getCard(id); - return card != null && !names.contains(card.getName()); + return card != null && (this.getTargets().contains(id) || !names.contains(card.getName())); } diff --git a/Mage.Sets/src/mage/cards/c/CyclonusCybertronianFighter.java b/Mage.Sets/src/mage/cards/c/CyclonusCybertronianFighter.java new file mode 100644 index 00000000000..1b21a9e9880 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CyclonusCybertronianFighter.java @@ -0,0 +1,86 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.LivingMetalAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.TurnPhase; +import mage.game.Game; +import mage.game.turn.TurnMod; + +import java.util.UUID; + +/** + * @author mllagostera + */ +public final class CyclonusCybertronianFighter extends CardImpl { + + public CyclonusCybertronianFighter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, ""); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + this.color.setBlack(true); + this.color.setBlue(true); + this.nightCard = true; + + // Living metal + this.addAbility(new LivingMetalAbility()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Cyclonus deals combat damage to a player, convert it. + // If you do, there is an additional beginning phase after this phase. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( + new CyclonusCybertronianFighterEffect(), + false + ); + this.addAbility(ability); + } + + private CyclonusCybertronianFighter(final CyclonusCybertronianFighter card) { + super(card); + } + + @Override + public CyclonusCybertronianFighter copy() { + return new CyclonusCybertronianFighter(this); + } +} + +class CyclonusCybertronianFighterEffect extends TransformSourceEffect { + + CyclonusCybertronianFighterEffect() { + super(); + staticText = "transform it. If you do, there is an additional beginning phase after this phase"; + } + + private CyclonusCybertronianFighterEffect(final CyclonusCybertronianFighterEffect effect) { + super(effect); + } + + @Override + public CyclonusCybertronianFighterEffect copy() { + return new CyclonusCybertronianFighterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + if (!super.apply(game, source)) { + return false; + } + TurnMod beginning = new TurnMod(game.getState().getActivePlayerId()).withExtraPhase(TurnPhase.BEGINNING); + game.getState().getTurnMods().add(beginning); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/c/CyclonusTheSaboteur.java b/Mage.Sets/src/mage/cards/c/CyclonusTheSaboteur.java new file mode 100644 index 00000000000..d5559695d3d --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CyclonusTheSaboteur.java @@ -0,0 +1,74 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.keyword.ConniveSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.MoreThanMeetsTheEyeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.PowerPredicate; + +import java.util.UUID; + +/** + * @author mllagostera + */ +public final class CyclonusTheSaboteur extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent(); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN,4)); + } + + private static final Condition condition = new SourceMatchesFilterCondition(filter); + + public CyclonusTheSaboteur(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{U}{B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ROBOT); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + this.secondSideCardClazz = mage.cards.c.CyclonusCybertronianFighter.class; + + // More Than Meets the Eye {5}{U}{B} + this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{5}{U}{B}")); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Cyclonus deals combat damage to a player, it connives. + Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility( + new ConniveSourceEffect("it"), + false, + true + ); + + // Then if Cyclonus's power is 5 or greater, convert it + ability.addEffect((new ConditionalOneShotEffect( + new TransformSourceEffect(), + condition, + "Then if {this}'s power is 5 or greater, convert it." + ))); + + this.addAbility(ability); + } + + private CyclonusTheSaboteur(final CyclonusTheSaboteur card) { + super(card); + } + + @Override + public CyclonusTheSaboteur copy() { + return new CyclonusTheSaboteur(this); + } +} diff --git a/Mage.Sets/src/mage/cards/e/EvolvedSpinoderm.java b/Mage.Sets/src/mage/cards/e/EvolvedSpinoderm.java index 8d9789f0196..0e4ed8efd43 100644 --- a/Mage.Sets/src/mage/cards/e/EvolvedSpinoderm.java +++ b/Mage.Sets/src/mage/cards/e/EvolvedSpinoderm.java @@ -48,8 +48,8 @@ public final class EvolvedSpinoderm extends CardImpl { // Evolved Spinoderm has trample as long as it was two or fewer oil counters on it, Otherwise, it has hexproof. this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( - new GainAbilitySourceEffect(HexproofAbility.getInstance()), new GainAbilitySourceEffect(TrampleAbility.getInstance()), + new GainAbilitySourceEffect(HexproofAbility.getInstance()), condition1, "{this} has trample as long as it has two " + "or fewer oil counters on it. Otherwise, it has hexproof" ))); diff --git a/Mage.Sets/src/mage/cards/p/Pestilence.java b/Mage.Sets/src/mage/cards/p/Pestilence.java index 90adfe9ea6a..9bedab824a0 100644 --- a/Mage.Sets/src/mage/cards/p/Pestilence.java +++ b/Mage.Sets/src/mage/cards/p/Pestilence.java @@ -22,7 +22,7 @@ import java.util.UUID; public final class Pestilence extends CardImpl { private static final Condition condition = new PermanentsOnTheBattlefieldCondition( - new FilterCreaturePermanent("no creatures are on the battlefield"), ComparisonType.EQUAL_TO, 0 + new FilterCreaturePermanent("no creatures are on the battlefield"), ComparisonType.EQUAL_TO, 0, false ); public Pestilence(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/cards/p/Pyrohemia.java b/Mage.Sets/src/mage/cards/p/Pyrohemia.java index c161ce7991f..0a1f52c5cf3 100644 --- a/Mage.Sets/src/mage/cards/p/Pyrohemia.java +++ b/Mage.Sets/src/mage/cards/p/Pyrohemia.java @@ -22,7 +22,7 @@ import java.util.UUID; public final class Pyrohemia extends CardImpl { private static final Condition condition = new PermanentsOnTheBattlefieldCondition( - new FilterCreaturePermanent("no creatures are on the battlefield"), ComparisonType.EQUAL_TO, 0 + new FilterCreaturePermanent("no creatures are on the battlefield"), ComparisonType.EQUAL_TO, 0, false ); public Pyrohemia(UUID ownerId, CardSetInfo setInfo) { diff --git a/Mage.Sets/src/mage/sets/SecretLairDrop.java b/Mage.Sets/src/mage/sets/SecretLairDrop.java index b9fff33cee5..55b6a53c79d 100644 --- a/Mage.Sets/src/mage/sets/SecretLairDrop.java +++ b/Mage.Sets/src/mage/sets/SecretLairDrop.java @@ -1669,7 +1669,7 @@ public class SecretLairDrop extends ExpansionSet { cards.add(new SetCardInfo("Chaotic Goo", 1658, Rarity.RARE, mage.cards.c.ChaoticGoo.class, RETRO_ART)); cards.add(new SetCardInfo("Kiki-Jiki, Mirror Breaker", 1659, Rarity.MYTHIC, mage.cards.k.KikiJikiMirrorBreaker.class, RETRO_ART)); cards.add(new SetCardInfo("Meteor Golem", 1660, Rarity.RARE, mage.cards.m.MeteorGolem.class, RETRO_ART_USE_VARIOUS)); - cards.add(new SetCardInfo("Wurmcoil Engine", 1661, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class, RETRO_ART)); + cards.add(new SetCardInfo("Wurmcoil Engine", 1661, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class, RETRO_ART_USE_VARIOUS)); cards.add(new SetCardInfo("Lightning Greaves", 1662, Rarity.RARE, mage.cards.l.LightningGreaves.class, RETRO_ART_USE_VARIOUS)); cards.add(new SetCardInfo("Skullclamp", 1663, Rarity.RARE, mage.cards.s.Skullclamp.class, RETRO_ART_USE_VARIOUS)); cards.add(new SetCardInfo("Sol Ring", 1664, Rarity.RARE, mage.cards.s.SolRing.class, RETRO_ART_USE_VARIOUS)); @@ -2060,6 +2060,10 @@ public class SecretLairDrop extends ExpansionSet { cards.add(new SetCardInfo("Sylvan Safekeeper", 2109, Rarity.RARE, mage.cards.s.SylvanSafekeeper.class)); cards.add(new SetCardInfo("Crucible of Worlds", 2110, Rarity.MYTHIC, mage.cards.c.CrucibleOfWorlds.class)); cards.add(new SetCardInfo("Zuran Orb", 2111, Rarity.RARE, mage.cards.z.ZuranOrb.class)); + cards.add(new SetCardInfo("Greensleeves, Maro-Sorcerer", 2193, Rarity.MYTHIC, mage.cards.g.GreensleevesMaroSorcerer.class)); + cards.add(new SetCardInfo("Polyraptor", 2194, Rarity.MYTHIC, mage.cards.p.Polyraptor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Academy Manufactor", 2195, Rarity.RARE, mage.cards.a.AcademyManufactor.class)); + cards.add(new SetCardInfo("Wurmcoil Engine", 2196, Rarity.MYTHIC, mage.cards.w.WurmcoilEngine.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Feed the Swarm", 7001, Rarity.RARE, mage.cards.f.FeedTheSwarm.class)); cards.add(new SetCardInfo("Forge Anew", 7002, Rarity.RARE, mage.cards.f.ForgeAnew.class)); cards.add(new SetCardInfo("Silence", 7003, Rarity.RARE, mage.cards.s.Silence.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage.Sets/src/mage/sets/Transformers.java b/Mage.Sets/src/mage/sets/Transformers.java index 1a228b0b29b..0e8daddb516 100644 --- a/Mage.Sets/src/mage/sets/Transformers.java +++ b/Mage.Sets/src/mage/sets/Transformers.java @@ -23,6 +23,8 @@ public final class Transformers extends ExpansionSet { cards.add(new SetCardInfo("Arcee, Sharpshooter", 7, Rarity.MYTHIC, mage.cards.a.ArceeSharpshooter.class)); cards.add(new SetCardInfo("Blitzwing, Adaptive Assailant", 4, Rarity.MYTHIC, mage.cards.b.BlitzwingAdaptiveAssailant.class)); cards.add(new SetCardInfo("Blitzwing, Cruel Tormentor", 4, Rarity.MYTHIC, mage.cards.b.BlitzwingCruelTormentor.class)); + cards.add(new SetCardInfo("Cyclonus, Cybertronian Fighter", 9, Rarity.MYTHIC, mage.cards.c.CyclonusCybertronianFighter.class)); + cards.add(new SetCardInfo("Cyclonus, the Saboteur", 9, Rarity.MYTHIC, mage.cards.c.CyclonusTheSaboteur.class)); cards.add(new SetCardInfo("Flamewar, Brash Veteran", 10, Rarity.MYTHIC, mage.cards.f.FlamewarBrashVeteran.class)); cards.add(new SetCardInfo("Flamewar, Streetwise Operative", 10, Rarity.MYTHIC, mage.cards.f.FlamewarStreetwiseOperative.class)); cards.add(new SetCardInfo("Goldbug, Humanity's Ally", 11, Rarity.MYTHIC, mage.cards.g.GoldbugHumanitysAlly.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/ArachnePsionicWeaverTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/ArachnePsionicWeaverTest.java index a210814861c..254b11c3ec0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/ArachnePsionicWeaverTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/ArachnePsionicWeaverTest.java @@ -42,6 +42,7 @@ public class ArachnePsionicWeaverTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Plains"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, arachnePsionicWeaver); + setChoice(playerA, playerB.getName()); setChoice(playerA, CardType.ARTIFACT.toString()); checkPlayableAbility("Player A can't cast Tormod's", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Cast " + tormodsCrypt, false); @@ -50,4 +51,4 @@ public class ArachnePsionicWeaverTest extends CardTestPlayerBase { setStopAt(2, PhaseStep.PRECOMBAT_MAIN); execute(); } -} \ No newline at end of file +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/TheSoulStoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/TheSoulStoneTest.java index c61b8fc1655..c02fe8c6db2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/TheSoulStoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/spm/TheSoulStoneTest.java @@ -76,8 +76,7 @@ public class TheSoulStoneTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, bearCub); addCard(Zone.GRAVEYARD, playerA, bearCub); addCard(Zone.HAND, playerA, teferisTimeTwist); - addCard(Zone.BATTLEFIELD, playerA, "Swamp", 7); - addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + addCard(Zone.BATTLEFIELD, playerA, "Underground Sea", 11); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{6}{B}, {T}"); setChoice(playerA, bearCub); @@ -118,4 +117,4 @@ public class TheSoulStoneTest extends CardTestPlayerBase { } }); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java b/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java index 1b6452e49ae..ca407272602 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/PermanentsOnTheBattlefieldCondition.java @@ -41,7 +41,8 @@ public class PermanentsOnTheBattlefieldCondition implements Condition { * Applies a filter, a {@link ComparisonType}, and count to permanents on * the battlefield when checking the condition during the * {@link #apply(mage.game.Game, mage.abilities.Ability) apply} method - * invocation. + * invocation. By default, only controlled permanents are counted. + * If you want to check the whole battlefield, use a constructor with the boolean. * * @param filter * @param type