[DMC] Implement Sivitri, Dragon Master (#9506)

* [DMC] Implement Sivitri, Dragon Master
* Generalised CantAttackYouUnlessPayAllEffect
This commit is contained in:
PurpleCrowbar 2022-09-12 04:18:25 +01:00 committed by GitHub
parent 20a1d2df93
commit 46cc674a8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 124 additions and 48 deletions

View file

@ -6,7 +6,7 @@ import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.effects.common.combat.CantBlockUnlessPayManaAllEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -50,7 +50,7 @@ public final class ArchangelOfTithes extends CardImpl {
} }
} }
class ArchangelOfTithesPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect { class ArchangelOfTithesPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
ArchangelOfTithesPayManaToAttackAllEffect() { ArchangelOfTithesPayManaToAttackAllEffect() {
super(new ManaCostsImpl<>("{1}"), true); super(new ManaCostsImpl<>("{1}"), true);

View file

@ -4,7 +4,7 @@ import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.FlyingAbility;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -33,7 +33,7 @@ public final class ArchonOfAbsolution extends CardImpl {
this.addAbility(ProtectionAbility.from(ObjectColor.WHITE)); 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. // 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 new ManaCostsImpl<>("{1}"), true
).setText("creatures can't attack you or planeswalkers you control " + ).setText("creatures can't attack you or planeswalkers you control " +
"unless their controller pays {1} for each of those creatures"))); "unless their controller pays {1} for each of those creatures")));

View file

@ -5,7 +5,7 @@ import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -32,7 +32,7 @@ public final class BairdStewardOfArgive extends CardImpl {
this.addAbility(VigilanceAbility.getInstance()); this.addAbility(VigilanceAbility.getInstance());
// Creatures can't attack you or a planeswalker you control unless their controller pays {1} for each of those creatures. // 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"))); .setText("Creatures can't attack you or planeswalkers you control unless their controller pays {1} for each of those creatures")));
} }

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.DomainValue; 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.abilities.hint.common.DomainHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -43,7 +43,7 @@ public final class CollectiveRestraint extends CardImpl {
} }
} }
class CollectiveRestraintPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect { class CollectiveRestraintPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
CollectiveRestraintPayManaToAttackAllEffect() { CollectiveRestraintPayManaToAttackAllEffect() {
super(null, false); super(null, false);

View file

@ -6,7 +6,7 @@ import mage.ObjectColor;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.combat.CantAttackYouAllEffect; 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.abilities.keyword.CumulativeUpkeepAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; 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))); 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. // 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) { private ElephantGrass(final ElephantGrass card) {

View file

@ -4,7 +4,7 @@ import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousEffect; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -27,7 +27,7 @@ public final class ForbiddingSpirit extends CardImpl {
this.toughness = new MageInt(3); 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. // 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 new ManaCostsImpl<>("{2}"), true
); );
effect.setDuration(Duration.UntilYourNextTurn); effect.setDuration(Duration.UntilYourNextTurn);

View file

@ -4,7 +4,7 @@ package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -20,7 +20,7 @@ public final class GhostlyPrison extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); 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 // 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}"))));
} }

View file

@ -8,7 +8,7 @@ import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -41,7 +41,7 @@ public final class KoskunFalls extends CardImpl {
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false)); 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. // 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) { private KoskunFalls(final KoskunFalls card) {

View file

@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
@ -108,7 +108,7 @@ class NilsDisciplineEnforcerCountersEffect extends OneShotEffect {
} }
} }
class NilsDisciplineEnforcerEffect extends CantAttackYouUnlessPayManaAllEffect { class NilsDisciplineEnforcerEffect extends CantAttackYouUnlessPayAllEffect {
NilsDisciplineEnforcerEffect() { NilsDisciplineEnforcerEffect() {
super(null, true); super(null, true);

View file

@ -4,7 +4,7 @@ package mage.cards.n;
import java.util.UUID; import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; 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.) // {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. // 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) { private NornsAnnex(final NornsAnnex card) {

View file

@ -4,7 +4,7 @@ package mage.cards.p;
import java.util.UUID; import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -20,7 +20,7 @@ public final class Propaganda extends CardImpl {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}"); 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. // 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) { private Propaganda(final Propaganda card) {

View 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 cant 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);
}
}

View file

