From 173b3dbb4fbec5056ed1a7d22642e82358d4022b Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Fri, 9 Sep 2022 04:26:43 +0100 Subject: [PATCH] [DMC] Implement Greensleeves, Maro-Sorcerer (#9487) --- .../cards/g/GreensleevesMaroSorcerer.java | 62 +++++++++++++++++++ .../mage/sets/DominariaUnitedCommander.java | 2 + .../game/permanent/token/BadgerToken.java | 27 ++++++++ 3 files changed, 91 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GreensleevesMaroSorcerer.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/BadgerToken.java diff --git a/Mage.Sets/src/mage/cards/g/GreensleevesMaroSorcerer.java b/Mage.Sets/src/mage/cards/g/GreensleevesMaroSorcerer.java new file mode 100644 index 0000000000..293c417636 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GreensleevesMaroSorcerer.java @@ -0,0 +1,62 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.LandsYouControlCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.StaticFilters; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.BadgerToken; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class GreensleevesMaroSorcerer extends CardImpl { + + private static final FilterCard filter = new FilterCard("planeswalkers and from Wizards"); + + static { + filter.add(Predicates.or(CardType.PLANESWALKER.getPredicate(), SubType.WIZARD.getPredicate())); + } + + public GreensleevesMaroSorcerer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELEMENTAL); + + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Protection from planeswalkers and from Wizards + this.addAbility(new ProtectionAbility(filter)); + + // Greensleeves, Maro-Sorcerer's power and toughness are each equal to the number of lands you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SetBasePowerToughnessSourceEffect(LandsYouControlCount.instance, Duration.EndOfGame) + )); + + // Whenever a land enters the battlefield under your control, create a 3/3 green Badger creature token. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + Zone.BATTLEFIELD, new CreateTokenEffect(new BadgerToken()), + StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT, false + )); + } + + private GreensleevesMaroSorcerer(final GreensleevesMaroSorcerer card) { + super(card); + } + + @Override + public GreensleevesMaroSorcerer copy() { + return new GreensleevesMaroSorcerer(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java index 1ea7409d09..05a3627f5a 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java +++ b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java @@ -82,6 +82,8 @@ public final class DominariaUnitedCommander extends ExpansionSet { cards.add(new SetCardInfo("Generous Gift", 100, Rarity.UNCOMMON, mage.cards.g.GenerousGift.class)); cards.add(new SetCardInfo("Glint-Eye Nephilim", 152, Rarity.RARE, mage.cards.g.GlintEyeNephilim.class)); cards.add(new SetCardInfo("Grasslands", 214, Rarity.UNCOMMON, mage.cards.g.Grasslands.class)); + cards.add(new SetCardInfo("Greensleeves, Maro-Sorcerer", 27, Rarity.MYTHIC, mage.cards.g.GreensleevesMaroSorcerer.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Greensleeves, Maro-Sorcerer", 77, Rarity.MYTHIC, mage.cards.g.GreensleevesMaroSorcerer.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Growth Spiral", 153, Rarity.COMMON, mage.cards.g.GrowthSpiral.class)); cards.add(new SetCardInfo("Hazoret's Monument", 183, Rarity.UNCOMMON, mage.cards.h.HazoretsMonument.class)); cards.add(new SetCardInfo("Hedron Archive", 184, Rarity.UNCOMMON, mage.cards.h.HedronArchive.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/BadgerToken.java b/Mage/src/main/java/mage/game/permanent/token/BadgerToken.java new file mode 100644 index 0000000000..dd4b27d094 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/BadgerToken.java @@ -0,0 +1,27 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.ObjectColor; +import mage.constants.CardType; +import mage.constants.SubType; + +public final class BadgerToken extends TokenImpl { + + public BadgerToken() { + super("Badger Token", "3/3 green Badger creature token"); + cardType.add(CardType.CREATURE); + color.addColor(ObjectColor.GREEN); + subtype.add(SubType.BADGER); + power = new MageInt(3); + toughness = new MageInt(3); + setOriginalExpansionSetCode("DMC"); + } + + public BadgerToken(final BadgerToken token) { + super(token); + } + + public BadgerToken copy() { + return new BadgerToken(this); + } +}