* Overload - Fixed that overload abilities of sorceries could be used with instant speed (Mizzium Mortars, Vandablast and Teleportal).

This commit is contained in:
LevelX2 2014-07-30 12:21:53 +02:00
parent 95dee0db0b
commit dcf8c8e45e
4 changed files with 12 additions and 3 deletions

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.OverloadAbility;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
@ -64,7 +65,7 @@ public class MizziumMortars extends CardImpl {
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
// Overload {3}{R}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
this.addAbility(new OverloadAbility(this, new DamageAllEffect(4, filter), new ManaCostsImpl("{3}{R}{R}{R}")));
this.addAbility(new OverloadAbility(this, new DamageAllEffect(4, filter), new ManaCostsImpl("{3}{R}{R}{R}"), TimingRule.SORCERY));
}
public MizziumMortars(final MizziumMortars card) {

View file

@ -42,6 +42,7 @@ import mage.abilities.effects.common.continious.BoostAllEffect;
import mage.abilities.effects.common.continious.BoostTargetEffect;
import mage.abilities.keyword.OverloadAbility;
import mage.cards.CardImpl;
import mage.constants.TimingRule;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.game.Game;
@ -75,7 +76,7 @@ public class Teleportal extends CardImpl {
this.getSpellAbility().addEffect(new UnblockableTargetEffect());
// Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
OverloadAbility ability = new OverloadAbility(this, new BoostAllEffect(1,0, Duration.EndOfTurn, filter,false), new ManaCostsImpl("{3}{U}{R}"));
OverloadAbility ability = new OverloadAbility(this, new BoostAllEffect(1,0, Duration.EndOfTurn, filter,false), new ManaCostsImpl("{3}{U}{R}"), TimingRule.SORCERY);
ability.addEffect(new TeleportalEffect(filter));
this.addAbility(ability);
}

View file

@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.keyword.OverloadAbility;
import mage.cards.CardImpl;
import mage.constants.TargetController;
import mage.constants.TimingRule;
import mage.filter.common.FilterArtifactPermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetArtifactPermanent;
@ -65,7 +66,7 @@ public class Vandalblast extends CardImpl {
this.getSpellAbility().addEffect(new DestroyTargetEffect());
// Overload {4}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
this.addAbility(new OverloadAbility(this, new DestroyAllEffect(filter), new ManaCostsImpl("{4}{R}")));
this.addAbility(new OverloadAbility(this, new DestroyAllEffect(filter), new ManaCostsImpl("{4}{R}"), TimingRule.SORCERY));
}

View file

@ -32,6 +32,7 @@ import mage.abilities.SpellAbility;
import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.effects.Effect;
import mage.cards.Card;
import mage.constants.TimingRule;
/**
@ -59,8 +60,13 @@ import mage.cards.Card;
public class OverloadAbility extends SpellAbility {
public OverloadAbility(Card card,Effect effect, ManaCosts costs) {
this(card, effect, costs, TimingRule.INSTANT);
}
public OverloadAbility(Card card,Effect effect, ManaCosts costs, TimingRule timingRule) {
super(costs, card.getName() + " with overload");
this.addEffect(effect);
this.timing = timingRule;
}
public OverloadAbility(final OverloadAbility ability) {