Maruno17/pokemon-essentials

Bug: X-Items not working correctly.

Closed this issue · 1 comments

2021-02-15.22-33-44.mp4

According to my testing in my own projects and Essentials v18.1, X-Items are still bugging out. They seem to have a really weird quirk where they only work properly on the Pokemon in the first slot of the party before battle starts. If that pokemon doesn't participate in battle, either via fainting, before or during or switching to a different Pokemon, then X-Items stop working properly. When using an X-Item on the Pokemon in the second slot, it suddenly starts showing them being used on the AI Pokemon. If you switch to a Pokemon in a different slot altogether, the game starts throwing error reports.

https://i.imgur.com/9b9J41Y.png

The root of this problem was confusion between party indices and battler indices. It should be fixed in the latest commit. I even tested it and it works.