Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card played face down by AI is revealed when popup shown via stack #455

Closed
lodici opened this issue Sep 30, 2015 · 6 comments
Closed

Card played face down by AI is revealed when popup shown via stack #455

lodici opened this issue Sep 30, 2015 · 6 comments
Labels

Comments

@lodici
Copy link
Member

lodici commented Sep 30, 2015

...and possibly using the new card link in the log as well. Reported on forum -

@lodici
Copy link
Member Author

lodici commented Oct 26, 2015

@melvinzhang, what is the best way to determine if MagicCardOnStack is face down?

@melvinzhang
Copy link
Contributor

@lodici there wasn't a good way to do it, so I made some modifications. For face down spells, cardOnStack.getCardDefinition() will return the Morph card definition instead of the actual card. To get the actual card definition, call cardOnStack.getSource().getCardDefinition()

@lodici
Copy link
Member Author

lodici commented Oct 27, 2015

That is certainly better than it is now, it shows the morph image although for both players. It seems to me that if MagicCardOnStack can be face down then it would be more logical and consistent if it has an isFaceDown() property similar to MagicPermanent (ie. it has a state that can be checked).

Will this update work for all other cases where the popup image should not show the main image? For example, manifest, double-sided, etc. I would find it very helpful if we could compile a definitive list of scenarios where this can happen.

@melvinzhang
Copy link
Contributor

Added isFaceDown to MagicCardOnStack

@melvinzhang
Copy link
Contributor

Changed to show the true card for human player. Not sure what you mean by other cases, from what I know, spells can only be face down when cast via the Morph ability. Manifest does not cast the spell, it just takes it from the library and put it on the battlefield face-down, double-faced cards are always cast from the normal face.

@lodici
Copy link
Member Author

lodici commented Oct 27, 2015

Thanks for the updates - it now behaves as expected. I was not sure whether there might be other circumstances other than morph where this issue might occur again. If it only affects morph then all bases appear to have been covered, thanks again for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants