Commit graph

4041 commits

Author SHA1 Message Date
Kurt
b81df689e6 Pass gender to moveset dreamworld entries
Oops.
ty anubis for notifying me
2021-06-01 13:54:43 -07:00
Kurt
138501da2f Minor clean
Condense some expressions
Use less linq
Rename some fields
2021-05-29 15:31:47 -07:00
Kurt
64dbb9ae74 Abstract filter matching
Similar to prior commit adding modifications and suggestions
2021-05-27 14:43:32 -07:00
Kurt
05e37eb073 Extend batch editing to allow for plugins to add new mods 2021-05-27 12:20:00 -07:00
Kurt
236fd2943f Add hgss pokewalker stored pk4 fetch
ty atrius
2021-05-25 10:07:14 -07:00
Exorcism
02605b402d
Update French Translation (#3209)
* Update language French (Français)

* Update French Translation

* Update MessageStrings_fr.txt

* Update text_EncounterType_fr.txt

* Update text_Ribbons_fr.txt

* Update text_Ribbons_fr.txt

* Update lang_fr.txt
2021-05-24 09:16:07 -07:00
Kurt
9b4e085890 Clamp fullness-byte (Playfulness) at maximum 2021-05-23 22:06:40 -07:00
Kurt
54611032c9 Refine crystal egg checks
Disallow crystal eggs if met data is not present
Set crystal met location more fluidly
2021-05-23 12:50:42 -07:00
Kurt
c9499f95be Add sociability to Memory editor, add legality checks 2021-05-23 11:22:09 -07:00
Kurt
b2e4ca393b Minor perf improvements
GetHexStringFromBytes: don't allocate temp slice array on heap
Tile: Span Slice toarray rather than new+copy
2021-05-23 10:56:25 -07:00
Kurt
15afd6f3bc Move mail get to sav obj 2021-05-22 09:28:04 -07:00
Kurt
96115916b2 Prevent overflow of memo write
Setting too many invalid entries will bloat above 500, so clamp the max.

Preallocate entries size rather than 4 always
2021-05-22 09:27:46 -07:00
Kurt
904ba8787a Uppercase gamesync ID
ok matt
2021-05-21 19:24:30 -07:00
Kurt
2c9b82824a Check static as-egg locations accurately
Thanks @sora10pls
2021-05-21 13:57:07 -07:00
Easy World
6b693b9b7e
Update Chinese translation (#3208) 2021-05-20 22:04:32 -07:00
sora10pls
3fb4bd7db2 Add Wooloo distribution raids
Nice
2021-05-20 20:16:13 -04:00
Kurt
d41fc571d0 Keep original trashbytes if string isn't changed
Similar to nickname setter
2021-05-20 16:54:53 -07:00
Kurt
207680b2f1 Update translatable lists 2021-05-20 15:05:40 -07:00
Alberto Tudela
7d27136bdc
Update spanish translations (#3207)
* Update spanish translations

* MInor Folder list fixes

* Update spanish translation
2021-05-20 13:21:21 -07:00
Kurt
4b3a3a4afe Update 21.05.21 2021-05-20 09:37:15 -07:00
Kurt
d83b2331ac Enhance nullable indication of array
Fix off by one unit test
2021-05-20 08:52:47 -07:00
Kurt
04ea271b8b Update ShowdownSet.cs 2021-05-20 08:24:22 -07:00
Kurt
2655892db1 Choose a gender on unspecified 2021-05-19 17:12:30 -07:00
Kurt
fac7555c50 postfix gender form
handle all permutations of Indeedee-M/F (M/F)

if it detects (F), it uses female, otherwise it uses whatever the detected form was (0/1) and sets the values accordingly.
2021-05-19 13:12:18 -07:00
Kurt
fc8f9ebd56 Add first row for subregions, remove header from countries txt 2021-05-19 09:36:20 -07:00
Kurt
d6b8a018e6 Fix 3DS console region indexing
mystery gift region ID is not the same indexing as 3DS console region
2021-05-19 09:11:54 -07:00
Kurt
2658c8b89a Update 21.05.19 2021-05-18 17:49:54 -07:00
Kurt
a03f5dcc9d Make EncounterTrade met location use inheritance
hovering would grab ILocation, which didn't use the flexible met location fetch.

Just repoint stuff and have it as a virtual call, since most of these are fixed values, there's no point increasing the size of the classes besides those for gen4.
2021-05-18 17:14:17 -07:00
Kurt
99f0978630 Extract random date to util 2021-05-18 16:58:53 -07:00
Kurt
53e9d31545 Allow searching encounter db for shiny state
random shinies behave like not-shinies
so it only really filters for "always shiny" or "can be nonshiny".
2021-05-18 16:17:57 -07:00
Kurt
74e0cba3b0 Minor tweaks
use assert instead of manual exceptions
span
remove some dead logic
2021-05-18 16:16:48 -07:00
Kurt
25fa52e597 Use correct SID
lol I had copied from VC->gen7
2021-05-18 13:33:36 -07:00
Kurt
215b1c6e23 Remove whitespace 2021-05-18 13:33:13 -07:00
Kurt
2c820bfbe9 Minor tweaks 2021-05-18 13:29:55 -07:00
Kurt
ae0b2f13ea Fix erroneous value setters 2021-05-18 13:12:43 -07:00
Kurt
2d8d3e04fc Move mxyz to subclasses 2021-05-18 13:04:23 -07:00
Kurt
fbba64c0e6 Clean up catch rate comparisons
Add dragonite to the uncapturable list, removes catchrate comparison for dragonite since it's filtered out.

Skip some linq by doing the loop directly in the method. Replace local methods with captured variables with direct if-returns.
2021-05-18 10:38:01 -07:00
Kurt
565f161226 Show shiny state of encounter in db
Force shiny state for GO encounters

For encounters, this interface property is mainly just for exposing metadata for sprites.
2021-05-18 10:36:45 -07:00
Kurt
4c8772ff14 Update EvolutionRestrictions.cs 2021-05-16 11:12:16 -07:00
Kurt
5a012e85a0 Fix gen8 move threshold evo checks
gen7 allows all moves to be reminded; gen8 reverted that.
add greedy minlevel return, and reduce array size allocation by 270 bytes
2021-05-16 00:00:29 -07:00
Kurt
0e2f070510 Clean up know-move-evolution checks
Looks like Mr. Rime case wasn't being handled, so I rewrote it. Better performance, less complexity. No need to double-reference the moves.

Cache a single Valid evolution result; every parse can reuse that object.
2021-05-15 21:41:04 -07:00
Kurt
4e12e54028 Replace regex parse with string find
Only remaining uses of regex in the sln are wordfilter (required), and unescape for QR replies from web api.

This is slightly faster -- cover all cases if the response json changes (shouldn't).
2021-05-15 12:39:37 -07:00
Kurt
ad4aec3439 Improve resource loading speed by precomputing full manifest lookup
no longer needing to compare manifest names with case insensitivity before finding the manifest name.
muh startup speed
2021-05-15 11:56:06 -07:00
Kurt
44affe3caa Add flag unit tests, more xmldoc 2021-05-15 11:32:25 -07:00
Kurt
ebefa0a918 Update ShowdownSet.cs 2021-05-15 10:20:19 -07:00
Kurt
2b25cd1e18 add notes for oras endscroll data
https://projectpokemon.org/home/forums/topic/49356-battle-chateau-help-well-not-really/?do=findComment&comment=266428
2021-05-15 01:46:33 -07:00
Kurt
e31980d15e Clean up nickname parsing, make Gender an int type
Breaking change for anyone using IBattleTemplate (alm)
2021-05-14 23:41:14 -07:00
Kurt
acdbda4e12 Split DateUtil from Util class 2021-05-14 16:46:48 -07:00
Kurt
3ac1882151 Move BinaryCodedDecimal conversions to separate class
Add unit tests, clarify names
2021-05-14 16:32:26 -07:00
Kurt
50b15cd740 Use range/index
More in line with modernizing the codebase with latest c# syntax

improve web-qr decode speed slightly (no linq skiptake)
get money/coin mask without a temporary string (lol performance)
2021-05-14 15:30:55 -07:00
Kurt
871f9b0627 Convert checksum operations to span-based
Fix SAV.Data references in SAV_Misc4 to use the General block instead
2021-05-14 12:30:40 -07:00
Kurt
014835ed14 Add BigEndian span conversions 2021-05-14 12:23:12 -07:00
Kurt
b9d9766674 Fix typos, update block list notes 2021-05-14 12:16:08 -07:00
Kurt
07584a8774 Add chateau score, seaside cycle score
Update some other areas too
looks like this fixes the sube pkx fetch method for extraslots, yay.
2021-05-13 23:12:53 -07:00
Kurt
1fe77c004c Cache transfer location arrays if created once 2021-05-11 23:32:29 -07:00
Kurt
b97b54e5e4 Skip first indexes if requested
Fixes partition2 calls
2021-05-11 23:25:36 -07:00
Kurt
013aac602f Don't clone string resources on fetch
Hardcode egg names, don't rely on string resource loading order for SpeciesNames to get an un-mutated copy.

fixes the infrequent race condition for legality unit tests
2021-05-10 18:41:01 -07:00
Kurt
3597eb14ad Improve gen1-4 species name fetch
reduce nesting (separated methods)
handle gen2 french egg name (all caps)
use stringbuilder to replace chars
2021-05-10 16:09:28 -07:00
Kurt
ef4857fa9f Improve perf of byte->hexstring parse
just use a stringbuilder
2021-05-10 16:07:25 -07:00
Kurt
d340642b09 Minor perf improvements 2021-05-10 01:01:45 -07:00
Kurt
8e9953dc0f Keep festaID separate from nex ID bytes 2021-05-09 23:38:14 -07:00
Kurt
01f75f8441 Add test for hex string (arbitrary length) convert 2021-05-09 23:33:54 -07:00
Kurt
1cad57e35d Build results in place, no linq
O(n) for speed & memory usage, as good as we can get.
Modified method is now less dumb. Array Copy doesn't have to worry about same-array overlapping src/dest regions
2021-05-09 22:48:24 -07:00
Kurt
2a7027ed84 Move files to more accurate subfolders
Gen1-3 are disjointed from the gen4+ item name listings, hence the separate folder. Plus, not all languages have localization files created.
2021-05-09 16:25:19 -07:00
Kurt
96d941db69 Preformat csv files, remove header
Shaves off a few kb
2021-05-09 15:47:21 -07:00
Kurt
f25ad054ef Selectively TrimEnd without extra robust logic
TrimEnd has some loops and stuff which isn't necessary for single-char, single-time trims
2021-05-09 13:21:59 -07:00
Kurt
43af6322e8 Clean up csproj's
no functional change
yay wildcards
2021-05-09 12:57:26 -07:00
Kurt
96ea7f0b39 Fix toxtricity neutral StatNature generating 2021-05-08 08:29:20 -07:00
Kurt
a7f3ce5766 Leak mismatched forms thru the possible check
The EncDB doesn't specify form; the encounter methods verify Form.

This is actually a fix; pkm that can change forms aren't really encounter trades, but we shouldn't be strict matching here.
2021-05-08 08:13:27 -07:00
Kurt
ceede68861 Minor tweaks 2021-05-07 22:11:10 -07:00
Kurt
31142ee297 Replace some linq usage with direct logic 2021-05-06 23:26:38 -07:00
Kurt
fa5bc0d634 Set friendship after form set
Resolves GO galarian stunfisk, ty matt
2021-05-05 08:43:32 -07:00
Kurt
f063014879 Improve clarity of plugin load failures 2021-05-02 18:27:04 -07:00
sora10pls
6ed6e60840 Add PogoType + Requirements for Strange Egg encounters
Rationale behind this is explained in the accompanied commit in PGET: 7c2575d8a8

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2021-04-30 21:13:28 -04:00
sora10pls
e330eb5cfc Add current Meowth Distribution Raids 2021-04-29 20:08:16 -04:00
Kurt
2bfcdaf148 Update LegalityAnalysis.cs 2021-04-28 18:22:39 -07:00
CanoeHope
c1cce9a892
Correct Colosseum/XD Item Quantities (#3203)
* Update SAV3Colosseum.cs

* Update SAV3XD.cs
2021-04-28 16:55:37 -07:00
CanoeHope
747d6ed6c7
Fix Colosseum/XD Max Money (#3202)
* Update SAV3Colosseum.cs

* Update SAV3XD.cs
2021-04-28 11:58:26 -07:00
Kurt
91557d0180 Don't defer on hidden ability change 2021-04-25 00:11:15 -07:00
Lusamine
e5867ce512 Add NormalEncountRigel2 block and Pokedex Rec block 2021-04-23 17:41:54 -05:00
Lusamine
eceb498da3 Fix Gen 2 roamer locations 2021-04-23 15:52:54 -05:00
sora10pls
00e88b2abd Add World Penguin Day distribution Raids 2021-04-23 11:39:20 -04:00
Kurt
e36fdd3cb6 Update EncounterStatic8ND.cs 2021-04-22 22:32:17 -07:00
Kurt
efb3d9aeac Add inaccessible den-rank checks
Rotom Bike water upgrade isn't available until you have sufficient progress, so you can't get these dens with the lowest rank.

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2021-04-22 21:47:25 -07:00
Kurt
f66662b8db More deferral tweaks for non-HA having HA 2021-04-22 13:47:33 -07:00
Kurt
8483dc241d Update MarkVerifier.cs 2021-04-21 19:12:50 -07:00
Kurt
7256ff0a7f Check if the Shedinja's encounter can have marks
Not all gen8 encounters can have marks (nest, go), so use the regular method.
2021-04-21 18:52:24 -07:00
Kurt
b89c4fb17f Database load on invalid party counts 2021-04-21 18:33:57 -07:00
Kurt
2aed4c3118 Add shedinja dropped ribbons/marking considerations
Nice bug ya got there, gamefreak.

Coulda cleared the AffixedRibbon value instead of copying it on Shedinja creation, and it would have made this unnecessary.

Please ditch the Affixed Ribbon gimmick for future games, thanks!
2021-04-21 15:20:16 -07:00
Kurt
25565e6f07 More pattern matching expressions
Shapes are fancy; nested pattern checks
2021-04-20 02:17:28 -07:00
Kurt
9dfa1077ee Rename internal PKMInfo class to match batch names 2021-04-20 01:50:47 -07:00
Kurt
d9c22b1d74 Move pk1/2 EV maxing to class 2021-04-20 01:50:27 -07:00
Kurt
b64edb751d More xmldoc 2021-04-20 01:50:04 -07:00
Kurt
2f078e6565 Minor tweaks
Make HP IV set use single array fetch, less memory required
add some xmldoc
2021-04-20 01:02:32 -07:00
Kurt
45f12bd924 Update FormVerifier.cs 2021-04-18 21:22:58 -07:00
Kurt
f61108ac4e Check gen1/2 female OTs a little more thoroughly
https://github.com/kwsch/PKHeX/issues/2687#issuecomment-822072999

celebi is a es2e, so just filter on specified TID

Co-Authored-By: FeralFalcon <33670476+FeralFalcon@users.noreply.github.com>
2021-04-18 19:31:22 -07:00
Kurt
c67e01849a Extract 3ds chinese glyph remapping, only do on 3DS games
Optimize some functions within gen7zh for perf (no linq, no allocation)
2021-04-18 18:29:02 -07:00
Kurt
0e4848ad82 minor clean 2021-04-18 18:18:09 -07:00
Kurt
c6d6a52e0b '->’ stragglers 2021-04-18 14:04:26 -07:00
Lusamine
f2c2a77cfe
Check nest distribution encounters by patch epoch (#3195)
Distribution raid encounters from before each of the DLC patches can only be captured in existing Wild Area locations.
Store the BCAT index in the encounter details and use it to compare when the BCAT was available.
2021-04-18 11:01:42 -07:00