From fdfd5c9c23c5a12025c0960871c058b07e89fb91 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 20 May 2022 17:31:10 -0400 Subject: [PATCH] [CLB] Implemented Cadira, Caller of the Small --- .../mage/cards/c/CadiraCallerOfTheSmall.java | 65 +++++++++++++++++++ .../CommanderLegendsBattleForBaldursGate.java | 1 + .../game/permanent/token/RabbitToken.java | 29 +++++++++ 3 files changed, 95 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CadiraCallerOfTheSmall.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/RabbitToken.java diff --git a/Mage.Sets/src/mage/cards/c/CadiraCallerOfTheSmall.java b/Mage.Sets/src/mage/cards/c/CadiraCallerOfTheSmall.java new file mode 100644 index 00000000000..f0ce7bddbfd --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CadiraCallerOfTheSmall.java @@ -0,0 +1,65 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.RabbitToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CadiraCallerOfTheSmall extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(TokenPredicate.TRUE); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter); + private static final Hint hint = new ValueHint("Tokens you control", xValue); + + public CadiraCallerOfTheSmall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ORC); + this.subtype.add(SubType.RANGER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever Cadira, Caller of the Small deals combat damage to a player, for each token you control, create a 1/1 white Rabbit creature token. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility( + new CreateTokenEffect(new RabbitToken(), xValue) + .setText("for each token you control, create a 1/1 white Rabbit creature token"), + false + )); + } + + private CadiraCallerOfTheSmall(final CadiraCallerOfTheSmall card) { + super(card); + } + + @Override + public CadiraCallerOfTheSmall copy() { + return new CadiraCallerOfTheSmall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 2c539f1f8f2..479f8762a77 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -37,6 +37,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Blur", 58, Rarity.COMMON, mage.cards.b.Blur.class)); cards.add(new SetCardInfo("Bountiful Promenade", 348, Rarity.RARE, mage.cards.b.BountifulPromenade.class)); cards.add(new SetCardInfo("Bramble Sovereign", 218, Rarity.MYTHIC, mage.cards.b.BrambleSovereign.class)); + cards.add(new SetCardInfo("Cadira, Caller of the Small", 269, Rarity.UNCOMMON, mage.cards.c.CadiraCallerOfTheSmall.class)); cards.add(new SetCardInfo("Charcoal Diamond", 305, Rarity.COMMON, mage.cards.c.CharcoalDiamond.class)); cards.add(new SetCardInfo("Cloakwood Hermit", 221, Rarity.UNCOMMON, mage.cards.c.CloakwoodHermit.class)); cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/RabbitToken.java b/Mage/src/main/java/mage/game/permanent/token/RabbitToken.java new file mode 100644 index 00000000000..5a4d5a3f78a --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/RabbitToken.java @@ -0,0 +1,29 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class RabbitToken extends TokenImpl { + + public RabbitToken() { + super("Rabbit Token", "1/1 white Rabbit creature token"); + cardType.add(CardType.CREATURE); + color.setWhite(true); + subtype.add(SubType.RABBIT); + power = new MageInt(1); + toughness = new MageInt(1); + } + + private RabbitToken(final RabbitToken token) { + super(token); + } + + @Override + public RabbitToken copy() { + return new RabbitToken(this); + } +}