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

able to sacrifice a creature to Desecration Demon even when there are no creatures you control #17

Closed
melvinzhang opened this issue Nov 7, 2014 · 2 comments
Assignees

Comments

@melvinzhang
Copy link
Contributor

@melvinzhang melvinzhang commented Nov 7, 2014

originally from http://www.slightlymagic.net/forum/viewtopic.php?f=82&t=3735&p=167490#p167489

jerichopumpkin wrote:
if you have got no creatures on the battlefield, when you are prompted to choose if sacrifice a creature for Desecration Demon, you can answer "yes", and Desecration Demon still becomes tapped and gets a +1/+1 counter

@ShawnieBoy
Copy link
Member

@ShawnieBoy ShawnieBoy commented Nov 9, 2014

Was checking if the sacrifice option was vaild after already asking the player.

@melvinzhang
Copy link
Contributor Author

@melvinzhang melvinzhang commented Nov 10, 2014

I think that's the wrong fix. The bug is in MagicConditionFactory.HasOptions(targetChoice). Note that the yes/no is asked when the trigger goes on the stack, the sacrifice happens when the effect resolves, between two events, you may have lost all the creatures you control. Thus, it is necessary to check isSatisfied in executeEvent. We should also not retrict the trigger to occur only if the opponent has a creature because you can gain a creature after the trigger goes on the stack and before the trigger resolves.

The bug in MagicConditionFactory.HasOptions(targetChoice) is checking where source.getController has a creature, not if event.getPlayer has a creature. This affects all uses of HasOptions and is rather serious.

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

Successfully merging a pull request may close this issue.

None yet
2 participants