mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[TDM] Implement Glacial Dragonhunt
This commit is contained in:
parent
b7c60c6401
commit
33c6a412ec
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/g/GlacialDragonhunt.java
Normal file
77
Mage.Sets/src/mage/cards/g/GlacialDragonhunt.java
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.HarmonizeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GlacialDragonhunt extends CardImpl {
|
||||
|
||||
public GlacialDragonhunt(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}{R}");
|
||||
|
||||
// Draw a card, then you may discard a card. When you discard a nonland card this way, Glacial Dragonhunt deals 3 damage to target creature.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
|
||||
this.getSpellAbility().addEffect(new GlacialDragonhuntEffect());
|
||||
|
||||
// Harmonize {4}{U}{R}
|
||||
this.addAbility(new HarmonizeAbility(this, "{4}{U}{R}"));
|
||||
}
|
||||
|
||||
private GlacialDragonhunt(final GlacialDragonhunt card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlacialDragonhunt copy() {
|
||||
return new GlacialDragonhunt(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GlacialDragonhuntEffect extends OneShotEffect {
|
||||
|
||||
GlacialDragonhuntEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = ", then you may discard a card. When you discard a nonland card this way, " +
|
||||
"{this} deals 3 damage to target creature";
|
||||
}
|
||||
|
||||
private GlacialDragonhuntEffect(final GlacialDragonhuntEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlacialDragonhuntEffect copy() {
|
||||
return new GlacialDragonhuntEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || player.getHand().isEmpty()
|
||||
|| player
|
||||
.discard(0, 1, true, source, game)
|
||||
.count(StaticFilters.FILTER_CARD_NON_LAND, game) < 1) {
|
||||
return false;
|
||||
}
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new DamageTargetEffect(3), false);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -69,6 +69,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fortress Kin-Guard", 12, Rarity.COMMON, mage.cards.f.FortressKinGuard.class));
|
||||
cards.add(new SetCardInfo("Fresh Start", 46, Rarity.UNCOMMON, mage.cards.f.FreshStart.class));
|
||||
cards.add(new SetCardInfo("Frontier Bivouac", 256, Rarity.UNCOMMON, mage.cards.f.FrontierBivouac.class));
|
||||
cards.add(new SetCardInfo("Glacial Dragonhunt", 188, Rarity.UNCOMMON, mage.cards.g.GlacialDragonhunt.class));
|
||||
cards.add(new SetCardInfo("Heritage Reclamation", 145, Rarity.COMMON, mage.cards.h.HeritageReclamation.class));
|
||||
cards.add(new SetCardInfo("Inevitable Defeat", 194, Rarity.RARE, mage.cards.i.InevitableDefeat.class));
|
||||
cards.add(new SetCardInfo("Island", 279, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue