mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
1) Added Ancient Runes.
2) Changed the code for Karma.
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
|
||||
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_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
|
||||
|
||||
@@ -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
|
||||
no cost
|
||||
Land
|
||||
|
||||
@@ -101,6 +101,7 @@ public class GameActionUtil {
|
||||
|
||||
upkeep_Convalescence();
|
||||
upkeep_Convalescent_Care();
|
||||
upkeep_Ancient_Runes();
|
||||
upkeep_Karma();
|
||||
upkeep_Defense_of_the_Heart();
|
||||
upkeep_Oath_of_Druids();
|
||||
@@ -7432,6 +7433,79 @@ public class GameActionUtil {
|
||||
}
|
||||
}//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() {
|
||||
final String player = AllZone.Phase.getActivePlayer();
|
||||
String opponent = AllZone.GameAction.getOpponent(player);
|
||||
@@ -7468,6 +7542,7 @@ public class GameActionUtil {
|
||||
}
|
||||
}// if
|
||||
}// upkeep_Karma()
|
||||
*/
|
||||
|
||||
private static void upkeep_Convalescence() {
|
||||
final String player = AllZone.Phase.getActivePlayer();
|
||||
|
||||
Reference in New Issue
Block a user