From f9a388fffa0dca5734c14ff2d2875660b106326a Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 30 May 2022 09:18:16 -0400 Subject: [PATCH] [CLB] Implemented Gray Harbor Merfolk --- .../src/mage/cards/g/GrayHarborMerfolk.java | 67 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 68 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GrayHarborMerfolk.java diff --git a/Mage.Sets/src/mage/cards/g/GrayHarborMerfolk.java b/Mage.Sets/src/mage/cards/g/GrayHarborMerfolk.java new file mode 100644 index 00000000000..5d59c834a59 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GrayHarborMerfolk.java @@ -0,0 +1,67 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.abilities.keyword.CantBeBlockedSourceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.filter.predicate.mageobject.CommanderPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GrayHarborMerfolk extends CardImpl { + + private static final FilterPermanent filter = new FilterCreatureOrPlaneswalkerPermanent(); + + static { + filter.add(TargetController.YOU.getControllerPredicate()); + filter.add(CommanderPredicate.instance); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter); + private static final Hint hint = new ConditionHint( + condition, "You control a commander that's a creature or planeswalker" + ); + + public GrayHarborMerfolk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); + + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(0); + this.toughness = new MageInt(3); + + // Gray Harbor Merfolk can't be blocked. + this.addAbility(new CantBeBlockedSourceAbility()); + + // Gray Harbor Merfolk gets +2/+0 as long as you control a commander that's a creature or planeswalker. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield), condition, + "{this} gets +2/+0 as long as you control a commander that's a creature or planeswalker" + ))); + } + + private GrayHarborMerfolk(final GrayHarborMerfolk card) { + super(card); + } + + @Override + public GrayHarborMerfolk copy() { + return new GrayHarborMerfolk(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 5889789a3ea..a767b3e4142 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -130,6 +130,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Goggles of Night", 74, Rarity.COMMON, mage.cards.g.GogglesOfNight.class)); cards.add(new SetCardInfo("Goliath Paladin", 21, Rarity.COMMON, mage.cards.g.GoliathPaladin.class)); cards.add(new SetCardInfo("Gorion, Wise Mentor", 276, Rarity.RARE, mage.cards.g.GorionWiseMentor.class)); + cards.add(new SetCardInfo("Gray Harbor Merfolk", 75, Rarity.COMMON, mage.cards.g.GrayHarborMerfolk.class)); cards.add(new SetCardInfo("Gray Slaad", 129, Rarity.COMMON, mage.cards.g.GraySlaad.class)); cards.add(new SetCardInfo("Greatsword of Tyr", 22, Rarity.COMMON, mage.cards.g.GreatswordOfTyr.class)); cards.add(new SetCardInfo("Guardian Naga", 23, Rarity.COMMON, mage.cards.g.GuardianNaga.class));