[VOW] Implemented Dorothea, Vengeful Victim / Dorothea's Retribution

This commit is contained in:
Evan Kranzler 2021-11-07 18:59:23 -05:00
parent e633c309f2
commit 1938e9657d
3 changed files with 153 additions and 0 deletions

View file

@ -0,0 +1,53 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DorotheaVengefulVictim extends CardImpl {
public DorotheaVengefulVictim(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
this.secondSideCardClazz = mage.cards.d.DorotheasRetribution.class;
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Dorothea, Vengeful Victim attacks or blocks, sacrifice it at end of combat.
this.addAbility(new AttacksOrBlocksTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
new AtTheEndOfCombatDelayedTriggeredAbility(new SacrificeSourceEffect())
), false));
// Disturb {1}{W}{U}
this.addAbility(new DisturbAbility(new ManaCostsImpl<>("{1}{W}{U}")));
}
private DorotheaVengefulVictim(final DorotheaVengefulVictim card) {
super(card);
}
@Override
public DorotheaVengefulVictim copy() {
return new DorotheaVengefulVictim(this);
}
}

View file

@ -0,0 +1,98 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.PutIntoGraveFromAnywhereSourceAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ExileSourceEffect;
import mage.abilities.effects.common.SacrificeTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.AngelToken;
import mage.game.permanent.token.Token;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetpointer.FixedTargets;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DorotheasRetribution extends CardImpl {
public DorotheasRetribution(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "");
this.subtype.add(SubType.AURA);
this.color.setWhite(true);
this.color.setBlue(true);
this.nightCard = true;
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// Enchanted creature has "Whenever this creature attacks, create a 4/4 white Spirit creature token with flying that's tapped and attacking. Sacrifice that token at end of combat."
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
new AttacksTriggeredAbility(new DorotheasRetributionEffect())
.setTriggerPhrase("Whenever this creature attacks, "),
AttachmentType.AURA
)));
// If Dorothea's Retribution would be put into a graveyard from anywhere, exile it instead.
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));
}
private DorotheasRetribution(final DorotheasRetribution card) {
super(card);
}
@Override
public DorotheasRetribution copy() {
return new DorotheasRetribution(this);
}
}
class DorotheasRetributionEffect extends OneShotEffect {
DorotheasRetributionEffect() {
super(Outcome.Benefit);
staticText = "create a 4/4 white Spirit creature token with flying " +
"that's tapped and attacking. Sacrifice that token at end of combat";
}
private DorotheasRetributionEffect(final DorotheasRetributionEffect effect) {
super(effect);
}
@Override
public DorotheasRetributionEffect copy() {
return new DorotheasRetributionEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Token token = new AngelToken();
token.putOntoBattlefield(1, game, source, source.getControllerId(), true, true);
game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(
new SacrificeTargetEffect()
.setTargetPointer(new FixedTargets(token, game))
.setText("sacrifce that token")
), source);
return true;
}
}

View file

@ -106,6 +106,8 @@ public final class InnistradCrimsonVow extends ExpansionSet {
cards.add(new SetCardInfo("Dominating Vampire", 154, Rarity.RARE, mage.cards.d.DominatingVampire.class));
cards.add(new SetCardInfo("Doomed Dissenter", 106, Rarity.COMMON, mage.cards.d.DoomedDissenter.class));
cards.add(new SetCardInfo("Dormant Grove", 198, Rarity.UNCOMMON, mage.cards.d.DormantGrove.class));
cards.add(new SetCardInfo("Dorothea's Retribution", 235, Rarity.RARE, mage.cards.d.DorotheasRetribution.class));
cards.add(new SetCardInfo("Dorothea, Vengeful Victim", 235, Rarity.RARE, mage.cards.d.DorotheaVengefulVictim.class));
cards.add(new SetCardInfo("Dread Fugue", 107, Rarity.UNCOMMON, mage.cards.d.DreadFugue.class));
cards.add(new SetCardInfo("Dreadfeast Demon", 108, Rarity.RARE, mage.cards.d.DreadfeastDemon.class));
cards.add(new SetCardInfo("Dreadlight Monstrosity", 57, Rarity.COMMON, mage.cards.d.DreadlightMonstrosity.class));