Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up life loss event #11991

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class ObNixilisCaptiveKingpinTest extends CardTestCommander4Players {
// - 1 opponent loses 2 life -> No trigger
// - 2 opponents lose 1 life each -> Ob Nixilis triggers
// - 2 opponents lose 2 life each -> No trigger
// - 2 opponents lose 1 and 2 life respectively -> No trigger
// - 1 opponent loses 1 and controller loses 2 life -> Ob Nixilis triggers
// - controller loses 1 life -> No trigger

@Test
Expand Down Expand Up @@ -92,6 +94,52 @@ public void damage2Opp2Points() {
assertCounterCount("Ob Nixilis, Captive Kingpin", CounterType.P1P1, 0);
}

@Test
public void damage2Opp1Point1Opp2Points() {
addCard(Zone.BATTLEFIELD, playerA, "Ob Nixilis, Captive Kingpin", 1);
addCard(Zone.BATTLEFIELD, playerA, "Expedition Envoy", 1);
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 1);

attack(1, playerA, "Expedition Envoy", playerB);
attack(1, playerA, "Memnite", playerC);

setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();

assertCounterCount("Ob Nixilis, Captive Kingpin", CounterType.P1P1, 0);
}

@Test
public void damage1Opp1PointCont2Points() {
addCard(Zone.BATTLEFIELD, playerA, "Ob Nixilis, Captive Kingpin", 1);

addCard(Zone.BATTLEFIELD, playerD, "Expedition Envoy", 1);
addCard(Zone.BATTLEFIELD, playerA, "Memnite", 2);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 6);

addCard(Zone.HAND, playerA, "Withstand Death", 1);
addCard(Zone.HAND, playerA, "Deadly Tempest", 1);

// // Give Ob Nixiis indestructible so it can still trigger
addTarget(playerA, "Ob Nixilis, Captive Kingpin");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Withstand Death", true);

// Destroy all creatures.
// Each player loses life equal to the number of creatures they controlled that were destroyed this way.
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Deadly Tempest", true);

setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();

assertLife(playerA, currentGame.getStartingLife() - 2);
assertLife(playerD, currentGame.getStartingLife() - 1);

assertCounterCount("Ob Nixilis, Captive Kingpin", CounterType.P1P1, 1);
}

@Test
public void payLife1Opp1Point() {
addCard(Zone.BATTLEFIELD, playerA, "Ob Nixilis, Captive Kingpin", 1);
Expand Down
Loading