mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
adding Slate of Ancestry from Onslaught
This commit is contained in:
@@ -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
|
||||
slate_of_ancestry.jpg http://www.wizards.com/global/images/magic/general/slate_of_ancestry.jpg
|
||||
champions_drake.jpg http://www.wizards.com/global/images/magic/general/champions_drake.jpg
|
||||
halimar_wavewatch.jpg http://www.wizards.com/global/images/magic/general/halimar_wavewatch.jpg
|
||||
tuktuk_the_explorer.jpg http://www.wizards.com/global/images/magic/general/tuktuk_the_explorer.jpg
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
Slate of Ancestry
|
||||
4
|
||||
Artifact
|
||||
no text
|
||||
|
||||
Champion's Drake
|
||||
1 U
|
||||
Creature Drake
|
||||
|
||||
@@ -18516,6 +18516,58 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Slate of Ancestry")) {
|
||||
/*
|
||||
* 4, Tap, Discard your hand: Draw a card for each creature you control.
|
||||
*/
|
||||
final Ability_Tap ability = new Ability_Tap(card, "4") {
|
||||
private static final long serialVersionUID = 5135410670684913401L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
final String player = card.getController();
|
||||
// Discard hand into graveyard
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, player);
|
||||
Card[] c = hand.getCards();
|
||||
for(int i = 0; i < c.length; i++)
|
||||
AllZone.GameAction.discard(c[i]);
|
||||
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, player);
|
||||
CardList creatures = new CardList(play.getCards());
|
||||
creatures = creatures.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature();
|
||||
}
|
||||
});
|
||||
// Draw a card for each creature
|
||||
for(int i = 0; i < creatures.size(); i++)
|
||||
AllZone.GameAction.drawCard(player);
|
||||
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||
CardList creatures = new CardList(play.getCards());
|
||||
creatures = creatures.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature();
|
||||
}
|
||||
});
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
|
||||
CardList handList = new CardList(hand.getCards());
|
||||
return creatures.size() > handList.size();
|
||||
}
|
||||
|
||||
};//Ability_Tap
|
||||
|
||||
ability.setDescription("4, tap: Discard your hand: Draw a card for each creature you control.");
|
||||
ability.setStackDescription(cardName+" - discard hand and draw 1 card for every creature you control.");
|
||||
ability.setBeforePayMana(new Input_PayManaCost(ability));
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
Reference in New Issue
Block a user