mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
fix and test Stern Judge
This commit is contained in:
parent
c58ecbcce3
commit
341479c36b
2 changed files with 31 additions and 2 deletions
|
|
@ -69,8 +69,8 @@ class SternJudgeEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
player.loseLife(game.getBattlefield().count(
|
||||
filter, source.getSourceId(), source, game
|
||||
player.loseLife(game.getBattlefield().countAll(
|
||||
filter, player.getId(), game
|
||||
), game, source, false);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package org.mage.test.cards.single.tor;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public class SternJudgeTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testCounts() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Swamp", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Stern Judge");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Each player loses");
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 17);
|
||||
assertLife(playerB, 18);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue