From 3f2d104cf80be35d135b4c23e8f0842687fe8650 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 18 Jun 2023 22:33:49 -0400 Subject: [PATCH] [LTC] Implement Corsairs of Umbar --- .../src/mage/cards/c/CorsairsOfUmbar.java | 65 +++++++++++++++++++ .../sets/TalesOfMiddleEarthCommander.java | 1 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CorsairsOfUmbar.java diff --git a/Mage.Sets/src/mage/cards/c/CorsairsOfUmbar.java b/Mage.Sets/src/mage/cards/c/CorsairsOfUmbar.java new file mode 100644 index 0000000000..c40dbdca07 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CorsairsOfUmbar.java @@ -0,0 +1,65 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.abilities.effects.keyword.AmassEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CorsairsOfUmbar extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("Goblin, Orc, or Pirate"); + + static { + filter.add(Predicates.or( + SubType.GOBLIN.getPredicate(), + SubType.ORC.getPredicate(), + SubType.PIRATE.getPredicate() + )); + } + + public CorsairsOfUmbar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PIRATE); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // {2}{U}: Target Goblin, Orc, or Pirate can't be blocked this turn. + Ability ability = new SimpleActivatedAbility( + new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{2}{U}") + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + + // Whenever Corsairs of Umbar deals combat damage to a player, amass Orcs 3. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility( + new AmassEffect(3, SubType.ORC), false + )); + } + + private CorsairsOfUmbar(final CorsairsOfUmbar card) { + super(card); + } + + @Override + public CorsairsOfUmbar copy() { + return new CorsairsOfUmbar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java index 8c65522356..fd93f295e5 100644 --- a/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java +++ b/Mage.Sets/src/mage/sets/TalesOfMiddleEarthCommander.java @@ -52,6 +52,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet { cards.add(new SetCardInfo("Command Tower", 301, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Commander's Sphere", 276, Rarity.COMMON, mage.cards.c.CommandersSphere.class)); cards.add(new SetCardInfo("Consider", 187, Rarity.COMMON, mage.cards.c.Consider.class)); + cards.add(new SetCardInfo("Corsairs of Umbar", 19, Rarity.RARE, mage.cards.c.CorsairsOfUmbar.class)); cards.add(new SetCardInfo("Court of Ire", 213, Rarity.RARE, mage.cards.c.CourtOfIre.class)); cards.add(new SetCardInfo("Crumbling Necropolis", 302, Rarity.UNCOMMON, mage.cards.c.CrumblingNecropolis.class)); cards.add(new SetCardInfo("Crypt Incursion", 198, Rarity.COMMON, mage.cards.c.CryptIncursion.class));