off by 1 max range for gen2 slot -> pk2
SetRandomIVs already sets IVs inside the method, retval is for knowing what the new value sare
show WC8 restricted version rather than defaulting to SH
pass the rand object rather than fetching for the current thread every loop for Unown & random IV shuffling
Use ToLowerInvariant for resource fetching, should resolve the turkish issue
Check typeof(T) first, not that we check for ToolStripItem or ContextMenuStrip with this function.
* Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately
Don't store within the object, track the slot origin data separately.
Batch editing now pre-filters if using Box/Slot/Identifier logic; split up mods/filters as they're starting to get pretty hefty.
- Requesting a Box Data report now shows all slots in the save file (party, misc)
- Can now exclude backup saves from database search via toggle (separate from settings preventing load entirely)
- Replace some linq usages with direct code
* Remove WasLink virtual in PKM
Inline any logic, since we now have encounter objects to indicate matching, rather than the proto-legality logic checking properties of a PKM.
* Use Fateful to directly check gen5 mysterygift origins
No other encounter types in gen5 apply Fateful
* Simplify double ball comparison
Used to be separate for deferral cases, now no longer needed to be separate.
* Grab move/relearn reference and update locally
Fix relearn move identifier
* Inline defog HM transfer preference check
HasMove is faster than getting moves & checking contains. Skips allocation by setting values directly.
* Extract more met location metadata checks: WasBredEgg
* Replace Console.Write* with Debug.Write*
There's no console output UI, so don't include them in release builds.
* Inline WasGiftEgg, WasEvent, and WasEventEgg logic
Adios legality tags that aren't entirely correct for the specific format. Just put the computations in EncounterFinder.
* Edit: The Spanish texts in the Resources folder have been updated.
* Edit: The translation of some files was updated and new translations into Spanish were made.
Farewell secret base descriptions. Not like the localized names would be too useful, but git history can keep em around if we ever need to reference them again (pls no)
Closes#3177
Format sizes are now accurate to game structure sizes. Added a few more editable fields, rid of label/textbox/etc for general base editing -- use a PropertyGrid instead.
Feels nice having a bank of saves to reference + idb to discover the struct layout.
Manually transferred from English Pt to English B
All revised indexes were the result in Black.
Differences that were not incorporated:
0EE=09794 ♂, not 09325 ⑭
0EF=09792 ♀, not 09326 ⑮
0F2=00215 ×, not 09319 ⑧
0F3=00247 ÷, not 09320 ⑨
Full-width and half-width symbols I think are related to full-width games, which English isn't. Probably has different handling for other language, plus it'd result in other duplicates of the half-width symbols.
Revise not-found char glyph to return ? instead of {terminator}, to match the game's behavior. Again, this might be language specific, but whatever.
Make the Convert char methods public, add a few unit tests.
Closes#3172
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
GetCanKnowMove should be checking for Smeargle knowing thousand arrows/waves.
GetNeededMoves should also return 1ka/1kw for needed moves, and then no encounters.
All uses of InvalidSketch are behind that method, so any future Smeargle modifications (like sketching a dummied move) will be checked (yay BDSP considerations).
Removes duplicates if every encounter in the same index is the same as a
previous index. The following were affected, and only the first index
was retained.
- 5, 7 (Index 2 has 1 move different on 1 mon)
- 3, 4
- 11, 13
- 16, 18
- 27, 28, 30, 32
- 33, 35
- 36, 38
- 42, 44
- 45, 47
- 48, 50, 52
- 53, 55, 57
- 59, 61
Just allocate the parent array and pass it to HashSet; having an ICollection, prevents resizing repeatedly and gc'ing the temp array is cheap.
Actually, only create a hashset if we're adding a gift from external DB. Saves on that allocation, and keeps the final result as an array (fastest iterating).
Removes 1.5MB of allocation; we don't need to preserve the encrypted state.
Revise savefile clone operation to use its own constructor, as we need to call the base constructor first (backup file clone...) prior to decrypting.
Expose CryptStaticXorpadBytes as GetDecryptedRawData no longer exists.
Regex objects aren't cheap, and the RegexCache has DefaultMaxCacheSize = 15.
We're checking 4,000 regexes for each unique string, so just keep the created regexes around instead of cycling new through the cache.
+4MB passive consumption, but each IsFiltered call no longer generates >4MB of discarded objects.
My unit tests run >25% faster now... nice?!