From 835e9abea44cad55dadc085a16bdd381ef58829b Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 17 Jul 2024 10:04:15 -0400 Subject: [PATCH] [BLB] Implement Scales of Shale --- Mage.Sets/src/mage/cards/s/ScalesOfShale.java | 65 +++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/ScalesOfShale.java diff --git a/Mage.Sets/src/mage/cards/s/ScalesOfShale.java b/Mage.Sets/src/mage/cards/s/ScalesOfShale.java new file mode 100644 index 00000000000..3bd95e41204 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/ScalesOfShale.java @@ -0,0 +1,65 @@ +package mage.cards.s; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.cost.SpellCostReductionForEachSourceEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.IndestructibleAbility; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ScalesOfShale extends CardImpl { + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount( + new FilterControlledPermanent(SubType.LIZARD, "Lizard you control") + ); + private static final Hint hint = new ValueHint("Lizards you control", xValue); + + public ScalesOfShale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); + + // This spell costs {1} less to cast for each Lizard you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, + new SpellCostReductionForEachSourceEffect(1, xValue).setCanWorksOnStackOnly(true) + ).setRuleAtTheTop(true).addHint(hint)); + + + // Target creature gets +2/+0 and gains lifelink and indestructible until end of turn. + this.getSpellAbility().addEffect(new BoostTargetEffect( + 2, 0, Duration.EndOfTurn + ).setText("target creature gets +2/+0")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect( + LifelinkAbility.getInstance(), Duration.EndOfTurn + ).setText("and gains lifelink")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn + ).setText("and indestructible until end of turn")); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private ScalesOfShale(final ScalesOfShale card) { + super(card); + } + + @Override + public ScalesOfShale copy() { + return new ScalesOfShale(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index d143bba9b12..d052b67fcb1 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -131,6 +131,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Run Away Together", 67, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); cards.add(new SetCardInfo("Rust-Shield Rampager", 190, Rarity.COMMON, mage.cards.r.RustShieldRampager.class)); cards.add(new SetCardInfo("Salvation Swan", 28, Rarity.RARE, mage.cards.s.SalvationSwan.class)); + cards.add(new SetCardInfo("Scales of Shale", 110, Rarity.COMMON, mage.cards.s.ScalesOfShale.class)); cards.add(new SetCardInfo("Seasoned Warrenguard", 30, Rarity.UNCOMMON, mage.cards.s.SeasonedWarrenguard.class)); cards.add(new SetCardInfo("Seedglaive Mentor", 231, Rarity.UNCOMMON, mage.cards.s.SeedglaiveMentor.class)); cards.add(new SetCardInfo("Seedpod Squire", 232, Rarity.COMMON, mage.cards.s.SeedpodSquire.class));