mirror of
https://github.com/magefree/mage.git
synced 2025-12-30 07:22:03 -08:00
* Overload - fixed that some cards was able to cast overload price as instant instead sorcery (Winds of Abandon, Mind Rake, Scale Up);
This commit is contained in:
parent
ecdc47ad68
commit
1c41f6418d
5 changed files with 22 additions and 40 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}")));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.SpellAbility;
|
||||
|
|
@ -10,7 +9,7 @@ import mage.constants.TimingRule;
|
|||
|
||||
/**
|
||||
* 702.94. Overload
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* 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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue