diff --git a/Mage.Sets/src/mage/cards/z/ZoeticGlyph.java b/Mage.Sets/src/mage/cards/z/ZoeticGlyph.java new file mode 100644 index 00000000000..91fe42927bb --- /dev/null +++ b/Mage.Sets/src/mage/cards/z/ZoeticGlyph.java @@ -0,0 +1,57 @@ +package mage.cards.z; + +import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureAttachedEffect; +import mage.abilities.effects.keyword.DiscoverEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.permanent.token.custom.CreatureToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetArtifactPermanent; + +import java.util.UUID; + +/** + * @author xenohedron + */ +public final class ZoeticGlyph extends CardImpl { + + public ZoeticGlyph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + + this.subtype.add(SubType.AURA); + + // Enchant artifact + TargetPermanent auraTarget = new TargetArtifactPermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget)); + + // Enchanted artifact is a Golem creature with base power and toughness 5/4 in addition to its other types. + this.addAbility(new SimpleStaticAbility(new BecomesCreatureAttachedEffect( + new CreatureToken(5, 4).withSubType(SubType.GOLEM), + "Enchanted artifact is a Golem creature with base power and toughness 5/4 in addition to its other types", + Duration.WhileOnBattlefield) + )); + + // When Zoetic Glyph is put into a graveyard from the battlefield, discover 3. + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DiscoverEffect(3, false))); + + } + + private ZoeticGlyph(final ZoeticGlyph card) { + super(card); + } + + @Override + public ZoeticGlyph copy() { + return new ZoeticGlyph(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java index 9cc242a08cd..c5759c3ec72 100644 --- a/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java +++ b/Mage.Sets/src/mage/sets/TheLostCavernsOfIxalan.java @@ -191,5 +191,6 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet { cards.add(new SetCardInfo("Waterlogged Hulk", 83, Rarity.UNCOMMON, mage.cards.w.WaterloggedHulk.class)); cards.add(new SetCardInfo("Watertight Gondola", 83, Rarity.UNCOMMON, mage.cards.w.WatertightGondola.class)); cards.add(new SetCardInfo("Waterwind Scout", 84, Rarity.COMMON, mage.cards.w.WaterwindScout.class)); + cards.add(new SetCardInfo("Zoetic Glyph", 86, Rarity.UNCOMMON, mage.cards.z.ZoeticGlyph.class)); } } diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/DiscoverEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/DiscoverEffect.java index 1eb0a7e272b..446b07d8ce7 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/DiscoverEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/DiscoverEffect.java @@ -24,12 +24,17 @@ public class DiscoverEffect extends OneShotEffect { private final int amount; public DiscoverEffect(int amount) { + this(amount, true); + } + + public DiscoverEffect(int amount, boolean withReminderText) { super(Outcome.Benefit); this.amount = amount; - staticText = "discover " + amount + ". (Exile cards from the top of your library " + + staticText = "discover " + amount + + (withReminderText ? ". (Exile cards from the top of your library " + "until you exile a nonland card with mana value " + amount + " or less. " + "Cast it without paying its mana cost or put it into your hand. " + - "Put the rest on the bottom in a random order.)"; + "Put the rest on the bottom in a random order.)" : ""); } private DiscoverEffect(final DiscoverEffect effect) { @@ -86,4 +91,4 @@ public class DiscoverEffect extends OneShotEffect { game.fireEvent(new DiscoverEvent(source, player.getId(), amount)); return card; } -} \ No newline at end of file +}