From fc2ea909b684ae25e5b81e2f684696113777bb96 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 15 Aug 2017 08:31:52 +0200 Subject: [PATCH 1/3] * Earthshaker Khenra - Fixed that the power comparison was until now not done during resolution. --- .../src/mage/cards/e/EarthshakerKhenra.java | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java index 5c48a786f4..5faf9b1621 100644 --- a/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java +++ b/Mage.Sets/src/mage/cards/e/EarthshakerKhenra.java @@ -32,6 +32,8 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.combat.CantBlockTargetEffect; import mage.abilities.keyword.EternalizeAbility; import mage.abilities.keyword.HasteAbility; @@ -40,11 +42,13 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; /** * @@ -67,7 +71,7 @@ public class EarthshakerKhenra extends CardImpl { this.addAbility(HasteAbility.getInstance()); // When Earthshaker Khenra enters the battlefield, target creature with power less than or equal to Earthshaker Khenra's power can't block this turn. - Ability ability = new EntersBattlefieldTriggeredAbility(new CantBlockTargetEffect(Duration.EndOfTurn)); + Ability ability = new EntersBattlefieldTriggeredAbility(new EarthshakerKhenraEffect()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); originalId = ability.getOriginalId(); @@ -82,11 +86,10 @@ public class EarthshakerKhenra extends CardImpl { if (ability.getOriginalId().equals(originalId)) { Permanent sourcePermanent = game.getPermanent(ability.getSourceId()); if (sourcePermanent != null) { - int power = sourcePermanent.getPower().getValue(); - FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power less than or equal to " + getLogName() + "'s power"); - filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, power + 1)); + FilterCreaturePermanent targetFilter = new FilterCreaturePermanent("creature with power less than or equal to " + getLogName() + "'s power"); + targetFilter.add(new PowerPredicate(ComparisonType.FEWER_THAN, sourcePermanent.getPower().getValue() + 1)); ability.getTargets().clear(); - ability.getTargets().add(new TargetCreaturePermanent(filter)); + ability.getTargets().add(new TargetCreaturePermanent(targetFilter)); } } } @@ -101,3 +104,40 @@ public class EarthshakerKhenra extends CardImpl { return new EarthshakerKhenra(this); } } + +class EarthshakerKhenraEffect extends OneShotEffect { + + public EarthshakerKhenraEffect() { + super(Outcome.UnboostCreature); + this.staticText = "target creature with power less than or equal to {this}'s power can't block this turn"; + } + + public EarthshakerKhenraEffect(final EarthshakerKhenraEffect effect) { + super(effect); + } + + @Override + public EarthshakerKhenraEffect copy() { + return new EarthshakerKhenraEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent sourceObject = game.getPermanentOrLKIBattlefield(source.getSourceId()); + if (sourceObject != null) { + Permanent targetCreature = game.getPermanent(getTargetPointer().getFirst(game, source)); + /* + 27.06.2017 The target creature’s power is checked when you target it with Earthshaker Khenra’s ability + and when that ability resolves. Once the ability resolves, if the creature’s power increases + or Earthshaker Khenra’s power decreases, the target creature will still be unable to block. + */ + if (targetCreature != null && targetCreature.getPower().getValue() <= sourceObject.getPower().getValue()) { + ContinuousEffect effect = new CantBlockTargetEffect(Duration.EndOfTurn); + effect.setTargetPointer(new FixedTarget(targetCreature, game)); + game.addEffect(effect, source); + } + return true; + } + return false; + } +} From 6c9a6ab58a6fb30f29e7dc95a600c4fb6d4a775a Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 15 Aug 2017 12:49:10 +0200 Subject: [PATCH 2/3] * Ulvenwald Tracker - Fixed rule text. --- Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java b/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java index c5791b7e97..17cdcd8b40 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldTracker.java @@ -51,7 +51,7 @@ import mage.target.common.TargetCreaturePermanent; public class UlvenwaldTracker extends CardImpl { public UlvenwaldTracker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); this.subtype.add("Human"); this.subtype.add("Shaman"); @@ -64,7 +64,7 @@ public class UlvenwaldTracker extends CardImpl { Target controlledTarget = new TargetControlledCreaturePermanent(); controlledTarget.setTargetTag(1); ability.addTarget(controlledTarget); - FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature to fight"); + FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new AnotherTargetPredicate(2)); Target secondTarget = new TargetCreaturePermanent(filter); secondTarget.setTargetTag(2); From 81a7c76374717f420de2e1de4f3b28a7a3cd295e Mon Sep 17 00:00:00 2001 From: "Saga\\Robert" Date: Tue, 15 Aug 2017 17:21:40 +0200 Subject: [PATCH 3/3] - fixed Kindred Dominance bug (was using Wasitora class) - sorted c17 set file alphabetically --- Mage.Sets/src/mage/sets/Commander2017.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/sets/Commander2017.java b/Mage.Sets/src/mage/sets/Commander2017.java index c2679d7cc0..66bcbf1bb9 100644 --- a/Mage.Sets/src/mage/sets/Commander2017.java +++ b/Mage.Sets/src/mage/sets/Commander2017.java @@ -49,6 +49,7 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("Balan, Wandering Knight", 2, Rarity.RARE, mage.cards.b.BalanWanderingKnight.class)); cards.add(new SetCardInfo("Bloodsworn Steward", 22, Rarity.RARE, mage.cards.b.BloodswornSteward.class)); + cards.add(new SetCardInfo("Crimson Honor Guard", 23, Rarity.RARE, mage.cards.c.CrimsonHonorGuard.class)); cards.add(new SetCardInfo("Curse of Bounty", 30, Rarity.UNCOMMON, mage.cards.c.CurseOfBounty.class)); cards.add(new SetCardInfo("Curse of Disturbance", 16, Rarity.UNCOMMON, mage.cards.c.CurseOfDisturbance.class)); cards.add(new SetCardInfo("Curse of Opulence", 24, Rarity.UNCOMMON, mage.cards.c.CurseOfOpulence.class)); @@ -56,8 +57,8 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("Curse of Vitality", 3, Rarity.UNCOMMON, mage.cards.c.CurseOfVitality.class)); cards.add(new SetCardInfo("Herald's Horn", 53, Rarity.UNCOMMON, mage.cards.h.HeraldsHorn.class)); cards.add(new SetCardInfo("Hungry Lynx", 31, Rarity.RARE, mage.cards.h.HungryLynx.class)); - cards.add(new SetCardInfo("Crimson Honor Guard", 23, Rarity.RARE, mage.cards.c.CrimsonHonorGuard.class)); cards.add(new SetCardInfo("Fractured Identity", 37, Rarity.RARE, mage.cards.f.FracturedIdentity.class)); + cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.k.KindredDominance.class)); cards.add(new SetCardInfo("Nazahn, Revered Bladesmith", 44, Rarity.MYTHIC, mage.cards.n.NazahnReveredBladesmith.class)); cards.add(new SetCardInfo("O-Kagachi, Vengeful Kami", 45, Rarity.MYTHIC, mage.cards.o.OKagachiVengefulKami.class)); cards.add(new SetCardInfo("Patron of the Vein", 20, Rarity.RARE, mage.cards.p.PatronOfTheVein.class)); @@ -69,8 +70,6 @@ public class Commander2017 extends ExpansionSet { cards.add(new SetCardInfo("Teferi's Protection", 8, Rarity.RARE, mage.cards.t.TeferisProtection.class)); cards.add(new SetCardInfo("Traverse the Outlands", 34, Rarity.RARE, mage.cards.t.TraverseTheOutlands.class)); cards.add(new SetCardInfo("Wasitora, Nekoru Queen", 49, Rarity.MYTHIC, mage.cards.w.WasitoraNekoruQueen.class)); - cards.add(new SetCardInfo("Kindred Dominance", 18, Rarity.RARE, mage.cards.w.WasitoraNekoruQueen.class)); - } }