mirror of
https://github.com/correl/mage.git
synced 2025-02-18 03:00:15 +00:00
Implemented Calculating Lich
This commit is contained in:
parent
6f600c0a50
commit
35ebebd0f4
4 changed files with 88 additions and 2 deletions
85
Mage.Sets/src/mage/cards/c/CalculatingLich.java
Normal file
85
Mage.Sets/src/mage/cards/c/CalculatingLich.java
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,7 +33,7 @@ public final class FiendishDuo extends CardImpl {
|
||||||
// First strike
|
// First strike
|
||||||
this.addAbility(FirstStrikeAbility.getInstance());
|
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()));
|
this.addAbility(new SimpleStaticAbility(new FiendishDuoEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ public final class GameNight2019 extends ExpansionSet {
|
||||||
super("Game Night 2019", "GN2", ExpansionSet.buildDate(2019, 11, 15), SetType.SUPPLEMENTAL);
|
super("Game Night 2019", "GN2", ExpansionSet.buildDate(2019, 11, 15), SetType.SUPPLEMENTAL);
|
||||||
this.hasBasicLands = false; // TODO: change when spoiled
|
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("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("Fiendish Duo", 4, Rarity.MYTHIC, mage.cards.f.FiendishDuo.class));
|
||||||
cards.add(new SetCardInfo("Highcliff Felidar", 1, Rarity.MYTHIC, mage.cards.h.HighcliffFelidar.class));
|
cards.add(new SetCardInfo("Highcliff Felidar", 1, Rarity.MYTHIC, mage.cards.h.HighcliffFelidar.class));
|
||||||
|
|
|
@ -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.|
|
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.|
|
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.|
|
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.|
|
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.|
|
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.|
|
||||||
|
|
Loading…
Reference in a new issue