[BRO] Implement Saheeli, Filigree Master (#9735)

* [BRO] Implement Saheeli, Filigree Master

* Add some comment text to Saheeli, Filigree Master's emblem
This commit is contained in:
PurpleCrowbar 2022-11-06 13:43:33 +00:00 committed by GitHub
parent 71a718ee72
commit 63c1325f37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 131 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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("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("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("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("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 Greatwurm", 220, Rarity.MYTHIC, mage.cards.s.SarinthGreatwurm.class));
cards.add(new SetCardInfo("Sarinth Steelseeker", 189, Rarity.UNCOMMON, mage.cards.s.SarinthSteelseeker.class)); cards.add(new SetCardInfo("Sarinth Steelseeker", 189, Rarity.UNCOMMON, mage.cards.s.SarinthSteelseeker.class));

View file

@ -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);
}
}