1) Added Ancient Runes.

2) Changed the code for Karma.
This commit is contained in:
jendave
2011-08-06 05:07:23 +00:00
parent 2c0113273f
commit a20bae461a
3 changed files with 83 additions and 2 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
ancient_runes.jpg http://www.wizards.com/global/images/magic/general/ancient_runes.jpg
vivid_crag.jpg http://www.wizards.com/global/images/magic/general/vivid_crag.jpg vivid_crag.jpg http://www.wizards.com/global/images/magic/general/vivid_crag.jpg
vivid_creek.jpg http://www.wizards.com/global/images/magic/general/vivid_creek.jpg vivid_creek.jpg http://www.wizards.com/global/images/magic/general/vivid_creek.jpg
vivid_grove.jpg http://www.wizards.com/global/images/magic/general/vivid_grove.jpg vivid_grove.jpg http://www.wizards.com/global/images/magic/general/vivid_grove.jpg

View File

@@ -1,3 +1,8 @@
Ancient Runes
2 R
Enchantment
At the beginning of each player's upkeep, Ancient Runes deals damage to that player equal to the number of artifacts he or she controls.
Vivid Crag Vivid Crag
no cost no cost
Land Land

View File

@@ -101,6 +101,7 @@ public class GameActionUtil {
upkeep_Convalescence(); upkeep_Convalescence();
upkeep_Convalescent_Care(); upkeep_Convalescent_Care();
upkeep_Ancient_Runes();
upkeep_Karma(); upkeep_Karma();
upkeep_Defense_of_the_Heart(); upkeep_Defense_of_the_Heart();
upkeep_Oath_of_Druids(); upkeep_Oath_of_Druids();
@@ -7431,7 +7432,80 @@ public class GameActionUtil {
} }
} }
}//Oath of Ghouls }//Oath of Ghouls
private static void upkeep_Ancient_Runes() {
final String player = AllZone.Phase.getActivePlayer();
CardList ancient_runes = new CardList();
ancient_runes.addAll(AllZone.Human_Play.getCards());
ancient_runes.addAll(AllZone.Computer_Play.getCards());
ancient_runes = ancient_runes.getName("Ancient Runes");
PlayerZone activePlayZone = AllZone.getZone(Constant.Zone.Play, player);
CardList artifacts = new CardList(activePlayZone.getCards());
artifacts = artifacts.getType("Artifact");
// determine how much damage to deal the current player
final int damage = artifacts.size();
// if there are 1 or more Ancient Runes on the
// battlefield have each of them deal damage.
if(0 < ancient_runes.size()) {
for(int i = 0; i < ancient_runes.size(); i++) {
Ability ability = new Ability(ancient_runes.get(0), "0") {
@Override
public void resolve() {
if(damage>0){
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.setLife(life.getLife() - damage);
}
}
};// Ability
if(damage>0){
ability.setStackDescription("Ancient Runes deals " + damage + " damage to " + player);
AllZone.Stack.add(ability);
}
}
}// if
}// upkeep_Ancient_Runes()
private static void upkeep_Karma() {
final String player = AllZone.Phase.getActivePlayer();
CardList karma = new CardList();
karma.addAll(AllZone.Human_Play.getCards());
karma.addAll(AllZone.Computer_Play.getCards());
karma = karma.getName("Karma");
PlayerZone activePlayZone = AllZone.getZone(Constant.Zone.Play, player);
CardList swamps = new CardList(activePlayZone.getCards());
swamps = swamps.getType("Swamp");
// determine how much damage to deal the current player
final int damage = swamps.size();
// if there are 1 or more Karmas on the
// battlefield have each of them deal damage.
if(0 < karma.size()) {
for(int i = 0; i < karma.size(); i++) {
Ability ability = new Ability(karma.get(0), "0") {
@Override
public void resolve() {
if(damage>0){
PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.setLife(life.getLife() - damage);
}
}
};// Ability
if(damage>0){
ability.setStackDescription("Karma deals " + damage + " damage to " + player);
AllZone.Stack.add(ability);
}
}
}// if
}// upkeep_Karma()
/*
private static void upkeep_Karma() { private static void upkeep_Karma() {
final String player = AllZone.Phase.getActivePlayer(); final String player = AllZone.Phase.getActivePlayer();
String opponent = AllZone.GameAction.getOpponent(player); String opponent = AllZone.GameAction.getOpponent(player);
@@ -7468,7 +7542,8 @@ public class GameActionUtil {
} }
}// if }// if
}// upkeep_Karma() }// upkeep_Karma()
*/
private static void upkeep_Convalescence() { private static void upkeep_Convalescence() {
final String player = AllZone.Phase.getActivePlayer(); final String player = AllZone.Phase.getActivePlayer();
PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player);