diff --git a/Mage.Common/src/mage/view/TableView.java b/Mage.Common/src/mage/view/TableView.java index ee885b1940c..6c52f6332fe 100644 --- a/Mage.Common/src/mage/view/TableView.java +++ b/Mage.Common/src/mage/view/TableView.java @@ -52,10 +52,10 @@ public class TableView implements Serializable { private String gameType; private int wins; private int freeMulligans; - private String deckType; + private final String deckType; private String tableName; private String controllerName; - private String additionalInfo; + private final String additionalInfo; private Date createTime; private TableState tableState; private boolean isTournament; diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java b/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java index 624bd35bd9c..d0c9bc78351 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/AjaniMentorOfHeroes.java @@ -73,12 +73,6 @@ public class AjaniMentorOfHeroes extends CardImpl { new CardTypePredicate(CardType.PLANESWALKER))); } - - static { - filter.add(new CardTypePredicate(CardType.CREATURE)); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 4)); - } - public AjaniMentorOfHeroes(UUID ownerId) { super(ownerId, 145, "Ajani, Mentor of Heroes", Rarity.MYTHIC, new CardType[]{CardType.PLANESWALKER}, "{3}{G}{W}"); this.expansionSetCode = "JOU"; diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/Godsend.java b/Mage.Sets/src/mage/sets/journeyintonyx/Godsend.java index f6d550bea6d..803cea5eb49 100644 --- a/Mage.Sets/src/mage/sets/journeyintonyx/Godsend.java +++ b/Mage.Sets/src/mage/sets/journeyintonyx/Godsend.java @@ -116,37 +116,40 @@ class GodsendTriggeredAbility extends TriggeredAbilityImpl 0) { - for (CombatGroup group: game.getCombat().getBlockingGroups()) { - if (group.getBlockers().contains(this.getSourceId())) { - possibleTargets.addAll(group.getAttackers()); + if (equippedPermanent.getBlocking() > 0) { + for (CombatGroup group: game.getCombat().getBlockingGroups()) { + if (group.getBlockers().contains(this.getSourceId())) { + possibleTargets.addAll(group.getAttackers()); + } } + } - - } - if (possibleTargets.size() > 0) { - if (possibleTargets.size() == 1) { - this.getTargets().clear(); - this.getEffects().get(0).setTargetPointer(new FixedTarget(possibleTargets.iterator().next())); - } else { - FilterCreaturePermanent filter = new FilterCreaturePermanent("one blocking or blocked creature"); - List uuidPredicates = new ArrayList<>(); - for (UUID creatureId : possibleTargets) { - uuidPredicates.add(new PermanentIdPredicate(creatureId)); + if (possibleTargets.size() > 0) { + if (possibleTargets.size() == 1) { + this.getTargets().clear(); + this.getEffects().get(0).setTargetPointer(new FixedTarget(possibleTargets.iterator().next())); + } else { + FilterCreaturePermanent filter = new FilterCreaturePermanent("one blocking or blocked creature"); + List uuidPredicates = new ArrayList<>(); + for (UUID creatureId : possibleTargets) { + uuidPredicates.add(new PermanentIdPredicate(creatureId)); + } + filter.add(Predicates.or(uuidPredicates)); + this.getTargets().add(new TargetCreaturePermanent(filter, true)); } - filter.add(Predicates.or(uuidPredicates)); - this.getTargets().add(new TargetCreaturePermanent(filter, true)); } } } diff --git a/Mage.Sets/src/mage/sets/journeyintonyx/StrengthOfTheFallen.java b/Mage.Sets/src/mage/sets/journeyintonyx/StrengthOfTheFallen.java new file mode 100644 index 00000000000..707ce14bc2f --- /dev/null +++ b/Mage.Sets/src/mage/sets/journeyintonyx/StrengthOfTheFallen.java @@ -0,0 +1,71 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.journeyintonyx; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.abilityword.ConstellationAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.continious.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Rarity; +import mage.filter.common.FilterCreatureCard; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class StrengthOfTheFallen extends CardImpl { + + public StrengthOfTheFallen(UUID ownerId) { + super(ownerId, 143, "Strength of the Fallen", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + this.expansionSetCode = "JOU"; + + this.color.setGreen(true); + + // Constellation - Whenever Strength of the Fallen or another entchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. + DynamicValue xValue = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards")); + Ability ability = new ConstellationAbility(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true)); + ability.addTarget(new TargetCreaturePermanent(true)); + this.addAbility(ability); + + } + + public StrengthOfTheFallen(final StrengthOfTheFallen card) { + super(card); + } + + @Override + public StrengthOfTheFallen copy() { + return new StrengthOfTheFallen(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index a55ca213bd2..ec6307ac6b0 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -23225,4 +23225,5 @@ Font of Ire|Journey into Nyx|97|C|{1}{R}|Enchantment|||{3}{R}, Sacrifice Font of Font of Fortunes|Journey into Nyx|38|C|{1}{U}|Enchantment|||{1}{U}, Sacrifice Font of Fortunes: Draw two cards.| Font of Return|Journey into Nyx|71|C|{1}{B}|Enchantment|||{3}{B}, Sacrifice Font of Return: Return up to three target creature cards from your graveyard to your hand.| Golden Hind|Journey into Nyx|124|C|{1}{G}|Creature - Elk|2|1|T: Add {G} to your mana pool.| -Harness by Force|Journey into Nyx|100|R|{1}{R}{R}|Sorcery|||Strive - Harness by Force costs 2R more to cast for each target beyond the first.$Gain control of any number of target creatures until end of turn. Untap those creatures. They gain haste until end of turn.| \ No newline at end of file +Harness by Force|Journey into Nyx|100|R|{1}{R}{R}|Sorcery|||Strive - Harness by Force costs 2R more to cast for each target beyond the first.$Gain control of any number of target creatures until end of turn. Untap those creatures. They gain haste until end of turn.| +Strength of the Fallen|Journey into Nyx|143|U|{1}{G}|Enchantment|||Constellation - Whenever Strength of the Fallen or another entchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard.|