-
Notifications
You must be signed in to change notification settings - Fork 761
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
Reworking goad effects (ready for review) #8034
Conversation
still having problems with this, not sure if it's due to the changes not working or issues with the test framework or both |
ok now when I run the test I added it attacks a random player including the goading player and also sometimes no players at all |
BTW you can use runCode command in tests -- it allows to make checks and asserts at any player's priority time. Not only at the end. Example: it can run attacks restriction or targets count (is it correct or not). |
oh wow, that's awesome |
@JayDi85 I think there's something wrong with TestPlayer's combat handling in multiplayer, I copied |
ok so it turns out that |
it seems like this is something to do with target selection |
Maybe related issues to that PR (wrong goad/restriction): |
ok I just pushed that one fix, I'll take another look at the other ones |
seems like it's choosing the opponent just fine but the attackers aren't getting declared anyway |
Todos in targeting code -- about choosing good or bad target. Look at target permanent code -- it selects by toughness to kill first. So player target can be same -- selects first to kill. Btw targeting code uses for non target calls, e.g. on resolve or choices. AI selects real spell targets by game simulations and battlefield score calc. |
I think the changes I made to targeting were fine since they only seem to matter when attacks are being forced. Anyway, all the tests pass now. |
Is it fix something in goad or it just a refactor? |
what do you mean? |
|
So something changed in game logic, not only refactor. |
I took that to mean that it shouldn't have been choosing planeswalkers at a higher priority, plus it was using a randomly chosen opponent rather than one of the defenders that the target was supposed to choose from. I'm pretty sure the only situation where that code block is even used is when the player is forced to attack. And I removed those |
oh I see what you're asking, yeah it's a fix and a refactor, but mostly because the rules for goad changed and I wanted to rework the implementation anyway because it wasn't working right |
just rebasing, not merging |
I'm gonna merge this tomorrow |
Changing goad effects so that they add a designation to the creature that is goaded. I'll build goad support directly into the game.