implement [EOC] Baloth Prime

This commit is contained in:
Susucre 2025-07-09 21:53:55 +02:00
parent 5b58f07196
commit a0b62d7b63
3 changed files with 115 additions and 0 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.common.SacrificePermanentTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.TapSourceEffect;
import mage.abilities.effects.common.UntapSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.BeastToken2;
import java.util.UUID;
/**
* @author Susucr
*/
public final class BalothPrime extends CardImpl {
public BalothPrime(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
this.subtype.add(SubType.BEAST);
this.power = new MageInt(10);
this.toughness = new MageInt(10);
// This creature enters tapped with six stun counters on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)
Ability ability = new EntersBattlefieldAbility(
new TapSourceEffect(true), "tapped with a stun counter on it. "
+ "<i>(If a permanent with a stun counter would become untapped, remove one from it instead.)</i>"
);
ability.addEffect(new AddCountersSourceEffect(CounterType.STUN.createInstance(6)));
this.addAbility(ability);
// Whenever you sacrifice a land, create a tapped 4/4 green Beast creature token and untap this creature.
ability = new SacrificePermanentTriggeredAbility(
new CreateTokenEffect(new BeastToken2()), StaticFilters.FILTER_LAND
);
ability.addEffect(new UntapSourceEffect().concatBy("and"));
this.addAbility(ability);
// {4}, Sacrifice a land: You gain 2 life.
ability = new SimpleActivatedAbility(new GainLifeEffect(2), new GenericManaCost(4));
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_LAND));
this.addAbility(ability);
}
private BalothPrime(final BalothPrime card) {
super(card);
}
@Override
public BalothPrime copy() {
return new BalothPrime(this);
}
}

View file

@ -23,5 +23,7 @@ public final class EdgeOfEternitiesCommander extends ExpansionSet {
cards.add(new SetCardInfo("Inspirit, Flagship Vessel", 2, Rarity.MYTHIC, mage.cards.i.InspiritFlagshipVessel.class)); cards.add(new SetCardInfo("Inspirit, Flagship Vessel", 2, Rarity.MYTHIC, mage.cards.i.InspiritFlagshipVessel.class));
cards.add(new SetCardInfo("Kilo, Apogee Mind", 3, Rarity.MYTHIC, mage.cards.k.KiloApogeeMind.class)); cards.add(new SetCardInfo("Kilo, Apogee Mind", 3, Rarity.MYTHIC, mage.cards.k.KiloApogeeMind.class));
cards.add(new SetCardInfo("Szarel, Genesis Shepherd", 4, Rarity.MYTHIC, mage.cards.s.SzarelGenesisShepherd.class)); cards.add(new SetCardInfo("Szarel, Genesis Shepherd", 4, Rarity.MYTHIC, mage.cards.s.SzarelGenesisShepherd.class));
cards.add(new SetCardInfo("Baloth Prime", 13, Rarity.RARE, mage.cards.b.BalothPrime.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Baloth Prime", 33, Rarity.RARE, mage.cards.b.BalothPrime.class, NON_FULL_USE_VARIOUS));
} }
} }

View file

@ -0,0 +1,47 @@
package org.mage.test.cards.single.eoc;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author Susucr
*/
public class BalothPrimeTest extends CardTestPlayerBase {
/**
* {@link mage.cards.b.BalothPrime Baloth Prime} {3}{G}
* Creature Beast
* This creature enters tapped with six stun counters on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)
* Whenever you sacrifice a land, create a tapped 4/4 green Beast creature token and untap this creature.
* {4}, Sacrifice a land: You gain 2 life.
* 10/10
*/
private static final String baloth = "Baloth Prime";
@Test
public void test_Simple() {
addCard(Zone.HAND, playerA, baloth);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 10);
addCard(Zone.BATTLEFIELD, playerA, "Wastes", 2);
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}", 2); // activate both Wastes
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, baloth, true);
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{4}, Sacrifice a land: You gain 2 life");
setChoice(playerA, "Wastes");
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{4}, Sacrifice a land: You gain 2 life");
setChoice(playerA, "Wastes");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
setStrictChooseMode(true);
execute();
assertGraveyardCount(playerA, "Wastes", 2);
assertTappedCount("Forest", true, 10);
assertCounterCount(playerA, baloth, CounterType.STUN, 6 - 2);
assertLife(playerA, 20 + 2 + 2);
assertPermanentCount(playerA, "Beast Token", 2);
}
}