From 754a5b38ebba104b83494629c1f3881020168b1e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 2 Apr 2021 08:12:06 -0400 Subject: [PATCH] [STX] Implemented Access Tunnel --- Mage.Sets/src/mage/cards/a/AccessTunnel.java | 55 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AccessTunnel.java diff --git a/Mage.Sets/src/mage/cards/a/AccessTunnel.java b/Mage.Sets/src/mage/cards/a/AccessTunnel.java new file mode 100644 index 0000000000..604568f491 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AccessTunnel.java @@ -0,0 +1,55 @@ +package mage.cards.a; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Duration; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AccessTunnel extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature with power 3 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 4)); + } + + public AccessTunnel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // {T}: Add {C}. + this.addAbility(new ColorlessManaAbility()); + + // {3}, {T}: Target creature with power 3 or less can't be blocked this turn. + Ability ability = new SimpleActivatedAbility( + new CantBeBlockedTargetEffect(Duration.EndOfTurn), new GenericManaCost(3) + ); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private AccessTunnel(final AccessTunnel card) { + super(card); + } + + @Override + public AccessTunnel copy() { + return new AccessTunnel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 0383299400..ab430de32d 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -32,6 +32,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { this.ratioBoosterMythic = 7.4; this.maxCardNumberInBooster = 275; + cards.add(new SetCardInfo("Access Tunnel", 262, Rarity.UNCOMMON, mage.cards.a.AccessTunnel.class)); cards.add(new SetCardInfo("Accomplished Alchemist", 119, Rarity.RARE, mage.cards.a.AccomplishedAlchemist.class)); cards.add(new SetCardInfo("Aether Helix", 162, Rarity.UNCOMMON, mage.cards.a.AetherHelix.class)); cards.add(new SetCardInfo("Ageless Guardian", 8, Rarity.COMMON, mage.cards.a.AgelessGuardian.class));