fixed Sunbird's Invocation not using LKI

This commit is contained in:
Evan Kranzler 2017-09-17 14:49:30 -04:00
parent ea4ff44ed7
commit 1fb37a3834

View file

@ -92,7 +92,7 @@ class SunbirdsInvocationTriggeredAbility extends SpellCastControllerTriggeredAbi
if (spell != null && spell.getFromZone() == Zone.HAND) { if (spell != null && spell.getFromZone() == Zone.HAND) {
if (spell.getCard() != null) { if (spell.getCard() != null) {
for (Effect effect : getEffects()) { for (Effect effect : getEffects()) {
effect.setTargetPointer(new FixedTarget(spell.getId())); effect.setTargetPointer(new FixedTarget(spell.getId(), spell.getZoneChangeCounter(game)));
} }
return true; return true;
} }
@ -126,7 +126,7 @@ class SunbirdsInvocationEffect extends OneShotEffect {
return false; return false;
} }
Cards cards = new CardsImpl(); Cards cards = new CardsImpl();
int xValue = game.getStack().getSpell(getTargetPointer().getFirst(game, source)).getConvertedManaCost(); int xValue = game.getLastKnownInformation(this.getTargetPointer().getFirst(game, source), Zone.STACK).getConvertedManaCost();
cards.addAll(controller.getLibrary().getTopCards(game, xValue)); cards.addAll(controller.getLibrary().getTopCards(game, xValue));
if (!cards.isEmpty()) { if (!cards.isEmpty()) {
controller.revealCards(sourceObject.getIdName(), cards, game); controller.revealCards(sourceObject.getIdName(), cards, game);