mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Create Hivestone card
This commit is contained in:
parent
92cfe2403e
commit
0a0878aba6
2 changed files with 72 additions and 0 deletions
71
Mage.Sets/src/mage/cards/h/Hivestone.java
Normal file
71
Mage.Sets/src/mage/cards/h/Hivestone.java
Normal file
|
@ -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<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game);
|
||||||
|
for (Permanent perm : permanents) {
|
||||||
|
List<String> 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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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("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("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("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("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("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));
|
cards.add(new SetCardInfo("Icatian Crier", 23, Rarity.COMMON, mage.cards.i.IcatianCrier.class));
|
||||||
|
|
Loading…
Reference in a new issue