mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
* Mirari - Fixed that the triggering spell was not copied (fixes #6338).
This commit is contained in:
parent
a75d08283f
commit
5c65ee31d9
4 changed files with 5 additions and 14 deletions
|
|
@ -79,13 +79,7 @@ class MirariTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (event.getPlayerId().equals(this.getControllerId())) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (isControlledInstantOrSorcery(spell)) {
|
||||
for (Effect effect : getEffects()) {
|
||||
if (effect instanceof DoIfCostPaid) {
|
||||
for (Effect execEffect : ((DoIfCostPaid) effect).getExecutingEffects()) {
|
||||
execEffect.setTargetPointer(new FixedTarget(spell.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
getEffects().setTargetPointer(new FixedTarget(spell.getId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class Putrefy extends CardImpl {
|
|||
public Putrefy (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{B}{G}");
|
||||
|
||||
|
||||
// Destroy target artifact or creature. It can't be regenerated.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ public class SpelltwineTest extends CardTestPlayerBase {
|
|||
* after this, failing to be in the stack box or resolve all.
|
||||
*/
|
||||
@Test
|
||||
@Ignore // TODO: test is wrong -- mirari exile cards and must cast their copies, on copies cast mirari triggers again (two times).
|
||||
public void testCopyCardsMirari() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 9);
|
||||
// Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard.
|
||||
|
|
@ -69,10 +68,8 @@ public class SpelltwineTest extends CardTestPlayerBase {
|
|||
|
||||
// cast spellwin
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Spelltwine");
|
||||
addTarget(playerA, "Impulse"); // target 1 to excile
|
||||
addTarget(playerA, "Blasphemous Act"); // target 2 to excile
|
||||
|
||||
|
||||
addTarget(playerA, "Impulse"); // target 1 to exile
|
||||
addTarget(playerA, "Blasphemous Act"); // target 2 to exile
|
||||
|
||||
setChoice(playerA, "Yes"); // pay {3} and copy spell
|
||||
setChoice(playerA, "Yes"); // Change targets
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ public abstract class StackObjImpl implements StackObject {
|
|||
name = targetPlayer.getLogName();
|
||||
}
|
||||
} else {
|
||||
name = object.getName();
|
||||
name = object.getIdName();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue