From 22e8af505dcce76b9be31a7a94b15c4a564993ce Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 15 Sep 2022 08:43:12 -0400 Subject: [PATCH] [40K] Implemented Goliath Truck --- Mage.Sets/src/mage/cards/g/GoliathTruck.java | 55 ++++++++++++++++++++ Mage.Sets/src/mage/sets/Warhammer40000.java | 1 + 2 files changed, 56 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GoliathTruck.java diff --git a/Mage.Sets/src/mage/cards/g/GoliathTruck.java b/Mage.Sets/src/mage/cards/g/GoliathTruck.java new file mode 100644 index 0000000000..183649b04f --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoliathTruck.java @@ -0,0 +1,55 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.CrewAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterAttackingCreature; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GoliathTruck extends CardImpl { + + private static final FilterPermanent filter = new FilterAttackingCreature("another target attacking creature"); + + static { + filter.add(AnotherPredicate.instance); + } + + public GoliathTruck(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Stowage -- Whenever Goliath Truck attacks, put two +1/+1 counters on another target attacking creature. + Ability ability = new AttacksTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability.withFlavorWord("Stowage")); + + // Crew 2 + this.addAbility(new CrewAbility(2)); + } + + private GoliathTruck(final GoliathTruck card) { + super(card); + } + + @Override + public GoliathTruck copy() { + return new GoliathTruck(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index 4ec9bbc49f..2df6d63684 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -62,6 +62,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Forgotten Cave", 280, Rarity.COMMON, mage.cards.f.ForgottenCave.class)); cards.add(new SetCardInfo("Frontier Bivouac", 281, Rarity.UNCOMMON, mage.cards.f.FrontierBivouac.class)); cards.add(new SetCardInfo("Game Trail", 282, Rarity.RARE, mage.cards.g.GameTrail.class)); + cards.add(new SetCardInfo("Goliath Truck", 158, Rarity.UNCOMMON, mage.cards.g.GoliathTruck.class)); cards.add(new SetCardInfo("Hardened Scales", 215, Rarity.RARE, mage.cards.h.HardenedScales.class)); cards.add(new SetCardInfo("Harrow", 216, Rarity.COMMON, mage.cards.h.Harrow.class)); cards.add(new SetCardInfo("Herald of Slaanesh", 77, Rarity.UNCOMMON, mage.cards.h.HeraldOfSlaanesh.class));