From 06f76eadec328d436e18a2936298dda4d2f8b947 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 28 Oct 2021 20:19:40 -0400 Subject: [PATCH] [VOW] Implemented Gluttonous Guest --- .../src/mage/cards/g/GluttonousGuest.java | 52 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 1 + .../src/main/java/mage/constants/SubType.java | 1 + .../mage/game/permanent/token/BloodToken.java | 40 ++++++++++++++ Utils/mtg-cards-data.txt | 1 + 5 files changed, 95 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GluttonousGuest.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/BloodToken.java diff --git a/Mage.Sets/src/mage/cards/g/GluttonousGuest.java b/Mage.Sets/src/mage/cards/g/GluttonousGuest.java new file mode 100644 index 00000000000..142239bbd93 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GluttonousGuest.java @@ -0,0 +1,52 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SacrificePermanentTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.BloodToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GluttonousGuest extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("a Blood token"); + + static { + filter.add(TokenPredicate.TRUE); + filter.add(SubType.BLOOD.getPredicate()); + } + + public GluttonousGuest(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.power = new MageInt(1); + this.toughness = new MageInt(4); + + // When Gluttonous Guest enters the battlefield, create a Blood token. + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BloodToken()))); + + // Whenever you sacrifice a Blood token, you gain 1 life. + this.addAbility(new SacrificePermanentTriggeredAbility(new GainLifeEffect(1), filter)); + } + + private GluttonousGuest(final GluttonousGuest card) { + super(card); + } + + @Override + public GluttonousGuest copy() { + return new GluttonousGuest(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 5fd28451ab3..23d1452509d 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -33,6 +33,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Dig Up", 197, Rarity.RARE, mage.cards.d.DigUp.class)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Gluttonous Guest", 114, Rarity.COMMON, mage.cards.g.GluttonousGuest.class)); cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 70374d6f864..6878495b7af 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -39,6 +39,7 @@ public enum SubType { SHARD("Shard", SubTypeSet.EnchantmentType), SHRINE("Shrine", SubTypeSet.EnchantmentType), // 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types. + BLOOD("Blood", SubTypeSet.ArtifactType), CLUE("Clue", SubTypeSet.ArtifactType), CONTRAPTION("Contraption", SubTypeSet.ArtifactType), EQUIPMENT("Equipment", SubTypeSet.ArtifactType), diff --git a/Mage/src/main/java/mage/game/permanent/token/BloodToken.java b/Mage/src/main/java/mage/game/permanent/token/BloodToken.java new file mode 100644 index 00000000000..208036a16c3 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/BloodToken.java @@ -0,0 +1,40 @@ +package mage.game.permanent.token; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class BloodToken extends TokenImpl { + + public BloodToken() { + super("Blood", "Blood token"); + cardType.add(CardType.ARTIFACT); + subtype.add(SubType.BLOOD); + + // {1}, {T}, Discard a card, Sacrifice this artifact: Draw a card.” + Ability ability = new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(1), new GenericManaCost(1) + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new DiscardCardCost()); + ability.addCost(new SacrificeSourceCost().setText("Sacrifice this artifact")); + this.addAbility(ability); + } + + public BloodToken(final BloodToken token) { + super(token); + } + + public BloodToken copy() { + return new BloodToken(this); + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index cd113cd14ae..eb0c286e5dd 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -43018,6 +43018,7 @@ Unclaimed Territory|Midnight Hunt Commander|187|U||Land|||As Unclaimed Territory Savior of Ollenblock|Innistrad: Crimson Vow|34|M|{1}{W}{W}|Creature - Human Soldier|1|2|Training$Whenever Savior of Ollenblock trains, exile up to one other target creature from the battlefield or creature card from a graveyard.$When Savior of Ollenblock leaves the battlefield, return the exiled cards onto the battlefield under their owners's control.| Thalia, Guardian of Thraben|Innistrad: Crimson Vow|38|R|{1}{W}|Legendary Creature - Human Soldier|2|1|First strike$Noncreature spells cost {1} more to cast.| Overcharged Amalgam|Innistrad: Crimson Vow|71|R|{2}{U}{U}|Creature - Zombie Horror|3|3|Flash$Flying$Exploit$When Overcharged Amalgam exploits a creature, counter target spell, activated ability, or triggered ability.| +Gluttonous Guest|Innistrad: Crimson Vow|114|C|{2}{B}|Creature - Vampire|1|4|When Gluttonous Guest enters the battlefield, create a Blood token.$Whenever you sacrifice a Blood token, you gain 1 life.| Sorin the Mirthless|Innistrad: Crimson Vow|131|M|{2}{B}{B}|Legendary Planeswalker - Sorin|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.$−2: Create a 2/3 black Vampire creature token with flying and lifelink.$−7: Sorin the Mirthless deals 13 damage to any target. You gain 13 life.| Voldaren Bloodcaster|Innistrad: Crimson Vow|137|R|{1}{B}|Creature - Vampire Wizard|2|1|Flying$Whenever or another nontoken creature you control dies, create a Blood token.$Whenever you create a Blood token, if you control five or more Blood tokens, transform Voldaren Bloodcaster.| Bloodbat Summoner|Innistrad: Crimson Vow|137|R||Creature - Vampire Wizard|3|3|Flying$At the beginning of combat on your turn, up to one target Blood token you control becomes a 2/2 black Bat creature with flying and haste in addition to its other types.|