mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[DMC] Implement Sivitri, Dragon Master (#9506)
* [DMC] Implement Sivitri, Dragon Master * Generalised CantAttackYouUnlessPayAllEffect
This commit is contained in:
parent
20a1d2df93
commit
46cc674a8e
18 changed files with 124 additions and 48 deletions
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockUnlessPayManaAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -50,7 +50,7 @@ public final class ArchangelOfTithes extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class ArchangelOfTithesPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect {
|
||||
class ArchangelOfTithesPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
|
||||
|
||||
ArchangelOfTithesPayManaToAttackAllEffect() {
|
||||
super(new ManaCostsImpl<>("{1}"), true);
|
||||
|
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -33,7 +33,7 @@ public final class ArchonOfAbsolution extends CardImpl {
|
|||
this.addAbility(ProtectionAbility.from(ObjectColor.WHITE));
|
||||
|
||||
// Creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures.
|
||||
this.addAbility(new SimpleStaticAbility(new CantAttackYouUnlessPayManaAllEffect(
|
||||
this.addAbility(new SimpleStaticAbility(new CantAttackYouUnlessPayAllEffect(
|
||||
new ManaCostsImpl<>("{1}"), true
|
||||
).setText("creatures can't attack you or planeswalkers you control " +
|
||||
"unless their controller pays {1} for each of those creatures")));
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -32,7 +32,7 @@ public final class BairdStewardOfArgive extends CardImpl {
|
|||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{1}"), true)
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{1}"), true)
|
||||
.setText("Creatures can't attack you or planeswalkers you control unless their controller pays {1} for each of those creatures")));
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DomainValue;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.hint.common.DomainHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -43,7 +43,7 @@ public final class CollectiveRestraint extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class CollectiveRestraintPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect {
|
||||
class CollectiveRestraintPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
|
||||
|
||||
CollectiveRestraintPayManaToAttackAllEffect() {
|
||||
super(null, false);
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.ObjectColor;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -41,7 +41,7 @@ public final class ElephantGrass extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouAllEffect(Duration.WhileOnBattlefield, filterBlack)));
|
||||
|
||||
// Nonblack creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"), false, filter)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{2}"), false, filter)));
|
||||
}
|
||||
|
||||
private ElephantGrass(final ElephantGrass card) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -27,7 +27,7 @@ public final class ForbiddingSpirit extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Forbidding Spirit enters the battlefield, until your next turn, creatures can't attack you or a planeswalker you control unless their controller pays {2} for each of those creatures.
|
||||
ContinuousEffect effect = new CantAttackYouUnlessPayManaAllEffect(
|
||||
ContinuousEffect effect = new CantAttackYouUnlessPayAllEffect(
|
||||
new ManaCostsImpl<>("{2}"), true
|
||||
);
|
||||
effect.setDuration(Duration.UntilYourNextTurn);
|
||||
|
|
|
@ -4,7 +4,7 @@ package mage.cards.g;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -20,7 +20,7 @@ public final class GhostlyPrison extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}");
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import mage.abilities.costs.common.TapTargetCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -41,7 +41,7 @@ public final class KoskunFalls extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false));
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
}
|
||||
|
||||
private KoskunFalls(final KoskunFalls card) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
@ -108,7 +108,7 @@ class NilsDisciplineEnforcerCountersEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class NilsDisciplineEnforcerEffect extends CantAttackYouUnlessPayManaAllEffect {
|
||||
class NilsDisciplineEnforcerEffect extends CantAttackYouUnlessPayAllEffect {
|
||||
|
||||
NilsDisciplineEnforcerEffect() {
|
||||
super(null, true);
|
||||
|
|
|
@ -4,7 +4,7 @@ package mage.cards.n;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -20,7 +20,7 @@ public final class NornsAnnex extends CardImpl {
|
|||
|
||||
// {W/P} ({W/P} can be paid with either or 2 life.)
|
||||
// Creatures can't attack you or a planeswalker you control unless their controller pays {W/P} for each of those creatures.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{W/P}"), true)));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{W/P}"), true)));
|
||||
}
|
||||
|
||||
private NornsAnnex(final NornsAnnex card) {
|
||||
|
|
|
@ -4,7 +4,7 @@ package mage.cards.p;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -20,7 +20,7 @@ public final class Propaganda extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}");
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
}
|
||||
|
||||
private Propaganda(final Propaganda card) {
|
||||
|
|
73
Mage.Sets/src/mage/cards/s/SivitriDragonMaster.java
Normal file
73
Mage.Sets/src/mage/cards/s/SivitriDragonMaster.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.CanBeYourCommanderAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author PurpleCrowbar
|
||||
*/
|
||||
public final class SivitriDragonMaster extends CardImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("a Dragon card");
|
||||
private static final FilterCreaturePermanent filterNonDragon = new FilterCreaturePermanent("non-Dragon creatures");
|
||||
|
||||
static {
|
||||
filter.add(SubType.DRAGON.getPredicate());
|
||||
filterNonDragon.add(Predicates.not(SubType.DRAGON.getPredicate()));
|
||||
}
|
||||
|
||||
public SivitriDragonMaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{U}{B}");
|
||||
addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.SIVITRI);
|
||||
|
||||
this.setStartingLoyalty(4);
|
||||
|
||||
// +1: Until your next turn, creatures can’t attack you or planeswalkers you
|
||||
// control unless their controller pays 2 life for each of those creatures.
|
||||
ContinuousEffect effect = new CantAttackYouUnlessPayAllEffect(
|
||||
new PayLifeCost(2), true
|
||||
);
|
||||
effect.setDuration(Duration.UntilYourNextTurn);
|
||||
effect.setText("until your next turn, creatures can't attack you or planeswalkers you control " +
|
||||
"unless their controller pays 2 life for each of those creatures.");
|
||||
this.addAbility(new LoyaltyAbility(effect, 1));
|
||||
|
||||
// -3: Search your library for a Dragon card, reveal it, put it into your hand, then shuffle.
|
||||
this.addAbility(new LoyaltyAbility(new SearchLibraryPutInHandEffect(
|
||||
new TargetCardInLibrary(filter), true, true
|
||||
), -3));
|
||||
|
||||
// -7: Destroy all non-Dragon creatures.
|
||||
this.addAbility(new LoyaltyAbility(new DestroyAllEffect(filterNonDragon), -7));
|
||||
|
||||
// Sivitri, Dragon Master can be your commander.
|
||||
this.addAbility(CanBeYourCommanderAbility.getInstance());
|
||||
}
|
||||
|
||||
private SivitriDragonMaster(final SivitriDragonMaster card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SivitriDragonMaster copy() {
|
||||
return new SivitriDragonMaster(this);
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ import mage.abilities.costs.mana.ManaCosts;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -48,7 +48,7 @@ public final class SphereOfSafety extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect {
|
||||
class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
|
||||
|
||||
SphereOfSafetyPayManaToAttackAllEffect() {
|
||||
super(null, true);
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -29,7 +29,7 @@ public final class WindbornMuse extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayManaAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantAttackYouUnlessPayAllEffect(new ManaCostsImpl<>("{2}"))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -161,9 +161,12 @@ public final class DominariaUnitedCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Search for Tomorrow", 137, Rarity.COMMON, mage.cards.s.SearchForTomorrow.class));
|
||||
cards.add(new SetCardInfo("Seaside Citadel", 231, Rarity.UNCOMMON, mage.cards.s.SeasideCitadel.class));
|
||||
cards.add(new SetCardInfo("Selvala, Explorer Returned", 167, Rarity.RARE, mage.cards.s.SelvalaExplorerReturned.class));
|
||||
cards.add(new SetCardInfo("Shanid, Sleepers' Scourge", 4, Rarity.MYTHIC, mage.cards.s.ShanidSleepersScourge.class));
|
||||
cards.add(new SetCardInfo("Shanid, Sleepers' Scourge", 4, Rarity.MYTHIC, mage.cards.s.ShanidSleepersScourge.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shanid, Sleepers' Scourge", 79, Rarity.MYTHIC, mage.cards.s.ShanidSleepersScourge.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Shivan Gorge", 232, Rarity.RARE, mage.cards.s.ShivanGorge.class));
|
||||
cards.add(new SetCardInfo("Shizo, Death's Storehouse", 233, Rarity.RARE, mage.cards.s.ShizoDeathsStorehouse.class));
|
||||
cards.add(new SetCardInfo("Sivitri, Dragon Master", 43, Rarity.MYTHIC, mage.cards.s.SivitriDragonMaster.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Sivitri, Dragon Master", 65, Rarity.MYTHIC, mage.cards.s.SivitriDragonMaster.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Smoldering Marsh", 234, Rarity.RARE, mage.cards.s.SmolderingMarsh.class));
|
||||
cards.add(new SetCardInfo("Sol Ring", 190, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
||||
cards.add(new SetCardInfo("Solemn Simulacrum", 191, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));
|
||||
|
|
|
@ -50,15 +50,14 @@ public abstract class PayCostToAttackBlockEffectImpl extends ReplacementEffectIm
|
|||
public PayCostToAttackBlockEffectImpl(Duration duration, Outcome outcome, RestrictType restrictType, Cost cost) {
|
||||
super(duration, outcome, false);
|
||||
this.restrictType = restrictType;
|
||||
if (cost instanceof ManaCosts) {
|
||||
this.cost = null;
|
||||
this.manaCosts = (ManaCosts) cost;
|
||||
}
|
||||
else {
|
||||
this.cost = cost;
|
||||
this.manaCosts = null;
|
||||
}
|
||||
|
||||
public PayCostToAttackBlockEffectImpl(Duration duration, Outcome outcome, RestrictType restrictType, ManaCosts manaCosts) {
|
||||
super(duration, outcome, false);
|
||||
this.restrictType = restrictType;
|
||||
this.cost = null;
|
||||
this.manaCosts = manaCosts;
|
||||
}
|
||||
|
||||
public PayCostToAttackBlockEffectImpl(final PayCostToAttackBlockEffectImpl effect) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
package mage.abilities.effects.common.combat;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -14,32 +14,32 @@ import mage.game.permanent.Permanent;
|
|||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class CantAttackYouUnlessPayManaAllEffect extends PayCostToAttackBlockEffectImpl {
|
||||
public class CantAttackYouUnlessPayAllEffect extends PayCostToAttackBlockEffectImpl {
|
||||
|
||||
private final FilterCreaturePermanent filterCreaturePermanent;
|
||||
private final boolean payAlsoForAttackingPlaneswalker;
|
||||
|
||||
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts) {
|
||||
this(manaCosts, false);
|
||||
public CantAttackYouUnlessPayAllEffect(Cost cost) {
|
||||
this(cost, false);
|
||||
}
|
||||
|
||||
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts, boolean payAlsoForAttackingPlaneswalker) {
|
||||
this(manaCosts, payAlsoForAttackingPlaneswalker, null);
|
||||
public CantAttackYouUnlessPayAllEffect(Cost cost, boolean payAlsoForAttackingPlaneswalker) {
|
||||
this(cost, payAlsoForAttackingPlaneswalker, null);
|
||||
}
|
||||
|
||||
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts, boolean payAlsoForAttackingPlaneswalker, FilterCreaturePermanent filter) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, manaCosts);
|
||||
public CantAttackYouUnlessPayAllEffect(Cost cost, boolean payAlsoForAttackingPlaneswalker, FilterCreaturePermanent filter) {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, cost);
|
||||
this.payAlsoForAttackingPlaneswalker = payAlsoForAttackingPlaneswalker;
|
||||
this.filterCreaturePermanent = filter;
|
||||
staticText = (filterCreaturePermanent == null ? "Creatures" : filterCreaturePermanent.getMessage())
|
||||
+ " can't attack you "
|
||||
+ (payAlsoForAttackingPlaneswalker ? "or a planeswalker you control " : "")
|
||||
+ "unless their controller pays "
|
||||
+ (manaCosts == null ? "" : manaCosts.getText())
|
||||
+ (cost == null ? "" : cost.getText())
|
||||
+ " for each creature they control that's attacking you";
|
||||
}
|
||||
|
||||
public CantAttackYouUnlessPayManaAllEffect(final CantAttackYouUnlessPayManaAllEffect effect) {
|
||||
public CantAttackYouUnlessPayAllEffect(final CantAttackYouUnlessPayAllEffect effect) {
|
||||
super(effect);
|
||||
this.payAlsoForAttackingPlaneswalker = effect.payAlsoForAttackingPlaneswalker;
|
||||
this.filterCreaturePermanent = effect.filterCreaturePermanent;
|
||||
|
@ -71,7 +71,7 @@ public class CantAttackYouUnlessPayManaAllEffect extends PayCostToAttackBlockEff
|
|||
}
|
||||
|
||||
@Override
|
||||
public CantAttackYouUnlessPayManaAllEffect copy() {
|
||||
return new CantAttackYouUnlessPayManaAllEffect(this);
|
||||
public CantAttackYouUnlessPayAllEffect copy() {
|
||||
return new CantAttackYouUnlessPayAllEffect(this);
|
||||
}
|
||||
}
|
|
@ -458,6 +458,7 @@ public enum SubType {
|
|||
SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType),
|
||||
SERRA("Serra", SubTypeSet.PlaneswalkerType),
|
||||
SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars
|
||||
SIVITRI("Sivitri", SubTypeSet.PlaneswalkerType),
|
||||
SORIN("Sorin", SubTypeSet.PlaneswalkerType),
|
||||
SZAT("Szat", SubTypeSet.PlaneswalkerType),
|
||||
TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType),
|
||||
|
|
Loading…
Reference in a new issue