Closes#3519
Usages weren't consistent; since `é` isn't accessible on usual english keyboards, just use regular `e` instead of alt-223 entry.
Not sure why VS preferred to save the text files without an encoding prefix; oh well.
New current handler verifier settings flag GO => LGPE transfers. Unlike GO => HOME, these transfers use your LGPE OT info, so it's legal to have no HT and have the current handler be OT
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Default settings do not flag, as Database view does not track the savefile (LegalityAnalysis only indirectly references the latest loaded save file, not the true source).
Bulk Analysis will flag them correctly if run. Can be turned off.
Recipient language fetching a value of 0 will now be permitted to yield the recipient's language. Earlier logic in the method would check if any other language maps to the recipient language
* Added Gen2 italian items text
* Italian translation text_ItemsG2_it.txt
* Translated MessageStrings_it.txt and improved some other italian messages/strings for better comprehension.
* Some tweaks
Not to be confused with Home fixed PID antishinies
WC8 is the only format to have fixed shinies, but let's copy the logic to WB8 and WA8 if they're ever added in the future.
Fix mgdb display filtering for SWSH & PLA (swapped oops)
Closes#3511
* Revises legality checks to account for traveling between the three game islands (PLA/BDSP/SWSH)
* Adds conversion mechanisms between the three formats, as well as flexible conversion options to backfill missing data (thanks GameFreak/ILCA for opting for lossy conversion instead of updating the games).
* Adds API abstractions for HOME data storage format (EKH/PKH format 1, aka EH1/PH1).
* Revises some APIs for better usage:
- `PKM` now exposes a `Context` to indicate the isolation context for legality purposes.
- Some method signatures have changed to accept `Context` or `GameVersion` instead of a vague `int` for Generation.
- Evolution History is now tracked in the Legality parse for specific contexts, rather than only per generation.
Future-proofing. We know that Hisuian Zoroark is in SV, as well as Petilil, so if Hisuian Lilligant is also present, we need to not show Lady Lilligant in the form dropdown for those games.
Also only show Primal Kyogre/Groudon for Gens 6/7 (can be revised later if they come back in SV).
ShowdownSet: Lessen allocation
MoveTutor: Remove boxing by calling the generic method instead of object method
Xoro8b: Add more xmldoc, use positive constant instead of inverse negative for parity
StadiumUtil: Use built-in endianness reversal methods
struct implementing interface is boxed when passed to method that accepts interface (not generic method).
Removes IDexLevel (no other inheritors but EvoCriteria) and uses the primitive the data is stored (array, not IReadOnlyList) for slightly better perf.
ty @Atrius97 for finally nailing the repro on this
Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Only allocations that remain are the runtime `new string(...)` that is required for the gen1-5 species name quirks.
Inlines some logic for language fetch, and requires slightly less memory.
Many years ago, PKX used to be a >4,000 line bloated file, which spun off multiple classes like CommonEdits and most of the early non-GUI PKM related logic. Now, it's just a stub to source the latest generation & personal table.
Separate files = more concise info, and more room to grow to do more advanced things.
Makes the IsPresent methods public (no longer internal).
* Draft checks for encounter slot mastery
* Check encounter mastery flags
* Add moves for LA static encounters that don't follow learnset
* Add moves on crossover LA static encounters
* add alpha moveset population method
Now generates and applies moves as the game does
Updates some handling of other methods to use Span
* Show better message for bad mastery init flags
* Insert descending if candidates have same level
Level 78 Yanmega:
- [01] [10] Quick Attack
- [06] [15] Gust
- [11] [20] Silver Wind
- [18] [28] Hypnosis
- [25] [35] Air Slash
- [34] [45] Ancient Power
- [43] [54] Crunch
- [43] [54] Bug Buzz
Yields:
AlphaMove
Crunch*
Bug Buzz*
Ancient Power
* Descending order due to iteration
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
Add Get/Set Relearn method to PKM.cs
Alpha Mastered move now indicates incomplete text entry (like moves/relearn)
Split up legal move indication helper class, use DI to allow other implementations of DataSource to be returned (pkhex mobile?).
Remove unused gender refresh method (see previous added UserControl commit)
Add helper method to center control within control
Single underscore discards (one of the c# language revisions allowed reusing the single underscore discard).
Remove a temporary allocation in BDSP flag editor
* Make EvolutionCriteria struct
8 bytes per object instead of 26
Unify LevelMin/LevelMax to match EncounterTemplate
bubble up precise array type for better iteration
* Inline queue operations, less allocation
* Inline some logic
* Update EvolutionChain.cs
* Improve clarity on duplicate move check
* Search reverse
For a dual stage chain, finds it first iteration rather than second.
Instantiating from template now follows group seed -> spawn 1 correlation, including alpha move.
Differentiates static encounters that don't follow the ow8a correlation, scrambles EC to disassociate.
Adds rand64 to get initial seeds
Set correct level range to match slotSeed; not respecting the slot roll being valid, but whatever.
Now reads/writes correctly in the GUI.
Closes#3470
Not going to handle slot swaps not matching the data, as this becomes problematic when cloning slots. Previous commit added the ability to manually move mail slots.
First 5 blocks are reserved for file accessing info, but we should include them when checking length
Closes#3468
Capture the bool indicating Japanese for the save file, so box names are now read correctly (if changed from game's default).
Getting close to weeding out all the easy inefficiencies to make me finally tackle the "stop gathering all moves instead of checking individual moves" allocation issue.
net6 was 4x faster than 461 with the old implementation; now it is faster for both but not as disparate.
New implementation performance is always at least 30% better than the old implementation; even better for smaller chunks of data (40% less time).
Pretty much mimics bare metal value writes
Sweet Heart still unobtainable (why did they give it a sprite if it's not functional ingame?)
Azure Flute is now obtainable
Sacred Ash was never obtainable
ddc6f414df caused it to be `<=` instead of `<`, but maybe the underlying issue was fixed a different way since all tests still pass with this reversion.
* Reuses move parse result objects for each encounter parsed in a LegalityCheck attempt, instead of creating a new object.
* Ensures the objects are never-null, and makes cleanup easier.
Slightly adjusts some other parts of the moveset validation to reduce allocations.
Have `Shiny.Random` be `0`, so we can skip init on this field for EncounterStatic. Plus makes it a little less brittle for future expansion if shiny qualities change.
ALM runs each legalization attempt in a separate thread, and if things are fast enough, we get multiple threads with the same Environment.TickCount seeding their Rand generator, resulting in the same PID/EC if similar templates are used.