mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
implement [MH3] Harbinger of the Seas
This commit is contained in:
parent
68f715d17d
commit
9ae855196c
3 changed files with 145 additions and 48 deletions
96
Mage.Sets/src/mage/cards/h/HarbingerOfTheSeas.java
Normal file
96
Mage.Sets/src/mage/cards/h/HarbingerOfTheSeas.java
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
package mage.cards.h;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.ContinuousEffectImpl;
|
||||||
|
import mage.abilities.mana.BlueManaAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.common.FilterLandPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Susucr
|
||||||
|
*/
|
||||||
|
public final class HarbingerOfTheSeas extends CardImpl {
|
||||||
|
|
||||||
|
public HarbingerOfTheSeas(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.MERFOLK);
|
||||||
|
this.subtype.add(SubType.WIZARD);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Nonbasic lands are Islands.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new HarbingerOfTheSeasEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private HarbingerOfTheSeas(final HarbingerOfTheSeas card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarbingerOfTheSeas copy() {
|
||||||
|
return new HarbingerOfTheSeas(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Very similar to Magus of the Moon
|
||||||
|
class HarbingerOfTheSeasEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
HarbingerOfTheSeasEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||||
|
this.staticText = "Nonbasic lands are Islands";
|
||||||
|
dependencyTypes.add(DependencyType.BecomeIsland);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HarbingerOfTheSeasEffect(final HarbingerOfTheSeasEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarbingerOfTheSeasEffect copy() {
|
||||||
|
return new HarbingerOfTheSeasEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||||
|
for (Permanent land : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||||
|
switch (layer) {
|
||||||
|
case TypeChangingEffects_4:
|
||||||
|
// 305.7 Note that this doesn't remove any abilities that were granted to the land by other effects
|
||||||
|
// So the ability removing has to be done before Layer 6
|
||||||
|
land.removeAllAbilities(source.getSourceId(), game);
|
||||||
|
land.removeAllSubTypes(game, SubTypeSet.NonBasicLandType);
|
||||||
|
land.addSubType(game, SubType.ISLAND);
|
||||||
|
// Islands have the blue mana ability intrinsically so the ability must be added in this layer
|
||||||
|
land.addAbility(new BlueManaAbility(), source.getSourceId(), game);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasLayer(Layer layer) {
|
||||||
|
return layer == Layer.TypeChangingEffects_4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -20,12 +20,6 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class MagusOfTheMoon extends CardImpl {
|
public final class MagusOfTheMoon extends CardImpl {
|
||||||
|
|
||||||
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
|
||||||
|
|
||||||
static {
|
|
||||||
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public MagusOfTheMoon(UUID ownerId, CardSetInfo setInfo) {
|
public MagusOfTheMoon(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||||
this.subtype.add(SubType.HUMAN);
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
|
@ -35,7 +29,7 @@ public final class MagusOfTheMoon extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// Nonbasic lands are Mountains.
|
// Nonbasic lands are Mountains.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MagusOfTheMoonEffect()));
|
this.addAbility(new SimpleStaticAbility(new MagusOfTheMoonEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private MagusOfTheMoon(final MagusOfTheMoon card) {
|
private MagusOfTheMoon(final MagusOfTheMoon card) {
|
||||||
|
|
@ -47,7 +41,15 @@ public final class MagusOfTheMoon extends CardImpl {
|
||||||
return new MagusOfTheMoon(this);
|
return new MagusOfTheMoon(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
static class MagusOfTheMoonEffect extends ContinuousEffectImpl {
|
}
|
||||||
|
|
||||||
|
class MagusOfTheMoonEffect extends ContinuousEffectImpl {
|
||||||
|
|
||||||
|
private static final FilterLandPermanent filter = new FilterLandPermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
MagusOfTheMoonEffect() {
|
MagusOfTheMoonEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||||
|
|
@ -92,5 +94,3 @@ public final class MagusOfTheMoon extends CardImpl {
|
||||||
return layer == Layer.TypeChangingEffects_4;
|
return layer == Layer.TypeChangingEffects_4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ public final class ModernHorizons3 extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Grist, Voracious Larva", 251, Rarity.MYTHIC, mage.cards.g.GristVoraciousLarva.class));
|
cards.add(new SetCardInfo("Grist, Voracious Larva", 251, Rarity.MYTHIC, mage.cards.g.GristVoraciousLarva.class));
|
||||||
cards.add(new SetCardInfo("Grist, the Plague Swarm", 251, Rarity.MYTHIC, mage.cards.g.GristThePlagueSwarm.class));
|
cards.add(new SetCardInfo("Grist, the Plague Swarm", 251, Rarity.MYTHIC, mage.cards.g.GristThePlagueSwarm.class));
|
||||||
cards.add(new SetCardInfo("Guide of Souls", 29, Rarity.RARE, mage.cards.g.GuideOfSouls.class));
|
cards.add(new SetCardInfo("Guide of Souls", 29, Rarity.RARE, mage.cards.g.GuideOfSouls.class));
|
||||||
|
cards.add(new SetCardInfo("Harbinger of the Seas", 63, Rarity.RARE, mage.cards.h.HarbingerOfTheSeas.class));
|
||||||
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
|
||||||
cards.add(new SetCardInfo("It That Heralds the End", 9, Rarity.UNCOMMON, mage.cards.i.ItThatHeraldsTheEnd.class));
|
cards.add(new SetCardInfo("It That Heralds the End", 9, Rarity.UNCOMMON, mage.cards.i.ItThatHeraldsTheEnd.class));
|
||||||
cards.add(new SetCardInfo("Jet Medallion", 292, Rarity.RARE, mage.cards.j.JetMedallion.class));
|
cards.add(new SetCardInfo("Jet Medallion", 292, Rarity.RARE, mage.cards.j.JetMedallion.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue