mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
convert Yavimaya Elder to AB$Draw
This commit is contained in:
@@ -3,6 +3,7 @@ ManaCost:1 G G
|
||||
Types:Creature Human Druid
|
||||
Text:When Yavimaya Elder is put into a graveyard from the battlefield, you may search your library for up to two basic land cards, reveal them, and put them into your hand. If you do, shuffle your library.
|
||||
PT:2/1
|
||||
A:AB$Draw|Cost$2 Sac<1/CARDNAME>|NumCards$1|SpellDescription$Draw a card.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/yavimaya_elder.jpg
|
||||
SetInfo:UDS|Common|http://magiccards.info/scans/en/ud/124.jpg
|
||||
|
||||
@@ -12816,37 +12816,7 @@ public class CardFactory_Creatures {
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Yavimaya Elder"))
|
||||
{
|
||||
final SpellAbility ability = new Ability(card, "2") {
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return AllZone.GameAction.isCardInPlay(card)
|
||||
&& !AllZone.Stack.getSourceCards().contains(card);//in play and not already activated(Sac cost problems)
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return (AllZone.Computer_Hand.size() < 3) && (AllZone.Computer_Library.size() > 0)
|
||||
&& MyRandom.random.nextBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
//if (card.getController().equals(AllZone.ComputerPlayer))
|
||||
//for now, sac happens during resolution:
|
||||
AllZone.GameAction.sacrifice(getSourceCard());
|
||||
card.getController().drawCard();
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sbDesc = new StringBuilder();
|
||||
sbDesc.append("2, Sacrifice ").append(card.getName()).append(": Draw a card.");
|
||||
ability.setDescription(sbDesc.toString());
|
||||
|
||||
StringBuilder sbStack = new StringBuilder();
|
||||
sbStack.append(card.getName()).append(" - Draw a card.");
|
||||
ability.setStackDescription(sbStack.toString());
|
||||
else if (cardName.equals("Yavimaya Elder")) {
|
||||
|
||||
final Command destroy = new Command()
|
||||
{
|
||||
@@ -12857,37 +12827,9 @@ public class CardFactory_Creatures {
|
||||
AllZone.GameAction.searchLibraryTwoBasicLand(card.getController(), Constant.Zone.Hand, false, Constant.Zone.Hand, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Input runtime = new Input() {
|
||||
|
||||
private static final long serialVersionUID = -4361362367624073190L;
|
||||
boolean once = true;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
//this is necessary in order not to have a StackOverflowException
|
||||
//because this updates a card, it creates a circular loop of observers
|
||||
if(once) {
|
||||
once = false;
|
||||
stopSetNext(new Input_PayManaCost(ability));
|
||||
AllZone.GameAction.sacrifice(card);
|
||||
|
||||
|
||||
//AllZone.Stack.add(ability);
|
||||
//stop();
|
||||
}
|
||||
}//showMessage()
|
||||
};
|
||||
|
||||
ability.setBeforePayMana(runtime);
|
||||
*/
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
card.addDestroyCommand(destroy);
|
||||
|
||||
}
|
||||
//*************** END ************ END **************************
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
|
||||
Reference in New Issue
Block a user