mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Reaper of Night
This commit is contained in:
parent
cac106dacc
commit
fae1802ef6
2 changed files with 67 additions and 0 deletions
66
Mage.Sets/src/mage/cards/r/ReaperOfNight.java
Normal file
66
Mage.Sets/src/mage/cards/r/ReaperOfNight.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ReaperOfNight extends AdventureCard {
|
||||
|
||||
public ReaperOfNight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{5}{B}{B}", "Harvest Fear", "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.SPECTER);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Whenever Reaper of Night attacks, if defending player has two or fewer cards in hand, it gains flying until end of turn.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new AttacksTriggeredAbility(new GainAbilitySourceEffect(
|
||||
FlyingAbility.getInstance(), Duration.EndOfTurn
|
||||
), false), ReaperOfNightCondition.instance, "Whenever {this} attacks, " +
|
||||
"if defending player has two or fewer cards in hand, it gains flying until end of turn."
|
||||
));
|
||||
|
||||
// Harvest Fear
|
||||
// Target opponent discards two cards.
|
||||
this.getAdventureSpellAbility().addEffect(new DiscardTargetEffect(2));
|
||||
this.getAdventureSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
private ReaperOfNight(final ReaperOfNight card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReaperOfNight copy() {
|
||||
return new ReaperOfNight(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum ReaperOfNightCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(game.getCombat().getDefendingPlayerId(source.getSourceId(), game));
|
||||
return player != null && player.getHand().size() <= 2;
|
||||
}
|
||||
}
|
|
@ -213,6 +213,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rampart Smasher", 213, Rarity.UNCOMMON, mage.cards.r.RampartSmasher.class));
|
||||
cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class));
|
||||
cards.add(new SetCardInfo("Realm-Cloaked Giant", 26, Rarity.MYTHIC, mage.cards.r.RealmCloakedGiant.class));
|
||||
cards.add(new SetCardInfo("Reaper of Night", 102, Rarity.COMMON, mage.cards.r.ReaperOfNight.class));
|
||||
cards.add(new SetCardInfo("Reave Soul", 103, Rarity.COMMON, mage.cards.r.ReaveSoul.class));
|
||||
cards.add(new SetCardInfo("Redcap Melee", 135, Rarity.UNCOMMON, mage.cards.r.RedcapMelee.class));
|
||||
cards.add(new SetCardInfo("Redcap Raiders", 136, Rarity.COMMON, mage.cards.r.RedcapRaiders.class));
|
||||
|
|
Loading…
Reference in a new issue