diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index a5fe3be7c12..e0abefff53d 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -2169,6 +2169,8 @@ public class ScryfallImageSupportTokens { // WHO put("WHO/Alien Insect", "https://api.scryfall.com/cards/twho/19/en?format=image"); + put("WHO/Human Noble", "https://api.scryfall.com/cards/twho/7/en?format=image"); + put("WHO/Horse", "https://api.scryfall.com/cards/twho/4/en?format=image"); // 8ED put("8ED/Rukh", "https://api.scryfall.com/cards/p03/7/en?format=image"); diff --git a/Mage.Sets/src/mage/cards/t/TheGirlInTheFireplace.java b/Mage.Sets/src/mage/cards/t/TheGirlInTheFireplace.java new file mode 100644 index 00000000000..e8e7af87461 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheGirlInTheFireplace.java @@ -0,0 +1,105 @@ +package mage.cards.t; + +import java.util.UUID; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SagaAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.counter.TimeTravelEffect; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SagaChapter; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.TheGirlInTheFireplaceHorseToken; +import mage.game.permanent.token.TheGirlInTheFireplaceHumanNobleToken; +import mage.filter.common.FilterControlledCreaturePermanent; + +/** + * + * @author padfoot + */ +public final class TheGirlInTheFireplace extends CardImpl { + + + public TheGirlInTheFireplace(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); + + this.subtype.add(SubType.SAGA); + + // (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.) + SagaAbility sagaAbility = new SagaAbility(this); + + // I -- Create a 1/1 white Human Noble creature token with vanishing 3 and "Prevent all damage that would be dealt to this creature." + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new TheGirlInTheFireplaceHumanNobleToken())); + + // II -- Create a 2/2 white Horse creature token with "Doctors you control have horsemanship." + sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new CreateTokenEffect(new TheGirlInTheFireplaceHorseToken()) + .withAdditionalRules(" (They can't be blocked except by creatures with horsemanship.)")); + + // III -- Whenever a creature you control deals combat damage to a player this turn, time travel. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_III, + new CreateDelayedTriggeredAbilityEffect( + new TheGirlInTheFireplaceTriggeredAbility() + ) + ); + + this.addAbility(sagaAbility); + + } + + private TheGirlInTheFireplace(final TheGirlInTheFireplace card) { + super(card); + } + + @Override + public TheGirlInTheFireplace copy() { + return new TheGirlInTheFireplace(this); + } +} + +class TheGirlInTheFireplaceTriggeredAbility extends DelayedTriggeredAbility { + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); + + public TheGirlInTheFireplaceTriggeredAbility() { + super(new TimeTravelEffect(), Duration.EndOfTurn, false); + } + + private TheGirlInTheFireplaceTriggeredAbility(TheGirlInTheFireplaceTriggeredAbility ability) { + super(ability); + } + + @Override + public TheGirlInTheFireplaceTriggeredAbility copy() { + return new TheGirlInTheFireplaceTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (!((DamagedPlayerEvent) event).isCombatDamage()) { + return false; + } + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (!filter.match(permanent, getControllerId(), this, game)) { + return false; + } + return true; + } + + @Override + public String getRule() { + return "Whenever a creature you control deals combat damage to a player this turn, time travel."; + } +} diff --git a/Mage.Sets/src/mage/sets/DoctorWho.java b/Mage.Sets/src/mage/sets/DoctorWho.java index a9ff63f658b..e0a8dc21424 100644 --- a/Mage.Sets/src/mage/sets/DoctorWho.java +++ b/Mage.Sets/src/mage/sets/DoctorWho.java @@ -955,8 +955,8 @@ public final class DoctorWho extends ExpansionSet { cards.add(new SetCardInfo("The Fugitive Doctor", 417, Rarity.RARE, mage.cards.t.TheFugitiveDoctor.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Fugitive Doctor", 541, Rarity.RARE, mage.cards.t.TheFugitiveDoctor.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Fugitive Doctor", 735, Rarity.RARE, mage.cards.t.TheFugitiveDoctor.class, NON_FULL_USE_VARIOUS)); - //cards.add(new SetCardInfo("The Girl in the Fireplace", 21, Rarity.RARE, mage.cards.t.TheGirlInTheFireplace.class, NON_FULL_USE_VARIOUS)); - //cards.add(new SetCardInfo("The Girl in the Fireplace", 626, Rarity.RARE, mage.cards.t.TheGirlInTheFireplace.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Girl in the Fireplace", 21, Rarity.RARE, mage.cards.t.TheGirlInTheFireplace.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Girl in the Fireplace", 626, Rarity.RARE, mage.cards.t.TheGirlInTheFireplace.class, NON_FULL_USE_VARIOUS)); //cards.add(new SetCardInfo("The Lux Foundation Library", 588, Rarity.COMMON, mage.cards.t.TheLuxFoundationLibrary.class)); //cards.add(new SetCardInfo("The Master, Formed Anew", 1017, Rarity.RARE, mage.cards.t.TheMasterFormedAnew.class, NON_FULL_USE_VARIOUS)); //cards.add(new SetCardInfo("The Master, Formed Anew", 1133, Rarity.RARE, mage.cards.t.TheMasterFormedAnew.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHorseToken.java b/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHorseToken.java new file mode 100644 index 00000000000..217f816d085 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHorseToken.java @@ -0,0 +1,36 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HorsemanshipAbility; +import mage.constants.Duration; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; + +/** + * @author padfoot + */ +public final class TheGirlInTheFireplaceHorseToken extends TokenImpl { + + public TheGirlInTheFireplaceHorseToken() { + super("Horse Token", "2/2 white Horse creature token with \"Doctors you control have horsemanship.\""); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.HORSE); + power = new MageInt(2); + toughness = new MageInt(2); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(HorsemanshipAbility.getInstance(), + Duration.WhileOnBattlefield, new FilterCreaturePermanent(SubType.DOCTOR, "Doctors"), false))); + } + + private TheGirlInTheFireplaceHorseToken(final TheGirlInTheFireplaceHorseToken token) { + super(token); + } + + @Override + public TheGirlInTheFireplaceHorseToken copy() { + return new TheGirlInTheFireplaceHorseToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHumanNobleToken.java b/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHumanNobleToken.java new file mode 100644 index 00000000000..7e19bb8edc5 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/TheGirlInTheFireplaceHumanNobleToken.java @@ -0,0 +1,40 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.PreventDamageToSourceEffect; +import mage.abilities.keyword.VanishingAbility; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Duration; + +/** + * @author padfoot + */ +public final class TheGirlInTheFireplaceHumanNobleToken extends TokenImpl { + + public TheGirlInTheFireplaceHumanNobleToken() { + super("Human Noble Token", "1/1 white Human Noble creature token with vanishing 3 and \"Prevent all damage that would be dealt to this creature.\""); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.HUMAN,SubType.NOBLE); + power = new MageInt(1); + toughness = new MageInt(1); + this.addAbility(new VanishingAbility(3)); + this.addAbility(new SimpleStaticAbility( + new PreventDamageToSourceEffect( + Duration.WhileOnBattlefield, + Integer.MAX_VALUE + ).setText("Prevent all damage that would be dealt to this creature.") + )); + } + + private TheGirlInTheFireplaceHumanNobleToken(final TheGirlInTheFireplaceHumanNobleToken token) { + super(token); + } + + @Override + public TheGirlInTheFireplaceHumanNobleToken copy() { + return new TheGirlInTheFireplaceHumanNobleToken(this); + } +}