From 414018db13396c5da3a45c3f0fdd5382e2b7042c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 22 Feb 2022 17:53:31 -0500 Subject: [PATCH] fixed the text on various sliver cards --- Mage.Sets/src/mage/cards/a/AcidicSliver.java | 2 +- Mage.Sets/src/mage/cards/a/ArmorSliver.java | 2 +- Mage.Sets/src/mage/cards/b/BarbedSliver.java | 2 +- Mage.Sets/src/mage/cards/b/BattleSliver.java | 13 +++-- Mage.Sets/src/mage/cards/b/BladeSliver.java | 2 +- .../src/mage/cards/b/BladebackSliver.java | 2 +- .../src/mage/cards/b/BonescytheSliver.java | 2 +- .../src/mage/cards/b/BonesplitterSliver.java | 2 +- .../src/mage/cards/c/CleavingSliver.java | 2 +- Mage.Sets/src/mage/cards/c/ClotSliver.java | 16 +++--- .../src/mage/cards/c/CloudshredderSliver.java | 4 +- .../src/mage/cards/c/ConstrictingSliver.java | 2 +- Mage.Sets/src/mage/cards/c/CryptSliver.java | 12 +++-- .../src/mage/cards/d/DarkheartSliver.java | 2 +- .../src/mage/cards/e/EnduringSliver.java | 2 +- Mage.Sets/src/mage/cards/e/EssenceSliver.java | 2 +- .../src/mage/cards/f/FirstSliversChosen.java | 2 +- Mage.Sets/src/mage/cards/f/FurySliver.java | 2 +- .../src/mage/cards/g/GaleriderSliver.java | 15 +++--- .../src/mage/cards/g/GroundshakerSliver.java | 15 +++--- Mage.Sets/src/mage/cards/h/HeartSliver.java | 20 +++----- .../src/mage/cards/h/HollowheadSliver.java | 2 +- Mage.Sets/src/mage/cards/h/HunterSliver.java | 14 +++--- Mage.Sets/src/mage/cards/l/LancerSliver.java | 2 +- .../src/mage/cards/l/LavabellySliver.java | 10 ++-- Mage.Sets/src/mage/cards/m/MagmaSliver.java | 6 +-- .../src/mage/cards/m/MeganticSliver.java | 13 ++--- .../src/mage/cards/m/MistformSliver.java | 21 +++++--- .../src/mage/cards/m/MnemonicSliver.java | 19 +++---- .../src/mage/cards/n/NecroticSliver.java | 2 +- Mage.Sets/src/mage/cards/p/PlatedSliver.java | 2 +- .../src/mage/cards/p/PoulticeSliver.java | 4 +- .../src/mage/cards/p/PredatorySliver.java | 2 +- Mage.Sets/src/mage/cards/q/QuickSliver.java | 2 +- .../src/mage/cards/s/ScuttlingSliver.java | 2 +- .../src/mage/cards/s/SentinelSliver.java | 15 +++--- .../src/mage/cards/s/SliverHivelord.java | 16 +++--- .../src/mage/cards/s/SpectralSliver.java | 2 +- Mage.Sets/src/mage/cards/s/SpinedSliver.java | 34 +++++-------- .../src/mage/cards/s/SpitefulSliver.java | 2 +- .../src/mage/cards/s/SteelformSliver.java | 2 +- .../src/mage/cards/s/StrikingSliver.java | 2 +- Mage.Sets/src/mage/cards/s/SynapseSliver.java | 50 +++++++++++++++---- Mage.Sets/src/mage/cards/s/SyphonSliver.java | 15 +++--- .../src/mage/cards/t/TemperedSliver.java | 2 +- .../src/mage/cards/t/ThorncasterSliver.java | 2 +- .../src/mage/cards/t/TwoHeadedSliver.java | 2 +- Mage.Sets/src/mage/cards/v/VenomSliver.java | 2 +- Mage.Sets/src/mage/cards/v/VictualSliver.java | 2 +- Mage.Sets/src/mage/cards/w/WardSliver.java | 11 ++-- Mage.Sets/src/mage/cards/w/WingedSliver.java | 20 +++----- .../main/java/mage/filter/StaticFilters.java | 10 +++- 52 files changed, 217 insertions(+), 196 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AcidicSliver.java b/Mage.Sets/src/mage/cards/a/AcidicSliver.java index 12826a9efd..b808edb913 100644 --- a/Mage.Sets/src/mage/cards/a/AcidicSliver.java +++ b/Mage.Sets/src/mage/cards/a/AcidicSliver.java @@ -38,7 +38,7 @@ public final class AcidicSliver extends CardImpl { ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Slivers have \"{2}, Sacrifice this permanent: This permanent deals 2 damage to any target.\""))); } diff --git a/Mage.Sets/src/mage/cards/a/ArmorSliver.java b/Mage.Sets/src/mage/cards/a/ArmorSliver.java index 51b621bb65..d3b81dcb08 100644 --- a/Mage.Sets/src/mage/cards/a/ArmorSliver.java +++ b/Mage.Sets/src/mage/cards/a/ArmorSliver.java @@ -30,7 +30,7 @@ public final class ArmorSliver extends CardImpl { this.toughness = new MageInt(2); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(0, 1, Duration.EndOfTurn).setText("this creature gets +0/+1 until end of turn"), - new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false))); } private ArmorSliver(final ArmorSliver card) { diff --git a/Mage.Sets/src/mage/cards/b/BarbedSliver.java b/Mage.Sets/src/mage/cards/b/BarbedSliver.java index 6eb399d644..0b8a258bb3 100644 --- a/Mage.Sets/src/mage/cards/b/BarbedSliver.java +++ b/Mage.Sets/src/mage/cards/b/BarbedSliver.java @@ -29,7 +29,7 @@ public final class BarbedSliver extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(2); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn).setText("this creature gets +1/+0 until end of turn"), - new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + new GenericManaCost(2)), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false))); } private BarbedSliver(final BarbedSliver card) { diff --git a/Mage.Sets/src/mage/cards/b/BattleSliver.java b/Mage.Sets/src/mage/cards/b/BattleSliver.java index 7bf8276baa..29cde1e0dc 100644 --- a/Mage.Sets/src/mage/cards/b/BattleSliver.java +++ b/Mage.Sets/src/mage/cards/b/BattleSliver.java @@ -1,7 +1,5 @@ - package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; @@ -10,11 +8,11 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author jeffwadsworth */ public final class BattleSliver extends CardImpl { @@ -27,9 +25,10 @@ public final class BattleSliver extends CardImpl { this.toughness = new MageInt(3); // Sliver creatures you control get +2/+0. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostControlledEffect(2, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); - + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( + 2, 0, Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private BattleSliver(final BattleSliver card) { diff --git a/Mage.Sets/src/mage/cards/b/BladeSliver.java b/Mage.Sets/src/mage/cards/b/BladeSliver.java index 7fc07a17b9..644d8fe77e 100644 --- a/Mage.Sets/src/mage/cards/b/BladeSliver.java +++ b/Mage.Sets/src/mage/cards/b/BladeSliver.java @@ -28,7 +28,7 @@ public final class BladeSliver extends CardImpl { // All Sliver creatures get +1/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostAllEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + new BoostAllEffect(1, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false))); } private BladeSliver(final BladeSliver card) { diff --git a/Mage.Sets/src/mage/cards/b/BladebackSliver.java b/Mage.Sets/src/mage/cards/b/BladebackSliver.java index de3440775f..109101d3c4 100644 --- a/Mage.Sets/src/mage/cards/b/BladebackSliver.java +++ b/Mage.Sets/src/mage/cards/b/BladebackSliver.java @@ -39,7 +39,7 @@ public final class BladebackSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( new GainAbilityControlledEffect( ability, Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS ), HellbentCondition.instance, "Hellbent — " + "As long as you have no cards in hand, Sliver creatures you control have " + "\"{T}: This creature deals 1 damage to target player or planeswalker.\"" diff --git a/Mage.Sets/src/mage/cards/b/BonescytheSliver.java b/Mage.Sets/src/mage/cards/b/BonescytheSliver.java index d386ccdd28..fc222e32f0 100644 --- a/Mage.Sets/src/mage/cards/b/BonescytheSliver.java +++ b/Mage.Sets/src/mage/cards/b/BonescytheSliver.java @@ -30,7 +30,7 @@ public final class BonescytheSliver extends CardImpl { // Sliver creatures you control have double strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DoubleStrikeAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS))); } private BonescytheSliver(final BonescytheSliver card) { diff --git a/Mage.Sets/src/mage/cards/b/BonesplitterSliver.java b/Mage.Sets/src/mage/cards/b/BonesplitterSliver.java index a3b89d1af4..70c8ec855c 100644 --- a/Mage.Sets/src/mage/cards/b/BonesplitterSliver.java +++ b/Mage.Sets/src/mage/cards/b/BonesplitterSliver.java @@ -27,7 +27,7 @@ public final class BonesplitterSliver extends CardImpl { // All Sliver creatures get +2/+0. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + new BoostAllEffect(2, 0, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false))); } private BonesplitterSliver(final BonesplitterSliver card) { diff --git a/Mage.Sets/src/mage/cards/c/CleavingSliver.java b/Mage.Sets/src/mage/cards/c/CleavingSliver.java index b3da1f1243..276865cf0c 100644 --- a/Mage.Sets/src/mage/cards/c/CleavingSliver.java +++ b/Mage.Sets/src/mage/cards/c/CleavingSliver.java @@ -27,7 +27,7 @@ public final class CleavingSliver extends CardImpl { // Sliver creatures you control get +2/+0. this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( 2, 0, Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_SLIVERS ))); } diff --git a/Mage.Sets/src/mage/cards/c/ClotSliver.java b/Mage.Sets/src/mage/cards/c/ClotSliver.java index be39f61fb1..d0c769b938 100644 --- a/Mage.Sets/src/mage/cards/c/ClotSliver.java +++ b/Mage.Sets/src/mage/cards/c/ClotSliver.java @@ -1,4 +1,3 @@ - package mage.cards.c; import mage.MageInt; @@ -12,7 +11,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; import mage.filter.FilterPermanent; import java.util.UUID; @@ -22,19 +20,19 @@ import java.util.UUID; */ public final class ClotSliver extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("Slivers"); - - static { - filter.add(SubType.SLIVER.getPredicate()); - } + private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "all Slivers"); public ClotSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect("this permanent"), new GenericManaCost(2)), Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + new SimpleActivatedAbility( + new RegenerateSourceEffect("this permanent"), new GenericManaCost(2) + ), Duration.WhileOnBattlefield, filter, false + ))); } private ClotSliver(final ClotSliver card) { diff --git a/Mage.Sets/src/mage/cards/c/CloudshredderSliver.java b/Mage.Sets/src/mage/cards/c/CloudshredderSliver.java index 15a194d3a3..203142ec60 100644 --- a/Mage.Sets/src/mage/cards/c/CloudshredderSliver.java +++ b/Mage.Sets/src/mage/cards/c/CloudshredderSliver.java @@ -30,11 +30,11 @@ public final class CloudshredderSliver extends CardImpl { // Sliver creatures you control have flying and haste. Ability ability = new SimpleStaticAbility(new GainAbilityControlledEffect( FlyingAbility.getInstance(), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS ).setText("Sliver creatures you control have flying")); ability.addEffect(new GainAbilityControlledEffect( HasteAbility.getInstance(), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS ).setText("and haste")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java b/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java index 4a746bf860..4d352e5fda 100644 --- a/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java +++ b/Mage.Sets/src/mage/cards/c/ConstrictingSliver.java @@ -39,7 +39,7 @@ public final class ConstrictingSliver extends CardImpl { ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new OnLeaveReturnExiledToBattlefieldAbility())); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS) .setText("Sliver creatures you control have \"When this creature enters the battlefield, " + "you may exile target creature an opponent controls until this creature leaves the battlefield.\""))); diff --git a/Mage.Sets/src/mage/cards/c/CryptSliver.java b/Mage.Sets/src/mage/cards/c/CryptSliver.java index 2fc6d71032..f7f025a690 100644 --- a/Mage.Sets/src/mage/cards/c/CryptSliver.java +++ b/Mage.Sets/src/mage/cards/c/CryptSliver.java @@ -1,4 +1,3 @@ - package mage.cards.c; import java.util.UUID; @@ -15,8 +14,10 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; +import mage.filter.FilterPermanent; import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; +import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; /** @@ -25,6 +26,7 @@ import mage.target.common.TargetCreaturePermanent; */ public final class CryptSliver extends CardImpl { + private static final FilterPermanent filter=new FilterPermanent(SubType.SLIVER,"Sliver"); public CryptSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.SLIVER); @@ -33,9 +35,11 @@ public final class CryptSliver extends CardImpl { this.toughness = new MageInt(1); // All Slivers have "{tap}: Regenerate target Sliver." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent(SubType.SLIVER, "Sliver"))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + Ability ability = new SimpleActivatedAbility( new RegenerateTargetEffect(), new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(new SimpleStaticAbility( new GainAbilityAllEffect( + ability, Duration.WhileOnBattlefield, filter + ).setText("all Slivers have \"{T}: Regenerate target Sliver.\""))); } private CryptSliver(final CryptSliver card) { diff --git a/Mage.Sets/src/mage/cards/d/DarkheartSliver.java b/Mage.Sets/src/mage/cards/d/DarkheartSliver.java index a3d2f57da1..bb7d549cb9 100644 --- a/Mage.Sets/src/mage/cards/d/DarkheartSliver.java +++ b/Mage.Sets/src/mage/cards/d/DarkheartSliver.java @@ -34,7 +34,7 @@ public final class DarkheartSliver extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new SacrificeSourceCost()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Slivers have \"Sacrifice this permanent: You gain 3 life.\""))); } diff --git a/Mage.Sets/src/mage/cards/e/EnduringSliver.java b/Mage.Sets/src/mage/cards/e/EnduringSliver.java index 953bbfe1b5..076553ca76 100644 --- a/Mage.Sets/src/mage/cards/e/EnduringSliver.java +++ b/Mage.Sets/src/mage/cards/e/EnduringSliver.java @@ -32,7 +32,7 @@ public final class EnduringSliver extends CardImpl { // Other sliver creatures you control have outlast {2}. this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( new OutlastAbility(new ManaCostsImpl<>("{2}")), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, true + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, true ).setText("Other Sliver creatures you control have outlast {2}."))); } diff --git a/Mage.Sets/src/mage/cards/e/EssenceSliver.java b/Mage.Sets/src/mage/cards/e/EssenceSliver.java index 058998c287..461faaa28a 100644 --- a/Mage.Sets/src/mage/cards/e/EssenceSliver.java +++ b/Mage.Sets/src/mage/cards/e/EssenceSliver.java @@ -83,7 +83,7 @@ class DealsDamageAllTriggeredAbility extends TriggeredAbilityImpl { @Override public String getTriggerPhrase() { - return "Whenever a Sliver deals damage, its controller" ; + return "Whenever a Sliver deals damage, " ; } } diff --git a/Mage.Sets/src/mage/cards/f/FirstSliversChosen.java b/Mage.Sets/src/mage/cards/f/FirstSliversChosen.java index 6d30afa21a..7fd150c1d1 100644 --- a/Mage.Sets/src/mage/cards/f/FirstSliversChosen.java +++ b/Mage.Sets/src/mage/cards/f/FirstSliversChosen.java @@ -28,7 +28,7 @@ public final class FirstSliversChosen extends CardImpl { // Sliver creatures you control have exalted. this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( new ExaltedAbility(), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_SLIVERS ))); } diff --git a/Mage.Sets/src/mage/cards/f/FurySliver.java b/Mage.Sets/src/mage/cards/f/FurySliver.java index 0a1c2188ca..e29441344e 100644 --- a/Mage.Sets/src/mage/cards/f/FurySliver.java +++ b/Mage.Sets/src/mage/cards/f/FurySliver.java @@ -30,7 +30,7 @@ public final class FurySliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS ) )); } diff --git a/Mage.Sets/src/mage/cards/g/GaleriderSliver.java b/Mage.Sets/src/mage/cards/g/GaleriderSliver.java index 9d6f32bbbf..4992ac5c56 100644 --- a/Mage.Sets/src/mage/cards/g/GaleriderSliver.java +++ b/Mage.Sets/src/mage/cards/g/GaleriderSliver.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -9,13 +7,13 @@ import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class GaleriderSliver extends CardImpl { @@ -28,9 +26,10 @@ public final class GaleriderSliver extends CardImpl { this.toughness = new MageInt(1); // Sliver creatures you control have flying. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(FlyingAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private GaleriderSliver(final GaleriderSliver card) { diff --git a/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java b/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java index 5c35d4afa9..e18edf0c19 100644 --- a/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java +++ b/Mage.Sets/src/mage/cards/g/GroundshakerSliver.java @@ -1,7 +1,5 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -9,13 +7,13 @@ import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class GroundshakerSliver extends CardImpl { @@ -28,9 +26,10 @@ public final class GroundshakerSliver extends CardImpl { this.toughness = new MageInt(5); // Sliver creatures you control have trample. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(TrampleAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + TrampleAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private GroundshakerSliver(final GroundshakerSliver card) { diff --git a/Mage.Sets/src/mage/cards/h/HeartSliver.java b/Mage.Sets/src/mage/cards/h/HeartSliver.java index 47c4e1fd6a..4427e8a7ff 100644 --- a/Mage.Sets/src/mage/cards/h/HeartSliver.java +++ b/Mage.Sets/src/mage/cards/h/HeartSliver.java @@ -1,7 +1,5 @@ - package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; @@ -11,27 +9,25 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @author Loki */ public final class HeartSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All sliver creatures"); - - static { - filter.add(SubType.SLIVER.getPredicate()); - } - public HeartSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + HasteAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false + ))); } private HeartSliver(final HeartSliver card) { diff --git a/Mage.Sets/src/mage/cards/h/HollowheadSliver.java b/Mage.Sets/src/mage/cards/h/HollowheadSliver.java index 33003fb362..aace31bb7d 100644 --- a/Mage.Sets/src/mage/cards/h/HollowheadSliver.java +++ b/Mage.Sets/src/mage/cards/h/HollowheadSliver.java @@ -36,7 +36,7 @@ public final class HollowheadSliver extends CardImpl { ability.addCost(new DiscardCardCost()); this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( ability, Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_SLIVERS ))); } diff --git a/Mage.Sets/src/mage/cards/h/HunterSliver.java b/Mage.Sets/src/mage/cards/h/HunterSliver.java index e271ba88af..34243ca8a0 100644 --- a/Mage.Sets/src/mage/cards/h/HunterSliver.java +++ b/Mage.Sets/src/mage/cards/h/HunterSliver.java @@ -1,7 +1,5 @@ - package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; @@ -9,13 +7,13 @@ import mage.abilities.keyword.ProvokeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author cbt33 */ public final class HunterSliver extends CardImpl { @@ -28,8 +26,10 @@ public final class HunterSliver extends CardImpl { this.toughness = new MageInt(1); // All Sliver creatures have provoke. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new ProvokeAbility(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + new ProvokeAbility(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS + ).setText("all Sliver creatures have provoke"))); } private HunterSliver(final HunterSliver card) { diff --git a/Mage.Sets/src/mage/cards/l/LancerSliver.java b/Mage.Sets/src/mage/cards/l/LancerSliver.java index c1eccc2891..b3e4f49722 100644 --- a/Mage.Sets/src/mage/cards/l/LancerSliver.java +++ b/Mage.Sets/src/mage/cards/l/LancerSliver.java @@ -28,7 +28,7 @@ public final class LancerSliver extends CardImpl { // Sliver creatures you control have first strike. this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( FirstStrikeAbility.getInstance(), Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + StaticFilters.FILTER_PERMANENT_SLIVERS ))); } diff --git a/Mage.Sets/src/mage/cards/l/LavabellySliver.java b/Mage.Sets/src/mage/cards/l/LavabellySliver.java index 86d764c891..303049facc 100644 --- a/Mage.Sets/src/mage/cards/l/LavabellySliver.java +++ b/Mage.Sets/src/mage/cards/l/LavabellySliver.java @@ -30,13 +30,15 @@ public final class LavabellySliver extends CardImpl { this.toughness = new MageInt(2); // Sliver creatures you control have "When this creature enters the battlefield, it deals 1 damage to target player or planeswalker and you gain 1 life." - Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1, "When this creature enters the battlefield, it"),false,true); + Ability ability = new EntersBattlefieldTriggeredAbility( + new DamageTargetEffect(1, "it"), + false, true + ).setTriggerPhrase("When this creature enters the battlefield, "); ability.addEffect(new GainLifeEffect(1).concatBy("and")); ability.addTarget(new TargetPlayerOrPlaneswalker()); this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( - ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) - .withForceQuotes() - )); + ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS + ).withForceQuotes())); } private LavabellySliver(final LavabellySliver card) { diff --git a/Mage.Sets/src/mage/cards/m/MagmaSliver.java b/Mage.Sets/src/mage/cards/m/MagmaSliver.java index 682c3140cd..a281441a77 100644 --- a/Mage.Sets/src/mage/cards/m/MagmaSliver.java +++ b/Mage.Sets/src/mage/cards/m/MagmaSliver.java @@ -39,15 +39,15 @@ public final class MagmaSliver extends CardImpl { // where X is the number of Slivers on the battlefield." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(new PermanentsOnBattlefieldCount( - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS), + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS), StaticValue.get(0), Duration.EndOfTurn, true), new TapSourceCost()); Target target = new TargetCreaturePermanent( new FilterCreaturePermanent(SubType.SLIVER, "Sliver creature")); ability.addTarget(target); Effect effect = new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS); - effect.setText("All Slivers have \"{T}: Target Sliver creature gets +X/+0 until end of turn," + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS); + effect.setText("All Slivers have \"{T}: Target Sliver creature gets +X/+0 until end of turn, " + "where X is the number of Slivers on the battlefield.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/m/MeganticSliver.java b/Mage.Sets/src/mage/cards/m/MeganticSliver.java index 2e0ae9898f..069a4e564e 100644 --- a/Mage.Sets/src/mage/cards/m/MeganticSliver.java +++ b/Mage.Sets/src/mage/cards/m/MeganticSliver.java @@ -1,20 +1,18 @@ - package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MeganticSliver extends CardImpl { @@ -27,7 +25,10 @@ public final class MeganticSliver extends CardImpl { this.toughness = new MageInt(3); // Sliver creatures you control get +3/+3. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(3, 3, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( + 3, 3, Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private MeganticSliver(final MeganticSliver card) { diff --git a/Mage.Sets/src/mage/cards/m/MistformSliver.java b/Mage.Sets/src/mage/cards/m/MistformSliver.java index 524ef7f7b6..70f2e7dc2d 100644 --- a/Mage.Sets/src/mage/cards/m/MistformSliver.java +++ b/Mage.Sets/src/mage/cards/m/MistformSliver.java @@ -1,12 +1,11 @@ package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.AddCardSubTypeTargetEffect; @@ -15,18 +14,25 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.choices.Choice; import mage.choices.ChoiceCreatureType; -import mage.constants.*; -import mage.filter.StaticFilters; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * @author cbt33, Plopman (Engineered Plague) */ public final class MistformSliver extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "all Slivers"); + public MistformSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.ILLUSION); @@ -36,8 +42,11 @@ public final class MistformSliver extends CardImpl { this.toughness = new MageInt(1); // All Slivers have "{1}: This permanent becomes the creature type of your choice in addition to its other types until end of turn." - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MistformSliverEffect(), new ManaCostsImpl("{1}")); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility( + new GainAbilityAllEffect(new SimpleActivatedAbility( + new MistformSliverEffect(), new GenericManaCost(1) + ), Duration.WhileOnBattlefield, filter) + )); } private MistformSliver(final MistformSliver card) { diff --git a/Mage.Sets/src/mage/cards/m/MnemonicSliver.java b/Mage.Sets/src/mage/cards/m/MnemonicSliver.java index d49bc9e0da..96304a3864 100644 --- a/Mage.Sets/src/mage/cards/m/MnemonicSliver.java +++ b/Mage.Sets/src/mage/cards/m/MnemonicSliver.java @@ -4,7 +4,6 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.costs.Cost; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -14,8 +13,7 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.StaticFilters; +import mage.filter.FilterPermanent; import java.util.UUID; @@ -24,18 +22,21 @@ import java.util.UUID; */ public final class MnemonicSliver extends CardImpl { + private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "all Slivers"); + public MnemonicSliver(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); - Cost cost = new SacrificeSourceCost(); - cost.setText("sacrifice this permanent"); - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2)); - gainedAbility.addCost(cost); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + Ability ability = new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(1), new GenericManaCost(2) + ); + ability.addCost(new SacrificeSourceCost().setText("sacrifice this permanent")); + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + ability, Duration.WhileOnBattlefield, filter, false + ))); } private MnemonicSliver(final MnemonicSliver card) { diff --git a/Mage.Sets/src/mage/cards/n/NecroticSliver.java b/Mage.Sets/src/mage/cards/n/NecroticSliver.java index a8940b0a6a..d14976817d 100644 --- a/Mage.Sets/src/mage/cards/n/NecroticSliver.java +++ b/Mage.Sets/src/mage/cards/n/NecroticSliver.java @@ -38,7 +38,7 @@ public final class NecroticSliver extends CardImpl { ability.addTarget(new TargetPermanent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Slivers have \"{3}, Sacrifice this permanent: Destroy target permanent.\""))); } diff --git a/Mage.Sets/src/mage/cards/p/PlatedSliver.java b/Mage.Sets/src/mage/cards/p/PlatedSliver.java index 9e888a8f2a..6511c894db 100644 --- a/Mage.Sets/src/mage/cards/p/PlatedSliver.java +++ b/Mage.Sets/src/mage/cards/p/PlatedSliver.java @@ -27,7 +27,7 @@ public final class PlatedSliver extends CardImpl { this.toughness = new MageInt(1); // All Sliver creatures get +0/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(0, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false))); } private PlatedSliver(final PlatedSliver card) { diff --git a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java index 4f3e3ef12e..b1a3629dff 100644 --- a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java +++ b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java @@ -35,11 +35,11 @@ public final class PoulticeSliver extends CardImpl { // All Slivers have "{2}, {tap}: Regenerate target Sliver." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateTargetEffect(), new GenericManaCost(2)); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS)); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ALL_SLIVERS)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Slivers have \"{2}, {T}: Regenerate target Sliver.\""))); } diff --git a/Mage.Sets/src/mage/cards/p/PredatorySliver.java b/Mage.Sets/src/mage/cards/p/PredatorySliver.java index 43a8747cfb..d642c6e97f 100644 --- a/Mage.Sets/src/mage/cards/p/PredatorySliver.java +++ b/Mage.Sets/src/mage/cards/p/PredatorySliver.java @@ -28,7 +28,7 @@ public final class PredatorySliver extends CardImpl { // Sliver creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostControlledEffect(1, 1, Duration.WhileInGraveyard, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + new BoostControlledEffect(1, 1, Duration.WhileInGraveyard, StaticFilters.FILTER_PERMANENT_SLIVERS))); } private PredatorySliver(final PredatorySliver card) { diff --git a/Mage.Sets/src/mage/cards/q/QuickSliver.java b/Mage.Sets/src/mage/cards/q/QuickSliver.java index 120575ed31..97ac74de83 100644 --- a/Mage.Sets/src/mage/cards/q/QuickSliver.java +++ b/Mage.Sets/src/mage/cards/q/QuickSliver.java @@ -20,7 +20,7 @@ import mage.filter.common.FilterCreatureCard; */ public final class QuickSliver extends CardImpl { - private static final FilterCreatureCard filter = new FilterCreatureCard("Sliver cards"); + private static final FilterCreatureCard filter = new FilterCreatureCard("Sliver spells"); static { filter.add(SubType.SLIVER.getPredicate()); } diff --git a/Mage.Sets/src/mage/cards/s/ScuttlingSliver.java b/Mage.Sets/src/mage/cards/s/ScuttlingSliver.java index 9532d22d0f..ba1be03668 100644 --- a/Mage.Sets/src/mage/cards/s/ScuttlingSliver.java +++ b/Mage.Sets/src/mage/cards/s/ScuttlingSliver.java @@ -32,7 +32,7 @@ public final class ScuttlingSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( new SimpleActivatedAbility( new UntapSourceEffect().setText("untap this creature"), new GenericManaCost(2) - ), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) + ), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS) .withForceQuotes() )); } diff --git a/Mage.Sets/src/mage/cards/s/SentinelSliver.java b/Mage.Sets/src/mage/cards/s/SentinelSliver.java index e6dfac198e..708dd9fddf 100644 --- a/Mage.Sets/src/mage/cards/s/SentinelSliver.java +++ b/Mage.Sets/src/mage/cards/s/SentinelSliver.java @@ -1,7 +1,5 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -11,24 +9,27 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** - * * @author Plopman */ public final class SentinelSliver extends CardImpl { public SentinelSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(2); this.toughness = new MageInt(2); // Sliver creatures you control have vigilance. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent(SubType.SLIVER, "Sliver creatures you control ")))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private SentinelSliver(final SentinelSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/SliverHivelord.java b/Mage.Sets/src/mage/cards/s/SliverHivelord.java index 93106c9dcb..b2acb06e41 100644 --- a/Mage.Sets/src/mage/cards/s/SliverHivelord.java +++ b/Mage.Sets/src/mage/cards/s/SliverHivelord.java @@ -1,7 +1,5 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -9,14 +7,14 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.SuperType; -import mage.constants.Zone; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class SliverHivelord extends CardImpl { @@ -30,10 +28,10 @@ public final class SliverHivelord extends CardImpl { this.toughness = new MageInt(5); // Sliver creatures you control have indestructible. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(IndestructibleAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); - + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private SliverHivelord(final SliverHivelord card) { diff --git a/Mage.Sets/src/mage/cards/s/SpectralSliver.java b/Mage.Sets/src/mage/cards/s/SpectralSliver.java index b617abfbaf..f2777d2e11 100644 --- a/Mage.Sets/src/mage/cards/s/SpectralSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpectralSliver.java @@ -33,7 +33,7 @@ public final class SpectralSliver extends CardImpl { // All Sliver creatures have "{2}: This creature gets +1/+1 until end of turn." Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn).setText("this creature gets +1/+1 until end of turn"), new ManaCostsImpl("{2}")); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS))); } private SpectralSliver(final SpectralSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/SpinedSliver.java b/Mage.Sets/src/mage/cards/s/SpinedSliver.java index 5fa93ec12f..3f45af3206 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpinedSliver.java @@ -1,7 +1,5 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BecomesBlockedAllTriggeredAbility; @@ -11,14 +9,15 @@ import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.filter.StaticFilters; import mage.game.Game; import mage.game.combat.CombatGroup; +import java.util.UUID; + /** - * * @author KholdFuzion */ public final class SpinedSliver extends CardImpl { @@ -31,10 +30,11 @@ public final class SpinedSliver extends CardImpl { this.toughness = new MageInt(2); // Whenever a Sliver becomes blocked, that Sliver gets +1/+1 until end of turn for each creature blocking it. - BlockersCount value = new BlockersCount(); - Effect effect = new BoostTargetEffect(value, value, Duration.EndOfTurn, true); - effect.setText("it gets +1/+1 until end of turn for each creature blocking it"); - this.addAbility(new BecomesBlockedAllTriggeredAbility(effect, false, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, true)); + this.addAbility(new BecomesBlockedAllTriggeredAbility( + new BoostTargetEffect(BlockersCount.instance, BlockersCount.instance, Duration.EndOfTurn, true) + .setText("that Sliver gets +1/+1 until end of turn for each creature blocking it"), + false, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, true + ).setTriggerPhrase("Whenever a Sliver becomes blocked, ")); } private SpinedSliver(final SpinedSliver card) { @@ -47,18 +47,8 @@ public final class SpinedSliver extends CardImpl { } } -class BlockersCount implements DynamicValue { - - private final String message; - - public BlockersCount() { - this.message = "each creature blocking it"; - } - - public BlockersCount(final BlockersCount blockersCount) { - super(); - this.message = blockersCount.message; - } +enum BlockersCount implements DynamicValue { + instance; @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { @@ -73,12 +63,12 @@ class BlockersCount implements DynamicValue { @Override public BlockersCount copy() { - return new BlockersCount(this); + return this; } @Override public String getMessage() { - return message; + return "each creature blocking it"; } @Override diff --git a/Mage.Sets/src/mage/cards/s/SpitefulSliver.java b/Mage.Sets/src/mage/cards/s/SpitefulSliver.java index 9ea011fbb4..fab6c73587 100644 --- a/Mage.Sets/src/mage/cards/s/SpitefulSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpitefulSliver.java @@ -35,7 +35,7 @@ public final class SpitefulSliver extends CardImpl { ); ability.addTarget(new TargetPlayer()); this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( - ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS ).setText("Sliver creatures you control have \"Whenever this creature is dealt damage, " + "it deals that much damage to target player or planeswalker.\"") )); diff --git a/Mage.Sets/src/mage/cards/s/SteelformSliver.java b/Mage.Sets/src/mage/cards/s/SteelformSliver.java index 1f7c1206a8..8e639460ab 100644 --- a/Mage.Sets/src/mage/cards/s/SteelformSliver.java +++ b/Mage.Sets/src/mage/cards/s/SteelformSliver.java @@ -29,7 +29,7 @@ public final class SteelformSliver extends CardImpl { // Sliver creatures you control get +0/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(0, 1, Duration.WhileOnBattlefield, - StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, false))); + StaticFilters.FILTER_PERMANENT_SLIVERS, false))); } private SteelformSliver(final SteelformSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/StrikingSliver.java b/Mage.Sets/src/mage/cards/s/StrikingSliver.java index 00de19b7e6..083e5e51fa 100644 --- a/Mage.Sets/src/mage/cards/s/StrikingSliver.java +++ b/Mage.Sets/src/mage/cards/s/StrikingSliver.java @@ -30,7 +30,7 @@ public final class StrikingSliver extends CardImpl { // Sliver creatures you control have first strike. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS))); } private StrikingSliver(final StrikingSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/SynapseSliver.java b/Mage.Sets/src/mage/cards/s/SynapseSliver.java index aa91c23382..094db229da 100644 --- a/Mage.Sets/src/mage/cards/s/SynapseSliver.java +++ b/Mage.Sets/src/mage/cards/s/SynapseSliver.java @@ -1,37 +1,40 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility; -import mage.abilities.effects.Effect; -import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SetTargetPointer; import mage.constants.SubType; import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; /** - * * @author cbt33 */ public final class SynapseSliver extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.SLIVER, "a Sliver"); + public SynapseSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); // Whenever a Sliver deals combat damage to a player, its controller may draw a card. - Effect effect = new DrawCardTargetEffect(1); - effect.setText("its controller may draw a card"); - this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility(effect, - new FilterCreaturePermanent(SubType.SLIVER, "a Sliver"), - true, SetTargetPointer.PLAYER, true)); + this.addAbility(new DealsDamageToAPlayerAllTriggeredAbility( + new SynapseSliverEffect(), filter, false, + SetTargetPointer.PLAYER, true + )); } private SynapseSliver(final SynapseSliver card) { @@ -43,3 +46,28 @@ public final class SynapseSliver extends CardImpl { return new SynapseSliver(this); } } + +class SynapseSliverEffect extends OneShotEffect { + + SynapseSliverEffect() { + super(Outcome.Benefit); + staticText = "its controller may draw a card"; + } + + private SynapseSliverEffect(final SynapseSliverEffect effect) { + super(effect); + } + + @Override + public SynapseSliverEffect copy() { + return new SynapseSliverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); + return player != null + && player.chooseUse(outcome, "Draw a card?", source, game) + && player.drawCards(1, source, game) > 0; + } +} diff --git a/Mage.Sets/src/mage/cards/s/SyphonSliver.java b/Mage.Sets/src/mage/cards/s/SyphonSliver.java index 88e993c08f..d9dbe7e6d1 100644 --- a/Mage.Sets/src/mage/cards/s/SyphonSliver.java +++ b/Mage.Sets/src/mage/cards/s/SyphonSliver.java @@ -1,7 +1,5 @@ - package mage.cards.s; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; @@ -9,13 +7,13 @@ import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.Zone; +import mage.constants.SubType; import mage.filter.StaticFilters; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class SyphonSliver extends CardImpl { @@ -28,9 +26,10 @@ public final class SyphonSliver extends CardImpl { this.toughness = new MageInt(2); // Sliver creatures you control have lifelink. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new GainAbilityControlledEffect(LifelinkAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + LifelinkAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_SLIVERS + ))); } private SyphonSliver(final SyphonSliver card) { diff --git a/Mage.Sets/src/mage/cards/t/TemperedSliver.java b/Mage.Sets/src/mage/cards/t/TemperedSliver.java index 6de875e1a7..e7a8f3e7ea 100644 --- a/Mage.Sets/src/mage/cards/t/TemperedSliver.java +++ b/Mage.Sets/src/mage/cards/t/TemperedSliver.java @@ -31,7 +31,7 @@ public final class TemperedSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( new DealsCombatDamageToAPlayerTriggeredAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), false,"Whenever this creature deals combat damage to a player, put a +1/+1 counter on it.",false - ), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS + ), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS ))); } diff --git a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java index e3c75dd4a0..569908848b 100644 --- a/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java +++ b/Mage.Sets/src/mage/cards/t/ThorncasterSliver.java @@ -35,7 +35,7 @@ public final class ThorncasterSliver extends CardImpl { ability.addTarget(new TargetAnyTarget()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS) + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS) .setText("Sliver creatures you control have \"Whenever this creature attacks, it deals 1 damage to any target.\""))); } diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java index 6a30a5c5f5..09529fa651 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedSliver.java @@ -31,7 +31,7 @@ public final class TwoHeadedSliver extends CardImpl { // All Sliver creatures have menace. (They can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( new MenaceAbility(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Sliver creatures have menace. (They can't be blocked except by two or more creatures.)"))); } diff --git a/Mage.Sets/src/mage/cards/v/VenomSliver.java b/Mage.Sets/src/mage/cards/v/VenomSliver.java index c0335b474d..4ae8cbbf26 100644 --- a/Mage.Sets/src/mage/cards/v/VenomSliver.java +++ b/Mage.Sets/src/mage/cards/v/VenomSliver.java @@ -30,7 +30,7 @@ public final class VenomSliver extends CardImpl { // Sliver creatures you control have deathtouch. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(DeathtouchAbility.getInstance(), - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS))); + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_SLIVERS))); } private VenomSliver(final VenomSliver card) { diff --git a/Mage.Sets/src/mage/cards/v/VictualSliver.java b/Mage.Sets/src/mage/cards/v/VictualSliver.java index 392f7d0e06..84edf3f8f7 100644 --- a/Mage.Sets/src/mage/cards/v/VictualSliver.java +++ b/Mage.Sets/src/mage/cards/v/VictualSliver.java @@ -37,7 +37,7 @@ public final class VictualSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, - Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, + Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, "All Slivers have \"{2}, Sacrifice this permanent: You gain 4 life.\""))); } diff --git a/Mage.Sets/src/mage/cards/w/WardSliver.java b/Mage.Sets/src/mage/cards/w/WardSliver.java index a0417bcf7a..a4d02eb8fe 100644 --- a/Mage.Sets/src/mage/cards/w/WardSliver.java +++ b/Mage.Sets/src/mage/cards/w/WardSliver.java @@ -14,6 +14,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; @@ -56,17 +57,11 @@ public final class WardSliver extends CardImpl { class WardSliverGainAbilityControlledEffect extends ContinuousEffectImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Slivers"); - - static { - filter.add(SubType.SLIVER.getPredicate()); - } - protected FilterPermanent protectionFilter; public WardSliverGainAbilityControlledEffect() { super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); - staticText = "Slivers have protection from the chosen color"; + staticText = "all Slivers have protection from the chosen color"; } public WardSliverGainAbilityControlledEffect(final WardSliverGainAbilityControlledEffect effect) { @@ -92,7 +87,7 @@ class WardSliverGainAbilityControlledEffect extends ContinuousEffectImpl { } } if (protectionFilter != null) { - for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, game)) { + for (Permanent perm: game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, game)) { perm.addAbility(new ProtectionAbility(protectionFilter), source.getSourceId(), game); } return true; diff --git a/Mage.Sets/src/mage/cards/w/WingedSliver.java b/Mage.Sets/src/mage/cards/w/WingedSliver.java index b4d95a0adc..8c6695dbf1 100644 --- a/Mage.Sets/src/mage/cards/w/WingedSliver.java +++ b/Mage.Sets/src/mage/cards/w/WingedSliver.java @@ -1,7 +1,5 @@ - package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; @@ -11,27 +9,25 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; -import mage.constants.Zone; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; + +import java.util.UUID; /** * @author Loki */ public final class WingedSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All sliver creatures"); - - static { - filter.add(SubType.SLIVER.getPredicate()); - } - public WingedSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield, + StaticFilters.FILTER_PERMANENT_ALL_SLIVERS, false + ))); } private WingedSliver(final WingedSliver card) { diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 1d33d25223..e69aea0e33 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -634,10 +634,16 @@ public final class StaticFilters { FILTER_PERMANENT_CREATURE_GOBLINS.setLockedFilter(true); } - public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures"); + public static final FilterCreaturePermanent FILTER_PERMANENT_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "Sliver creatures"); static { - FILTER_PERMANENT_CREATURE_SLIVERS.setLockedFilter(true); + FILTER_PERMANENT_SLIVERS.setLockedFilter(true); + } + + public static final FilterCreaturePermanent FILTER_PERMANENT_ALL_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures"); + + static { + FILTER_PERMANENT_ALL_SLIVERS.setLockedFilter(true); } public static final FilterControlledPermanent FILTER_CONTROLLED_SAMURAI_OR_WARRIOR = new FilterControlledPermanent("a Samurai or Warrior you control");