mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
Fix Blitz not being cleaned up when the permanent leaved the BF (#9775)
A onCard: false parameter was necessary to clean the effect once the blitz creature leaved the battlefield.
This commit is contained in:
parent
2cdfb255cf
commit
70fa98f492
2 changed files with 49 additions and 1 deletions
|
@ -104,6 +104,54 @@ public class BlitzTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTenaciousUnderdogTwice() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 10);
|
||||
addCard(Zone.GRAVEYARD, playerA, underdog);
|
||||
addCard(Zone.HAND, playerA, "Go for the Throat");
|
||||
addCard(Zone.LIBRARY, playerA, "Plains", 5);
|
||||
skipInitShuffling();
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, underdog + withBlitz);
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerA, "Go for the Throat", underdog);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, underdog + withBlitz);
|
||||
// There are two delayed triggers, only one will actually sacrifice the underdog.
|
||||
setChoice(playerA, "At the beginning of the");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Plains", 2);
|
||||
assertLife(playerA, 16);
|
||||
assertGraveyardCount(playerA, underdog, 1);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testTenaciousUnderdogSTP() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
||||
addCard(Zone.GRAVEYARD, playerA, underdog);
|
||||
addCard(Zone.LIBRARY, playerA, "Plains", 5);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains");
|
||||
addCard(Zone.HAND, playerB, "Swords to Plowshares");
|
||||
|
||||
skipInitShuffling();
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, underdog + withBlitz);
|
||||
castSpell(1, PhaseStep.BEGIN_COMBAT, playerB, "Swords to Plowshares", underdog);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.UPKEEP);
|
||||
|
||||
execute();
|
||||
|
||||
assertHandCount(playerA, "Plains", 0);
|
||||
assertLife(playerA, 20 - 2 + 3);
|
||||
assertGraveyardCount(playerA, underdog, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTenaciousUnderdogBlitz() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlitzAbility extends SpellAbility {
|
|||
);
|
||||
ability.addEffect(new GainAbilitySourceEffect(new DiesSourceTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1)
|
||||
).setTriggerPhrase("When this creature dies, ")));
|
||||
).setTriggerPhrase("When this creature dies, "), Duration.Custom, false));
|
||||
ability.addEffect(new BlitzAddDelayedTriggeredAbilityEffect());
|
||||
ability.setRuleVisible(false);
|
||||
addSubAbility(ability);
|
||||
|
|
Loading…
Reference in a new issue