Remove KickerAbility.getSpellKickedCount (#12553)

* Remove KickerAbility.getSpellKickedCount

* Check spell LKI instead of only current spell object

* Remove bad LKI storage under wrong ID
This commit is contained in:
ssk97 2024-07-22 20:13:48 -07:00 committed by GitHub
parent 2118570a0d
commit 78649c1a62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 91 additions and 127 deletions

View file

@ -814,4 +814,42 @@ public class KickerTest extends CardTestPlayerBase {
assertTappedCount("Mountain", true, 5);
}
@Test
public void testWastescapeBattlemage() {
String battlemage = "Wastescape Battlemage"; // 1C + kickers G (exile artifact/enchantment) + 1U (bounce creature)
addCard(Zone.BATTLEFIELD, playerA, "Wastes", 5);
addCard(Zone.BATTLEFIELD, playerA, "Tropical Island", 3);
addCard(Zone.HAND, playerA, battlemage, 2);
addCard(Zone.BATTLEFIELD, playerB, "Darksteel Relic", 2);
addCard(Zone.BATTLEFIELD, playerB, "Squire", 2);
addCard(Zone.BATTLEFIELD, playerB, "Island", 2);
addCard(Zone.HAND, playerB, "Counterspell", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, battlemage);
setChoice(playerA, true);
setChoice(playerA, false);
addTarget(playerA, "Darksteel Relic");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, battlemage);
setChoice(playerA, true);
setChoice(playerA, true);
setChoice(playerA, "When you cast this spell, if it was kicked with its {G} kicker, exile");
addTarget(playerA, "Darksteel Relic");
addTarget(playerA, "Squire");
//Abilities have not resolved yet
checkStackSize("Spell+2 Triggers on Stack", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, 3);
checkPermanentCount("Darksteel Relic count", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Darksteel Relic", 1);
checkPermanentCount("Squire count", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Squire", 2);
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Counterspell", battlemage);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.END_TURN);
execute();
assertPermanentCount(playerA, battlemage, 1);
assertPermanentCount(playerB, "Darksteel Relic", 0);
assertPermanentCount(playerB, "Squire", 1);
assertExileCount(playerB, 2);
assertHandCount(playerB, "Squire", 1);
}
}