Fix #9649 and clean up counter effect text generation

This commit is contained in:
Alex W. Jackson 2022-10-14 00:41:02 -04:00
parent 5ec2cd0378
commit 332db3aecb
17 changed files with 117 additions and 374 deletions

View file

@ -180,7 +180,6 @@ public class NestOfScarabsTest extends CardTestPlayerBase {
}
/*
Reported bug: Nest of Scarabs not triggering off wither damage dealt by creatures such as Sickle Ripper
*/
@Test
@ -204,4 +203,48 @@ public class NestOfScarabsTest extends CardTestPlayerBase {
assertCounterCount(playerB, wOmens, CounterType.M1M1, 2);
assertPermanentCount(playerA, "Insect Token", 2);
}
/*
https://github.com/magefree/mage/issues/9649
*/
@Test
public void scarabs_ETBWithCountersTriggers() {
String hatchling = "Noxious Hatchling"; // ETB with four -1/-1 counters
addCard(Zone.BATTLEFIELD, playerA, nestScarabs);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
addCard(Zone.HAND, playerA, hatchling);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, hatchling);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, nestScarabs, 1);
assertPermanentCount(playerA, hatchling, 1);
assertPermanentCount(playerA, "Insect Token", 4);
}
@Test
public void scarabs_OpponentETBWithCountersNoTriggers() {
String hatchling = "Noxious Hatchling"; // ETB with four -1/-1 counters
addCard(Zone.BATTLEFIELD, playerB, nestScarabs);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4);
addCard(Zone.HAND, playerA, hatchling);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, hatchling);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerB, nestScarabs, 1);
assertPermanentCount(playerA, hatchling, 1);
assertPermanentCount(playerA, "Insect Token", 0);
assertPermanentCount(playerB, "Insect Token", 0);
}
}