diff --git a/Mage.Sets/src/mage/cards/a/ArchangelOfTithes.java b/Mage.Sets/src/mage/cards/a/ArchangelOfTithes.java index 82f961cb8d..72c79e2271 100644 --- a/Mage.Sets/src/mage/cards/a/ArchangelOfTithes.java +++ b/Mage.Sets/src/mage/cards/a/ArchangelOfTithes.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/a/ArchonOfAbsolution.java b/Mage.Sets/src/mage/cards/a/ArchonOfAbsolution.java index e66bef7e77..84ad630835 100644 --- a/Mage.Sets/src/mage/cards/a/ArchonOfAbsolution.java +++ b/Mage.Sets/src/mage/cards/a/ArchonOfAbsolution.java @@ -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"))); diff --git a/Mage.Sets/src/mage/cards/b/BairdStewardOfArgive.java b/Mage.Sets/src/mage/cards/b/BairdStewardOfArgive.java index 366713bb27..25b66f5b51 100644 --- a/Mage.Sets/src/mage/cards/b/BairdStewardOfArgive.java +++ b/Mage.Sets/src/mage/cards/b/BairdStewardOfArgive.java @@ -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"))); } diff --git a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java index df7d2435c8..b978844654 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/e/ElephantGrass.java b/Mage.Sets/src/mage/cards/e/ElephantGrass.java index 3da16aedf1..c5d2e380bd 100644 --- a/Mage.Sets/src/mage/cards/e/ElephantGrass.java +++ b/Mage.Sets/src/mage/cards/e/ElephantGrass.java @@ -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) { diff --git a/Mage.Sets/src/mage/cards/f/ForbiddingSpirit.java b/Mage.Sets/src/mage/cards/f/ForbiddingSpirit.java index 29b9c4b8fa..a9430369bd 100644 --- a/Mage.Sets/src/mage/cards/f/ForbiddingSpirit.java +++ b/Mage.Sets/src/mage/cards/f/ForbiddingSpirit.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/g/GhostlyPrison.java b/Mage.Sets/src/mage/cards/g/GhostlyPrison.java index c9e990efd3..2498c62a45 100644 --- a/Mage.Sets/src/mage/cards/g/GhostlyPrison.java +++ b/Mage.Sets/src/mage/cards/g/GhostlyPrison.java @@ -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}")))); } diff --git a/Mage.Sets/src/mage/cards/k/KoskunFalls.java b/Mage.Sets/src/mage/cards/k/KoskunFalls.java index abc876b3df..fee26ee005 100644 --- a/Mage.Sets/src/mage/cards/k/KoskunFalls.java +++ b/Mage.Sets/src/mage/cards/k/KoskunFalls.java @@ -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) { diff --git a/Mage.Sets/src/mage/cards/n/NilsDisciplineEnforcer.java b/Mage.Sets/src/mage/cards/n/NilsDisciplineEnforcer.java index 31764db1e0..3931a40c48 100644 --- a/Mage.Sets/src/mage/cards/n/NilsDisciplineEnforcer.java +++ b/Mage.Sets/src/mage/cards/n/NilsDisciplineEnforcer.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/n/NornsAnnex.java b/Mage.Sets/src/mage/cards/n/NornsAnnex.java index 7037872df0..017354b155 100644 --- a/Mage.Sets/src/mage/cards/n/NornsAnnex.java +++ b/Mage.Sets/src/mage/cards/n/NornsAnnex.java @@ -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) { diff --git a/Mage.Sets/src/mage/cards/p/Propaganda.java b/Mage.Sets/src/mage/cards/p/Propaganda.java index b06265e919..32c10a7ddf 100644 --- a/Mage.Sets/src/mage/cards/p/Propaganda.java +++ b/Mage.Sets/src/mage/cards/p/Propaganda.java @@ -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) { diff --git a/Mage.Sets/src/mage/cards/s/SivitriDragonMaster.java b/Mage.Sets/src/mage/cards/s/SivitriDragonMaster.java new file mode 100644 index 0000000000..97a523cc20 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SivitriDragonMaster.java @@ -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); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java index 46d5b1b834..a2ac264d85 100644 --- a/Mage.Sets/src/mage/cards/s/SphereOfSafety.java +++ b/Mage.Sets/src/mage/cards/s/SphereOfSafety.java @@ -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); diff --git a/Mage.Sets/src/mage/cards/w/WindbornMuse.java b/Mage.Sets/src/mage/cards/w/WindbornMuse.java index 41cbba0b1f..ae569a0349 100644 --- a/Mage.Sets/src/mage/cards/w/WindbornMuse.java +++ b/Mage.Sets/src/mage/cards/w/WindbornMuse.java @@ -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}")))); } diff --git a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java index 65f94ca70f..909fc33aa1 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java +++ b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java @@ -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)); diff --git a/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java b/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java index 70adc3b8c4..e10d9018be 100644 --- a/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java +++ b/Mage/src/main/java/mage/abilities/effects/PayCostToAttackBlockEffectImpl.java @@ -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; - 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; + if (cost instanceof ManaCosts) { + this.cost = null; + this.manaCosts = (ManaCosts) cost; + } + else { + this.cost = cost; + this.manaCosts = null; + } } public PayCostToAttackBlockEffectImpl(final PayCostToAttackBlockEffectImpl effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayAllEffect.java similarity index 72% rename from Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java rename to Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayAllEffect.java index cfd3e5e2f1..23e352f0cf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayManaAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantAttackYouUnlessPayAllEffect.java @@ -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); } } diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 6468ab3b11..2233ce77ff 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -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),