diff --git a/Mage.Sets/src/mage/cards/l/LaezelVlaakithsChampion.java b/Mage.Sets/src/mage/cards/l/LaezelVlaakithsChampion.java new file mode 100644 index 0000000000..a2c47bc658 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LaezelVlaakithsChampion.java @@ -0,0 +1,94 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ChooseABackgroundAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LaezelVlaakithsChampion extends CardImpl { + + public LaezelVlaakithsChampion(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.GITH); + this.subtype.add(SubType.WARRIOR); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // If you would put one or more counters on a creature or planeswalker you control or on yourself, put that many plus one of each of those kinds of counters on that permanent or player instead. + this.addAbility(new SimpleStaticAbility(new LaezelVlaakithsChampionEffect())); + + // Choose a Background + this.addAbility(ChooseABackgroundAbility.getInstance()); + } + + private LaezelVlaakithsChampion(final LaezelVlaakithsChampion card) { + super(card); + } + + @Override + public LaezelVlaakithsChampion copy() { + return new LaezelVlaakithsChampion(this); + } +} + +class LaezelVlaakithsChampionEffect extends ReplacementEffectImpl { + + LaezelVlaakithsChampionEffect() { + super(Duration.WhileOnBattlefield, Outcome.BoostCreature, false); + staticText = "if you would put one or more counters on a creature or planeswalker you control or on yourself, " + + "put that many plus one of each of those kinds of counters on that permanent or player instead"; + } + + LaezelVlaakithsChampionEffect(final LaezelVlaakithsChampionEffect effect) { + super(effect); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + event.setAmountForCounters(event.getAmount() + 1, true); + return false; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ADD_COUNTERS; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (!source.isControlledBy(event.getPlayerId())) { + return false; + } + if (source.isControlledBy(event.getTargetId())) { + return true; + } + Permanent permanent = game.getPermanent(event.getTargetId()); + return permanent != null + && (permanent.isCreature(game) || permanent.isPlaneswalker(game)) + && permanent.isControlledBy(source.getControllerId()); + } + + @Override + public boolean apply(Game game, Ability source) { + return true; + } + + @Override + public LaezelVlaakithsChampionEffect copy() { + return new LaezelVlaakithsChampionEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index b6f3e73ea3..e58bbe8dc8 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -53,6 +53,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Island", 455, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Jaheira's Respite", 238, Rarity.RARE, mage.cards.j.JaheirasRespite.class)); cards.add(new SetCardInfo("Korlessa, Scale Singer", 280, Rarity.UNCOMMON, mage.cards.k.KorlessaScaleSinger.class)); + cards.add(new SetCardInfo("Lae'zel, Vlaakith's Champion", 29, Rarity.RARE, mage.cards.l.LaezelVlaakithsChampion.class)); cards.add(new SetCardInfo("Lightning Bolt", 187, Rarity.COMMON, mage.cards.l.LightningBolt.class)); cards.add(new SetCardInfo("Luxury Suite", 355, Rarity.RARE, mage.cards.l.LuxurySuite.class)); cards.add(new SetCardInfo("Marble Diamond", 320, Rarity.COMMON, mage.cards.m.MarbleDiamond.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 2d4b0cc486..5a65bda91a 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -163,6 +163,7 @@ public enum SubType { GARGOYLE("Gargoyle", SubTypeSet.CreatureType), GERM("Germ", SubTypeSet.CreatureType), GIANT("Giant", SubTypeSet.CreatureType), + GITH("Gith", SubTypeSet.CreatureType), GNOME("Gnome", SubTypeSet.CreatureType), GNOLL("Gnoll", SubTypeSet.CreatureType), GOLEM("Golem", SubTypeSet.CreatureType),