diff --git a/Mage.Sets/src/mage/cards/h/Hivestone.java b/Mage.Sets/src/mage/cards/h/Hivestone.java index 2f5d24e4a4b..6331f80a7c9 100644 --- a/Mage.Sets/src/mage/cards/h/Hivestone.java +++ b/Mage.Sets/src/mage/cards/h/Hivestone.java @@ -28,7 +28,7 @@ public class Hivestone extends CardImpl { // Creatures you control are Slivers in addition to their other creature types. ArrayList subTypes = new ArrayList<>(); - subTypes.add("Slivers"); + subTypes.add("Sliver"); Effect effect = new BecomesSubtypeAllEffect(Duration.WhileOnBattlefield, subTypes, filter, false); effect.setText("Creatures you control are Slivers in addition to their other creature types"); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); diff --git a/Mage.Sets/src/mage/cards/m/MuscleSliver.java b/Mage.Sets/src/mage/cards/m/MuscleSliver.java index c639ae6ebc4..01b4f1b3c15 100644 --- a/Mage.Sets/src/mage/cards/m/MuscleSliver.java +++ b/Mage.Sets/src/mage/cards/m/MuscleSliver.java @@ -28,13 +28,12 @@ package mage.cards.m; import java.util.UUID; - -import mage.constants.CardType; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.continuous.BoostAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; @@ -52,11 +51,13 @@ public class MuscleSliver extends CardImpl { } public MuscleSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add("Sliver"); this.power = new MageInt(1); this.toughness = new MageInt(1); + + // All Sliver creatures get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 1, Duration.WhileOnBattlefield, filter, false))); } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java index 945e1848111..3fcfd21c844 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/tsp/HivestoneTest.java @@ -16,26 +16,32 @@ public class HivestoneTest extends CardTestPlayerBase { */ @Test public void abilityCheckTest() { - addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 1); - addCard(Zone.BATTLEFIELD, playerA, "Hivestone", 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 4); + addCard(Zone.HAND, playerA, "Grizzly Bears", 1); // Creature {1}{G} + // Creatures you control are Slivers in addition to their other creature types. + addCard(Zone.HAND, playerA, "Hivestone", 1); // Artifact {2} + // All Sliver creatures get +1/+1. addCard(Zone.BATTLEFIELD, playerA, "Muscle Sliver", 1); + addCard(Zone.BATTLEFIELD, playerB, "Runeclaw Bear", 1); // Creature 2/2 - addCard(Zone.BATTLEFIELD, playerB, "Runeclaw Bear", 1); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Grizzly Bears"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hivestone"); - setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); + assertPermanentCount(playerA, "Hivestone", 1); + assertPermanentCount(playerA, "Grizzly Bears", 1); assertPowerToughness(playerA, "Grizzly Bears", 3, 3, Filter.ComparisonScope.Any); - assertPowerToughness(playerB, "Runeclaw Bear", 2, 2, Filter.ComparisonScope.Any); - } /** - * Turns only your creatures on the battlefield, not in other zones, into Slivers. It won’t allow you to have - * Root Sliver on the battlefield and make your Grizzly Bears uncounterable, for example. + * Turns only your creatures on the battlefield, not in other zones, into + * Slivers. It won’t allow you to have Root Sliver on the battlefield and + * make your Grizzly Bears uncounterable, for example. */ @Test public void rootSliverTest() { @@ -45,7 +51,6 @@ public class HivestoneTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Root Sliver", 1); addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); - addCard(Zone.BATTLEFIELD, playerB, "Island", 2); addCard(Zone.HAND, playerB, "Counterspell"); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java index e1967e797a8..982a6831d9e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesSubtypeAllEffect.java @@ -70,7 +70,7 @@ public class BecomesSubtypeAllEffect extends ContinuousEffectImpl { @Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { - for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) { + for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { if (permanent != null) { switch (layer) { case TypeChangingEffects_4: @@ -86,10 +86,8 @@ public class BecomesSubtypeAllEffect extends ContinuousEffectImpl { } break; } - } else { - if (duration.equals(Duration.Custom)) { - discard(); - } + } else if (duration.equals(Duration.Custom)) { + discard(); } } return true;