added test scenario for unleash cards

master
melvin 2013-02-18 18:35:52 +08:00
parent 706c75c5e5
commit a01227ac31
1 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,53 @@
package magic.test;
import magic.model.MagicDuel;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicPlayerDefinition;
import magic.model.MagicPlayerProfile;
import magic.model.phase.MagicMainPhase;
class TestUnleash extends TestGameBuilder {
public MagicGame getGame() {
final MagicDuel duel=new MagicDuel();
duel.setDifficulty(6);
final MagicPlayerProfile profile=new MagicPlayerProfile("bgruw");
final MagicPlayerDefinition player1=new MagicPlayerDefinition("Player",false,profile,15);
final MagicPlayerDefinition player2=new MagicPlayerDefinition("Computer",true,profile,14);
duel.setPlayers(new MagicPlayerDefinition[]{player1,player2});
duel.setStartPlayer(0);
final MagicGame game=duel.nextGame(true);
game.setPhase(MagicMainPhase.getFirstInstance());
final MagicPlayer player=game.getPlayer(0);
final MagicPlayer opponent=game.getPlayer(1);
MagicPlayer P = player;
P.setLife(20);
addToLibrary(P, "Plains", 10);
createPermanent(game,P,"Rupture Spire",false,8);
addToHand(P, "Bloodfray Giant", 1);
addToHand(P, "Carnival Hellsteed", 1);
addToHand(P, "Chaos Imps", 1);
addToHand(P, "Dead Reveler", 1);
addToHand(P, "Gore-House Chainwalker", 1);
addToHand(P, "Grim Roustabout", 1);
addToHand(P, "Hellhole Flailer", 1);
addToHand(P, "Rakdos Cackler", 1);
addToHand(P, "Spawn of Rix Maadi", 1);
addToHand(P, "Splatter Thug", 1);
addToHand(P, "Thrill-Kill Assassin", 1);
P = opponent;
P.setLife(10);
addToLibrary(P, "Plains", 10);
createPermanent(game,P,"Rupture Spire",false,8);
addToHand(P, "Bloodfray Giant", 1);
addToHand(P, "Carnival Hellsteed", 1);
return game;
}
}