[VOW] Implemented Into the Night

This commit is contained in:
Evan Kranzler 2021-11-05 20:03:59 -04:00
parent ecfe08cee0
commit ccccc0b384
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,64 @@
package mage.cards.i;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class IntoTheNight extends CardImpl {
public IntoTheNight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
// It becomes night. Discard any number of cards, then draw that many cards plus one.
this.getSpellAbility().addEffect(new IntoTheNightEffect());
}
private IntoTheNight(final IntoTheNight card) {
super(card);
}
@Override
public IntoTheNight copy() {
return new IntoTheNight(this);
}
}
class IntoTheNightEffect extends OneShotEffect {
IntoTheNightEffect() {
super(Outcome.Benefit);
staticText = "it becomes night. Discard any number of cards, then draw that many cards plus one";
}
private IntoTheNightEffect(final IntoTheNightEffect effect) {
super(effect);
}
@Override
public IntoTheNightEffect copy() {
return new IntoTheNightEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
game.setDaytime(false);
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
player.drawCards(player.discard(
0, Integer.MAX_VALUE, false, source, game
).size() + 1, source, game);
return true;
}
}

View file

@ -134,6 +134,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Infestation Expert", 206, Rarity.UNCOMMON, mage.cards.i.InfestationExpert.class));
cards.add(new SetCardInfo("Infested Werewolf", 206, Rarity.UNCOMMON, mage.cards.i.InfestedWerewolf.class));
cards.add(new SetCardInfo("Inspired Idea", 64, Rarity.RARE, mage.cards.i.InspiredIdea.class));
cards.add(new SetCardInfo("Into the Night", 163, Rarity.UNCOMMON, mage.cards.i.IntoTheNight.class));
cards.add(new SetCardInfo("Investigator's Journal", 258, Rarity.RARE, mage.cards.i.InvestigatorsJournal.class));
cards.add(new SetCardInfo("Island", 399, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Kessig Flamebreather", 164, Rarity.COMMON, mage.cards.k.KessigFlamebreather.class));