added Acidic Soil from Urza's Saga

This commit is contained in:
jendave
2011-08-06 04:12:43 +00:00
parent ea2c099ad3
commit aa4e39d8a6
4 changed files with 65 additions and 0 deletions

View File

@@ -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_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_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 snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
acidic_soil.jpg http://www.wizards.com/global/images/magic/general/acidic_soil.jpg
dissipate.jpg http://www.wizards.com/global/images/magic/general/dissipate.jpg dissipate.jpg http://www.wizards.com/global/images/magic/general/dissipate.jpg
all_is_dust.jpg http://www.wizards.com/global/images/magic/general/all_is_dust.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 tranquil_path.jpg http://www.wizards.com/global/images/magic/general/tranquil_path.jpg

View File

@@ -1,3 +1,8 @@
Acidic Soil
2 R
Sorcery
Acidic Soil deals damage to each player equal to the number of lands he or she controls.
Dissipate Dissipate
1 U U 1 U U
Instant Instant

View File

@@ -10,6 +10,7 @@ package forge;
*/ */
public class AllZoneUtil { public class AllZoneUtil {
//////////// Creatures
/** /**
* use to get a list of creatures in play for a given player * use to get a list of creatures in play for a given player
* *
@@ -37,6 +38,25 @@ public class AllZoneUtil {
} }
}; };
///////////////// Lands
/**
* use to get a list of all lands a given player has in play
*
* @param player the player whose lands we want to get
* @return a CardList containing all lands the given player has in play
*/
public static CardList getPlayerLandsInPlay(final String player) {
CardList cards = getPlayerCardsInPlay(player);
return cards.filter(lands);
}
private static CardListFilter lands = new CardListFilter() {
public boolean addCard(Card c) {
return c.isLand();
}
};
//============================================================================= //=============================================================================
// //
// These functions handle getting all cards for a given player // These functions handle getting all cards for a given player

View File

@@ -18935,6 +18935,45 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Acidic Soil")) {
/*
* Acidic Soil deals damage to each player equal to the number of
* lands he or she controls.
*/
SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8555498267738686288L;
@Override
public void resolve() {
CardList humanLands = AllZoneUtil.getPlayerLandsInPlay(Constant.Player.Human);
CardList compLands = AllZoneUtil.getPlayerLandsInPlay(Constant.Player.Computer);
AllZone.GameAction.addDamage(Constant.Player.Computer, compLands.size(), card);
AllZone.GameAction.addDamage(Constant.Player.Human, humanLands.size(), card);
}// resolve()
@Override
public boolean canPlayAI() {
PlayerLife compLife = AllZone.GameAction.getPlayerLife(Constant.Player.Computer);
PlayerLife humanLife = AllZone.GameAction.getPlayerLife(Constant.Player.Human);
CardList human = AllZoneUtil.getPlayerLandsInPlay(Constant.Player.Human);
CardList comp = AllZoneUtil.getPlayerLandsInPlay(Constant.Player.Computer);
if(humanLife.getLife() <= human.size() ) {
return true;
}
if( compLife.getLife() >= comp.size() && human.size() > comp.size()+2 ) {
return true;
}
return false;
}
};// SpellAbility
card.clearSpellAbility();
card.addSpellAbility(spell);
}// *************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) { if(hasKeyword(card, "Cycling") != -1) {