mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
implement [MH3] Monstrous Vortex (#12326)
This commit is contained in:
parent
b765fe165b
commit
1c8725c0e5
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/m/MonstrousVortex.java
Normal file
76
Mage.Sets/src/mage/cards/m/MonstrousVortex.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.keyword.DiscoverEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author grimreap124
|
||||
*/
|
||||
public final class MonstrousVortex extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("a creature spell with power 5 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new PowerPredicate(ComparisonType.OR_GREATER, 5));
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
}
|
||||
|
||||
public MonstrousVortex(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] { CardType.ENCHANTMENT }, "{3}{G}");
|
||||
|
||||
// Whenever you cast a creature spell with power 5 or greater, discover X, where X is that spell's mana value.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new MonstrousVortexEffect(), filter, false,
|
||||
SetTargetPointer.SPELL));
|
||||
}
|
||||
|
||||
private MonstrousVortex(final MonstrousVortex card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MonstrousVortex copy() {
|
||||
return new MonstrousVortex(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MonstrousVortexEffect extends OneShotEffect {
|
||||
|
||||
MonstrousVortexEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "discover X, where X is that spell's mana value";
|
||||
}
|
||||
|
||||
private MonstrousVortexEffect(final MonstrousVortexEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MonstrousVortexEffect copy() {
|
||||
return new MonstrousVortexEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||
if (spell != null) {
|
||||
new DiscoverEffect(spell.getManaValue()).apply(game, source);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -128,6 +128,7 @@ public final class ModernHorizons3 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Meteoric Mace", 283, Rarity.UNCOMMON, mage.cards.m.MeteoricMace.class));
|
||||
cards.add(new SetCardInfo("Mindless Conscription", 101, Rarity.UNCOMMON, mage.cards.m.MindlessConscription.class));
|
||||
cards.add(new SetCardInfo("Mogg Mob", 127, Rarity.UNCOMMON, mage.cards.m.MoggMob.class));
|
||||
cards.add(new SetCardInfo("Monstrous Vortex", 162, Rarity.UNCOMMON, mage.cards.m.MonstrousVortex.class));
|
||||
cards.add(new SetCardInfo("Mountain", 307, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Nadier's Nightblade", 275, Rarity.COMMON, mage.cards.n.NadiersNightblade.class));
|
||||
cards.add(new SetCardInfo("Nadu, Winged Wisdom", 193, Rarity.RARE, mage.cards.n.NaduWingedWisdom.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue