Set unique target players for CharmAi#10053
Set unique target players for CharmAi#10053kojotak wants to merge 4 commits intoCard-Forge:masterfrom
Conversation
|
Are there cards with CharmAi that can legitimately target the same player and you can choose more than one option? If there are, would this break them, especially in 1v1 matches where this behavior would be viable? |
| if (uniquePlayerTargets == num) { | ||
| Player nextPlayer = ai; | ||
| for (AbilitySub choosen : chosenList) { | ||
| choosen.resetTargets(); |
There was a problem hiding this comment.
hmn this is a tricky situation:
I don't think trying to retroactively fix the situation is viable enough (right now it could still perform illegal targeting and chances are this approach just ends up producing dumb plays anyway)
What should happen instead is manually building out the SA chain inside each choices loop so that their API checks can just naturally skip already targeted entries 🪄
Though it looks to me like this might risk CharmEffect.chainAbilities creating an infinite loop, so probably also requires some additional reset logic before finishing 🤔
There was a problem hiding this comment.
I don't think trying to retroactively fix the situation is viable enough
You are right. I've discovered some invalid targeting today as well 😞.
I was considering adding new parameter (TargetDifferentPlayer$ True) representing Each mode must target a different player. (as a hint for targeting) but it duplicated the TargetUnique$ True (for each mode).
I will try to take a look at "SA chain", because that's something new for me.
I was worried about it too, therefore the proposed change checks for I tried to check charms with |
657e6c8 to
7b2511c
Compare
Possible fix for #9044.
AI no longer targets the same player. Same issue as with
Shadrix Silverquillcan be observed withChaos Balor. It works, but I'm not sure, whetherCharmAiis the right place (and time) to set targets.