add Reanimate (from Tempest) - requested by DeadSpeak

This commit is contained in:
jendave
2011-08-06 04:29:24 +00:00
parent a8142ed0b8
commit 234eba01e2
3 changed files with 68 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_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
reanimate.jpg http://www.wizards.com/global/images/magic/general/reanimate.jpg
sound_the_call.jpg http://www.wizards.com/global/images/magic/general/sound_the_call.jpg
mana_vault.jpg http://www.wizards.com/global/images/magic/general/mana_vault.jpg
vampire_hexmage.jpg http://www.wizards.com/global/images/magic/general/vampire_hexmage.jpg

View File

@@ -1,3 +1,8 @@
Reanimate
B
Sorcery
Put target creature card from a graveyard onto the battlefield under your control. You lose life equal to its converted mana cost.
Grave Defiler
3 B
Creature Zombie

View File

@@ -19747,6 +19747,68 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Reanimate")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 2940635076296411568L;
@Override
public void resolve() {
Card c = getTargetCard();
int cmc = CardUtil.getConvertedManaCost(c.getManaCost());
PlayerZone grave = AllZone.getZone(c);
if(AllZone.GameAction.isCardInZone(c, grave)) {
PlayerZone play = AllZone.getZone(Constant.Zone.Play, c.getController());
AllZone.GameAction.moveTo(play, c);
}
AllZone.GameAction.getPlayerLife(c.getController()).subtractLife(cmc);
}//resolve()
@Override
public boolean canPlay() {
return super.canPlay() && getCreatures().size() > 0;
}
public CardList getCreatures() {
CardList creatures = AllZoneUtil.getCardsInGraveyard();
return creatures.filter(AllZoneUtil.creatures);
}
@Override
public void chooseTargetAI() {
CardList creatures = getCreatures();
Card biggest = creatures.get(0);
for(int i = 0; i < creatures.size(); i++)
if(biggest.getNetAttack() < creatures.get(i).getNetAttack()) {
biggest = creatures.get(i);
}
setTargetCard(biggest);
}
};//SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
Input target = new Input() {
private static final long serialVersionUID = -5293899159488141547L;
@Override
public void showMessage() {
Object check = AllZone.Display.getChoiceOptional("Select creature", getCreatures());
if(check != null) {
spell.setTargetCard((Card) check);
stopSetNext(new Input_PayManaCost(spell));
} else stop();
}//showMessage()
public Card[] getCreatures() {
CardList creatures = AllZoneUtil.getCardsInGraveyard();
return creatures.filter(AllZoneUtil.creatures).toArray();
}
};//Input
spell.setBeforePayMana(target);
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) {