From 63c1325f374adc64caf9e7c79ee5b19e71868412 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Sun, 6 Nov 2022 13:43:33 +0000 Subject: [PATCH] [BRO] Implement Saheeli, Filigree Master (#9735) * [BRO] Implement Saheeli, Filigree Master * Add some comment text to Saheeli, Filigree Master's emblem --- .../mage/cards/s/SaheeliFiligreeMaster.java | 97 +++++++++++++++++++ Mage.Sets/src/mage/sets/TheBrothersWar.java | 2 + .../emblems/SaheeliFiligreeMasterEmblem.java | 32 ++++++ 3 files changed, 131 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SaheeliFiligreeMaster.java create mode 100644 Mage/src/main/java/mage/game/command/emblems/SaheeliFiligreeMasterEmblem.java diff --git a/Mage.Sets/src/mage/cards/s/SaheeliFiligreeMaster.java b/Mage.Sets/src/mage/cards/s/SaheeliFiligreeMaster.java new file mode 100644 index 00000000000..d244a66573d --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SaheeliFiligreeMaster.java @@ -0,0 +1,97 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.costs.common.TapTargetCost; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.keyword.HasteAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.TappedPredicate; +import mage.game.Game; +import mage.game.command.emblems.SaheeliFiligreeMasterEmblem; +import mage.game.permanent.token.ThopterColorlessToken; +import mage.game.permanent.token.Token; +import mage.target.common.TargetControlledPermanent; +import mage.target.targetpointer.FixedTargets; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class SaheeliFiligreeMaster extends CardImpl { + + private static final FilterControlledPermanent filter + = new FilterControlledArtifactPermanent("an untapped artifact you control"); + + static { + filter.add(TappedPredicate.UNTAPPED); + } + + public SaheeliFiligreeMaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{R}"); + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SAHEELI); + this.setStartingLoyalty(3); + + // +1: Scry 1. You may tap an untapped artifact you control. If you do, draw a card. + Ability ability = new LoyaltyAbility(new ScryEffect(1, false), 1); + ability.addEffect(new DoIfCostPaid( + new DrawCardSourceControllerEffect(1), new TapTargetCost(new TargetControlledPermanent(filter)) + )); + this.addAbility(ability); + + // −2: Create two 1/1 colorless Thopter artifact creature tokens with flying. They gain haste until end of turn. + this.addAbility(new LoyaltyAbility(new SaheeliFiligreeMasterEffect(), -2)); + + // −4: You get an emblem with "Artifact creatures you control get +1/+1" and "Artifact spells you cast cost {1} less to cast." + this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new SaheeliFiligreeMasterEmblem()), -4)); + } + + private SaheeliFiligreeMaster(final SaheeliFiligreeMaster card) { + super(card); + } + + @Override + public SaheeliFiligreeMaster copy() { + return new SaheeliFiligreeMaster(this); + } +} + +class SaheeliFiligreeMasterEffect extends OneShotEffect { + + SaheeliFiligreeMasterEffect() { + super(Outcome.PutCreatureInPlay); + staticText = "Create two 1/1 colorless Thopter artifact creature tokens with flying. They gain haste until end of turn"; + } + + private SaheeliFiligreeMasterEffect(final SaheeliFiligreeMasterEffect effect) { + super(effect); + } + + @Override + public SaheeliFiligreeMasterEffect copy() { + return new SaheeliFiligreeMasterEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Token token = new ThopterColorlessToken(); + token.putOntoBattlefield(2, game, source); + game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance()) + .setTargetPointer(new FixedTargets(token, game)), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/TheBrothersWar.java b/Mage.Sets/src/mage/sets/TheBrothersWar.java index d727dd8f39a..5fde1b714dc 100644 --- a/Mage.Sets/src/mage/sets/TheBrothersWar.java +++ b/Mage.Sets/src/mage/sets/TheBrothersWar.java @@ -196,6 +196,8 @@ public final class TheBrothersWar extends ExpansionSet { cards.add(new SetCardInfo("Retrieval Agent", 60, Rarity.COMMON, mage.cards.r.RetrievalAgent.class)); cards.add(new SetCardInfo("Roc Hunter", 150, Rarity.COMMON, mage.cards.r.RocHunter.class)); cards.add(new SetCardInfo("Rust Goliath", 204, Rarity.COMMON, mage.cards.r.RustGoliath.class)); + cards.add(new SetCardInfo("Saheeli, Filigree Master", 219, Rarity.MYTHIC, mage.cards.s.SaheeliFiligreeMaster.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Saheeli, Filigree Master", 294, Rarity.MYTHIC, mage.cards.s.SaheeliFiligreeMaster.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sardian Cliffstomper", 151, Rarity.UNCOMMON, mage.cards.s.SardianCliffstomper.class)); cards.add(new SetCardInfo("Sarinth Greatwurm", 220, Rarity.MYTHIC, mage.cards.s.SarinthGreatwurm.class)); cards.add(new SetCardInfo("Sarinth Steelseeker", 189, Rarity.UNCOMMON, mage.cards.s.SarinthSteelseeker.class)); diff --git a/Mage/src/main/java/mage/game/command/emblems/SaheeliFiligreeMasterEmblem.java b/Mage/src/main/java/mage/game/command/emblems/SaheeliFiligreeMasterEmblem.java new file mode 100644 index 00000000000..ca05ce07f3d --- /dev/null +++ b/Mage/src/main/java/mage/game/command/emblems/SaheeliFiligreeMasterEmblem.java @@ -0,0 +1,32 @@ +package mage.game.command.emblems; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.game.command.Emblem; + +/** + * @author PurpleCrowbar + */ +public final class SaheeliFiligreeMasterEmblem extends Emblem { + + // −4: You get an emblem with "Artifact creatures you control get +1/+1" and "Artifact spells you cast cost {1} less to cast." + public SaheeliFiligreeMasterEmblem() { + this.setName("Emblem Saheeli"); + this.setExpansionSetCodeForImage("BRO"); + Ability ability = new SimpleStaticAbility( + Zone.COMMAND, + new BoostControlledEffect( + 1, 1, Duration.EndOfGame, + StaticFilters.FILTER_PERMANENT_ARTIFACT_CREATURE + ).setText("Artifact creatures you control get +1/+1") + ); + ability.addEffect(new SpellsCostReductionControllerEffect(StaticFilters.FILTER_CARD_ARTIFACT, 1) + .setText("Artifact spells you cast cost {1} less to cast")); + this.getAbilities().add(ability); + } +}