From f7ebf806278b8d4bf16367ff39272df9509c7835 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 9 Sep 2019 18:23:35 -0400 Subject: [PATCH] Implemented Giant Killer --- Mage.Sets/src/mage/cards/g/GiantKiller.java | 62 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + .../src/main/java/mage/constants/SubType.java | 1 + 3 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GiantKiller.java diff --git a/Mage.Sets/src/mage/cards/g/GiantKiller.java b/Mage.Sets/src/mage/cards/g/GiantKiller.java new file mode 100644 index 00000000000..27ea0041560 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantKiller.java @@ -0,0 +1,62 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.TapTargetEffect; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GiantKiller extends AdventureCard { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature with power 4 or greater"); + + static { + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); + } + + public GiantKiller(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{W}", "Chop Down", "{2}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.power = new MageInt(1); + this.toughness = new MageInt(2); + + // {1}{W}, {T}: Tap target creature. + Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new ManaCostsImpl("{1}{W}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // Chop Down + // Destroy target creature with power 4 or greater. + this.getAdventureSpellAbility().addEffect(new DestroyTargetEffect()); + this.getAdventureSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private GiantKiller(final GiantKiller card) { + super(card); + } + + @Override + public GiantKiller copy() { + return new GiantKiller(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index be7aac6be7f..2661cfe45f8 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -60,6 +60,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Frogify", 47, Rarity.UNCOMMON, mage.cards.f.Frogify.class)); cards.add(new SetCardInfo("Garrison Griffin", 305, Rarity.COMMON, mage.cards.g.GarrisonGriffin.class)); cards.add(new SetCardInfo("Garruk, Cursed Huntsman", 191, Rarity.MYTHIC, mage.cards.g.GarrukCursedHuntsman.class)); + cards.add(new SetCardInfo("Giant Killer", 14, Rarity.RARE, mage.cards.g.GiantKiller.class)); cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class)); cards.add(new SetCardInfo("Gluttonous Troll", 327, Rarity.RARE, mage.cards.g.GluttonousTroll.class)); cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 6b6e1660be6..da6b5bc6299 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -258,6 +258,7 @@ public enum SubType { OYSTER("Oyster", SubTypeSet.CreatureType), // P PANGOLIN("Pangolin", SubTypeSet.CreatureType), + PEASANT("Peasant", SubTypeSet.CreatureType), PEGASUS("Pegasus", SubTypeSet.CreatureType), PENTAVITE("Pentavite", SubTypeSet.CreatureType), PEST("Pest", SubTypeSet.CreatureType),