From cf67c272bca8797c772b08f0a714edb31d3a3cfc Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 23 Sep 2018 10:40:59 +0200 Subject: [PATCH] * Varchild, Betrayer of Kjeldor - Fixe dthat the tokens were not created (fixes #5330). --- Mage.Sets/src/mage/cards/p/Plaguecrafter.java | 15 +++++++-------- .../mage/cards/v/VarchildBetrayerOfKjeldor.java | 11 ++++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Mage.Sets/src/mage/cards/p/Plaguecrafter.java b/Mage.Sets/src/mage/cards/p/Plaguecrafter.java index 2e0c97b14c..39eaf6eb38 100644 --- a/Mage.Sets/src/mage/cards/p/Plaguecrafter.java +++ b/Mage.Sets/src/mage/cards/p/Plaguecrafter.java @@ -30,7 +30,7 @@ import mage.target.targetpointer.FixedTarget; public final class Plaguecrafter extends CardImpl { public Plaguecrafter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); @@ -53,12 +53,11 @@ public final class Plaguecrafter extends CardImpl { } } - class PlaguecrafterEffect extends OneShotEffect { public PlaguecrafterEffect() { super(Outcome.Benefit); - this.staticText = "Each player sacrifices a creature or planeswalker. " + this.staticText = "each player sacrifices a creature or planeswalker. " + "Each player who can't discards a card."; } @@ -77,10 +76,10 @@ class PlaguecrafterEffect extends OneShotEffect { if (controller == null) { return false; } - + List perms = new ArrayList<>(); List cantSac = new ArrayList<>(); - + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { @@ -99,14 +98,14 @@ class PlaguecrafterEffect extends OneShotEffect { } } } - + for (UUID permID : perms) { Permanent permanent = game.getPermanent(permID); if (permanent != null) { permanent.sacrifice(source.getSourceId(), game); } } - + for (UUID playerId : cantSac) { Effect discardEffect = new DiscardTargetEffect(1); discardEffect.setTargetPointer(new FixedTarget(playerId, game)); @@ -114,4 +113,4 @@ class PlaguecrafterEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/v/VarchildBetrayerOfKjeldor.java b/Mage.Sets/src/mage/cards/v/VarchildBetrayerOfKjeldor.java index bbff89dbf7..ae1f7cceec 100644 --- a/Mage.Sets/src/mage/cards/v/VarchildBetrayerOfKjeldor.java +++ b/Mage.Sets/src/mage/cards/v/VarchildBetrayerOfKjeldor.java @@ -6,18 +6,19 @@ import mage.abilities.Ability; import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenTargetEffect; import mage.abilities.effects.common.combat.CantAttackYouOrPlaneswalkerAllEffect; import mage.abilities.effects.common.combat.CantBlockAllEffect; import mage.abilities.effects.common.continuous.GainControlAllEffect; -import mage.constants.SubType; -import mage.constants.SuperType; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; import mage.constants.TargetController; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -108,9 +109,9 @@ class VarchildBetrayerOfKjeldorEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { int damage = (int) this.getValue("damage"); if (damage > 0) { - return new CreateTokenTargetEffect( - new SurvivorToken(), damage - ).apply(game, source); + Effect effect = new CreateTokenTargetEffect(new SurvivorToken(), damage); + effect.setTargetPointer(getTargetPointer()); + return effect.apply(game, source); } return false; }