fix for Alandra Sky Dreamer using lockIn for the boost (#10245)

This commit is contained in:
amoscatelli 2023-04-20 21:01:42 +02:00 committed by GitHub
parent 5f31c061cf
commit 8b7558b78e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,80 +1,82 @@
package mage.cards.a; package mage.cards.a;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.DrawNthCardTriggeredAbility; import mage.abilities.common.DrawNthCardTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.SuperType; import mage.constants.SuperType;
import mage.game.permanent.token.DrakeToken; import mage.game.permanent.token.DrakeToken;
import java.util.UUID; import java.util.UUID;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.constants.Duration; import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
/** /**
* @author amoscatelli * @author amoscatelli
*/ */
public final class AlandraSkyDreamer extends CardImpl { public final class AlandraSkyDreamer extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.DRAKE, "Drakes"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.DRAKE, "Drakes");
public AlandraSkyDreamer(UUID ownerId, CardSetInfo setInfo) { public AlandraSkyDreamer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
this.power = new MageInt(2); this.power = new MageInt(2);
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Whenever you draw your second card earch turn, create a 2/2 blue Drake creature token with flying. // Whenever you draw your second card earch turn, create a 2/2 blue Drake creature token with flying.
this.addAbility( this.addAbility(
new DrawNthCardTriggeredAbility( new DrawNthCardTriggeredAbility(
new CreateTokenEffect( new CreateTokenEffect(
new DrakeToken() new DrakeToken()
), ),
false, false,
2 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. // 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( DrawNthCardTriggeredAbility drawNthCardTriggeredAbility = new DrawNthCardTriggeredAbility(
new BoostSourceEffect( new BoostSourceEffect(
CardsInControllerHandCount.instance, CardsInControllerHandCount.instance,
CardsInControllerHandCount.instance, CardsInControllerHandCount.instance,
Duration.EndOfTurn Duration.EndOfTurn,
).setText("{this}"), true
false, ).setText("{this}"),
5 false,
); 5
drawNthCardTriggeredAbility.addEffect( );
new BoostControlledEffect( drawNthCardTriggeredAbility.addEffect(
CardsInControllerHandCount.instance, new BoostControlledEffect(
CardsInControllerHandCount.instance, CardsInControllerHandCount.instance,
Duration.EndOfTurn, CardsInControllerHandCount.instance,
filter, Duration.EndOfTurn,
false filter,
).setText("and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand") false,
); true
this.addAbility( ).setText("and Drakes you control each get +X/+X until end of turn, where X is the number of cards in your hand")
drawNthCardTriggeredAbility );
); this.addAbility(
drawNthCardTriggeredAbility
} );
private AlandraSkyDreamer(final AlandraSkyDreamer card) { }
super(card);
} private AlandraSkyDreamer(final AlandraSkyDreamer card) {
super(card);
@Override }
public AlandraSkyDreamer copy() {
return new AlandraSkyDreamer(this); @Override
} public AlandraSkyDreamer copy() {
} return new AlandraSkyDreamer(this);
}
}