Commit graph

7706 commits

Author SHA1 Message Date
Kurt
d2d2be899b Critical typo fix
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-01-07 21:30:39 -08:00
Kurt
92c9e9897a Add latest dist raid changes
Same as 11/20, with one swap. Only the swap is kept (because duplicate encounters don't matter).
2021-01-07 21:27:57 -08:00
Kurt
c9f222bf38 Set valid mystry mew seed on creation
Uses a Method specific seed regardless of template.
2021-01-07 21:27:19 -08:00
Kurt
86d80a7d0b Minor perf improvement for advancing keys
Further improvements can be made if there's a way to have a union struct (4 u16s, lumped u64) that has a simple 4bit diagonal mirror operation on it. Can be at least twice as fast.

Benchmarking with optimizations shows about 80-90% of the prior time taken, so at least a 10% speed optimization

Rarely used, was fun to try and optimize a little more.

Eliminate bounds checks by accessing/setting the highest element, and only index twice instead of 6x.
Eliminate u16 casts by leaving as int type (same result)
Eliminate temp value caching and instead directly write to storage. (no more _0123).

End result looks neat too, since the >> 0's removed looks like a diagonal, like the nibble rotation :D
2021-01-07 20:50:28 -08:00
Kurt
1138cd44bc Minor rearranging 2021-01-07 18:05:21 -08:00
Kurt
19d40f61f5 Move save crypto types to focused folder 2021-01-07 16:01:34 -08:00
Kurt
f615814548 Add xmldoc, increase swish util flexibility 2021-01-07 15:34:26 -08:00
Kurt
5554651951 Mark scxorshift32 and xoro128p as ref structs
Prevents passing them as args, as intended. These are self mutating structs
2021-01-07 15:33:42 -08:00
Kurt
a4dfff5361 Move CoC & contributing to .github subfolder 2021-01-07 14:56:01 -08:00
Kurt
1c19bc86f4 Preallocate some holding objects to prevent doubling allocations
Saves 12 doubling reallocations for new List to hold blocks
Saves 21 for the memorystream on writing
2021-01-07 09:37:27 -08:00
Kurt
6e741a0cf0 Minor tweaks
Add xmldoc
Remove linq from memecrypto code (speed lmao)
Hide some methods that shouldn't be called directly
Name variables better for accessor const's
2021-01-06 23:30:30 -08:00
Kurt
9718d1d2aa Add save handler abstraction for detecting atypical save formats
GCI, DSV, DUC are already supported, so I've written the abstraction for those and seed the Handler list on startup.

Can add a new class with recognition via SaveUtil.Handlers.Add(myHandler);
2021-01-06 15:46:43 -08:00
Kurt
118e1266a6 Swap lgpe sandshrew/vulpix version restrictions
Closes #3122 ty @FeralFalcon !
2021-01-05 17:30:14 -08:00
Kurt
1bd60ba6f9 Check original species in the event of VC transfers 2021-01-05 16:36:16 -08:00
Kurt
9d7c9929b4 Minor tweaks
should be it :( :(
2021-01-05 09:58:33 -08:00
Kurt
23b5aebe05 Update IndividualValueVerifier.cs 2021-01-05 09:56:19 -08:00
Kurt
70fe1847ac sync missing changes 2021-01-05 09:51:32 -08:00
Kurt
373aecdf7c Merge GO IV checks, behavior is now correct
Rename IV1/2/3 to HP/ATK/DEF in gp1 structure
2021-01-05 09:39:50 -08:00
Kurt
6fc8779aaa Revert "Add vc shiny female gender ratio check"
This reverts commit d5a1283585.
2021-01-04 17:31:56 -08:00
Kurt
cc43550357 Simplify more expressions 2021-01-04 17:31:43 -08:00
Kurt
ad48f4e909 Set languageID if present for sav
Lowercase the "SAV" variable too
2021-01-04 16:28:46 -08:00
Kurt
acf811f5c1 Permit all generations prior to requested generation for know move check 2021-01-04 15:38:30 -08:00
Kurt
cbc57dc794 Force sav1 BU to init as japanese 2021-01-04 15:18:16 -08:00
Kurt
99fe3b59b4 Fix contains indexing incorrectly
blame apr 17 2017 !
a5b1d72f06 (diff-53c2e8acc19c5af65034cf0460ba82ebc7dc00ba61eb142ef4aa2c0cbc1f7cffR2918)
2021-01-04 15:06:52 -08:00
Kurt
0ab3493335 Skip save sub-type detection if we already it 2021-01-03 18:11:59 -08:00
Kurt
d5a1283585 Add vc shiny female gender ratio check 2021-01-03 18:08:31 -08:00
Kurt
730640decc Minor clean 2021-01-03 16:53:13 -08:00
Kurt
33ad654be6 Mark encstatic version on init rather than post-init 2021-01-03 16:49:49 -08:00
CanoeHope
916c70341a
Added Bebe's PC Event Flag for DP + Update Gen 3 & 4 translations (#3116)
* Update flags_dp_en.txt

* Update flags_frlg_es.txt

* Update flags_dp_es.txt

* Update flags_dp_ja.txt

* Update flags_dp_ko.txt

* Update flags_dp_zh.txt

* Update flags_frlg_zh.txt

* Update flags_rs_es.txt

* Update flags_rs_zh.txt
2021-01-02 21:36:42 -08:00
Kurt
e663ffdd35 Fix comparison 2021-01-02 20:52:39 -08:00
Kurt
1f600f3518 Fix Gen2 Shiny ShowdownSet import
SetNature loops by changing the PID which doesn't exist; there's no nature or abilities in gen1/2 so just skip these two methods completely.
2021-01-02 19:58:25 -08:00
Kurt
7629d3f887 Bounds check empty permutations
If the length is 0 or malformed input, we return empty.
2021-01-02 19:23:39 -08:00
Kurt
1f3d3112d3 Move some future-evolution tables to separate class 2021-01-02 19:11:46 -08:00
Kurt
4a52b349ff Minor clean 2021-01-02 19:11:34 -08:00
Kurt
77a784a881 Move Stadium static encounter junk to event list
Charmander has Leer at level 5, which makes it a special move (can't learn it normally that low).
2021-01-02 14:48:11 -08:00
Kurt
97be69bca1 Use EncounterMatch when EncounterOriginal doesn't matter 2021-01-02 14:47:39 -08:00
Kurt
7a4d8925f2 Update EncounterStaticGenerator.cs 2021-01-02 13:53:25 -08:00
Kurt
cdcbc3750b Update PKMEditor.cs 2021-01-02 12:46:46 -08:00
Kurt
d02dd29e83 More version-location shenanigans
Should be behaving correctly for gen!2=>gen2 now
2021-01-02 10:35:48 -08:00
Kurt
f785231692 Fix backup filenaming 2021-01-02 10:34:33 -08:00
Kurt
699a598227 Update NicknameVerifier.cs
Nickname AND Trainer Name are verified in that method; we still want to execute it. If it has a fixed nickname, we can skip the wordfilter since it's already been checked.
2021-01-02 01:02:59 -08:00
Kurt
401add520a Check nickname of non-nicknamed in-game trades 2021-01-02 00:48:58 -08:00
Kurt
c432a15a20 Relocate some tables to a location closer to where they're used 2021-01-02 00:46:09 -08:00
Kurt
a7b9fafb69 Remove unnecessary logic
Encounters are thoroughly checked for their origins; don't need to check again if it's possible to have it in an egg.
2021-01-01 19:45:40 -08:00
Kurt
2648560684 Invert breeding method result returns
clean:
if (!logical) return;

Existing logic had methods named to return true if fail, now method checks for passing, thus the logic now follows the above pattern.
2021-01-01 19:36:54 -08:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
1d22b74970 Remove unused block class
Copied from Gen7b, swsh is just a key,value list
2021-01-01 16:57:18 -08:00
Kurt
813180453e Delete duplicate HT bit fetch method
Make expression methods
2021-01-01 16:39:33 -08:00
Kurt
11a2a7a318 Condense expression to use bitflags
from 2 cmp to just 1
2021-01-01 16:25:48 -08:00
Kurt
46f3b17a67 Replace this[] indirect access with direct table access
The static constructor setup methods don't need to be maxSpecies aware, they always succeed. So just remove the self-imposed-safe bounds checks by accessing & mutating the table directly.
2021-01-01 15:24:11 -08:00