mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
added Acidic Soil from Urza's Saga
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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
1 U U
|
||||
Instant
|
||||
|
||||
@@ -10,6 +10,7 @@ package forge;
|
||||
*/
|
||||
public class AllZoneUtil {
|
||||
|
||||
//////////// Creatures
|
||||
/**
|
||||
* 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
|
||||
|
||||
@@ -18935,6 +18935,45 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** 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
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
Reference in New Issue
Block a user