From f42bfc9f9f3bca78f91cdef8d00c657c649191e6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 25 May 2022 08:07:44 -0400 Subject: [PATCH] [CLB] Implemented Horn of Valhalla --- .../src/mage/cards/h/HornOfValhalla.java | 61 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HornOfValhalla.java diff --git a/Mage.Sets/src/mage/cards/h/HornOfValhalla.java b/Mage.Sets/src/mage/cards/h/HornOfValhalla.java new file mode 100644 index 0000000000..b1e1b84cfd --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HornOfValhalla.java @@ -0,0 +1,61 @@ +package mage.cards.h; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.permanent.token.SoldierToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HornOfValhalla extends AdventureCard { + + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("other creature you control"); + + static { + filter.add(AnotherPredicate.instance); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 1); + + public HornOfValhalla(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, new CardType[]{CardType.SORCERY}, "{1}{W}", "Ysgard's Call", "{X}{W}{W}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +1/+1 for each other creature you control. + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(xValue, xValue))); + + // Equip {3} + this.addAbility(new EquipAbility(3)); + + // Ysgard's Call + // Create X 1/1 white Soldier creature tokens. + this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect( + new SoldierToken(), ManacostVariableValue.REGULAR + )); + } + + private HornOfValhalla(final HornOfValhalla card) { + super(card); + } + + @Override + public HornOfValhalla copy() { + return new HornOfValhalla(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 3f70f82ce8..c7d05aaabe 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -92,6 +92,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Gut, True Soul Zealot", 180, Rarity.UNCOMMON, mage.cards.g.GutTrueSoulZealot.class)); cards.add(new SetCardInfo("Hammers of Moradin", 25, Rarity.UNCOMMON, mage.cards.h.HammersOfMoradin.class)); cards.add(new SetCardInfo("Hardy Outlander", 235, Rarity.UNCOMMON, mage.cards.h.HardyOutlander.class)); + cards.add(new SetCardInfo("Horn of Valhalla", 26, Rarity.RARE, mage.cards.h.HornOfValhalla.class)); cards.add(new SetCardInfo("Imoen, Mystic Trickster", 77, Rarity.UNCOMMON, mage.cards.i.ImoenMysticTrickster.class)); cards.add(new SetCardInfo("Irenicus's Vile Duplication", 78, Rarity.UNCOMMON, mage.cards.i.IrenicussVileDuplication.class)); cards.add(new SetCardInfo("Iron Mastiff", 317, Rarity.UNCOMMON, mage.cards.i.IronMastiff.class));