mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
[AFR] Implemented Iymrith, Desert Doom
This commit is contained in:
parent
e99158cadd
commit
e5cf8d2051
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/i/IymrithDesertDoom.java
Normal file
91
Mage.Sets/src/mage/cards/i/IymrithDesertDoom.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.SourceTappedCondition;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class IymrithDesertDoom extends CardImpl {
|
||||
|
||||
public IymrithDesertDoom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Iymrith, Desert Doom has ward {4} as long as it's untapped.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(new WardAbility(new GenericManaCost(4)), Duration.WhileOnBattlefield),
|
||||
new InvertCondition(SourceTappedCondition.instance),
|
||||
"{this} has ward {4} as long as it's untapped"
|
||||
)));
|
||||
|
||||
// Whenever Iymrith deals combat damage to a player, draw a card. Then if you have fewer than three cards in hand, draw cards equal to the difference.
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new DrawCardSourceControllerEffect(1), false);
|
||||
ability.addEffect(new IymrithDesertDoomEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private IymrithDesertDoom(final IymrithDesertDoom card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IymrithDesertDoom copy() {
|
||||
return new IymrithDesertDoom(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IymrithDesertDoomEffect extends OneShotEffect {
|
||||
|
||||
public IymrithDesertDoomEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Then if you have fewer than three cards in hand, draw cards equal to the difference";
|
||||
}
|
||||
|
||||
private IymrithDesertDoomEffect(final IymrithDesertDoomEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IymrithDesertDoomEffect copy() {
|
||||
return new IymrithDesertDoomEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int handSize = controller.getHand().size();
|
||||
if (handSize < 3) {
|
||||
controller.drawCards(3 - handSize, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -99,6 +99,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Inspiring Bard", 189, Rarity.COMMON, mage.cards.i.InspiringBard.class));
|
||||
cards.add(new SetCardInfo("Intrepid Outlander", 191, Rarity.UNCOMMON, mage.cards.i.IntrepidOutlander.class));
|
||||
cards.add(new SetCardInfo("Island", 266, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Iymrith, Desert Doom", 62, Rarity.MYTHIC, mage.cards.i.IymrithDesertDoom.class));
|
||||
cards.add(new SetCardInfo("Lightfoot Rogue", 111, Rarity.UNCOMMON, mage.cards.l.LightfootRogue.class));
|
||||
cards.add(new SetCardInfo("Lolth, Spider Queen", 112, Rarity.MYTHIC, mage.cards.l.LolthSpiderQueen.class));
|
||||
cards.add(new SetCardInfo("Manticore", 113, Rarity.COMMON, mage.cards.m.Manticore.class));
|
||||
|
|
Loading…
Reference in a new issue