[VOW] Implemented Sorin the Mirthless

This commit is contained in:
Daniel Bomar 2021-10-29 12:24:31 -05:00
parent 7da842a754
commit 096a2868a9
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 124 additions and 0 deletions

View file

@ -0,0 +1,89 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.cards.*;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.token.VampireLifelinkToken;
import mage.players.Player;
import mage.target.common.TargetAnyTarget;
/**
*
* @author weirddan455
*/
public final class SorinTheMirthless extends CardImpl {
public SorinTheMirthless(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{B}{B}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SORIN);
this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4));
// +1: Look at the top card of your library. You may reveal that card and put it into your hand. If you do, you lose life equal to its mana value.
this.addAbility(new LoyaltyAbility(new SorinTheMirthlessEffect(), 1));
// 2: Create a 2/3 black Vampire creature token with flying and lifelink.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new VampireLifelinkToken()), -2));
// 7: Sorin the Mirthless deals 13 damage to any target. You gain 13 life.
Ability ability = new LoyaltyAbility(new DamageTargetEffect(13), -7);
ability.addEffect(new GainLifeEffect(13));
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}
private SorinTheMirthless(final SorinTheMirthless card) {
super(card);
}
@Override
public SorinTheMirthless copy() {
return new SorinTheMirthless(this);
}
}
class SorinTheMirthlessEffect extends OneShotEffect {
public SorinTheMirthlessEffect() {
super(Outcome.DrawCard);
staticText = "Look at the top card of your library. You may reveal that card and put it into your hand. If you do, you lose life equal to its mana value";
}
private SorinTheMirthlessEffect(final SorinTheMirthlessEffect effect) {
super(effect);
}
@Override
public SorinTheMirthlessEffect copy() {
return new SorinTheMirthlessEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller == null) {
return false;
}
Card topCard = controller.getLibrary().getFromTop(game);
if (topCard != null) {
Cards cards = new CardsImpl(topCard);
controller.lookAtCards(source, null, cards, game);
if (controller.chooseUse(outcome, "Reveal " + topCard.getName() + " and put it into your hand?", source, game)) {
controller.revealCards(source, cards, game);
controller.moveCards(cards, Zone.HAND, source, game);
controller.loseLife(topCard.getManaValue(), game, source, false);
}
}
return true;
}
}

View file

@ -51,6 +51,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Rot-Tide Gargantua", 129, Rarity.COMMON, mage.cards.r.RotTideGargantua.class));
cards.add(new SetCardInfo("Shattered Sanctum", 264, Rarity.RARE, mage.cards.s.ShatteredSanctum.class));
cards.add(new SetCardInfo("Sorin the Mirthless", 131, Rarity.MYTHIC, mage.cards.s.SorinTheMirthless.class));
cards.add(new SetCardInfo("Stormcarved Coast", 265, Rarity.RARE, mage.cards.s.StormcarvedCoast.class));
cards.add(new SetCardInfo("Sundown Pass", 266, Rarity.RARE, mage.cards.s.SundownPass.class));
cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));

View file

@ -0,0 +1,34 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.LifelinkAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
*
* @author weirddan455
*/
public class VampireLifelinkToken extends TokenImpl {
public VampireLifelinkToken() {
super("Vampire", "2/3 black Vampire creature token with flying and lifelink");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.VAMPIRE);
power = new MageInt(2);
toughness = new MageInt(3);
addAbility(FlyingAbility.getInstance());
addAbility(LifelinkAbility.getInstance());
}
private VampireLifelinkToken(final VampireLifelinkToken token) {
super(token);
}
@Override
public VampireLifelinkToken copy() {
return new VampireLifelinkToken(this);
}
}