From 5940ff7cfd08c9f2db7e4a756570a344c414216c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 5 Feb 2022 20:21:11 -0500 Subject: [PATCH] [NEO] Implemented Kura, the Boundless Sky --- .../src/mage/cards/k/KuraTheBoundlessSky.java | 88 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + .../permanent/token/SpiritGreenXToken.java | 28 ++++++ 3 files changed, 117 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/SpiritGreenXToken.java diff --git a/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java b/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java new file mode 100644 index 00000000000..45a0f219b2a --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KuraTheBoundlessSky.java @@ -0,0 +1,88 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.dynamicvalue.common.LandsYouControlCount; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.abilities.hint.common.LandsYouControlHint; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.FlyingAbility; +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.StaticFilters; +import mage.game.Game; +import mage.game.permanent.token.SpiritGreenXToken; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KuraTheBoundlessSky extends CardImpl { + + public KuraTheBoundlessSky(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.DRAGON); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // When Kura, the Boundless Sky dies, choose one — + // • Search your library for up to three land cards, reveal them, put them into your hand, then shuffle. + Ability ability = new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect( + new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_LANDS) + )); + + // • Create an X/X green Spirit creature token, where X is the number of lands you control. + ability.addMode(new Mode(new KuraTheBoundlessSkyEffect())); + this.addAbility(ability.addHint(LandsYouControlHint.instance)); + } + + private KuraTheBoundlessSky(final KuraTheBoundlessSky card) { + super(card); + } + + @Override + public KuraTheBoundlessSky copy() { + return new KuraTheBoundlessSky(this); + } +} + +class KuraTheBoundlessSkyEffect extends OneShotEffect { + + KuraTheBoundlessSkyEffect() { + super(Outcome.Benefit); + staticText = "create an X/X green Spirit creature token, where X is the number of lands you control"; + } + + private KuraTheBoundlessSkyEffect(final KuraTheBoundlessSkyEffect effect) { + super(effect); + } + + @Override + public KuraTheBoundlessSkyEffect copy() { + return new KuraTheBoundlessSkyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int xValue = LandsYouControlCount.instance.calculate(game, source, this); + return new SpiritGreenXToken(xValue).putOntoBattlefield(1, game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index d46c141bafe..d58761bae71 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -148,6 +148,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Kirin-Touched Orochi", 212, Rarity.RARE, mage.cards.k.KirinTouchedOrochi.class)); cards.add(new SetCardInfo("Kitsune Ace", 22, Rarity.COMMON, mage.cards.k.KitsuneAce.class)); cards.add(new SetCardInfo("Kodama of the West Tree", 199, Rarity.MYTHIC, mage.cards.k.KodamaOfTheWestTree.class)); + cards.add(new SetCardInfo("Kura, the Boundless Sky", 200, Rarity.MYTHIC, mage.cards.k.KuraTheBoundlessSky.class)); cards.add(new SetCardInfo("Kyodai, Soul of Kamigawa", 23, Rarity.RARE, mage.cards.k.KyodaiSoulOfKamigawa.class)); cards.add(new SetCardInfo("Leech Gauntlet", 106, Rarity.UNCOMMON, mage.cards.l.LeechGauntlet.class)); cards.add(new SetCardInfo("Life of Toshiro Umezawa", 108, Rarity.UNCOMMON, mage.cards.l.LifeOfToshiroUmezawa.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritGreenXToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritGreenXToken.java new file mode 100644 index 00000000000..e329aa24ee0 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritGreenXToken.java @@ -0,0 +1,28 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class SpiritGreenXToken extends TokenImpl { + + public SpiritGreenXToken(int xValue) { + super("Spirit token", "X/X green Spirit creature token"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.SPIRIT); + color.setGreen(true); + power = new MageInt(xValue); + toughness = new MageInt(xValue); + } + + public SpiritGreenXToken(final SpiritGreenXToken token) { + super(token); + } + + public SpiritGreenXToken copy() { + return new SpiritGreenXToken(this); + } +}