mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed God-Eternal Kefnet interaction with split cards (fixes #7397)
This commit is contained in:
parent
e8a15e6491
commit
721ae2dbe9
1 changed files with 8 additions and 2 deletions
|
@ -14,6 +14,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.cards.SplitCard;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
@ -95,10 +96,15 @@ class GodEternalKefnetDrawCardReplacementEffect extends ReplacementEffectImpl {
|
||||||
if (topCard.isInstantOrSorcery() && you.chooseUse(outcome, "Would you like to copy " + topCard.getName()
|
if (topCard.isInstantOrSorcery() && you.chooseUse(outcome, "Would you like to copy " + topCard.getName()
|
||||||
+ " and cast it for {2} less?", source, game)) {
|
+ " and cast it for {2} less?", source, game)) {
|
||||||
Card blueprint = topCard.copy();
|
Card blueprint = topCard.copy();
|
||||||
|
if (blueprint instanceof SplitCard) {
|
||||||
|
((SplitCard) blueprint).getLeftHalfCard().addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2)));
|
||||||
|
((SplitCard) blueprint).getRightHalfCard().addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2)));
|
||||||
|
} else {
|
||||||
blueprint.addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2)));
|
blueprint.addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2)));
|
||||||
|
}
|
||||||
Card copiedCard = game.copyCard(blueprint, source, source.getControllerId());
|
Card copiedCard = game.copyCard(blueprint, source, source.getControllerId());
|
||||||
you.moveCardToHandWithInfo(copiedCard, source, game, true); // The copy is created in and cast from your hand.
|
you.moveCardToHandWithInfo(copiedCard, source, game, true); // The copy is created in and cast from your hand.
|
||||||
you.cast(copiedCard.getSpellAbility(), game, false, new ApprovingObject(source, game));
|
you.cast(you.chooseAbilityForCast(copiedCard, game, false), game, false, new ApprovingObject(source, game));
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw (return false for default draw)
|
// draw (return false for default draw)
|
||||||
|
|
Loading…
Reference in a new issue