continued simplification
core.cs is pretty much the following:
misc one-off junk
moveset fetch
encounter table fetch
evo chain fetch
might eventually move things around a bit further for cleanliness so
that misc meta junk is the only thing that remains in core.
egg fetch returns array, need to add to the collection
force everything as readonly to prevent adds outside of the constructor
Closes#1988
Thanks @iiippppk !
fix b2w2 egg base levelup reference (not bw, b2w2!), doesn't really
matter much except for better indication (possibly?)
remove some unnecessary linq ToArray() calls
continue relocating code out of Core
pull out some move data fetching to separate class
add methods to quickly fetch if the move is learnable via that method
eventual plan is this:
replace
'fetch all possible moves then look within' move validation
with:
'peek if learnable, and get info how' move validation
advantages:
- returns game the move was learned in and the level (if appropriate)
- infinitely less object creation (garbage collection)
- only looks for a given move, doesn't have to fetch everything before
checking
- faster than full fetch, can be made even faster by optimizing lookups.
subject to change :)
Level = Level is equivalent to Level = 0
update EggInfoSource to use Level instead of LevelMin (LevelMin returns
Level, just be clear on usage)
update VerifyCurrentMoves so that only gen1/2 do the gen1/2 move update
methods. Recently extended all encounters to have a generation property;
we only care about gen1/2 here.
https://projectpokemon.org/home/forums/topic/43655-pokemon-crystal-egg-mark-as-not-legit/
fetch is exclusively done with version already known; there are cases
where version can change for eggs so it's safer this way.
version change reference (gen6+):
212a489335