When Max Battles first launched, the Master Ball was not available in the Poké Ball tray in the bonus challenge. This did not apply to the tutorial Wooloo or Skwovet/Wooloo from Special Research.
0.333.0, which released on September 27 2024, added a property named `canUseMasterBallPostBattle` for Max Battles. Players noted being able to use a Master Ball on Gigantamax Charizard when it debuted in the game, meaning this is the likely culprit.
Since all past Max Battles have other, less restrictive encounter methods where the Master Ball is permitted, this does not cause any potential invalid legality overlaps. Gigantamax Pokémon also can't be transferred, so they don't need to be accounted for.
* use pa8's current level for determining Mastered flag for Move Shop Records to ensure all flags are checked on encounters who learn moves close to their level mins
* use met level instead of current level to reduce unnecessary calculations
Can get the native memory span via MemoryMarshal.CreateSpan; this skips allocating a 15KB buffer as well as copying 30KB for each mutation
am paranoid about mutating the original image, so that can stay for now
Was missing the worst case scenario; ran a bruteforce script to find a 539 after adding the final logic. We try to do the least amount of cpu instructions so this is probably the better arrangement anyway.
Revise the method signatures to exclude the scratchspace span reuse (not-obvious behavior). Just stackalloc a new span.
Add seed indication to legality formatting. #4416
Closes#4416
Majority of the changelog here is additional/revised comments/xmldoc or "unused code". Only `GetFirstSeed`'s behavior has changed on line 154 (new). Since there is no longer the need to refer to Species and Course, remove from the method signatures & usages.
Refer to the discussion in the ^ mentioned issue.
Co-Authored-By: HappyLappy1 <86489014+happylappy1@users.noreply.github.com>
Co-Authored-By: NickPlayeZ <80699972+nickplayez@users.noreply.github.com>
Handle ARNG egg manaphy for gen4 trainer, force hatch
add xmldoc/comments
expand expressions for version/language selection, disallow languages correctly
Make nick/trainer'd encounters use RoM instead of string[] to truly make them readonly records, and skip 1 dereference on access
add some xmldoc
fix open file suggesting main from another folder
Closes#4410
Also fix trash bytes persistence (only overwrite nickname with default if it visually differs from what is present in the textbox).
Add trash edits to Gen3 HoF
The first screen is configured with origin coordinates 0,0; any other screens that are arranged to the left or below will have coordinates in the negative. Negative coordinates are valid; don't sanitize.
Closes#4409
(icon reference needed to point to the static resource)
Add SAV3 property to check for misconfigured (small) sizes, to disallow editing extdata blocks that don't exist (no exception thrown for the small saves, can't open the GUI)
Rearrange GUI, handle exception when copypasting bad PID and saving, add sprite, add Clear button instead of auto-clearing on species:0, add shiny checkbox (readonly)
Only checks PLA stats in PA8 format; no need to type check this in the main method. Might be a good idea to extract format-specific verifiers into classes.
Extract size checks to top level method. A wasted type check isn't too bad compared to all the duplicate logic.
Less noise in the user drop-downs for moves that aren't available in the game. Unlike SW/SH that has all moves from the past, there's no need to confuse the user with impossible options (unless they turn on HaX, which is unchanged).
Add performant path for dummied move list fetch for Gen8a+
Skip duplicate work for Relearn list fetch (always same as Moves, except for Gen7 relearn)
No need to carry this baggage further since SV ditched it. PLA and BDSP only have it because there's a gap in the structure that *we assume* is unused (rather than reserved), and is worth checking for legality (unused bytes shouldn't be used).
Inline some gameversion calls, replace `is IAlpha` with immutable interface instead
Add interface to get the mastery object for a given a learnset source & species-form (rather than calling it statically)
Shorten the BallUseLegality expression
Defer ec%100 context to PKX (easy to miss in a future update if any others added down the road)
Rewrite Alpha mark check logic to require entry in to HOME (tracker present) as that's the method of obtaining the mark
Make SaveUtil not allocate, and let the compiler optimize size checks.
If Legends: ZA adds more megas (likely), would have to refactor this monster. Rename the mega check, as SV doesn't have megas, but if ZA is Gen9(a?) we need to segregate somehow.
No need to have the entire master personal table visible within the assembly when it is only used for gender fetching. Add 2 methods that return the info that the previous consumers were wanting from the previous logic.