kwsch / PermuteMMO

Permutes all possible player actions to yield shinies in Pokémon Legends: Arceus
GNU General Public License v3.0
29 stars 5 forks source link

Extract state tracking model, refactor for multi-wave #7

Closed kwsch closed 2 years ago

kwsch commented 2 years ago

Extracts some logic for respawning into the spawner model. Can be experimentally reused for different spawner counts.

Since I got carried away...

Refactors SpawnInfo to be a linked list allowing circular wave referencing. Still need to investigate quirks of regular spawners. Might need to tweak the recursion depth or refactor to not be recursion if a stack overflow is nigh :)

Don't have json for wild encounters, but this could technically support permuting wild stuff (respawn via resting) or future encounter types with multi waves (pls give us challenging wave encounters for SV or Nightfall DLC).

Removes isBonus passing for each recursion step, ez perf gain w/ 1 less primitive being passed.