From 8b7558b78ed0491ef5a043fabaa971ca5bf359c4 Mon Sep 17 00:00:00 2001 From: amoscatelli Date: Thu, 20 Apr 2023 21:01:42 +0200 Subject: [PATCH] fix for Alandra Sky Dreamer using lockIn for the boost (#10245) --- .../src/mage/cards/a/AlandraSkyDreamer.java | 162 +++++++++--------- 1 file changed, 82 insertions(+), 80 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AlandraSkyDreamer.java b/Mage.Sets/src/mage/cards/a/AlandraSkyDreamer.java index 26df186e13..b60862d95a 100644 --- a/Mage.Sets/src/mage/cards/a/AlandraSkyDreamer.java +++ b/Mage.Sets/src/mage/cards/a/AlandraSkyDreamer.java @@ -1,80 +1,82 @@ -package mage.cards.a; - -import mage.MageInt; -import mage.abilities.common.DrawNthCardTriggeredAbility; -import mage.abilities.effects.common.CreateTokenEffect; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.game.permanent.token.DrakeToken; - -import java.util.UUID; -import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; -import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; -import mage.constants.Duration; -import mage.filter.common.FilterCreaturePermanent; - -/** - * @author amoscatelli - */ -public final class AlandraSkyDreamer extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.DRAKE, "Drakes"); - - public AlandraSkyDreamer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); - addSuperType(SuperType.LEGENDARY); - this.subtype.add(SubType.MERFOLK); - this.subtype.add(SubType.WIZARD); - - this.power = new MageInt(2); - this.toughness = new MageInt(4); - - // Whenever you draw your second card earch turn, create a 2/2 blue Drake creature token with flying. - this.addAbility( - new DrawNthCardTriggeredAbility( - new CreateTokenEffect( - new DrakeToken() - ), - false, - 2 - ) - ); - - // Whenever you draw your fifth card each turn, Alandra, Sky Dreamer and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand. - DrawNthCardTriggeredAbility drawNthCardTriggeredAbility = new DrawNthCardTriggeredAbility( - new BoostSourceEffect( - CardsInControllerHandCount.instance, - CardsInControllerHandCount.instance, - Duration.EndOfTurn - ).setText("{this}"), - false, - 5 - ); - drawNthCardTriggeredAbility.addEffect( - new BoostControlledEffect( - CardsInControllerHandCount.instance, - CardsInControllerHandCount.instance, - Duration.EndOfTurn, - filter, - false - ).setText("and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand") - ); - this.addAbility( - drawNthCardTriggeredAbility - ); - - } - - private AlandraSkyDreamer(final AlandraSkyDreamer card) { - super(card); - } - - @Override - public AlandraSkyDreamer copy() { - return new AlandraSkyDreamer(this); - } -} +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.common.DrawNthCardTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.game.permanent.token.DrakeToken; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; + +/** + * @author amoscatelli + */ +public final class AlandraSkyDreamer extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.DRAKE, "Drakes"); + + public AlandraSkyDreamer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); + addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.MERFOLK); + this.subtype.add(SubType.WIZARD); + + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Whenever you draw your second card earch turn, create a 2/2 blue Drake creature token with flying. + this.addAbility( + new DrawNthCardTriggeredAbility( + new CreateTokenEffect( + new DrakeToken() + ), + false, + 2 + ) + ); + + // Whenever you draw your fifth card each turn, Alandra, Sky Dreamer and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand. + DrawNthCardTriggeredAbility drawNthCardTriggeredAbility = new DrawNthCardTriggeredAbility( + new BoostSourceEffect( + CardsInControllerHandCount.instance, + CardsInControllerHandCount.instance, + Duration.EndOfTurn, + true + ).setText("{this}"), + false, + 5 + ); + drawNthCardTriggeredAbility.addEffect( + new BoostControlledEffect( + CardsInControllerHandCount.instance, + CardsInControllerHandCount.instance, + Duration.EndOfTurn, + filter, + false, + true + ).setText("and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand") + ); + this.addAbility( + drawNthCardTriggeredAbility + ); + + } + + private AlandraSkyDreamer(final AlandraSkyDreamer card) { + super(card); + } + + @Override + public AlandraSkyDreamer copy() { + return new AlandraSkyDreamer(this); + } +}