added Nyxathid and testcase

master
beholder 2011-10-02 09:08:16 +02:00
parent 5fa963a4dc
commit f11c26dd25
3 changed files with 76 additions and 0 deletions

View File

@ -11308,3 +11308,15 @@ converted=1
cost={R} cost={R}
given_pt=2/-2 given_pt=2/-2
timing=aura timing=aura
>Nyxathid
image=http://magiccards.info/scans/en/cfx/49.jpg
value=3
rarity=R
type=Creature
subtype=Elemental
color=b
converted=3
cost={1}{B}{B}
pt=7/7
timing=main

View File

@ -0,0 +1,17 @@
package magic.card;
import magic.model.MagicGame;
import magic.model.MagicPermanent;
import magic.model.MagicPowerToughness;
import magic.model.mstatic.MagicStatic;
import magic.model.mstatic.MagicLayer;
public class Nyxathid {
public static final MagicStatic S = new MagicStatic(MagicLayer.ModPT) {
@Override
public void getPowerToughness(final MagicGame game,final MagicPermanent permanent,final MagicPowerToughness pt) {
final int amount = game.getOpponent(permanent.getCard().getOwner()).getHandSize();
pt.add(-amount,-amount);
}
};
}

View File

@ -0,0 +1,47 @@
package magic.test;
import magic.model.MagicGame;
import magic.model.MagicPlayer;
import magic.model.MagicPlayerDefinition;
import magic.model.MagicPlayerProfile;
import magic.model.MagicTournament;
import magic.model.phase.MagicMainPhase;
class TestNyxathid extends TestGameBuilder {
public MagicGame getGame() {
final MagicTournament tournament=new MagicTournament();
tournament.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);
tournament.setPlayers(new MagicPlayerDefinition[]{player1,player2});
tournament.setStartPlayer(0);
final MagicGame game=tournament.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, "Mountain", 10);
createPermanent(game,P,"Rupture Spire",false,6);
createPermanent(game,P,"Nyxathid",false,1);
addToHand(P,"Eager Cadet",1);
P = opponent;
P.setLife(20);
addToLibrary(P, "Mountain", 10);
createPermanent(game,P,"Rupture Spire",false,6);
createPermanent(game,P,"Eager Cadet",false,1);
addToHand(P,"Sift",1);
addToHand(P,"Mountain",3);
return game;
}
}