-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Prevents double targeting on player mon if both ai mons see kill #5297
base: upcoming
Are you sure you want to change the base?
Conversation
Would you be willing to add an extremely brief section for the flag to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as is, though I would request that AI_FLAG_VANILLA_DOUBLE_TARGET
get added to the ai_flags.md document if you don't mind :)
Will add. Also I want to write some tests. |
Ready for re-review |
There is a bug (the ai recalcs the target but not the move choice) in this so putting in on draft |
I'm now back form my honeymoon so can re-review when you're ready :) |
Closes #5212. It isn't exactly what was asked in the suggestion but this is a superset of it. I believe the suggestion in the issue ticket isn't good and should not make it into expansion
In vanilla when both AI mons see a kill on a player mon they will pin down the mon with both mons. This pr changes it so the other mon will be targeted by one of the AI mons.
Since this is a superset of the vanilla implementation I made it as default with a vanilla ai flag to turn it off. This could potentially be a config. Additionally or replacing the ai flag.
Examples:
If slot 1 and 3 see kill on slot 2, Slot 1 will first target slot 2 then if Slot 3 targets slot 2 as well, slot 1 will recalc and skip slot 3 as the target
If both ai mons (slot 1 and 3) see kill on both player mons (slot 0 and 2), slot 1 will randomly decide between slot 0 and 2. Then Slot 3 decides randomly. If they both target the same slot, slot 1 will recalc
Scenario 1:
double1.mp4
Scenario 2:
double2.mp4
Scenario 3:
double3.mp4