diff --git a/res/card-pictures.txt b/res/card-pictures.txt index cb65e98ee04..fac3603f1a2 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -39,6 +39,7 @@ snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/gene 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 howl_of_the_night_pack.jpg http://www.wizards.com/global/images/magic/general/howl_of_the_night_pack.jpg +wall_of_reverence.jpg http://www.wizards.com/global/images/magic/general/wall_of_reverence.jpg beacon_of_creation.jpg http://www.wizards.com/global/images/magic/general/beacon_of_creation.jpg echoing_courage.jpg http://www.wizards.com/global/images/magic/general/echoing_courage.jpg brush_with_death.jpg http://www.wizards.com/global/images/magic/general/brush_with_death.jpg diff --git a/res/cards.txt b/res/cards.txt index bdeb4257301..41ae6cf3f03 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,11 @@ +Wall of Reverence +3 W +Creature Spirit Wall +At the beginning of your end step, you may gain life equal to the power of target creature you control. +1/6 +Defender +Flying + Howl of the Night Pack 6 G Sorcery diff --git a/src/forge/CardUtil.java b/src/forge/CardUtil.java index 3c92e349e1a..3e67262127d 100644 --- a/src/forge/CardUtil.java +++ b/src/forge/CardUtil.java @@ -241,7 +241,7 @@ public class CardUtil { tMC = tCL.toString() + " " + mc1 + " " + mc2; - System.out.println("TMC:" + tMC); + //System.out.println("TMC:" + tMC); return tMC; } diff --git a/src/forge/EndOfTurn.java b/src/forge/EndOfTurn.java index cf4cda3d5da..dfe3aa976ba 100644 --- a/src/forge/EndOfTurn.java +++ b/src/forge/EndOfTurn.java @@ -33,6 +33,8 @@ public class EndOfTurn implements java.io.Serializable AllZone.GameAction.sacrifice(sacrifice.get(i)); } + GameActionUtil.endOfTurn_Wall_Of_Reverence(); + //GameActionUtil.removeExaltedEffects(); GameActionUtil.removeAttackedBlockedThisTurn(); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 97e2f881c19..637d2ad10d2 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -2128,6 +2128,8 @@ public class GameActionUtil { } } + //UPKEEP CARDS: + public static void upkeep_removeDealtDamageToOppThisTurn() { // resets the status of attacked/blocked this turn String player = AllZone.Phase.getActivePlayer(); @@ -2583,6 +2585,68 @@ public class GameActionUtil { } }//damageUpkeepCost + //END UPKEEP CARDS + + //START ENDOFTURN CARDS + + public static void endOfTurn_Wall_Of_Reverence() + { + final String player = AllZone.Phase.getActivePlayer(); + final PlayerZone playZone = AllZone.getZone(Constant.Zone.Play, player); + CardList list = new CardList(playZone.getCards()); + list = list.getName("Wall of Reverence"); + + Ability ability; + for (int i = 0; i < list.size(); i++) + { + final Card card = list.get(i); + ability = new Ability(list.get(i), "0") + { + public void resolve() + { + CardList creats = new CardList(playZone.getCards()); + CardList validTargets = new CardList(); + creats = creats.getType("Creature"); + for (int i = 0; i < creats.size(); i++) { + if (CardFactoryUtil.canTarget(card, creats.get(i))) { + validTargets.add(creats.get(i)); + } + } + if (validTargets.size() == 0) + return; + + if (player.equals(Constant.Player.Human)) + { + Object o = AllZone.Display.getChoiceOptional("Select creature for Wall of Reverence life gain", validTargets.toArray()); + if (o != null) { + Card c = (Card) o; + int power=c.getNetAttack(); + PlayerLife life = AllZone.GameAction.getPlayerLife(player); + life.addLife(power); + } + } + else//computer + { + CardListUtil.sortAttack(validTargets); + Card c = creats.get(0); + if (c != null) { + int power = c.getNetAttack(); + PlayerLife life = AllZone.GameAction.getPlayerLife(player); + life.addLife(power); + } + } + } // resolve + }; // ability + ability.setStackDescription("Wall of Reverence - " + + player + " gains life equal to target creature's power."); + AllZone.Stack.add(ability); + } + + } + + + //END ENDOFTURN CARDS + public static void removeAttackedBlockedThisTurn() { // resets the status of attacked/blocked this turn String player = AllZone.Phase.getActivePlayer(); diff --git a/src/forge/SpellAbility.java b/src/forge/SpellAbility.java index c3f6efaa956..477005517d9 100644 --- a/src/forge/SpellAbility.java +++ b/src/forge/SpellAbility.java @@ -192,7 +192,7 @@ public abstract class SpellAbility { //begin - Input methods public Input getBeforePayMana() { - return beforePayMana; + return beforePayMana; } public void setBeforePayMana(Input in) {