mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user