[SPM] implement Terrific Team-Up and create a shared effect (#13954)

* create common TargetsDamageTargetsEffect

* [SPM] implement Superior Terrific Team-Up

* fix band together second target predicate

* remove unnecessary checks in TargetsDamageTargetsEffect
This commit is contained in:
Jmlundeen 2025-09-07 16:50:34 -05:00 committed by GitHub
parent d2a7991f8e
commit 432de6f9fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 271 additions and 354 deletions

View file

@ -0,0 +1,61 @@
package org.mage.test.cards.single.spm;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.filter.Filter;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author Jmlundeen
*/
public class TerrificTeamUpTest extends CardTestPlayerBase {
/*
Terrific Team-Up
{3}{G}
Instant
This spell costs {2} less to cast if you control a permanent with mana value 4 or greater.
One or two target creatures you control each get +1/+0 until end of turn. They each deal damage equal to their power to target creature an opponent controls.
*/
private static final String terrificTeamUp = "Terrific Team-Up";
/*
Bear Cub
{1}{G}
Creature - Bear
2/2
*/
private static final String bearCub = "Bear Cub";
/*
Sea Monster
{4}{U}{U}
Creature - Serpent
Sea Monster can't attack unless defending player controls an Island.
6/6
*/
private static final String seaMonster = "Sea Monster";
@Test
public void testTerrificTeamUp() {
setStrictChooseMode(true);
addCard(Zone.BATTLEFIELD, playerA, bearCub, 2);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
addCard(Zone.BATTLEFIELD, playerB, seaMonster);
addCard(Zone.HAND, playerA, terrificTeamUp);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, terrificTeamUp);
addTarget(playerA, bearCub, 2);
addTarget(playerA, seaMonster);
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
execute();
assertGraveyardCount(playerB, seaMonster, 1);
assertPowerToughness(playerA, bearCub, 3, 2, Filter.ComparisonScope.All);
}
}

View file

@ -4,6 +4,7 @@ import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.player.TestPlayer;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
@ -38,7 +39,8 @@ public class GracefulTakedownTest extends CardTestPlayerBase {
addCard(Zone.HAND, playerA, takedown);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, takedown);
addTarget(playerA, cub);
addTarget(playerA, TestPlayer.TARGET_SKIP); // enchanted
addTarget(playerA, cub); // one other
addTarget(playerA, ancient);
setStopAt(1, PhaseStep.END_COMBAT);
@ -62,7 +64,8 @@ public class GracefulTakedownTest extends CardTestPlayerBase {
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, strength, piker, true);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, takedown);
addTarget(playerA, cub + "^" + piker);
addTarget(playerA, piker); // enchanted
addTarget(playerA, cub); // one other
addTarget(playerA, ancient);
setStopAt(1, PhaseStep.END_COMBAT);