[VOW] Implemented Alluring Suitor / Deadly Dancer

This commit is contained in:
Evan Kranzler 2021-11-07 08:32:53 -05:00
parent 3801325a04
commit fc58a78eae
3 changed files with 170 additions and 0 deletions

View file

@ -0,0 +1,81 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.TransformAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class AlluringSuitor extends CardImpl {
public AlluringSuitor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
this.secondSideCardClazz = mage.cards.d.DeadlyDancer.class;
// When you attack with exactly two creatures, transform Alluring Suitor.
this.addAbility(new TransformAbility());
this.addAbility(new AlluringSuitorTriggeredAbility());
}
private AlluringSuitor(final AlluringSuitor card) {
super(card);
}
@Override
public AlluringSuitor copy() {
return new AlluringSuitor(this);
}
}
class AlluringSuitorTriggeredAbility extends TriggeredAbilityImpl {
AlluringSuitorTriggeredAbility() {
super(Zone.BATTLEFIELD, new TransformSourceEffect());
}
private AlluringSuitorTriggeredAbility(final AlluringSuitorTriggeredAbility ability) {
super(ability);
}
@Override
public AlluringSuitorTriggeredAbility copy() {
return new AlluringSuitorTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return isControlledBy(game.getCombat().getAttackingPlayerId())
&& game
.getCombat()
.getAttackers()
.stream()
.map(game::getPermanent)
.filter(permanent -> permanent.isCreature(game))
.count() == 2;
}
@Override
public String getRule() {
return "When you attack with exactly two creatures, transform {this}.";
}
}

View file

@ -0,0 +1,87 @@
package mage.cards.d;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.TransformIntoSourceTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DeadlyDancer extends CardImpl {
public DeadlyDancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
this.color.setRed(true);
this.nightCard = true;
// Trample
this.addAbility(TrampleAbility.getInstance());
// When this creature transforms into Deadly Dancer, add {R}{R}. Until end of turn, you don't lose this mana as steps and phases end.
this.addAbility(new TransformIntoSourceTriggeredAbility(new DeadlyDancerEffect()));
// {R}{R}: Deadly Dancer and another target creature each get +1/+0 until end of turn.
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(
1, 0, Duration.EndOfTurn
).setText("{this} and another target creature"), new ManaCostsImpl<>("{R}{R}"));
ability.addEffect(new BoostTargetEffect(1, 0).setText("each get +1/+0 until end of turn"));
this.addAbility(ability);
}
private DeadlyDancer(final DeadlyDancer card) {
super(card);
}
@Override
public DeadlyDancer copy() {
return new DeadlyDancer(this);
}
}
class DeadlyDancerEffect extends OneShotEffect {
DeadlyDancerEffect() {
super(Outcome.Benefit);
staticText = "add {R}{R}. Until end of turn, you don't lose this mana as steps and phases end";
}
private DeadlyDancerEffect(final DeadlyDancerEffect effect) {
super(effect);
}
@Override
public DeadlyDancerEffect copy() {
return new DeadlyDancerEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
player.getManaPool().addMana(Mana.RedMana(2), game, source, true);
return true;
}
}

View file

@ -35,6 +35,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Adamant Will", 1, Rarity.COMMON, mage.cards.a.AdamantWill.class));
cards.add(new SetCardInfo("Aim for the Head", 92, Rarity.COMMON, mage.cards.a.AimForTheHead.class));
cards.add(new SetCardInfo("Alchemist's Retrieval", 47, Rarity.COMMON, mage.cards.a.AlchemistsRetrieval.class));
cards.add(new SetCardInfo("Alluring Suitor", 141, Rarity.UNCOMMON, mage.cards.a.AlluringSuitor.class));
cards.add(new SetCardInfo("Ancestor's Embrace", 22, Rarity.COMMON, mage.cards.a.AncestorsEmbrace.class));
cards.add(new SetCardInfo("Ancient Lumberknot", 230, Rarity.UNCOMMON, mage.cards.a.AncientLumberknot.class));
cards.add(new SetCardInfo("Angelic Quartermaster", 2, Rarity.UNCOMMON, mage.cards.a.AngelicQuartermaster.class));
@ -87,6 +88,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Dawnhart Disciple", 196, Rarity.COMMON, mage.cards.d.DawnhartDisciple.class));
cards.add(new SetCardInfo("Dawnhart Geist", 8, Rarity.UNCOMMON, mage.cards.d.DawnhartGeist.class));
cards.add(new SetCardInfo("Daybreak Combatants", 153, Rarity.COMMON, mage.cards.d.DaybreakCombatants.class));
cards.add(new SetCardInfo("Deadly Dancer", 141, Rarity.UNCOMMON, mage.cards.d.DeadlyDancer.class));
cards.add(new SetCardInfo("Deathcap Glade", 261, Rarity.RARE, mage.cards.d.DeathcapGlade.class));
cards.add(new SetCardInfo("Demonic Bargain", 103, Rarity.RARE, mage.cards.d.DemonicBargain.class));
cards.add(new SetCardInfo("Depraved Harvester", 104, Rarity.COMMON, mage.cards.d.DepravedHarvester.class));