Commit graph

4041 commits

Author SHA1 Message Date
JDox
742ade78f6
Update MessageStrings_es.txt (#3225) 2021-06-24 08:28:00 -07:00
Kurt
a10b35190c Minor tweaks
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.
2021-06-24 00:36:04 -07:00
Kurt
401ab98f42 Fix inlined check 2021-06-22 23:30:40 -07:00
Kurt
3e7775fc44
Track a PKM's Box,Slot,StorageFlags,Identifier metadata separately (#3222)
* 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.
2021-06-22 20:23:48 -07:00
BlackShark
350383cf51
Updated German translation (#3223)
* updated german language files

* added german readme
2021-06-22 20:12:15 -07:00
Exorcism
3fecea9e29
Update some file for the FR language (#3220)
* Update some file for the FR language

* Update README.md

* Update MessageStrings_fr.txt

* Add files via upload

* Add files via upload

* Create text_ItemsG3Colosseum_fr.txt

* Update lang_fr.txt

* Create text_ItemsG1_ko.txt

* Create text_ItemsG1_it.txt
2021-06-18 22:10:39 -07:00
Kurt
87ac1cbcc9 Unban Sgr7348 encounter 2021-06-18 22:07:27 -07:00
Kurt
9e427ad9a0 Update translatables with latest 2021-06-15 20:01:01 -07:00
Kurt
394c5c2c95 Minor clean
Shed some unused code
2021-06-15 20:00:51 -07:00
Korados
47d14abbf0
Colosseum and XD German Item Names (#3219)
* Create text_ItemsG3XD_de.txt

* Update text_ItemsG3XD_de.txt

* Create text_ItemsG3Colosseum_de.txt
2021-06-15 16:43:25 -07:00
Kurt
a1ddbc7930 Add settings to use pkm tabs as criteria for Enc->PKM
Some encounters might not use the criteria completely, so it might not listen 100% of the time.
2021-06-14 20:26:12 -07:00
CanoeHope
249070debd
Corrected GSC Sudowoodo Event Flag (#3217)
* Update flags_c_en.txt

* Update flags_c_es.txt

* Update flags_c_ja.txt

* Update flags_c_zh.txt

* Update flags_gs_en.txt

* Update flags_gs_es.txt

* Update flags_gs_ja.txt

* Update flags_gs_ko.txt

* Update flags_gs_zh.txt

* Update flags_gs_es.txt
2021-06-14 14:13:50 -07:00
M1atias
4bdff06145
Edit: The Spanish texts in the Resources folder have been updated. (#3216)
* 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.
2021-06-14 06:52:24 -07:00
Kurt
652e9eb6da Add Eon Flute to observable used key items
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2021-06-13 00:59:06 -07:00
Kurt
e56281aff6 Update GUI translatable list
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)
2021-06-13 00:45:36 -07:00
Kurt
0686922d5c Rewrite gen6ao secret base handling, i/o, GUI
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.
2021-06-13 00:38:47 -07:00
Kurt
390cf518b8 Revise 4->5 encode table (Half-width symbols)
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>
2021-06-11 19:38:34 -07:00
Kurt
f77a8ecfbd Fix comment
wasn't sync'd :(
2021-06-10 23:29:03 -07:00
Kurt
24d6c0d713 Change "Some" EV train rating from [0,127] to (0,127] 2021-06-10 19:18:58 -07:00
Kurt
6029c15521 Fix incorrect GameVersion reference 2021-06-09 22:56:19 -07:00
Kurt
f984862f48 Extract catchrate check 2021-06-09 22:54:21 -07:00
Kurt
49b7d4522c Sync missing change 2021-06-09 18:40:17 -07:00
Kurt
2083201ee1 Add ObjectType custom filter logic 2021-06-08 20:28:13 -07:00
Kurt
2abf95cdf8 Minor clean
expand some expressions, extract some methods, add comments
2021-06-08 20:14:55 -07:00
Kurt
f529fd1432 Add xmldoc, split out some operations 2021-06-07 20:03:14 -07:00
Kurt
035584dc7c Extract templating from EditPKMUtil, rename methods 2021-06-07 20:02:57 -07:00
Kurt
f7423daf7a Add array sanitization if error was thrown 2021-06-07 19:59:08 -07:00
Kurt
a07549f013 Extract sketch valid check
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).
2021-06-06 23:36:59 -07:00
Kurt
c98717bdc0 Fix namespaces 2021-06-06 23:34:15 -07:00
Lusamine
e66d5eaad5 Remove another duplicated distribution index
Index 24 is the same as 26, but they cross epochs from base to DLC1.
Keep the later one since it encompasses all legal Wild Areas.
2021-06-06 21:46:23 -05:00
Kurt
871de4e213 Add more xmldoc 2021-06-06 11:56:54 -07:00
Kurt
bad65dd4ec Enhance debugging obj->ToString indications for evo checks 2021-06-06 11:49:41 -07:00
Kurt
bf400f27fe Add optional form param for learn check 2021-06-06 11:49:13 -07:00
Kurt
200bdbd553 Sanity check form prior to yield checks 2021-06-06 11:48:54 -07:00
Alberto Tudela
b173c659d7
Update spanish translations (#3212) 2021-06-05 17:21:39 -07:00
Lusamine
72b4975429 Remove inaccessible water nest encounters 2021-06-05 18:11:19 -05:00
Lusamine
aee35cbe81 Clean up duplicated distribution indices
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
2021-06-05 16:33:41 -05:00
Kurt
6ee67e624d Update gen2/3 setdex's too 2021-06-04 17:29:55 -07:00
Kurt
d30e00ffbe Clean up SetDex guard clauses
add egg checks for gen4-6/8, group species bound checks
2021-06-04 17:26:06 -07:00
Kurt
7ee60d9e98 Update Zukan4.cs
Set seen after gender-seen, as we check seen in that method (first or second seen gender).
2021-06-04 17:19:12 -07:00
Kurt
3a1fbc9b88 Don't pass key byref
Pass byval and return the result; emits less IL
mark for inlining
2021-06-04 14:19:07 -07:00
Kurt
ad79833420 Update EncounterEvent.cs 2021-06-04 13:53:02 -07:00
Kurt
8222297da8 Remove enumerating when loading event templates
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).
2021-06-04 13:48:02 -07:00
Kurt
041074f26c Decrypt sav8 blocks in-place
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.
2021-06-04 13:16:00 -07:00
Kurt
64039b4070 Force shiny state of raids
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-06-03 17:50:48 -07:00
Kurt
927ccee613 Cache all created regexes
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?!
2021-06-03 17:24:45 -07:00
Kurt
8ec25da194 Condense expression
single bool branch
2021-06-03 17:08:42 -07:00
sora10pls
a2492eddd9 Add Frog distribution raids 2021-06-03 20:07:07 -04:00
Kurt
066aedfc21 Separate scblock ctor's
No longer need to set byte[] twice
Add value-setter checks for bad mutations (size change, bool1<->bool2 only)
2021-06-03 12:35:39 -07:00
Kurt
8c970ec991 Minor tweaks
no functional change, readability++
add more xmldoc
2021-06-03 12:04:19 -07:00