Some cards from Rize of the Eldrazi
Hello , i think you could add this card from Rize of the Eldrazi:
- Code: Select all
Cadaver Imp
In CardFactory_Creatures.java:
//*************** START *********** START **************************
else if(cardName.equals("Cadaver Imp")) {
final SpellAbility ability = new Ability(card, "0") {
@Override
public void resolve() {
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
if(AllZone.GameAction.isCardInZone(getTargetCard(), grave)) {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
AllZone.GameAction.moveTo(hand, getTargetCard());
}
}//resolve()
};
Command intoPlay = new Command() {
private static final long serialVersionUID = -7433708170033536384L;
public void execute() {
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
CardList list = new CardList(grave.getCards());
list = list.getType("Creature");
if(list.isEmpty()) return;
if(card.getController().equals(Constant.Player.Human)) {
Object o = AllZone.Display.getChoiceOptional("Select target card", list.toArray());
if(o != null) {
ability.setTargetCard((Card) o);
AllZone.Stack.add(ability);
}
}//if
else//computer
{
Card best = CardFactoryUtil.AI_getBestCreature(list);
ability.setTargetCard(best);
AllZone.Stack.add(ability);
}
}//execute()
};//Command
card.addComesIntoPlayCommand(intoPlay);
}//*************** END ************ END **************************
in Cards.txt:
Cadaver Imp
1 B B
Creature Imp
When Cadaver Imp enters the battlefield, you may return target creature card from your graveyard to your hand.
1/1
Flying