mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
add All is Dust from Rise of the Eldrazi
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
|
||||
all_is_dust.jpg http://www.wizards.com/global/images/magic/general/all_is_dust.jpg
|
||||
tranquil_path.jpg http://www.wizards.com/global/images/magic/general/tranquil_path.jpg
|
||||
buried_alive.jpg http://www.wizards.com/global/images/magic/general/buried_alive.jpg
|
||||
ulamog_the_infinite_gyre.jpg http://www.wizards.com/global/images/magic/general/ulamog_the_infinite_gyre.jpg
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
All is Dust
|
||||
7
|
||||
Tribal Sorcery Eldrazi
|
||||
Each player sacrifices all colored permanents he or she controls.
|
||||
|
||||
Tranquil Path
|
||||
4 G
|
||||
Sorcery
|
||||
|
||||
@@ -18861,6 +18861,51 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("All is Dust")) {
|
||||
/*
|
||||
* Each player sacrifices all colored permanents he or she controls.
|
||||
*/
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -8228522411909468245L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardList all = AllZoneUtil.getCardsInPlay();
|
||||
all = all.filter(colorless);
|
||||
|
||||
CardListUtil.sortByIndestructible(all);
|
||||
CardListUtil.sortByDestroyEffect(all);
|
||||
|
||||
for(Card c: all) {
|
||||
AllZone.GameAction.sacrifice(c);
|
||||
}
|
||||
}// resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
//same basic AI as Wrath of God, Damnation, Consume the Meek, etc.
|
||||
CardList human = AllZoneUtil.getPlayerCardsInPlay(Constant.Player.Human);
|
||||
human = human.filter(colorless);
|
||||
CardList computer = AllZoneUtil.getPlayerCardsInPlay(Constant.Player.Computer);
|
||||
computer = computer.filter(colorless);
|
||||
|
||||
// the computer will at least destroy 2 more human permanents
|
||||
return AllZone.Phase.getPhase().equals(Constant.Phase.Main2) &&
|
||||
(computer.size() < human.size() - 1
|
||||
|| (AllZone.Computer_Life.getLife() < 7 && !human.isEmpty()));
|
||||
}
|
||||
|
||||
private CardListFilter colorless = new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return !CardUtil.getColors(c).contains(Constant.Color.Colorless) && !c.getName().equals("Mana Pool");
|
||||
}
|
||||
};
|
||||
};// SpellAbility
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}// *************** END ************ END **************************
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
Reference in New Issue
Block a user