diff --git a/Mage.Sets/src/mage/cards/h/Hivestone.java b/Mage.Sets/src/mage/cards/h/Hivestone.java new file mode 100644 index 0000000000..da2f346c15 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/Hivestone.java @@ -0,0 +1,71 @@ +package mage.cards.h; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.List; +import java.util.UUID; + +/** + * Created by Alexsandr0x. + */ +public class Hivestone extends CardImpl { + + public Hivestone(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // Creatures you control are Slivers in addition to their other creature types. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CreaturesAreSliversEffect())); + } + + public Hivestone(final Hivestone card) { + super(card); + } + + @Override + public Card copy() { + return new Hivestone(this); + } + +} + +class CreaturesAreSliversEffect extends ContinuousEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + + public CreaturesAreSliversEffect() { + + super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Neutral); + staticText = "All permanents are artifacts in addition to their other types"; + } + + @Override + public boolean apply(Game game, Ability source) { + List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game); + for (Permanent perm : permanents) { + List cardSubType = perm.getSubtype(game); + if (!cardSubType.contains("Sliver")) { + cardSubType.add("Sliver"); + } + } + return true; + } + + @Override + public mage.cards.h.CreaturesAreSliversEffect copy() { + return new mage.cards.h.CreaturesAreSliversEffect(this); + } + + private CreaturesAreSliversEffect(mage.cards.h.CreaturesAreSliversEffect effect) { + super(effect); + } +} diff --git a/Mage.Sets/src/mage/sets/TimeSpiral.java b/Mage.Sets/src/mage/sets/TimeSpiral.java index b3c01a8ad8..f943f5cb34 100644 --- a/Mage.Sets/src/mage/sets/TimeSpiral.java +++ b/Mage.Sets/src/mage/sets/TimeSpiral.java @@ -130,6 +130,7 @@ public class TimeSpiral extends ExpansionSet { cards.add(new SetCardInfo("Haunting Hymn", 112, Rarity.UNCOMMON, mage.cards.h.HauntingHymn.class)); cards.add(new SetCardInfo("Havenwood Wurm", 199, Rarity.COMMON, mage.cards.h.HavenwoodWurm.class)); cards.add(new SetCardInfo("Herd Gnarr", 200, Rarity.COMMON, mage.cards.h.HerdGnarr.class)); + cards.add(new SetCardInfo("Hivestone", 256, Rarity.RARE, mage.cards.h.Hivestone.class)); cards.add(new SetCardInfo("Hypergenesis", 201, Rarity.RARE, mage.cards.h.Hypergenesis.class)); cards.add(new SetCardInfo("Ib Halfheart, Goblin Tactician", 163, Rarity.RARE, mage.cards.i.IbHalfheartGoblinTactician.class)); cards.add(new SetCardInfo("Icatian Crier", 23, Rarity.COMMON, mage.cards.i.IcatianCrier.class));