diff --git a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java index e68fb1b295..4d66891eea 100644 --- a/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java +++ b/Mage.Sets/src/mage/sets/theros/AshiokNightmareWeaver.java @@ -38,6 +38,8 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Layer; @@ -163,6 +165,7 @@ class AshiokNightmareWeaverPutIntoPlayEffect extends OneShotEffect { this.color.setGreen(true); // Attacking creatures you control have deathtouch. - GainAbilityControlledEffect gainEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterAttackingCreature(), false); + GainAbilityControlledEffect gainEffect = new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield, new FilterAttackingCreature("Attacking creatures"), false); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, gainEffect)); // {1}{G}, {T}: Choose one - Put a +1/+1 counter on target creature; Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new ManaCostsImpl("{1}{G}")); + ability.addTarget(new TargetCreaturePermanent()); ability.addCost(new TapSourceCost()); // or Bow of Nylea deals 2 damage to target creature with flying; Mode mode = new Mode(); diff --git a/Mage/src/mage/target/common/TargetCardInExile.java b/Mage/src/mage/target/common/TargetCardInExile.java index c6835dcb43..53a51bc62b 100644 --- a/Mage/src/mage/target/common/TargetCardInExile.java +++ b/Mage/src/mage/target/common/TargetCardInExile.java @@ -71,17 +71,24 @@ public class TargetCardInExile extends TargetCard { @Override public Set possibleTargets(UUID sourceId, UUID sourceControllerId, Game game) { + Set possibleTargets = new HashSet(); if (allExileZones) { - Set possibleTargets = new HashSet(); for (Card card : game.getExile().getAllCards(game)) { if (filter.match(card, sourceControllerId, game)) { possibleTargets.add(card.getId()); } } - return possibleTargets; } else { - return super.possibleTargets(sourceId, sourceControllerId, game); + ExileZone exileZone = game.getExile().getExileZone(zoneId); + if (exileZone != null) { + for(Card card : exileZone.getCards(game)) { + if (filter.match(card, sourceControllerId, game)) { + possibleTargets.add(card.getId()); + } + } + } } + return possibleTargets; } @Override @@ -94,10 +101,15 @@ public class TargetCardInExile extends TargetCard { return true; } } - return false; } else { - return super.canChoose(sourceControllerId, game); + ExileZone exileZone = game.getExile().getExileZone(zoneId); + if (exileZone != null) { + if (exileZone.count(filter, sourceId, sourceControllerId, game) >= this.minNumberOfTargets) { + return true; + } + } } + return false; } @Override