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
Various bugs in PhantomPreventionEffect #12179
Comments
Phantom Wurm - (Gatherer) (Scryfall) (EDHREC)
|
New to this object--would it not be better to instead check the |
Nope, |
I think we could have an event whenever GameState::procesAction is called and reset the watcher then? Really not sure. |
Just use two events - one to apply (on damage) and one to reset (on damaged). It’s a standard code style to reset some values in many places. |
Issue is that replacement effect prevents all the damage. So we may not see the proper damaged event when we'd like to reset. And grouping/batching multiple pre-replacement effects seems wrong, but that's just my gut feeling. I guess I'll need to see it in action a lot of testing to be convinced. |
Phantom cards has three problems (see tests list in starting post):
|
There are only one batch event with all damages. So watcher can be reset after each (e.g. on next damage it will take new counter). Queue example:
|
Yes, but when all damage is prevented, there is no batch event of all damage. At least I don't think so. Will check later. |
[[Phantom Wurm]] as example
Affected 7 cards: https://scryfall.com/search?q=phantom%20o%3A%22prevent%20that%22
Reported bug on discord for Phantom Nishoba: if dealt damage by multiple sources during the first strike combat damage step, a counter is removed for each source.
Effect has a hack to remove only a single counter during combat damage step, but it doesn't consider the first strike combat damage step. The hack is also problematic in that subsequent non-simultaneous damage within the same combat damage step would (presumably) be caught by the same code and not remove a counter.
Storing info within the class is bad style anyway.
Needs reworked, probably using a watcher, but not clear exactly how to reset it - probably on every process action?
Must have unit tests for various cases:
The text was updated successfully, but these errors were encountered: