mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[KHM] Implemented Graven Lore
This commit is contained in:
parent
80412ffd6e
commit
241ef4c6eb
4 changed files with 73 additions and 5 deletions
68
Mage.Sets/src/mage/cards/g/GravenLore.java
Normal file
68
Mage.Sets/src/mage/cards/g/GravenLore.java
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
package mage.cards.g;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class GravenLore extends CardImpl {
|
||||||
|
|
||||||
|
public GravenLore(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.SNOW);
|
||||||
|
|
||||||
|
// Scry X, where is the amount of {S} spent to cast this spell, then draw three cards.
|
||||||
|
this.getSpellAbility().addEffect(new GravenLoreEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
private GravenLore(final GravenLore card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GravenLore copy() {
|
||||||
|
return new GravenLore(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GravenLoreEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
GravenLoreEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "scry X, where is the amount of {S} spent to cast this spell, then draw three cards";
|
||||||
|
}
|
||||||
|
|
||||||
|
private GravenLoreEffect(final GravenLoreEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GravenLoreEffect copy() {
|
||||||
|
return new GravenLoreEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow();
|
||||||
|
if (snow > 0) {
|
||||||
|
player.scry(snow, source, game);
|
||||||
|
}
|
||||||
|
player.drawCards(3, source, game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,7 +13,6 @@ import mage.filter.FilterCard;
|
||||||
import mage.filter.predicate.Predicate;
|
import mage.filter.predicate.Predicate;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.common.TargetCardInLibrary;
|
import mage.target.common.TargetCardInLibrary;
|
||||||
import mage.watchers.common.ManaSpentToCastWatcher;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ public final class SearchForGlory extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new GainLifeEffect(
|
this.getSpellAbility().addEffect(new GainLifeEffect(
|
||||||
SnowManaSpentValue.instance
|
SnowManaSpentValue.instance
|
||||||
).setText("You gain 1 life for each {S} spent to cast this spell"));
|
).setText("You gain 1 life for each {S} spent to cast this spell"));
|
||||||
this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private SearchForGlory(final SearchForGlory card) {
|
private SearchForGlory(final SearchForGlory card) {
|
||||||
|
|
|
@ -65,9 +65,10 @@ class TundraFumaroleEffect extends OneShotEffect {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
player.getManaPool().addMana(new Mana(
|
int snow = source.getManaCostsToPay().getUsedManaToPay().getSnow();
|
||||||
ManaType.COLORLESS, source.getManaCostsToPay().getUsedManaToPay().getSnow()
|
if (snow > 0) {
|
||||||
), game, source, true);
|
player.getManaPool().addMana(new Mana(ManaType.COLORLESS, snow), game, source, true);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,6 +182,7 @@ public final class Kaldheim extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Goldmaw Champion", 14, Rarity.COMMON, mage.cards.g.GoldmawChampion.class));
|
cards.add(new SetCardInfo("Goldmaw Champion", 14, Rarity.COMMON, mage.cards.g.GoldmawChampion.class));
|
||||||
cards.add(new SetCardInfo("Goldspan Dragon", 139, Rarity.MYTHIC, mage.cards.g.GoldspanDragon.class));
|
cards.add(new SetCardInfo("Goldspan Dragon", 139, Rarity.MYTHIC, mage.cards.g.GoldspanDragon.class));
|
||||||
cards.add(new SetCardInfo("Goldvein Pick", 239, Rarity.COMMON, mage.cards.g.GoldveinPick.class));
|
cards.add(new SetCardInfo("Goldvein Pick", 239, Rarity.COMMON, mage.cards.g.GoldveinPick.class));
|
||||||
|
cards.add(new SetCardInfo("Graven Lore", 61, Rarity.RARE, mage.cards.g.GravenLore.class));
|
||||||
cards.add(new SetCardInfo("Great Hall of Starnheim", 259, Rarity.UNCOMMON, mage.cards.g.GreatHallOfStarnheim.class));
|
cards.add(new SetCardInfo("Great Hall of Starnheim", 259, Rarity.UNCOMMON, mage.cards.g.GreatHallOfStarnheim.class));
|
||||||
cards.add(new SetCardInfo("Grim Draugr", 96, Rarity.COMMON, mage.cards.g.GrimDraugr.class));
|
cards.add(new SetCardInfo("Grim Draugr", 96, Rarity.COMMON, mage.cards.g.GrimDraugr.class));
|
||||||
cards.add(new SetCardInfo("Grizzled Outrider", 173, Rarity.COMMON, mage.cards.g.GrizzledOutrider.class));
|
cards.add(new SetCardInfo("Grizzled Outrider", 173, Rarity.COMMON, mage.cards.g.GrizzledOutrider.class));
|
||||||
|
|
Loading…
Reference in a new issue