mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Paupers' Cage - fixed that counts controllers cards in hand instead opponents;
This commit is contained in:
parent
e51b054249
commit
b9be369bd3
2 changed files with 84 additions and 2 deletions
|
|
@ -0,0 +1,81 @@
|
|||
package org.mage.test.cards.abilities.other;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
public class PaupersCageTest extends CardTestPlayerBase {
|
||||
|
||||
// Paupers' Cage
|
||||
// At the beginning of each opponent's upkeep, if that player has two or fewer cards in hand,
|
||||
// Paupers' Cage deals 2 damage to him or her.
|
||||
|
||||
@Test
|
||||
public void test_TooManyCards() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Paupers' Cage", 1);
|
||||
//
|
||||
addCard(Zone.HAND, playerA, "Island", 5);
|
||||
addCard(Zone.HAND, playerB, "Island", 5);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_YouHaveFewCards() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Paupers' Cage", 1);
|
||||
//
|
||||
//addCard(Zone.HAND, playerA, "Island", 5);
|
||||
addCard(Zone.HAND, playerB, "Island", 5);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_OpponentHaveFewCards() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Paupers' Cage", 1);
|
||||
//
|
||||
addCard(Zone.HAND, playerA, "Island", 5);
|
||||
//addCard(Zone.HAND, playerB, "Island", 5);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20 - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_OpponentHaveFewCardsMultipleTurns() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Paupers' Cage", 1);
|
||||
//
|
||||
addCard(Zone.HAND, playerA, "Island", 5);
|
||||
//addCard(Zone.HAND, playerB, "Island", 5);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(4, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20 - 2 * 2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue