New way of copying permanents - supports copies of copies. +1 test pass.

This commit is contained in:
magenoxx 2012-05-23 20:41:51 +04:00
parent e5b6807d91
commit 0d732e8f86
11 changed files with 149 additions and 49 deletions

View file

@ -103,7 +103,7 @@ public class PhantasmalImageTest extends CardTestPlayerBase {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Illusionary Servant");
setChoice(playerA, "Illusionary Servant");
setChoice(playerA, "Phantasmal Image");
setChoice(playerA, "Illusionary Servant-M12");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Phantasmal Image");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Phantasmal Image");

View file

@ -189,6 +189,12 @@ public class TestPlayer extends ComputerPlayer<TestPlayer> {
choices.remove(choose2);
return true;
}
} else if ((permanent.getName()+"-"+permanent.getExpansionSetCode()).equals(choose2)) {
if (((TargetPermanent)target).canTarget(playerId, permanent.getId(), null, game) && !target.getTargets().contains(permanent.getId())) {
target.add(permanent.getId(), game);
choices.remove(choose2);
return true;
}
}
}
}