cp.getMatchingForgeCard() hand no owner and belonged to no game - that's why it didn't pass the test invoked by Card.isValid

This commit is contained in:
Maxmtg
2013-06-24 16:08:56 +00:00
parent 69d5be5bd9
commit b20da90917

View File

@@ -108,7 +108,8 @@ public class ChooseCardNameEffect extends SpellAbilityEffect {
Collections.sort(cards);
PaperCard cp = GuiChoose.one(message, cards);
if (cp.getMatchingForgeCard().isValid(valid, host.getController(), host)) {
Card instanceForPlayer = cp.toForgeCard(p); // the Card instance for test needs a game to be tested
if (instanceForPlayer.isValid(valid, host.getController(), host)) {
host.setNamedCard(cp.getName());
ok = true;
}