diff --git a/Mage.Sets/src/mage/cards/c/CalculatingLich.java b/Mage.Sets/src/mage/cards/c/CalculatingLich.java new file mode 100644 index 0000000000..d003b57b95 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CalculatingLich.java @@ -0,0 +1,85 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.LoseLifeTargetEffect; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CalculatingLich extends CardImpl { + + public CalculatingLich(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}"); + + this.subtype.add(SubType.ZOMBIE); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever a creature attacks one of your opponents, that player loses 1 life. + this.addAbility(new CalculatingLichTriggeredAbility()); + } + + private CalculatingLich(final CalculatingLich card) { + super(card); + } + + @Override + public CalculatingLich copy() { + return new CalculatingLich(this); + } +} + +class CalculatingLichTriggeredAbility extends TriggeredAbilityImpl { + + CalculatingLichTriggeredAbility() { + super(Zone.BATTLEFIELD, null, false); + } + + private CalculatingLichTriggeredAbility(final CalculatingLichTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Player player = game.getPlayer(getControllerId()); + UUID defenderId = game.getCombat().getDefenderId(event.getSourceId()); + if (player == null || !player.hasOpponent(defenderId, game)) { + return false; + } + getEffects().clear(); + addEffect(new LoseLifeTargetEffect(1).setTargetPointer(new FixedTarget(defenderId, game))); + return true; + } + + @Override + public String getRule() { + return "Whenever a creature attacks one of your opponents, that player loses 1 life."; + } + + @Override + public CalculatingLichTriggeredAbility copy() { + return new CalculatingLichTriggeredAbility(this); + } +} diff --git a/Mage.Sets/src/mage/cards/f/FiendishDuo.java b/Mage.Sets/src/mage/cards/f/FiendishDuo.java index 41b7da9023..e8ae73d92e 100644 --- a/Mage.Sets/src/mage/cards/f/FiendishDuo.java +++ b/Mage.Sets/src/mage/cards/f/FiendishDuo.java @@ -33,7 +33,7 @@ public final class FiendishDuo extends CardImpl { // First strike this.addAbility(FirstStrikeAbility.getInstance()); - // If a source would deal damage to an opponent, it deals double that damage that player instead. + // If a source would deal damage to an opponent, it deals double that damage to that player instead. this.addAbility(new SimpleStaticAbility(new FiendishDuoEffect())); } diff --git a/Mage.Sets/src/mage/sets/GameNight2019.java b/Mage.Sets/src/mage/sets/GameNight2019.java index c9b0e4ef04..ece39af080 100644 --- a/Mage.Sets/src/mage/sets/GameNight2019.java +++ b/Mage.Sets/src/mage/sets/GameNight2019.java @@ -19,6 +19,7 @@ public final class GameNight2019 extends ExpansionSet { super("Game Night 2019", "GN2", ExpansionSet.buildDate(2019, 11, 15), SetType.SUPPLEMENTAL); this.hasBasicLands = false; // TODO: change when spoiled + cards.add(new SetCardInfo("Calculating Lich", 3, Rarity.MYTHIC, mage.cards.c.CalculatingLich.class)); cards.add(new SetCardInfo("Earthshaker Giant", 5, Rarity.MYTHIC, mage.cards.e.EarthshakerGiant.class)); cards.add(new SetCardInfo("Fiendish Duo", 4, Rarity.MYTHIC, mage.cards.f.FiendishDuo.class)); cards.add(new SetCardInfo("Highcliff Felidar", 1, Rarity.MYTHIC, mage.cards.h.HighcliffFelidar.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index c5a6c0505d..e96203d62f 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -36431,6 +36431,6 @@ Castle Vantress|Throne of Eldraine Collector's Edition|390|R||Land|||Castle Vant Fabled Passage|Throne of Eldraine Collector's Edition|391|R||Land|||{T}, Sacrifice Fabled Passage: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. Then if you control four or more lands, untap that land.| Highcliff Felidar|Game Night 2019|1|M|{5}{W}{W}|Creature - Cat Beast|5|5|Vigilance$When Highcliff Felidar enters the battlefield, for each opponent, choose a creature with the greatest power among creatures that player controls. Destroy those creatures.| Sphinx of Enlightenment|Game Night 2019|2|M|{4}{U}{U}|Creature - Sphinx|5|5|Flying$When Sphinx of Enlightenment enters the battlefield, target opponent draws a card and you draw three cards.| -Calculating Lich|Game Night 2019|3|M|{4}{B}{B}|Creature - Zombie Wizard|5|5|Menance$Whenever a creature attacks one of your opponents, that player loses 1 life.| +Calculating Lich|Game Night 2019|3|M|{4}{B}{B}|Creature - Zombie Wizard|5|5|Menace$Whenever a creature attacks one of your opponents, that player loses 1 life.| Fiendish Duo|Game Night 2019|4|M|{4}{R}{R}|Creature - Devil|5|5|First strike$If a source would deal damage to an opponent, it deals double that damage that player instead.| Earthshaker Giant|Game Night 2019|5|M|{4}{G}{G}|Creature - Giant Druid|6|6|Trample$When Earthshaker Giant enters the battlefield, other creatures you control get +3/+3 and gain trample until end of turn.|