From 0e0673387ca5201f3e4c5eb77a7ec2f80a7ea383 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 19 Sep 2018 12:10:32 -0400 Subject: [PATCH] Implemented Goblin Locksmith --- .../src/mage/cards/g/GoblinLocksmith.java | 51 +++++++++++++++++++ Mage.Sets/src/mage/sets/GuildsOfRavnica.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GoblinLocksmith.java diff --git a/Mage.Sets/src/mage/cards/g/GoblinLocksmith.java b/Mage.Sets/src/mage/cards/g/GoblinLocksmith.java new file mode 100644 index 0000000000..9fa25f47df --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinLocksmith.java @@ -0,0 +1,51 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.combat.CantBlockAllEffect; +import mage.abilities.keyword.DefenderAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AbilityPredicate; + +/** + * + * @author TheElk801 + */ +public final class GoblinLocksmith extends CardImpl { + + private static final FilterCreaturePermanent filter + = new FilterCreaturePermanent("creatures with defender"); + + static { + filter.add(new AbilityPredicate(DefenderAbility.class)); + } + + public GoblinLocksmith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.GOBLIN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Whenever Goblin Locksmith attacks, creatures with defender can't block this turn. + this.addAbility(new AttacksTriggeredAbility( + new CantBlockAllEffect(filter, Duration.EndOfTurn), false + )); + } + + public GoblinLocksmith(final GoblinLocksmith card) { + super(card); + } + + @Override + public GoblinLocksmith copy() { + return new GoblinLocksmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index 5c7b18d4b0..e0189769e2 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -98,6 +98,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Goblin Banneret", 102, Rarity.UNCOMMON, mage.cards.g.GoblinBanneret.class)); cards.add(new SetCardInfo("Goblin Cratermaker", 103, Rarity.UNCOMMON, mage.cards.g.GoblinCratermaker.class)); cards.add(new SetCardInfo("Goblin Electromancer", 174, Rarity.COMMON, mage.cards.g.GoblinElectromancer.class)); + cards.add(new SetCardInfo("Goblin Locksmith", 104, Rarity.COMMON, mage.cards.g.GoblinLocksmith.class)); cards.add(new SetCardInfo("Golgari Findbroker", 175, Rarity.UNCOMMON, mage.cards.g.GolgariFindbroker.class)); cards.add(new SetCardInfo("Golgari Guildgate", 248, Rarity.COMMON, mage.cards.g.GolgariGuildgate.class)); cards.add(new SetCardInfo("Golgari Guildgate", 249, Rarity.COMMON, mage.cards.g.GolgariGuildgate.class));