[KHM] Implemented Inga Rune-Eyes (#7349)

This commit is contained in:
Daniel Bomar 2021-01-08 21:44:29 -06:00 committed by GitHub
parent a38e78362a
commit e445b6c6f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.i;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalOneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.Game;
import mage.watchers.common.CreaturesDiedWatcher;
/**
*
* @author weirddan455
*/
public final class IngaRuneEyes extends CardImpl {
public IngaRuneEyes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// When Inga Rune-Eyes enters the battlefield, scry 3.
this.addAbility(new EntersBattlefieldTriggeredAbility(new ScryEffect(3)));
// When Inga Rune-Eyes dies, draw three cards if three or more creatures died this turn.
this.addAbility(new DiesSourceTriggeredAbility(new ConditionalOneShotEffect(
new DrawCardSourceControllerEffect(3), IngaRuneEyesCondition.instance
).setText("draw three cards if three or more creatures died this turn")), new CreaturesDiedWatcher());
}
private IngaRuneEyes(final IngaRuneEyes card) {
super(card);
}
@Override
public IngaRuneEyes copy() {
return new IngaRuneEyes(this);
}
}
enum IngaRuneEyesCondition implements Condition {
instance;
@Override
public boolean apply (Game game, Ability source) {
CreaturesDiedWatcher watcher = game.getState().getWatcher(CreaturesDiedWatcher.class);
if (watcher != null) {
return watcher.getAmountOfCreaturesDiedThisTurn() > 2;
}
return false;
}
}

View file

@ -66,6 +66,7 @@ public final class Kaldheim extends ExpansionSet {
cards.add(new SetCardInfo("Hengegate Pathway", 260, Rarity.RARE, mage.cards.h.HengegatePathway.class));
cards.add(new SetCardInfo("Highland Forest", 261, Rarity.COMMON, mage.cards.h.HighlandForest.class));
cards.add(new SetCardInfo("Ice Tunnel", 262, Rarity.COMMON, mage.cards.i.IceTunnel.class));
cards.add(new SetCardInfo("Inga Rune-Eyes", 64, Rarity.UNCOMMON, mage.cards.i.IngaRuneEyes.class));
cards.add(new SetCardInfo("Invasion of the Giants", 215, Rarity.UNCOMMON, mage.cards.i.InvasionOfTheGiants.class));
cards.add(new SetCardInfo("Kaya the Inexorable", 218, Rarity.MYTHIC, mage.cards.k.KayaTheInexorable.class));
cards.add(new SetCardInfo("Magda, Brazen Outlaw", 142, Rarity.RARE, mage.cards.m.MagdaBrazenOutlaw.class));