add Phyrexian Dreadnought (from Mirage)

This commit is contained in:
jendave
2011-08-06 14:10:19 +00:00
parent 49c17954e9
commit bedc67492a
3 changed files with 82 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -3608,6 +3608,7 @@ res/cardsfolder/phylactery_lich.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_arena.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_battleflies.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_boon.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_dreadnought.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_gargantua.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_ghoul.txt -text svneol=native#text/plain
res/cardsfolder/phyrexian_hulk.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Phyrexian Dreadnought
ManaCost:1
Types:Artifact Creature Dreadnought
Text:When CARDNAME enters the battlefield, sacrifice it unless you sacrifice any number of creatures with total power 12 or greater.
PT:12/12
K:Trample
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/phyrexian_dreadnought.jpg
End

View File

@@ -55,7 +55,7 @@ public class CardFactory_Creatures {
}
public static Card getCard(final Card card, String cardName, Player owner, CardFactory cf) {
public static Card getCard(final Card card, final String cardName, Player owner, CardFactory cf) {
//*************** START *********** START **************************
if(cardName.equals("Lurking Informant")) {
@@ -13516,6 +13516,76 @@ public class CardFactory_Creatures {
//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Phyrexian Dreadnought")) {
final Command comesIntoPlay = new Command() {
private static final long serialVersionUID = 7680692311339496770L;
final Player player = card.getController();
final CardList toSac = new CardList();
public void execute() {
if(player.isHuman()) {
Input target = new Input() {
private static final long serialVersionUID = 2698036349873486664L;
@Override
public void showMessage() {
String toDisplay = cardName+" - Select any number of creatures to sacrifice. ";
toDisplay += "Currently, ("+toSac.size()+") selected with a total power of: "+getTotalPower();
toDisplay += " Click OK when Done.";
AllZone.Display.showMessage(toDisplay);
ButtonUtil.enableAll();
}
@Override
public void selectButtonOK() {
done();
}
@Override
public void selectButtonCancel() {
toSac.clear();
AllZone.GameAction.sacrifice(card);
stop();
}
@Override
public void selectCard(Card c, PlayerZone zone) {
if(c.isCreature() && zone.is(Constant.Zone.Battlefield, AllZone.HumanPlayer)
&& !toSac.contains(c)) {
toSac.add(c);
}
showMessage();
}//selectCard()
private void done() {
if(getTotalPower() >= 12) {
for(Card sac:toSac) AllZone.GameAction.sacrifice(sac);
}
else {
AllZone.GameAction.sacrifice(card);
}
toSac.clear();
stop();
}
};//Input
AllZone.InputControl.setInput(target);
}
}
private int getTotalPower() {
int sum = 0;
for(Card c:toSac) {
sum += c.getNetAttack();
}
return sum;
}
};
card.addComesIntoPlayCommand(comesIntoPlay);
}//*************** END ************ END **************************
if(hasKeyword(card, "Level up") != -1 && hasKeyword(card, "maxLevel") != -1)
{
int n = hasKeyword(card, "Level up");