mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
* Pyromancer Ascension - Fixed that the triggered ability that copies a spell also works, if the spell that was copied left the stack (e.g. countered) before the ability resolves.
This commit is contained in:
parent
c12fb572f7
commit
a0ef96e975
2 changed files with 9 additions and 14 deletions
|
|
@ -33,6 +33,7 @@ import mage.constants.Outcome;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
|
|
@ -54,6 +55,9 @@ public class CopyTargetSpellEffect extends OneShotEffect<CopyTargetSpellEffect>
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
|
||||
if (spell == null) {
|
||||
spell = (Spell) game.getLastKnownInformation(targetPointer.getFirst(game, source), Zone.STACK);
|
||||
}
|
||||
if (spell != null) {
|
||||
Spell copy = spell.copySpell();
|
||||
copy.setControllerId(source.getControllerId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue