mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[MH2] Implemented Discerning Taste (#7852)
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
af87260262
commit
6c293187a6
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/d/DiscerningTaste.java
Normal file
76
Mage.Sets/src/mage/cards/d/DiscerningTaste.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class DiscerningTaste extends CardImpl {
|
||||
|
||||
public DiscerningTaste(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
|
||||
|
||||
// Look at the top four cards of your library. Put one of them into your hand and the rest into your graveyard. You gain life equal to the greatest power among creature cards put into your graveyard this way.
|
||||
this.getSpellAbility().addEffect(new DiscerningTasteEffect());
|
||||
}
|
||||
|
||||
private DiscerningTaste(final DiscerningTaste card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscerningTaste copy() {
|
||||
return new DiscerningTaste(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DiscerningTasteEffect extends LookLibraryAndPickControllerEffect {
|
||||
|
||||
public DiscerningTasteEffect() {
|
||||
super(StaticValue.get(4), false, StaticValue.get(1), StaticFilters.FILTER_CARD, Zone.GRAVEYARD,
|
||||
false, false, false, Zone.HAND, false, false, false
|
||||
);
|
||||
}
|
||||
|
||||
private DiscerningTasteEffect(final DiscerningTasteEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscerningTasteEffect copy() {
|
||||
return new DiscerningTasteEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void putCardsBack(Ability source, Player player, Cards cards, Game game) {
|
||||
int life = 0;
|
||||
for (Card card : cards.getCards(StaticFilters.FILTER_CARD_CREATURE, game)) {
|
||||
int power = card.getPower().getValue();
|
||||
if (power > life) {
|
||||
life = power;
|
||||
}
|
||||
}
|
||||
player.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
player.gainLife(life, game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return super.getText(mode).concat(". You gain life equal to the greatest power among creature cards put into your graveyard this way");
|
||||
}
|
||||
}
|
|
@ -48,6 +48,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dakkon, Shadow Slayer", 192, Rarity.MYTHIC, mage.cards.d.DakkonShadowSlayer.class));
|
||||
cards.add(new SetCardInfo("Darkmoss Bridge", 245, Rarity.COMMON, mage.cards.d.DarkmossBridge.class));
|
||||
cards.add(new SetCardInfo("Diamond Lion", 225, Rarity.RARE, mage.cards.d.DiamondLion.class));
|
||||
cards.add(new SetCardInfo("Discerning Taste", 82, Rarity.COMMON, mage.cards.d.DiscerningTaste.class));
|
||||
cards.add(new SetCardInfo("Dragon's Rage Channeler", 121, Rarity.UNCOMMON, mage.cards.d.DragonsRageChanneler.class));
|
||||
cards.add(new SetCardInfo("Drey Keeper", 194, Rarity.COMMON, mage.cards.d.DreyKeeper.class));
|
||||
cards.add(new SetCardInfo("Drossforge Bridge", 246, Rarity.COMMON, mage.cards.d.DrossforgeBridge.class));
|
||||
|
|
Loading…
Reference in a new issue