@ -7,7 +7,7 @@ import mage.abilities.costs.mana.ManaCosts;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect; 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.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -48,7 +48,7 @@ public final class SphereOfSafety extends CardImpl {
} }
class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayManaAllEffect { class SphereOfSafetyPayManaToAttackAllEffect extends CantAttackYouUnlessPayAllEffect {
SphereOfSafetyPayManaToAttackAllEffect() { SphereOfSafetyPayManaToAttackAllEffect() {
super(null, true); super(null, true);

View file

@ -5,7 +5,7 @@ import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; 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.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -29,7 +29,7 @@ public final class WindbornMuse extends CardImpl {
this.addAbility(FlyingAbility.getInstance()); this.addAbility(FlyingAbility.getInstance());
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you. // 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}"))));
} }

View file

@ -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("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("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("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("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("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("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("Sol Ring", 190, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
cards.add(new SetCardInfo("Solemn Simulacrum", 191, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); cards.add(new SetCardInfo("Solemn Simulacrum", 191, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));

View file

@ -50,15 +50,14 @@ public abstract class PayCostToAttackBlockEffectImpl extends ReplacementEffectIm
public PayCostToAttackBlockEffectImpl(Duration duration, Outcome outcome, RestrictType restrictType, Cost cost) { public PayCostToAttackBlockEffectImpl(Duration duration, Outcome outcome, RestrictType restrictType, Cost cost) {
super(duration, outcome, false); super(duration, outcome, false);
this.restrictType = restrictType; this.restrictType = restrictType;
if (cost instanceof ManaCosts) {
this.cost = null;
this.manaCosts = (ManaCosts) cost;
}
else {
this.cost = cost; this.cost = cost;
this.manaCosts = null; 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) { public PayCostToAttackBlockEffectImpl(final PayCostToAttackBlockEffectImpl effect) {

View file

@ -2,7 +2,7 @@
package mage.abilities.effects.common.combat; package mage.abilities.effects.common.combat;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.Cost;
import mage.abilities.effects.PayCostToAttackBlockEffectImpl; import mage.abilities.effects.PayCostToAttackBlockEffectImpl;
import mage.constants.Duration; import mage.constants.Duration;
import mage.constants.Outcome; import mage.constants.Outcome;
@ -14,32 +14,32 @@ import mage.game.permanent.Permanent;
/** /**
* @author LevelX2 * @author LevelX2
*/ */
public class CantAttackYouUnlessPayManaAllEffect extends PayCostToAttackBlockEffectImpl { public class CantAttackYouUnlessPayAllEffect extends PayCostToAttackBlockEffectImpl {
private final FilterCreaturePermanent filterCreaturePermanent; private final FilterCreaturePermanent filterCreaturePermanent;
private final boolean payAlsoForAttackingPlaneswalker; private final boolean payAlsoForAttackingPlaneswalker;
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts) { public CantAttackYouUnlessPayAllEffect(Cost cost) {
this(manaCosts, false); this(cost, false);
} }
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts, boolean payAlsoForAttackingPlaneswalker) { public CantAttackYouUnlessPayAllEffect(Cost cost, boolean payAlsoForAttackingPlaneswalker) {
this(manaCosts, payAlsoForAttackingPlaneswalker, null); this(cost, payAlsoForAttackingPlaneswalker, null);
} }
public CantAttackYouUnlessPayManaAllEffect(ManaCosts manaCosts, boolean payAlsoForAttackingPlaneswalker, FilterCreaturePermanent filter) { public CantAttackYouUnlessPayAllEffect(Cost cost, boolean payAlsoForAttackingPlaneswalker, FilterCreaturePermanent filter) {
super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, manaCosts); super(Duration.WhileOnBattlefield, Outcome.Detriment, RestrictType.ATTACK, cost);
this.payAlsoForAttackingPlaneswalker = payAlsoForAttackingPlaneswalker; this.payAlsoForAttackingPlaneswalker = payAlsoForAttackingPlaneswalker;
this.filterCreaturePermanent = filter; this.filterCreaturePermanent = filter;
staticText = (filterCreaturePermanent == null ? "Creatures" : filterCreaturePermanent.getMessage()) staticText = (filterCreaturePermanent == null ? "Creatures" : filterCreaturePermanent.getMessage())
+ " can't attack you " + " can't attack you "
+ (payAlsoForAttackingPlaneswalker ? "or a planeswalker you control " : "") + (payAlsoForAttackingPlaneswalker ? "or a planeswalker you control " : "")
+ "unless their controller pays " + "unless their controller pays "
+ (manaCosts == null ? "" : manaCosts.getText()) + (cost == null ? "" : cost.getText())
+ " for each creature they control that's attacking you"; + " for each creature they control that's attacking you";
} }
public CantAttackYouUnlessPayManaAllEffect(final CantAttackYouUnlessPayManaAllEffect effect) { public CantAttackYouUnlessPayAllEffect(final CantAttackYouUnlessPayAllEffect effect) {
super(effect); super(effect);
this.payAlsoForAttackingPlaneswalker = effect.payAlsoForAttackingPlaneswalker; this.payAlsoForAttackingPlaneswalker = effect.payAlsoForAttackingPlaneswalker;
this.filterCreaturePermanent = effect.filterCreaturePermanent; this.filterCreaturePermanent = effect.filterCreaturePermanent;
@ -71,7 +71,7 @@ public class CantAttackYouUnlessPayManaAllEffect extends PayCostToAttackBlockEff
} }
@Override @Override
public CantAttackYouUnlessPayManaAllEffect copy() { public CantAttackYouUnlessPayAllEffect copy() {
return new CantAttackYouUnlessPayManaAllEffect(this); return new CantAttackYouUnlessPayAllEffect(this);
} }
} }

View file

@ -458,6 +458,7 @@ public enum SubType {
SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType), SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType),
SERRA("Serra", SubTypeSet.PlaneswalkerType), SERRA("Serra", SubTypeSet.PlaneswalkerType),
SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars
SIVITRI("Sivitri", SubTypeSet.PlaneswalkerType),
SORIN("Sorin", SubTypeSet.PlaneswalkerType), SORIN("Sorin", SubTypeSet.PlaneswalkerType),
SZAT("Szat", SubTypeSet.PlaneswalkerType), SZAT("Szat", SubTypeSet.PlaneswalkerType),
TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType), TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType),