diff --git a/res/card-pictures.txt b/res/card-pictures.txt index 12c3d7fe9a4..6e49c8cfaff 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -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 +eternity_vessel.jpg http://www.wizards.com/global/images/magic/general/eternity_vessel.jpg vengevine.jpg http://www.wizards.com/global/images/magic/general/vengevine.jpg maelstrom_nexus.jpg http://www.wizards.com/global/images/magic/general/maelstrom_nexus.jpg life_from_the_loam.jpg http://www.wizards.com/global/images/magic/general/life_from_the_loam.jpg diff --git a/res/cards.txt b/res/cards.txt index 324b071a24b..9726d2bebc2 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,9 @@ +Eternity Vessel +6 +Artifact +Eternity Vessel enters the battlefield with X charge counters on it, where X is your life total. Landfall — Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel. +Landfall + Vengevine 2 G G Creature Elemental diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index d72bd38c81f..a5fd6c1e811 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -4111,7 +4111,24 @@ public class CardFactory implements NewConstants { }//*************** END ************ END ************************** - + //*************** START *********** START ************************** + else if(cardName.equals("Eternity Vessel")) { + Command intoPlay = new Command() { + private static final long serialVersionUID = 7202704600935499188L; + + public void execute() { + int player = 0; + if(card.getController() == "Human") { + player = AllZone.Human_Life.getLife(); + } else { + player = AllZone.Computer_Life.getLife(); + } + card.addCounter(Counters.CHARGE, player); + } + }; + card.addComesIntoPlayCommand(intoPlay); + }//*************** END ************ END ************************** + //*************** START *********** START ************************** else if(cardName.equals("Timetwister")) { final SpellAbility spell = new Spell(card) { diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 2341fadb78e..abac5985fdc 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -4221,6 +4221,7 @@ public class GameActionUtil { else if(c.getName().equals("Hedron Crab")) landfall_Hedron_Crab(c); else if(c.getName().equals("Bloodghast")) landfall_Bloodghast(c); else if(c.getName().equals("Avenger of Zendikar")) landfall_Avenger_of_Zendikar(c); + else if(c.getName().equals("Eternity Vessel")) landfall_Eternity_Vessel(c); } private static boolean checkValakutCondition(Card valakutCard, Card mtn) { @@ -4582,7 +4583,51 @@ public class GameActionUtil { } }//landfall_Avenger + + private static void landfall_Eternity_Vessel(Card c) { + final Card crd = c; + Card biggest = null; + if(c.getController() == "Computer") { + CardList Vessels = new CardList(); + PlayerZone zone = AllZone.getZone(Constant.Zone.Play, c.getController()); + if(zone != null) { + Vessels.addAll(zone.getCards()); + Vessels = Vessels.getName("Eternity Vessel"); + biggest = Vessels.get(0); + for(int i = 0; i < Vessels.size(); i++) + if(biggest.getCounters(Counters.CHARGE) < Vessels.get(i).getCounters(Counters.CHARGE)) biggest = Vessels.get(i); + } + } + final Card CompVessel = biggest; + Ability ability = new Ability(c, "0") { + @Override + public void resolve() { + Card Target = null; + if(crd.getController() == "Human") Target = crd; + else Target = CompVessel; + + PlayerLife life = AllZone.GameAction.getPlayerLife(Target.getController()); + int lifeGain = Target.getCounters(Counters.CHARGE); + life.setLife(lifeGain); + } + }; + ability.setStackDescription("Landfall — Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel."); + if(c.getController().equals(Constant.Player.Human)) { + if(showLandfallDialog(c)) AllZone.Stack.add(ability); + } else if(c.getController().equals(Constant.Player.Computer)) { + CardList Hexmages = new CardList(); + PlayerZone zone = AllZone.getZone(Constant.Zone.Play, "Human"); + if(zone != null) { + Hexmages.addAll(zone.getCards()); + Hexmages = Hexmages.getName("Vampire Hexmage"); + int clife = AllZone.Computer_Life.getLife(); + if(CompVessel.getCounters(Counters.CHARGE) > clife && (Hexmages.size() == 0)) AllZone.Stack.add(ability); + } + } + + }//landfall_Eternity_Vessel + public static void executeLifeLinkEffects(Card c) { final String player = c.getController(); int pwr = c.getNetAttack();