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

AI must support multiple targets on resolve #12044

Open
2 tasks
JayDi85 opened this issue Apr 2, 2024 · 2 comments
Open
2 tasks

AI must support multiple targets on resolve #12044

JayDi85 opened this issue Apr 2, 2024 · 2 comments
Assignees
Labels
AI bug Bugs and errors

Comments

@JayDi85
Copy link
Member

JayDi85 commented Apr 2, 2024

From #12039 (comment)

BarterInBloodTest uses AI targeting instead direct test commands and it fails on "while" remove. Looks like AI do not support multiple targets in choice dialogs (on resolve) and it works fine for cast/activate only (cause it uses game simulations for it).

Good code from human:
shot_240402_070836

Bad code from computer:
shot_240402_071218

It's a more global problem with AI, not related to PR. Possible bug: ability require to select a multiple targets for sacrifice, but AI selects only 1;

TODO:

  • add AI tests for "choose multiple targets on resolve" use cases -- BarterInBloodTest and SacrificeAllEffect is good starting point;
  • search and replace all while cycle with Target::isChosen usage by single "choose" call (all multiple choices must be processed inside a choose dialog);
@JayDi85
Copy link
Member Author

JayDi85 commented Jan 12, 2025

Fix example: 39872e2

@JayDi85
Copy link
Member Author

JayDi85 commented Jan 12, 2025

Looks like TestPlayer can have same problems -- if you setup wrong choices in VonasHungerTest->test_Ascend_Normal (e.g. choose 1 creature instead 3) then it pass it with 1 sacrificed creature and without any errors.

Test code must raise errors on wrong targets setup. Need research -- is it possible to fix. Yes, it's possible to fix, see example with c82511f

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

No branches or pull requests

1 participant