diff --git a/Mage.Sets/src/mage/cards/t/TheBearsOfLittjara.java b/Mage.Sets/src/mage/cards/t/TheBearsOfLittjara.java new file mode 100644 index 0000000000..163c2e2cbb --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheBearsOfLittjara.java @@ -0,0 +1,106 @@ +package mage.cards.t; + +import mage.abilities.Ability; +import mage.abilities.common.SagaAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.ShapeshifterBlueToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreatureOrPlaneswalker; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TheBearsOfLittjara extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent( + SubType.SHAPESHIFTER, "any number of target Shapeshifter creatures you control" + ); + + public TheBearsOfLittjara(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{U}"); + + this.subtype.add(SubType.SAGA); + + // (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.) + SagaAbility sagaAbility = new SagaAbility(this, SagaChapter.CHAPTER_III); + + // I — Create a 2/2 blue Shapeshifter creature token with changeling. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_II, + new CreateTokenEffect(new ShapeshifterBlueToken()) + ); + + // II — Any number of target Shapeshifter creatures you control have base power and toughness 4/4. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II, + new SetPowerToughnessTargetEffect(4, 4, Duration.Custom), + new TargetPermanent(0, Integer.MAX_VALUE, filter, false) + ); + + // III — Choose up to one target creature or planeswalker. Each creature with power 4 or greater you control deals damage equal to its power to that permanent. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_III, SagaChapter.CHAPTER_III, + new TheBearsOfLittjaraEffect(), new TargetCreatureOrPlaneswalker(0, 1) + ); + } + + private TheBearsOfLittjara(final TheBearsOfLittjara card) { + super(card); + } + + @Override + public TheBearsOfLittjara copy() { + return new TheBearsOfLittjara(this); + } +} + +class TheBearsOfLittjaraEffect extends OneShotEffect { + + TheBearsOfLittjaraEffect() { + super(Outcome.Benefit); + staticText = "Choose up to one target creature or planeswalker. " + + "Each creature with power 4 or greater you control deals damage equal to its power to that permanent."; + } + + private TheBearsOfLittjaraEffect(final TheBearsOfLittjaraEffect effect) { + super(effect); + } + + @Override + public TheBearsOfLittjaraEffect copy() { + return new TheBearsOfLittjaraEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (permanent == null) { + return false; + } + for (Permanent creature : game.getBattlefield().getActivePermanents( + StaticFilters.FILTER_CONTROLLED_CREATURE, + source.getControllerId(), source.getSourceId(), game + )) { + if (creature == null) { + continue; + } + int power = creature.getPower().getValue(); + if (power >= 4) { + permanent.damage(power, creature.getId(), source, game); + } + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 2e62f84608..33352ad748 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -309,6 +309,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 396, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Tergrid's Shadow", 113, Rarity.UNCOMMON, mage.cards.t.TergridsShadow.class)); cards.add(new SetCardInfo("Tergrid, God of Fright", 112, Rarity.RARE, mage.cards.t.TergridGodOfFright.class)); + cards.add(new SetCardInfo("The Bears of Littjara", 205, Rarity.RARE, mage.cards.t.TheBearsOfLittjara.class)); cards.add(new SetCardInfo("The Bloodsky Massacre", 207, Rarity.RARE, mage.cards.t.TheBloodskyMassacre.class)); cards.add(new SetCardInfo("The Trickster-God's Heist", 232, Rarity.UNCOMMON, mage.cards.t.TheTricksterGodsHeist.class)); cards.add(new SetCardInfo("The World Tree", 275, Rarity.RARE, mage.cards.t.TheWorldTree.class));