diff --git a/Mage.Sets/src/mage/cards/m/MizziumMortars.java b/Mage.Sets/src/mage/cards/m/MizziumMortars.java index a722d4a4c6d..04883f5d00e 100644 --- a/Mage.Sets/src/mage/cards/m/MizziumMortars.java +++ b/Mage.Sets/src/mage/cards/m/MizziumMortars.java @@ -1,7 +1,5 @@ - package mage.cards.m; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.DamageTargetEffect; @@ -10,13 +8,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.constants.TimingRule; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MizziumMortars extends CardImpl { @@ -28,7 +26,7 @@ public final class MizziumMortars extends CardImpl { } public MizziumMortars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); // MizziumMortars deals 4 damage to target creature you don't control. @@ -36,7 +34,7 @@ public final 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}"), TimingRule.SORCERY)); + this.addAbility(new OverloadAbility(this, new DamageAllEffect(4, filter), new ManaCostsImpl("{3}{R}{R}{R}"))); } public MizziumMortars(final MizziumMortars card) { diff --git a/Mage.Sets/src/mage/cards/m/MizzixsMastery.java b/Mage.Sets/src/mage/cards/m/MizzixsMastery.java index fca8a396637..f4a146756bb 100644 --- a/Mage.Sets/src/mage/cards/m/MizzixsMastery.java +++ b/Mage.Sets/src/mage/cards/m/MizzixsMastery.java @@ -1,22 +1,14 @@ - package mage.cards.m; -import java.util.Set; -import java.util.UUID; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ExileSpellEffect; import mage.abilities.keyword.OverloadAbility; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; -import mage.constants.TimingRule; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterInstantOrSorceryCard; @@ -25,8 +17,10 @@ import mage.players.Player; import mage.target.TargetCard; import mage.target.common.TargetCardInYourGraveyard; +import java.util.Set; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MizzixsMastery extends CardImpl { @@ -40,7 +34,7 @@ public final class MizzixsMastery extends CardImpl { this.getSpellAbility().addEffect(ExileSpellEffect.getInstance()); // Overload {5}{R}{R}{R} - Ability ability = new OverloadAbility(this, new MizzixsMasteryOverloadEffect(), new ManaCostsImpl("{5}{R}{R}{R}"), TimingRule.SORCERY); + Ability ability = new OverloadAbility(this, new MizzixsMasteryOverloadEffect(), new ManaCostsImpl("{5}{R}{R}{R}")); ability.addEffect(ExileSpellEffect.getInstance()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/Teleportal.java b/Mage.Sets/src/mage/cards/t/Teleportal.java index c1412acee16..2bb5cefa96a 100644 --- a/Mage.Sets/src/mage/cards/t/Teleportal.java +++ b/Mage.Sets/src/mage/cards/t/Teleportal.java @@ -1,7 +1,5 @@ - package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -15,7 +13,6 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; import mage.constants.TargetController; -import mage.constants.TimingRule; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; @@ -23,9 +20,10 @@ import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Teleportal extends CardImpl { @@ -37,16 +35,16 @@ public final class Teleportal extends CardImpl { } public Teleportal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{R}"); // Target creature you control gets +1/+0 until end of turn and can't be blocked this turn. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); - this.getSpellAbility().addEffect(new BoostTargetEffect(1,0, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new CantBeBlockedTargetEffect()); // 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}"), TimingRule.SORCERY); + OverloadAbility ability = new OverloadAbility(this, new BoostAllEffect(1, 0, Duration.EndOfTurn, filter, false), new ManaCostsImpl("{3}{U}{R}")); ability.addEffect(new TeleportalEffect(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/Vandalblast.java b/Mage.Sets/src/mage/cards/v/Vandalblast.java index ef3f2c4224e..af2848e71bb 100644 --- a/Mage.Sets/src/mage/cards/v/Vandalblast.java +++ b/Mage.Sets/src/mage/cards/v/Vandalblast.java @@ -1,7 +1,5 @@ - package mage.cards.v; -import java.util.UUID; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DestroyAllEffect; import mage.abilities.effects.common.DestroyTargetEffect; @@ -10,13 +8,13 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.TargetController; -import mage.constants.TimingRule; import mage.filter.common.FilterArtifactPermanent; import mage.filter.predicate.permanent.ControllerPredicate; import mage.target.common.TargetArtifactPermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Vandalblast extends CardImpl { @@ -28,14 +26,14 @@ public final class Vandalblast extends CardImpl { } public Vandalblast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}"); // Destroy target artifact you don't control. this.getSpellAbility().addTarget(new TargetArtifactPermanent(FILTER)); 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}"), TimingRule.SORCERY)); + this.addAbility(new OverloadAbility(this, new DestroyAllEffect(FILTER), new ManaCostsImpl("{4}{R}"))); } diff --git a/Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java b/Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java index b38b1508115..9fd88a0b84f 100644 --- a/Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/OverloadAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.keyword; import mage.abilities.SpellAbility; @@ -10,7 +9,7 @@ import mage.constants.TimingRule; /** * 702.94. Overload - * + *

* 702.94a. Overload is a keyword that represents two static abilities: one that * functions from any zone in which the spell with overload can be cast and * another that functions while the card is on the stack. Overload [cost] means @@ -19,28 +18,23 @@ import mage.constants.TimingRule; * instances of the word 'target' with the word 'each.'" Using the overload * ability follows the rules for paying alternative costs in rules 601.2b and * 601.2e-g. - * + *

* 702.94b. If a player chooses to pay the overload cost of a spell, that spell * won't require any targets. It may affect objects that couldn't be chosen as * legal targets if the spell were cast without its overload cost being paid. - * + *

* 702.94c. Overload's second ability creates a text-changing effect. See rule * 612, "Text-Changing Effects." * * @author LevelX2 - * */ 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.spellAbilityType = SpellAbilityType.BASE_ALTERNATE; this.addEffect(effect); - this.timing = timingRule; + this.timing = (card.isSorcery() ? TimingRule.SORCERY : TimingRule.INSTANT); } public OverloadAbility(final OverloadAbility ability) {