* Vines of Vastwood - Fixed that it did not work correctly if cast on a creature controlled by an opponent.

This commit is contained in:
LevelX2 2014-09-16 17:21:05 +02:00
parent ad863ca1fa
commit 972dc729b2
5 changed files with 193 additions and 11 deletions

View file

@ -37,7 +37,7 @@ import mage.MageInt;
import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.CantCounterSourceEffect;
import mage.abilities.effects.common.CantTargetSourceEffect;
import mage.abilities.effects.common.CantBeTargetedSourceEffect;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.filter.FilterStackObject;
@ -66,7 +66,7 @@ public class GaeasRevenge extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.STACK, new CantCounterSourceEffect()));
this.addAbility(HasteAbility.getInstance());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantTargetSourceEffect(filter, Duration.WhileOnBattlefield)));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeTargetedSourceEffect(filter, Duration.WhileOnBattlefield)));
}

View file

@ -29,17 +29,24 @@
package mage.sets.zendikar;
import java.util.UUID;
import mage.ObjectColor;
import mage.abilities.condition.LockedInCondition;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.decorator.ConditionalContinousEffect;
import mage.abilities.effects.common.CantBeTargetedTargetEffect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.effects.common.continious.GainAbilityTargetEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.filter.FilterStackObject;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
/**
@ -47,7 +54,13 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class VinesOfVastwood extends CardImpl {
private static final String staticText = "If Vines of Vastwood was kicked, that creature gets +4/+4 until end of turn";
private static final FilterStackObject filter = new FilterStackObject("spells or abilities your opponents control");
static {
filter.add(new ControllerPredicate(TargetController.OPPONENT));
}
private static final String staticText = "If {this} was kicked, that creature gets +4/+4 until end of turn";
public VinesOfVastwood(UUID ownerId) {
super(ownerId, 193, "Vines of Vastwood", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{G}");
@ -58,9 +71,8 @@ public class VinesOfVastwood extends CardImpl {
this.addAbility(new KickerAbility("{G}"));
// Target creature can't be the target of spells or abilities your opponents control this turn.
TargetCreaturePermanent target = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(target);
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new CantBeTargetedTargetEffect(filter, Duration.EndOfTurn));
// If Vines of Vastwood was kicked, that creature gets +4/+4 until end of turn.
this.getSpellAbility().addEffect(new ConditionalContinousEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn),