-
Notifications
You must be signed in to change notification settings - Fork 816
Hinata fixes #13489
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
base: master
Are you sure you want to change the base?
Hinata fixes #13489
Conversation
[[Hinata, Dawn-Crowned]] Wanted to write down a list of interesting cards to write tests for:
|
Hinata, Dawn-Crowned - (Gatherer) (Scryfall) (EDHREC)
Volcanic Offering - (Gatherer) (Scryfall) (EDHREC)
Magma Opus - (Gatherer) (Scryfall) (EDHREC)
Mystic Confluence - (Gatherer) (Scryfall) (EDHREC)
Prismari Command - (Gatherer) (Scryfall) (EDHREC)
Wail of the Forgotten - (Gatherer) (Scryfall) (EDHREC)
Sublime Epiphany - (Gatherer) (Scryfall) (EDHREC)
|
Another weird test case: something makes [[Collective Effort]] cost {1} more to cast and you only have 2 white mana available to cast it. It would be possible to cast this with Hinata if you have an untapped creature. |
Collective Effort - (Gatherer) (Scryfall) (EDHREC)
|
I'm also pretty sure [[Battlefield Thaumaturge]] is incorrect as well. |
Battlefield Thaumaturge - (Gatherer) (Scryfall) (EDHREC)
|
Some notes:
|
Cosmic Hunger - (Gatherer) (Scryfall) (EDHREC)
|
Some info/ideas (do not debug real code) for second effect (opponent's cost increase):
Looks like that's a problem code: It must look for required and min targets amount like that -- maybe it can help: if (game.inCheckPlayableState()) {
return abilityToModify.getTargets().stream()
.mapToInt(a -> !a.isRequired() ? 0 : a.getMinNumberOfTargets())
.min()
.orElse(0);
} else {
return CardUtil.getAllSelectedTargets(abilityToModify, game).size();
} |
Yup, these were all the same conclusions I came to. Right now, I'm focusing on writing tests to hit all of the edge cases I can think of. The code snippet you give is too simple, though. It doesn’t acknowledge the existence of different modes and also as mentioned above a simple |
BTW it’s ok to reduce whole generic cost in hard use case like Integer.MAX (example: possible targets count in single mode and whole generic cost on multiple modes) — real cast will use real targets list anyway. The main task here - pass playable check. P.S. Snippet can be improved by code |
I’d personally prefer to end up with something that’s correct in most cases (and overly conservative in others) because I personally dislike when a card highlights as playable when it isn’t actually. |
Last I knew, the playable check is used to not only determine whether a card is highlighted as playable but also whether or not you can attempt to play it at all so if we can't be 100% correct, we must be liberal in corner cases. |
@Grath yeah that's what led me to fixing this because as it is right now the card is nigh-unplayable. |
Attempting to fix #8685 (this never actually got fixed) and #10112
Just some tests for now.