mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
[CMR] fixed Hellkite Courser - missing command zone support in target (#7198);
This commit is contained in:
parent
2b78388eab
commit
c548b3fd1d
5 changed files with 82 additions and 7 deletions
|
|
@ -0,0 +1,50 @@
|
|||
package org.mage.test.cards.single.cmr;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestCommanderDuelBase;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
|
||||
public class HellkiteCourserTest extends CardTestCommanderDuelBase {
|
||||
|
||||
@Test
|
||||
public void test_ETB() {
|
||||
// https://github.com/magefree/mage/issues/7198
|
||||
|
||||
// When Hellkite Courser enters the battlefield, you may put a commander you own from the command
|
||||
// zone onto the battlefield. It gains haste. Return it to the command zone at the
|
||||
// beginning of the next end step.
|
||||
addCard(Zone.HAND, playerA, "Hellkite Courser", 1); // {4}{R}{R}
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 6);
|
||||
//
|
||||
addCard(Zone.COMMAND, playerA, "Balduvian Bears", 1); // {1}{G}
|
||||
|
||||
checkCommandCardCount("before", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
|
||||
|
||||
// cast card and move commander to battle
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Hellkite Courser");
|
||||
setChoice(playerA, "Yes"); // put commander to battlefield
|
||||
setChoice(playerA, "Balduvian Bears");
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
checkPermanentCount("after etb", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
|
||||
|
||||
// try to attack (test haste)
|
||||
attack(1, playerA, "Balduvian Bears", playerB);
|
||||
|
||||
// keep until end
|
||||
checkPermanentCount("keep after battle", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Balduvian Bears", 1);
|
||||
|
||||
// return to command zone
|
||||
checkPermanentCount("return on end", 2, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 0);
|
||||
checkCommandCardCount("return on end", 2, PhaseStep.PRECOMBAT_MAIN, playerA, "Balduvian Bears", 1);
|
||||
|
||||
setStrictChooseMode(true);
|
||||
setStopAt(2, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
}
|
||||
}
|
||||
|
|
@ -2055,7 +2055,7 @@ public class TestPlayer implements Player {
|
|||
Set<UUID> possibleCards = target.possibleTargets(sourceId, abilityControllerId, game);
|
||||
CheckTargetsList:
|
||||
for (UUID targetId : possibleCards) {
|
||||
MageObject targetObject = game.getObject(targetId);
|
||||
MageObject targetObject = game.getCard(targetId);
|
||||
if (hasObjectTargetNameOrAlias(targetObject, possibleChoice)) {
|
||||
if (target.canTarget(targetObject.getId(), game)) {
|
||||
// only unique targets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue