From a85560a012d7d55fcfe1892a258fd3b2a7047dab Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Tue, 2 Nov 2021 08:36:31 -0500 Subject: [PATCH] [VOW] Implemented Bloodsworn Squire / Bloodsworn Knight --- .../src/mage/cards/b/BloodswornKnight.java | 60 +++++++++++++++++ .../src/mage/cards/b/BloodswornSquire.java | 65 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 2 + 3 files changed, 127 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BloodswornKnight.java create mode 100644 Mage.Sets/src/mage/cards/b/BloodswornSquire.java diff --git a/Mage.Sets/src/mage/cards/b/BloodswornKnight.java b/Mage.Sets/src/mage/cards/b/BloodswornKnight.java new file mode 100644 index 0000000000..d17112c59d --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodswornKnight.java @@ -0,0 +1,60 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.TapSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author weirddan455 + */ +public final class BloodswornKnight extends CardImpl { + + public BloodswornKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + this.color.setBlack(true); + + // Back half of Bloodsworn Squire + this.nightCard = true; + + // Bloodsworn Knight's power and toughness are each equal to the number of creature cards in your graveyard. + this.addAbility(new SimpleStaticAbility(new SetPowerToughnessSourceEffect(new CardsInControllerGraveyardCount(), Duration.EndOfGame))); + + // {1}{B}, Discard a card: Bloodsworn Knight gains indestructible until end of turn. Tap it. + Ability ability = new SimpleActivatedAbility( + new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + new ManaCostsImpl<>("{1}{B}") + ); + ability.addCost(new DiscardCardCost()); + ability.addEffect(new TapSourceEffect().setText("tap it")); + this.addAbility(ability); + } + + private BloodswornKnight(final BloodswornKnight card) { + super(card); + } + + @Override + public BloodswornKnight copy() { + return new BloodswornKnight(this); + } +} diff --git a/Mage.Sets/src/mage/cards/b/BloodswornSquire.java b/Mage.Sets/src/mage/cards/b/BloodswornSquire.java new file mode 100644 index 0000000000..baf0f7716b --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloodswornSquire.java @@ -0,0 +1,65 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.CardsInControllerGraveyardCondition; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.TapSourceEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.TransformAbility; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.filter.StaticFilters; + +/** + * + * @author weirddan455 + */ +public final class BloodswornSquire extends CardImpl { + + public BloodswornSquire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + + this.subtype.add(SubType.VAMPIRE); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + this.transformable = true; + this.secondSideCardClazz = mage.cards.b.BloodswornKnight.class; + + this.addAbility(new TransformAbility()); + + // {1}{B}, Discard a card: Bloodsworn Squire gains indestructible until end of turn. Tap it. Then if there are four or more creature cards in your graveyard, transform Bloodsworn Squire. + Ability ability = new SimpleActivatedAbility( + new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), + new ManaCostsImpl<>("{1}{B}") + ); + ability.addCost(new DiscardCardCost()); + ability.addEffect(new TapSourceEffect().setText("tap it")); + ability.addEffect(new ConditionalOneShotEffect( + new TransformSourceEffect(true, true), + new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES), + "Then if there are four or more creature cards in your graveyard, transform {this}" + )); + this.addAbility(ability); + } + + private BloodswornSquire(final BloodswornSquire card) { + super(card); + } + + @Override + public BloodswornSquire copy() { + return new BloodswornSquire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 19e3a048e6..b28e753aea 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -38,6 +38,8 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Apprentice Sharpshooter", 185, Rarity.COMMON, mage.cards.a.ApprenticeSharpshooter.class)); cards.add(new SetCardInfo("Archghoul of Thraben", 93, Rarity.UNCOMMON, mage.cards.a.ArchghoulOfThraben.class)); cards.add(new SetCardInfo("Ascendant Packleader", 186, Rarity.RARE, mage.cards.a.AscendantPackleader.class)); + cards.add(new SetCardInfo("Bloodsworn Knight", 97, Rarity.UNCOMMON, mage.cards.b.BloodswornKnight.class)); + cards.add(new SetCardInfo("Bloodsworn Squire", 97, Rarity.UNCOMMON, mage.cards.b.BloodswornSquire.class)); cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class)); cards.add(new SetCardInfo("Change of Fortune", 150, Rarity.RARE, mage.cards.c.ChangeOfFortune.class)); cards.add(new SetCardInfo("Clever Distraction", 9, Rarity.UNCOMMON, mage.cards.c.CleverDistraction.class));