mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Rite of the Raging Storm - Fixed bug that tokens were not doubled if the token was created by an effect controlled from other players (fixes #2584).
This commit is contained in:
parent
7cd105b951
commit
c84d7ef49b
2 changed files with 27 additions and 3 deletions
|
|
@ -40,7 +40,6 @@ import mage.constants.Zone;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -91,8 +90,7 @@ class DoublingSeasonTokenEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
|
||||
return stackObject != null && event.getPlayerId().equals(source.getControllerId());
|
||||
return event.getPlayerId().equals(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -166,4 +166,30 @@ public class DoublingSeasonTest extends CardTestPlayerBase {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDoubleRiteOfRagingStormOpponent() {
|
||||
// At the beginning of each player's upkeep, that player creates a 5/1 red Elemental creature token named Lightning Rager.
|
||||
// It has trample, haste, and "At the beginning of the end step, sacrifice this creature."
|
||||
addCard(Zone.HAND, playerA, "Rite of the Raging Storm");// {3}{R}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 5);
|
||||
// If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
|
||||
// If an effect would place one or more counters on a permanent you control, it places twice that many of those counters on that permanent instead.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Doubling Season");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rite of the Raging Storm");
|
||||
|
||||
attack(2, playerB, "Lightning Rager"); // Can't attack
|
||||
attack(2, playerA, "Lightning Rager"); // Can't attack
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Rite of the Raging Storm", 1);
|
||||
|
||||
assertPermanentCount(playerB, "Lightning Rager", 2);
|
||||
|
||||
assertLife(playerB, 20);
|
||||
assertLife(playerA, 20);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue