implement [BLB] Clement, the Worrywort (#13444)

---------

Co-authored-by: xenohedron <12538125+xenohedron@users.noreply.github.com>
This commit is contained in:
earchip94 2025-04-13 19:56:54 -05:00 committed by GitHub
parent 0ccc5a706b
commit 187703a1fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 241 additions and 3 deletions

View file

@ -0,0 +1,105 @@
package org.mage.test.cards.abilities.enters;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
import mage.constants.PhaseStep;
import mage.constants.Zone;
/**
*
* @author earchip94
*/
public class ClementTheWorrywortTest extends CardTestPlayerBase{
private final String frog = "Clement, the Worrywort";
@Test
public void castBounce() {
addCard(Zone.HAND, playerA, frog);
addCard(Zone.BATTLEFIELD, playerA, "Spore Frog");
addCard(Zone.BATTLEFIELD, playerA, "Forest");
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, frog);
addTarget(playerA, "Spore Frog");
setStrictChooseMode(true);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, 4);
assertHandCount(playerA, 1);
}
@Test
public void castNoTarget() {
addCard(Zone.HAND, playerA, frog);
addCard(Zone.BATTLEFIELD, playerA, "Haze Frog");
addCard(Zone.BATTLEFIELD, playerA, "Forest");
addCard(Zone.BATTLEFIELD, playerA, "Island", 2);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, frog);
setStrictChooseMode(false);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, 5);
assertHandCount(playerA, 0);
}
@Test
public void castOther() {
addCard(Zone.HAND, playerA, "Haze Frog");
addCard(Zone.BATTLEFIELD, playerA, frog);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Haze Frog");
setChoice(playerA, "Whenever"); // order triggers
addTarget(playerA, frog);
setStrictChooseMode(true);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, 6);
assertHandCount(playerA, 1);
}
@Test
public void castOtherNoTarget() {
addCard(Zone.HAND, playerA, "Spore Frog");
addCard(Zone.BATTLEFIELD, playerA, frog);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 5);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Spore Frog");
setStrictChooseMode(false);
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, 7);
assertHandCount(playerA, 0);
}
@Test
public void otherPlayerCast() {
addCard(Zone.BATTLEFIELD, playerA, frog);
addCard(Zone.HAND, playerB, "Llanowar Elves");
addCard(Zone.BATTLEFIELD, playerB, "Forest");
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Llanowar Elves");
// No choice required
setStrictChooseMode(true);
setStopAt(2, PhaseStep.BEGIN_COMBAT);
execute();
assertPermanentCount(playerA, 1);
assertPermanentCount(playerB, 2);
assertChoicesCount(playerA, 0);
assertChoicesCount(playerB, 0);
}
}