mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added Yavimaya Elder.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Yavimaya Elder
|
||||||
|
1 G G
|
||||||
|
Creature Human Druid
|
||||||
|
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.
|
||||||
|
2/1
|
||||||
|
|
||||||
Scavenger Drake
|
Scavenger Drake
|
||||||
3 B
|
3 B
|
||||||
Creature Drake
|
Creature Drake
|
||||||
|
|||||||
@@ -20631,6 +20631,74 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
|
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(Constant.Player.Computer))
|
||||||
|
//for now, sac happens during resolution:
|
||||||
|
AllZone.GameAction.sacrifice(getSourceCard());
|
||||||
|
AllZone.GameAction.drawCard(card.getController());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ability.setDescription("2, Sacrifice " + card.getName() + ": Draw a card.");
|
||||||
|
ability.setStackDescription(card.getName() + " - Draw a card.");
|
||||||
|
|
||||||
|
final Command destroy = new Command()
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = -5552202665064265632L;
|
||||||
|
|
||||||
|
public void execute()
|
||||||
|
{
|
||||||
|
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 **************************
|
||||||
|
|
||||||
|
|
||||||
// Cards with Cycling abilities
|
// Cards with Cycling abilities
|
||||||
// -1 means keyword "Cycling" not found
|
// -1 means keyword "Cycling" not found
|
||||||
if(shouldCycle(card) != -1) {
|
if(shouldCycle(card) != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user