[BLB] Implement Scales of Shale

This commit is contained in:
theelk801 2024-07-17 10:04:15 -04:00
parent 579c74d41b
commit 835e9abea4
2 changed files with 66 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));