[MID] [VOW] fix some cards with missing targets

This commit is contained in:
Alex W. Jackson 2022-10-14 02:28:02 -04:00
parent c03d6a1cf3
commit 1c3dd76c3e
4 changed files with 16 additions and 9 deletions

View file

@ -16,8 +16,11 @@ import mage.constants.CardType;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent;
import java.util.UUID; import java.util.UUID;
@ -26,6 +29,12 @@ import java.util.UUID;
*/ */
public final class DeadlyDancer extends CardImpl { public final class DeadlyDancer extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature");
static {
filter.add(AnotherPredicate.instance);
}
public DeadlyDancer(UUID ownerId, CardSetInfo setInfo) { public DeadlyDancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
@ -47,6 +56,7 @@ public final class DeadlyDancer extends CardImpl {
).setText("{this}"), new ManaCostsImpl<>("{R}{R}")); ).setText("{this}"), new ManaCostsImpl<>("{R}{R}"));
ability.addEffect(new BoostTargetEffect(1, 0) ability.addEffect(new BoostTargetEffect(1, 0)
.setText("and another target creature each get +1/+0 until end of turn")); .setText("and another target creature each get +1/+0 until end of turn"));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -3,7 +3,7 @@ package mage.cards.m;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.condition.common.OpponentControlsPermanentCondition;
import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.hint.ConditionHint; import mage.abilities.hint.ConditionHint;
@ -24,13 +24,9 @@ import java.util.UUID;
*/ */
public final class MaliciousInvader extends CardImpl { public final class MaliciousInvader extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent(SubType.HUMAN, ""); private static final FilterPermanent filter = new FilterPermanent(SubType.HUMAN, "an opponent controls a Human");
static { private static final Condition condition = new OpponentControlsPermanentCondition(filter);
filter.add(TargetController.OPPONENT.getControllerPredicate());
}
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
private static final Hint hint = new ConditionHint(condition, "An opponent controls a Human"); private static final Hint hint = new ConditionHint(condition, "An opponent controls a Human");
public MaliciousInvader(UUID ownerId, CardSetInfo setInfo) { public MaliciousInvader(UUID ownerId, CardSetInfo setInfo) {

View file

@ -19,6 +19,7 @@ import mage.filter.FilterPermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID; import java.util.UUID;
@ -43,6 +44,7 @@ public final class NeonatesRush extends CardImpl {
// Neonate's Rush deals 1 damage to target creature and 1 damage to its controller. Draw a card. // Neonate's Rush deals 1 damage to target creature and 1 damage to its controller. Draw a card.
this.getSpellAbility().addEffect(new NeonatesRushEffect()); this.getSpellAbility().addEffect(new NeonatesRushEffect());
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
} }
private NeonatesRush(final NeonatesRush card) { private NeonatesRush(final NeonatesRush card) {

View file

@ -13,7 +13,6 @@ import mage.abilities.keyword.DeathtouchAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
@ -33,7 +32,7 @@ public final class OakhameAdversary extends CardImpl {
filter.add(new ColorPredicate(ObjectColor.GREEN)); filter.add(new ColorPredicate(ObjectColor.GREEN));
} }
private static final Condition condition = new OpponentControlsPermanentCondition(filter, ComparisonType.MORE_THAN, 0); private static final Condition condition = new OpponentControlsPermanentCondition(filter);
public OakhameAdversary(UUID ownerId, CardSetInfo setInfo) { public OakhameAdversary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");