2013-04-12 19:32:25 -07:00
|
|
|
package magic.test;
|
|
|
|
|
|
|
|
import magic.model.MagicCounterType;
|
|
|
|
import magic.model.MagicDuel;
|
|
|
|
import magic.model.MagicGame;
|
|
|
|
import magic.model.MagicPermanent;
|
|
|
|
import magic.model.MagicPlayer;
|
2015-04-13 00:49:43 -07:00
|
|
|
import magic.model.action.ChangeCountersAction;
|
2013-04-12 19:32:25 -07:00
|
|
|
import magic.model.phase.MagicMainPhase;
|
|
|
|
|
|
|
|
// When a creature with soulbond enters the battlefield, you may pair it with
|
|
|
|
// another unpaired creature you control. When another creature enters the
|
|
|
|
// battlefield under your control, if you control a creature with soulbond
|
|
|
|
// that isn't currently paired, you may pair it with the new creature.
|
|
|
|
|
|
|
|
// The two creatures become unpaired if either of them leaves the battlefield,
|
|
|
|
// is no longer under your control, or stops being a creature.
|
2013-06-23 18:33:35 -07:00
|
|
|
class TestSoulbond extends TestGameBuilder {
|
2013-04-12 19:32:25 -07:00
|
|
|
|
2017-06-16 20:19:03 -07:00
|
|
|
@Override
|
2013-04-12 19:32:25 -07:00
|
|
|
public MagicGame getGame() {
|
2015-04-05 01:22:52 -07:00
|
|
|
final MagicDuel duel=createDuel();
|
2014-11-29 04:58:07 -08:00
|
|
|
final MagicGame game=duel.nextGame();
|
2013-04-12 19:32:25 -07:00
|
|
|
game.setPhase(MagicMainPhase.getFirstInstance());
|
|
|
|
final MagicPlayer player=game.getPlayer(0);
|
|
|
|
final MagicPlayer opponent=game.getPlayer(1);
|
|
|
|
|
|
|
|
MagicPlayer P = player;
|
|
|
|
|
|
|
|
P.setLife(12);
|
|
|
|
addToLibrary(P,"Plains",15);
|
2015-05-21 20:05:34 -07:00
|
|
|
createPermanent(P,"Rupture Spire",false,8);
|
|
|
|
createPermanent(P,"Creeping Tar Pit",false,1);
|
|
|
|
createPermanent(P,"Wingcrafter",false,1);
|
|
|
|
createPermanent(P,"Wall of Stone",false,1);
|
2013-04-12 19:32:25 -07:00
|
|
|
addToHand(P,"Wingcrafter",1);
|
|
|
|
addToHand(P,"Barony Vampire",1);
|
|
|
|
addToHand(P,"Act of Treason",1);
|
|
|
|
addToHand(P,"Lightning Bolt",1);
|
|
|
|
addToHand(P,"Swamp",1);
|
|
|
|
addToHand(P,"Eager Cadet",1);
|
2013-06-23 18:33:35 -07:00
|
|
|
|
2013-04-12 19:32:25 -07:00
|
|
|
P = opponent;
|
2013-06-23 18:33:35 -07:00
|
|
|
|
2013-04-12 19:32:25 -07:00
|
|
|
P.setLife(12);
|
|
|
|
addToLibrary(P, "Swamp", 15);
|
2015-05-21 20:05:34 -07:00
|
|
|
createPermanent(P,"Rupture Spire",false,8);
|
|
|
|
createPermanent(P,"Assault Griffin",false,1);
|
|
|
|
createPermanent(P,"Hagra Diabolist",false,1);
|
|
|
|
final MagicPermanent la = createPermanent(P, "Legacy's Allure", false, 1);
|
2018-04-09 21:08:37 -07:00
|
|
|
game.doAction(new ChangeCountersAction(P, la, MagicCounterType.Charge, 3));
|
2013-04-12 19:32:25 -07:00
|
|
|
addToHand(P,"Wingcrafter",1);
|
|
|
|
addToHand(P,"Eager Cadet",1);
|
2013-06-23 18:33:35 -07:00
|
|
|
|
2013-04-12 19:32:25 -07:00
|
|
|
return game;
|
|
|
|
}
|
|
|
|
}
|