mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Added London mulligan as default mulligan type for all games (except Canadian Highlander);
This commit is contained in:
parent
16c37d0806
commit
d6d67b78db
24 changed files with 109 additions and 110 deletions
|
|
@ -7,7 +7,7 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ import java.io.FileNotFoundException;
|
|||
public class NaturesWillTest extends CardTestPlayerBase {
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
playerC = createPlayer(game, playerC, "PlayerC");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ import java.io.FileNotFoundException;
|
|||
public class StormTheVaultTest extends CardTestPlayerBase {
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
playerC = createPlayer(game, playerC, "PlayerC");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ import java.io.FileNotFoundException;
|
|||
public class RagsRichesTest extends CardTestMultiPlayerBase {
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -13,19 +12,20 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BlatantThieveryTest extends CardTestMultiPlayerBase {
|
||||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -8,23 +7,25 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
* Enchantment {3}{B}
|
||||
* At the beginning of your upkeep, each player discards a card.
|
||||
* Each opponent who discarded a card that shares a card type with the card you discarded loses 3 life.
|
||||
* At the beginning of your upkeep, each player discards a card.
|
||||
* Each opponent who discarded a card that shares a card type with the card you discarded loses 3 life.
|
||||
* (Players reveal the discarded cards simultaneously.)
|
||||
*
|
||||
*
|
||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com
|
||||
*/
|
||||
public class CreepingDreadTest extends CardTestMultiPlayerBase {
|
||||
|
||||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 40);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
@ -32,27 +33,27 @@ public class CreepingDreadTest extends CardTestMultiPlayerBase {
|
|||
playerD = createPlayer(game, playerD, "PlayerD");
|
||||
return game;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Discard creature and all opponents who discard creature lose 3 life
|
||||
*/
|
||||
@Test
|
||||
public void basicTest() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Creeping Dread");
|
||||
addCard(Zone.HAND, playerA, "Merfolk Looter");
|
||||
addCard(Zone.HAND, playerB, "Hill Giant");
|
||||
addCard(Zone.HAND, playerC, "Elite Vanguard");
|
||||
addCard(Zone.HAND, playerD, "Bone Saw");
|
||||
|
||||
|
||||
setChoice(playerA, "Merfolk Looter");
|
||||
setChoice(playerB, "Hill Giant");
|
||||
setChoice(playerC, "Elite Vanguard");
|
||||
setChoice(playerD, "Bone Saw");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Merfolk Looter", 1);
|
||||
assertGraveyardCount(playerB, "Hill Giant", 1);
|
||||
assertGraveyardCount(playerC, "Elite Vanguard", 1);
|
||||
|
|
@ -63,27 +64,27 @@ public class CreepingDreadTest extends CardTestMultiPlayerBase {
|
|||
assertLife(playerC, 37);
|
||||
assertLife(playerD, 40); // no match
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Discard Artifact Creature and all opponents who discard either an Artifact or Creature lose 3 life
|
||||
*/
|
||||
@Test
|
||||
public void twoTypesTest() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Creeping Dread");
|
||||
addCard(Zone.HAND, playerA, "Bronze Sable");
|
||||
addCard(Zone.HAND, playerB, "Hill Giant");
|
||||
addCard(Zone.HAND, playerC, "Swamp");
|
||||
addCard(Zone.HAND, playerD, "Bone Saw");
|
||||
|
||||
|
||||
setChoice(playerA, "Bronze Sable");
|
||||
setChoice(playerB, "Hill Giant");
|
||||
setChoice(playerC, "Swamp");
|
||||
setChoice(playerD, "Bone Saw");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Bronze Sable", 1);
|
||||
assertGraveyardCount(playerB, "Hill Giant", 1);
|
||||
assertGraveyardCount(playerC, "Swamp", 1);
|
||||
|
|
@ -94,63 +95,63 @@ public class CreepingDreadTest extends CardTestMultiPlayerBase {
|
|||
assertLife(playerC, 40); // neither
|
||||
assertLife(playerD, 37); // artifact
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Discard enchantment and no opponents discard an enchantment, so no one loses life
|
||||
*/
|
||||
@Test
|
||||
public void noMatchesTest() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Creeping Dread");
|
||||
addCard(Zone.HAND, playerA, "Moat"); // enchantment
|
||||
addCard(Zone.HAND, playerB, "Hill Giant");
|
||||
addCard(Zone.HAND, playerC, "Swamp");
|
||||
addCard(Zone.HAND, playerD, "Bone Saw");
|
||||
|
||||
|
||||
setChoice(playerA, "Moat");
|
||||
setChoice(playerB, "Hill Giant");
|
||||
setChoice(playerC, "Swamp");
|
||||
setChoice(playerD, "Bone Saw");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerA, "Moat", 1);
|
||||
assertGraveyardCount(playerB, "Hill Giant", 1);
|
||||
assertGraveyardCount(playerC, "Swamp", 1);
|
||||
assertGraveyardCount(playerD, "Bone Saw", 1);
|
||||
|
||||
assertLife(playerA, 40); // no matches
|
||||
assertLife(playerB, 40);
|
||||
assertLife(playerB, 40);
|
||||
assertLife(playerC, 40);
|
||||
assertLife(playerD, 40);
|
||||
assertLife(playerD, 40);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Upkeep player has no cards to discard, so no matches
|
||||
*/
|
||||
@Test
|
||||
public void noDiscardNoMatches() {
|
||||
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Creeping Dread");
|
||||
addCard(Zone.HAND, playerB, "Hill Giant");
|
||||
addCard(Zone.HAND, playerC, "Swamp");
|
||||
addCard(Zone.HAND, playerD, "Bone Saw");
|
||||
|
||||
|
||||
setChoice(playerB, "Hill Giant");
|
||||
setChoice(playerC, "Swamp");
|
||||
setChoice(playerD, "Bone Saw");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.DRAW);
|
||||
execute();
|
||||
|
||||
|
||||
assertGraveyardCount(playerB, "Hill Giant", 1);
|
||||
assertGraveyardCount(playerC, "Swamp", 1);
|
||||
assertGraveyardCount(playerD, "Bone Saw", 1);
|
||||
|
||||
assertLife(playerA, 40); // no matches
|
||||
assertLife(playerB, 40);
|
||||
assertLife(playerB, 40);
|
||||
assertLife(playerC, 40);
|
||||
assertLife(playerD, 40);
|
||||
assertLife(playerD, 40);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -8,15 +7,17 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
public class MultiplayerTriggerTest extends CardTestMultiPlayerBase {
|
||||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 40);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ public class MyriadTest extends CardTestMultiPlayerBase {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 40);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -13,13 +12,14 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayerDiedStackTargetHandlingTest extends CardTestMultiPlayerBase {
|
||||
|
|
@ -27,7 +27,7 @@ public class PlayerDiedStackTargetHandlingTest extends CardTestMultiPlayerBase {
|
|||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
// Start Life = 2
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, new VancouverMulligan(0), 3);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 3);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -10,14 +8,15 @@ import mage.counters.CounterType;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayerLeftGameRange1Test extends CardTestMultiPlayerBase {
|
||||
|
|
@ -25,7 +24,7 @@ public class PlayerLeftGameRange1Test extends CardTestMultiPlayerBase {
|
|||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
// Start Life = 2
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, new VancouverMulligan(0), 2);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 2);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
@ -131,7 +130,7 @@ public class PlayerLeftGameRange1Test extends CardTestMultiPlayerBase {
|
|||
* player concedes the game and removes the Planeswalker. Once it becomes an
|
||||
* opponent of the original player's turn and that opponent plays a spell,
|
||||
* Xmage throws an error and rollsback the turn.
|
||||
*
|
||||
* <p>
|
||||
* I don't have the actual error report on my due to negligence, but what I
|
||||
* can recollect is that the error message was along the lines of "The
|
||||
* emblem cannot find the original source. This turn will be rolled back".
|
||||
|
|
@ -278,7 +277,7 @@ public class PlayerLeftGameRange1Test extends CardTestMultiPlayerBase {
|
|||
/**
|
||||
* Pithing Needle keeps the named card's abilities disabled even after the
|
||||
* player controlling the Needle loses the game.
|
||||
*
|
||||
* <p>
|
||||
* I saw it happen during a Commander game. A player cast Pithing Needle
|
||||
* targeting my Proteus Staff. After I killed him, I still couldn't activate
|
||||
* the Staff.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -9,13 +8,14 @@ import mage.counters.CounterType;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class PlayerLeftGameRangeAllTest extends CardTestMultiPlayerBase {
|
||||
|
|
@ -23,7 +23,7 @@ public class PlayerLeftGameRangeAllTest extends CardTestMultiPlayerBase {
|
|||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
// Start Life = 2
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 2);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 2);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
@ -129,7 +129,7 @@ public class PlayerLeftGameRangeAllTest extends CardTestMultiPlayerBase {
|
|||
* player concedes the game and removes the Planeswalker. Once it becomes an
|
||||
* opponent of the original player's turn and that opponent plays a spell,
|
||||
* Xmage throws an error and rollsback the turn.
|
||||
*
|
||||
* <p>
|
||||
* I don't have the actual error report on my due to negligence, but what I
|
||||
* can recollect is that the error message was along the lines of "The
|
||||
* emblem cannot find the original source. This turn will be rolled back".
|
||||
|
|
@ -283,7 +283,7 @@ public class PlayerLeftGameRangeAllTest extends CardTestMultiPlayerBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* * 11/4/2015: In a multiplayer game, if Grasp of Fate's owner leaves the
|
||||
* * 11/4/2015: In a multiplayer game, if Grasp of Fate's owner leaves the
|
||||
* game, the exiled cards will return to the battlefield. Because the
|
||||
* one-shot effect that returns the cards isn't an ability that goes on the
|
||||
* stack, it won't cease to exist along with the leaving player's spells and
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.counters.CounterType;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ public class PrivilegedPositionTest extends CardTestMultiPlayerBase {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 40);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
@ -32,9 +32,9 @@ public class PrivilegedPositionTest extends CardTestMultiPlayerBase {
|
|||
}
|
||||
|
||||
/*
|
||||
* Reported bug: see issue #3328
|
||||
* Players unable to attack Planeswalker with Privileged Position on battlefield.
|
||||
*/
|
||||
* Reported bug: see issue #3328
|
||||
* Players unable to attack Planeswalker with Privileged Position on battlefield.
|
||||
*/
|
||||
@Test
|
||||
public void testAttackPlaneswalkerWithHexproofPrivilegedPosition() {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package org.mage.test.multiplayer;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
|
|
@ -9,19 +7,20 @@ import mage.constants.Zone;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestMultiPlayerBase;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class VindictiveLichTest extends CardTestMultiPlayerBase {
|
||||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 40);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.game.Game;
|
|||
import mage.game.GameException;
|
||||
import mage.game.GameOptions;
|
||||
import mage.game.TwoPlayerDuel;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import mage.player.ai.ComputerPlayer;
|
||||
import mage.players.Player;
|
||||
import mage.players.PlayerType;
|
||||
|
|
@ -36,7 +36,7 @@ public class PlayGameTest extends MageTestBase {
|
|||
@Ignore
|
||||
@Test
|
||||
public void playOneGame() throws GameException, FileNotFoundException, IllegalArgumentException {
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
|
||||
Player computerA = createPlayer("ComputerA", PlayerType.COMPUTER_MINIMAX_HYBRID);
|
||||
// Player playerA = createPlayer("ComputerA", "Computer - mad");
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.game.Game;
|
|||
import mage.game.GameException;
|
||||
import mage.game.GameOptions;
|
||||
import mage.game.TwoPlayerDuel;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import mage.player.ai.ComputerPlayer;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
|
@ -42,7 +42,7 @@ public class TestPlayRandomGame extends MageTestBase {
|
|||
}
|
||||
|
||||
private void playOneGame() throws GameException, FileNotFoundException, IllegalArgumentException {
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
|
||||
Player computerA = createRandomPlayer("ComputerA");
|
||||
Deck deck = generateRandomDeck();
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
package org.mage.test.serverside.base;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.CommanderFreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public abstract class CardTestCommander3PlayersFFA extends CardTestPlayerAPIImpl {
|
||||
|
|
@ -24,7 +24,7 @@ public abstract class CardTestCommander3PlayersFFA extends CardTestPlayerAPIImpl
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new CommanderFreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, new VancouverMulligan(0), 40);
|
||||
Game game = new CommanderFreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
playerA = createPlayer(game, playerA, "PlayerA", deckNameA);
|
||||
playerB = createPlayer(game, playerB, "PlayerB", deckNameB);
|
||||
playerC = createPlayer(game, playerC, "PlayerC", deckNameC);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.constants.RangeOfInfluence;
|
|||
import mage.game.CommanderFreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -17,7 +17,7 @@ public abstract class CardTestCommander4Players extends CardTestPlayerAPIImpl {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new CommanderFreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new CommanderFreeForAll(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
|
||||
package org.mage.test.serverside.base;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.CommanderDuel;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public abstract class CardTestCommanderDuelBase extends CardTestPlayerAPIImpl {
|
||||
|
|
@ -24,7 +23,7 @@ public abstract class CardTestCommanderDuelBase extends CardTestPlayerAPIImpl {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new CommanderDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, new VancouverMulligan(0), 40);
|
||||
Game game = new CommanderDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 40);
|
||||
|
||||
playerA = createPlayer(game, playerA, "PlayerA", deckNameA);
|
||||
playerB = createPlayer(game, playerB, "PlayerB", deckNameB);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.constants.RangeOfInfluence;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -21,7 +21,7 @@ public abstract class CardTestMultiPlayerBase extends CardTestPlayerAPIImpl {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.constants.RangeOfInfluence;
|
|||
import mage.game.FreeForAll;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -17,7 +17,7 @@ public abstract class CardTestMultiPlayerBaseWithRangeAll extends CardTestPlayer
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, new VancouverMulligan(0), 20);
|
||||
Game game = new FreeForAll(MultiplayerAttackOption.LEFT, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
// Player order: A -> D -> C -> B
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -1,33 +1,34 @@
|
|||
package org.mage.test.serverside.base;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.TwoPlayerDuel;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
/**
|
||||
* Base class for testing single cards and effects.
|
||||
*
|
||||
* @author ayratn
|
||||
*/
|
||||
public abstract class CardTestPlayerBase extends CardTestPlayerAPIImpl {
|
||||
|
||||
|
||||
public CardTestPlayerBase() {
|
||||
deckNameA = "RB Aggro.dck";
|
||||
deckNameB = "RB Aggro.dck";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, new VancouverMulligan(0), 20);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
|
||||
playerA = createPlayer(game, playerA, "PlayerA", deckNameA);
|
||||
playerB = createPlayer(game, playerB, "PlayerB", deckNameB);
|
||||
return game;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.constants.RangeOfInfluence;
|
|||
import mage.game.Game;
|
||||
import mage.game.GameException;
|
||||
import mage.game.TwoPlayerDuel;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import org.mage.test.player.TestComputerPlayer7;
|
||||
import org.mage.test.player.TestPlayer;
|
||||
import org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl;
|
||||
|
|
@ -21,7 +21,7 @@ public abstract class CardTestPlayerBaseAI extends CardTestPlayerAPIImpl {
|
|||
|
||||
@Override
|
||||
protected Game createNewGameAndPlayers() throws GameException, FileNotFoundException {
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, new VancouverMulligan(0), 20);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.LEFT, RangeOfInfluence.ONE, MulliganType.GAME_DEFAULT.getMulligan(0), 20);
|
||||
|
||||
playerA = createPlayer(game, playerA, "PlayerA");
|
||||
playerB = createPlayer(game, playerB, "PlayerB");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.constants.PlanarDieRoll;
|
|||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.Game;
|
||||
import mage.game.TwoPlayerDuel;
|
||||
import mage.game.mulligan.VancouverMulligan;
|
||||
import mage.game.mulligan.MulliganType;
|
||||
import mage.player.human.HumanPlayer;
|
||||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
|
@ -93,7 +93,7 @@ public class RandomTest {
|
|||
String dest = "f:/test/xmage/";
|
||||
//RandomUtil.setSeed(123);
|
||||
Player player = new HumanPlayer("random", RangeOfInfluence.ALL, 1);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 50);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 50);
|
||||
|
||||
int height = 512;
|
||||
int weight = 512;
|
||||
|
|
@ -116,7 +116,7 @@ public class RandomTest {
|
|||
String dest = "f:/test/xmage/";
|
||||
//RandomUtil.setSeed(123);
|
||||
Player player = new HumanPlayer("random", RangeOfInfluence.ALL, 1);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 50);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 50);
|
||||
|
||||
int height = 512;
|
||||
int weight = 512;
|
||||
|
|
@ -141,7 +141,7 @@ public class RandomTest {
|
|||
String dest = "f:/test/xmage/";
|
||||
//RandomUtil.setSeed(123);
|
||||
Player player = new HumanPlayer("random", RangeOfInfluence.ALL, 1);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, new VancouverMulligan(0), 50);
|
||||
Game game = new TwoPlayerDuel(MultiplayerAttackOption.MULTIPLE, RangeOfInfluence.ALL, MulliganType.GAME_DEFAULT.getMulligan(0), 50);
|
||||
Deck deck = DeckTestUtils.buildRandomDeck("WGUBR", false, "GRN");
|
||||
player.getLibrary().addAll(deck.getCards(), game);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue