Merge pull request #778 from mnapoleon/master

Fixed some minor issues in some of the Invasion cards I previously implemented.
This commit is contained in:
Michael Napoleon 2015-03-07 21:49:25 -05:00
commit 1a3d1a4248
5 changed files with 14 additions and 5 deletions

View file

@ -34,6 +34,9 @@ import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Rarity;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -45,12 +48,17 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class Backlash extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("untapped creature");
static {
filter.add(Predicates.not(new TappedPredicate()));
}
public Backlash(UUID ownerId) {
super(ownerId, 234, "Backlash", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{B}{R}");
this.expansionSetCode = "INV";
// Tap target untapped creature. That creature deals damage equal to its power to its controller.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter));
this.getSpellAbility().addEffect(new BacklashEffect());
}

View file

@ -33,6 +33,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
@ -59,7 +60,7 @@ public class CinderShade extends CardImpl {
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{B}")));
// {R}, Sacrifice Cinder Shade: Cinder Shade deals damage equal to its power to target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(this.power.getValue()), new ManaCostsImpl("{R}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(new SourcePermanentPowerCount()), new ManaCostsImpl("{R}"));
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);

View file

@ -64,7 +64,7 @@ public class Duskwalker extends CardImpl {
// If Duskwalker was kicked, it enters the battlefield with two +1/+1 counters on it and with fear.
Ability ability = new ConditionalTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2))),
KickedCondition.getInstance(),"If Duskwalker was kicked, it enters the battlefield with two +1/+1 counters on it and with fear.");
KickedCondition.getInstance(),"If {this} was kicked, it enters the battlefield with two +1/+1 counters on it and with fear.");
ability.addEffect(new GainAbilitySourceEffect(FearAbility.getInstance(), Duration.WhileOnBattlefield));
this.addAbility(ability);
}

View file

@ -63,7 +63,7 @@ public class LlanowarElite extends CardImpl {
// If Llanowar Elite was kicked, it enters the battlefield with five +1/+1 counters on it.
Ability ability = new EntersBattlefieldAbility(
new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), KickedCondition.getInstance(), ""),
"If Llanowar Elite was kicked, it enters the battlefield with five +1/+1 counters on it.");
"If {this} was kicked, it enters the battlefield with five +1/+1 counters on it.");
this.addAbility(ability);
}

View file

@ -63,7 +63,7 @@ public class PincerSpider extends CardImpl {
// If Pincer Spider was kicked, it enters the battlefield with a +1/+1 counter on it.
Ability ability = new EntersBattlefieldAbility(
new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), KickedCondition.getInstance(), ""),
"If Pincer Spider was kicked, it enters the battlefield with a +1/+1 counter on it.");
"If {this} was kicked, it enters the battlefield with a +1/+1 counter on it.");
this.addAbility(ability);
}