added Suffer the Past from Rise of the Eldrazi

This commit is contained in:
jendave
2011-08-06 04:02:43 +00:00
parent 670957c436
commit 2f1289eff0
3 changed files with 67 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
suffer_the_past.jpg http://www.wizards.com/global/images/magic/general/suffer_the_past.jpg
repay_in_kind.jpg http://www.wizards.com/global/images/magic/general/repay_in_kind.jpg repay_in_kind.jpg http://www.wizards.com/global/images/magic/general/repay_in_kind.jpg
keening_stone.jpg http://www.wizards.com/global/images/magic/general/keening_stone.jpg keening_stone.jpg http://www.wizards.com/global/images/magic/general/keening_stone.jpg
sarkhan_the_mad.jpg http://www.wizards.com/global/images/magic/general/sarkhan_the_mad.jpg sarkhan_the_mad.jpg http://www.wizards.com/global/images/magic/general/sarkhan_the_mad.jpg

View File

@@ -1,3 +1,8 @@
Suffer the Past
X B
Sorcery
Exile X target cards from target player's graveyard. For each card exiled this way, that player loses 1 life and you gain 1 life.
Repay in Kind Repay in Kind
5 B B 5 B B
Sorcery Sorcery

View File

@@ -18337,6 +18337,67 @@ public class CardFactory implements NewConstants {
card.clearSpellAbility(); card.clearSpellAbility();
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if (cardName.equals("Suffer the Past"))
{
final SpellAbility spell = new Spell(card){
private static final long serialVersionUID = 1168802375190293222L;
@Override
public void resolve() {
String tPlayer = getTargetPlayer();
String player = card.getController();
final int max = card.getXManaCostPaid();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, tPlayer);
CardList graveList = new CardList(grave.getCards());
int X = Math.min(max, graveList.size());
if( player.equals(Constant.Player.Human)) {
for(int i = 0; i < X; i++) {
Object o = AllZone.Display.getChoice("Remove from game", graveList.toArray());
if(o == null) break;
Card c_1 = (Card) o;
graveList.remove(c_1); //remove from the display list
AllZone.GameAction.removeFromGame(c_1);
}
}
else { //Computer
//Random random = new Random();
for(int j = 0; j < X; j++) {
//int index = random.nextInt(X-j);
AllZone.GameAction.removeFromGame(graveList.get(j));
}
}
AllZone.GameAction.getPlayerLife(tPlayer).subtractLife(X);
AllZone.GameAction.getPlayerLife(player).addLife(X);
card.setXManaCostPaid(0);
}
@Override
public void chooseTargetAI() {
setTargetPlayer(Constant.Player.Human);
}//chooseTargetAI()
@Override
public boolean canPlayAI() {
String player = getTargetPlayer();
PlayerZone grave = AllZone.getZone(Constant.Zone.Library, player);
CardList graveList = new CardList(grave.getCards());
//int computerLife = AllZone.Computer_Life.getLife();
final int maxX = ComputerUtil.getAvailableMana().size() - 1;
return (maxX >= 3) && (graveList.size() > 0);
}
};
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities