diff --git a/Mage.Sets/src/mage/cards/v/VronosMaskedInquisitor.java b/Mage.Sets/src/mage/cards/v/VronosMaskedInquisitor.java new file mode 100644 index 00000000000..5ce41e937d5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VronosMaskedInquisitor.java @@ -0,0 +1,106 @@ +package mage.cards.v; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.PhaseOutTargetEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.AddCardSubTypeTargetEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; +import mage.filter.common.FilterNonlandPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.ControllerIdPredicate; +import mage.game.Game; +import mage.game.permanent.token.custom.CreatureToken; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.targetadjustment.TargetAdjuster; +import mage.target.targetpointer.EachTargetPointer; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class VronosMaskedInquisitor extends CardImpl { + + private static final FilterControlledPlaneswalkerPermanent filter = new FilterControlledPlaneswalkerPermanent("planeswalkers you control"); + + static { + filter.add(AnotherPredicate.instance); + } + + public VronosMaskedInquisitor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{U}{U}"); + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.VRONOS); + this.setStartingLoyalty(5); + + // +1: Up to two other target planeswalkers you control phase out at the beginning of the next end step. + LoyaltyAbility ability = new LoyaltyAbility(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new PhaseOutTargetEffect())) + .setText("up to two other target planeswalkers you control phase out at the beginning of the next end step. " + + "(Treat them and anything attached to them as though they don't exist until your next turn.)"), 1); + ability.addTarget(new TargetPermanent(0, 2, filter)); + this.addAbility(ability); + + // −2: For each opponent, return up to one target nonland permanent that player controls to its owner's hand. + LoyaltyAbility ability2 = new LoyaltyAbility(new ReturnToHandTargetEffect().setTargetPointer(new EachTargetPointer()) + .setText("for each opponent, return up to one target nonland permanent that player controls to its owner's hand"), -2); + ability2.setTargetAdjuster(VronosMaskedInquisitorAdjuster.instance); + this.addAbility(ability2); + + // −7: Target artifact you control becomes a 9/9 Construct artifact creature and gains vigilance, indestructible, and "This creature can't be blocked." + LoyaltyAbility ability3 = new LoyaltyAbility(new BecomesCreatureTargetEffect( + new CreatureToken(9, 9) + .withType(CardType.ARTIFACT), + false, false, Duration.EndOfGame).setText("Target artifact you control becomes a 9/9 Construct artifact creature"), -7); + ability3.addEffect(new AddCardSubTypeTargetEffect(SubType.CONSTRUCT, Duration.EndOfGame).setText(" and gains")); + ability3.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfGame, " vigilance,")); + ability3.addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfGame, " indestructible,")); + ability3.addEffect(new GainAbilityTargetEffect(new SimpleStaticAbility(new CantBeBlockedSourceEffect()), Duration.EndOfGame, " and \"This creature can't be blocked.\"")); + ability3.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT)); + this.addAbility(ability3); + } + + private VronosMaskedInquisitor(final VronosMaskedInquisitor card) { + super(card); + } + + @Override + public VronosMaskedInquisitor copy() { + return new VronosMaskedInquisitor(this); + } +} + +enum VronosMaskedInquisitorAdjuster implements TargetAdjuster { + instance; + + @Override + public void adjustTargets(Ability ability, Game game) { + ability.getTargets().clear(); + for (UUID opponentId : game.getOpponents(ability.getControllerId())) { + Player opponent = game.getPlayer(opponentId); + if (opponent == null) { + continue; + } + FilterPermanent filter = new FilterNonlandPermanent("nonland permanent controlled by " + opponent.getLogName()); + filter.add(new ControllerIdPredicate(opponentId)); + ability.addTarget(new TargetPermanent(0, 1, filter, false)); + } + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderMasters.java b/Mage.Sets/src/mage/sets/CommanderMasters.java index a53736340d9..8ddb0034999 100644 --- a/Mage.Sets/src/mage/sets/CommanderMasters.java +++ b/Mage.Sets/src/mage/sets/CommanderMasters.java @@ -697,6 +697,7 @@ public final class CommanderMasters extends ExpansionSet { cards.add(new SetCardInfo("Victimize", 195, Rarity.UNCOMMON, mage.cards.v.Victimize.class)); cards.add(new SetCardInfo("Vindictive Lich", 196, Rarity.RARE, mage.cards.v.VindictiveLich.class)); cards.add(new SetCardInfo("Vizier of Tumbling Sands", 131, Rarity.COMMON, mage.cards.v.VizierOfTumblingSands.class)); + cards.add(new SetCardInfo("Vronos, Masked Inquisitor", 729, Rarity.RARE, mage.cards.v.VronosMaskedInquisitor.class)); cards.add(new SetCardInfo("Vulshok Battlegear", 418, Rarity.COMMON, mage.cards.v.VulshokBattlegear.class)); cards.add(new SetCardInfo("Wake the Dead", 197, Rarity.RARE, mage.cards.w.WakeTheDead.class)); cards.add(new SetCardInfo("Wakening Sun's Avatar", 68, Rarity.RARE, mage.cards.w.WakeningSunsAvatar.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 6c3e6045876..bdbc8d12315 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -494,6 +494,7 @@ public enum SubType { VENSER("Venser", SubTypeSet.PlaneswalkerType), VIVIEN("Vivien", SubTypeSet.PlaneswalkerType), VRASKA("Vraska", SubTypeSet.PlaneswalkerType), + VRONOS("Vronos", SubTypeSet.PlaneswalkerType), WILL("Will", SubTypeSet.PlaneswalkerType), WINDGRACE("Windgrace", SubTypeSet.PlaneswalkerType), WRENN("Wrenn", SubTypeSet.PlaneswalkerType),