keldaanCommunity / pokemonAutoChess

Pokemon Auto Chess Game. Made by fans for fans. Open source, non profit. All rights to the Pokemon Company.
https://pokemon-auto-chess.com/
GNU General Public License v3.0
1.15k stars 359 forks source link

Fix order of simulation constructor call #2415

Closed sylvainpolletvillard closed 1 week ago

sylvainpolletvillard commented 1 week ago

Rearrange the simulation constructor call to ensure proper initialization of players objects before calling the simulation logic

For example player.team was not always correctly initialized when calling afterSimulationStart hooks.

I think this is what caused the comfey bug https://discord.com/channels/737230355039387749/1301940314948505690