Commit graph

6060 commits

Author SHA1 Message Date
Kurt
30d85c95a0 Handle radar slot bypassing / chain shiny 2024-03-09 18:13:09 -06:00
Kurt
90cf6cff84 Fix slot replace indexing for slotNum
see dumper, was giving SlotNumber as absolute index, not the replaced index (keep the original SlotNumber value now)
60668dfc9b
2024-03-09 14:16:26 -06:00
Kurt
6d8504bf82 Misc tweaks for slot4 level check 2024-03-09 13:50:15 -06:00
Jonathan Herbert
78fba23eae
Replace Epoch1900DateTimeValue Duplicate Logic Instances (#4207)
* Replace LastSaved8a With Epoch1900DateTimeValue

Since LastSaved8a basically implemented the same logic, replace it and update Epoch1900DateTimeValue.DisplayValue to not display seconds if they aren't present

* Replace PlayTime8 With PlayTime7b
2024-03-09 00:41:26 -06:00
Kurt
d86469266b Enhance bv5 checksum documentation
add for gen4 so there's no more mystery on that

change span to memory for direct injecting to a bv obj
2024-03-08 21:31:17 -06:00
Kurt
994c063537 Misc tweaks 2024-03-08 21:30:21 -06:00
Jonathan Herbert
0693825f96
Correct SM and USUM GameTime7 Offsets (#4205) 2024-03-08 01:02:15 -06:00
Kurt
6dc785da0c Add gen5 battle video reads 2024-03-08 00:53:35 -06:00
Kurt
df7c25d43f Rename battle video classes, allow bv4 recognition 2024-03-07 00:34:21 -06:00
Kurt
802974a42c Add BV4 reading for SAV4
D/P don't store battle videos, so the SAV4 get will always return null for those games. Still can return null if the extdata blocks aren't present.
2024-03-06 21:02:33 -06:00
Kurt
3e25ed9d32 Show sv surprise trade slots in misc tab 2024-03-05 22:04:13 -06:00
sora10pls
d841a7a4bb Add latest distribution raid data 🐢💧 2024-03-05 19:03:13 -05:00
Kurt
efe0f5e0cf Update WB7Records.cs 2024-03-05 10:04:04 -06:00
Kurt
f32a1ddc7a Misc fixes
event flag editor gen5-7
rs/frlg/dp/hgss enc->pkm version choice
pb7 party stats loading
daycare slot now shows when present
remove unnecessary `GameVersion.Unknown`, use Invalid instead. Might be worth removing Invalid in favor of changing `Any=0` to `None=0`.
2024-03-05 09:42:20 -06:00
Kurt
4e87fd7eca Misc fixes
ty matt & foohyfooh
2024-03-04 23:46:11 -06:00
Kurt
59ad4d749f Add handling for lgpe lumped in Contains/Gen check
ty Oval Lenin (discord)

Co-Authored-By: Ivan <15915901+ivanlonel@users.noreply.github.com>
2024-03-03 23:40:55 -06:00
Kurt
fa80dac2ac
Refactoring: Rework saveblock to be Memory<byte> based (#4200) 2024-03-03 23:13:16 -06:00
Lusamine
2b63c4b013 Fix Project Snorlax Mystery Gift date
End date for the promo is Feb 29th, but the code can be redeemed until March 31st.
This also adjusts some of the event comments to be more descriptive.
2024-03-02 19:57:42 -06:00
Kurt
0f936f88f4 Gen3: Fix jump/berry max 9999->99990 2024-03-02 13:53:00 -06:00
BlackShark
378b28bc07
Fixed national magic for FRLG (#4199) 2024-03-02 13:51:28 -06:00
sora10pls
466b5f5ea9 Add latest distribution raid data 🍃🐸 2024-02-27 19:06:24 -05:00
Sakura
4a6eab1d2f
Add PokéCenter Snorlax Date (#4198) 2024-02-27 10:41:49 -06:00
Kurt
aa841aebe9 Bounds check on invalid encounter
Magmortar from Gen3 in Gen4+ somehow requests learnset; just give it species 0.
2024-02-26 00:02:46 -06:00
Kurt
645d65bf3b Update SaveBlockAccessor7b.cs 2024-02-25 23:51:53 -06:00
Kurt
8b5e4e798b Add NSO save handler for Gen1/2 saves
Closes #3921
Not sure if the RTC handling is correct (always 0x20 length?) but at least we have a non-fixed-sized header handled with some leniency for different builds.
2024-02-24 21:53:21 -06:00
Kurt
88569d1107 RBY: Add bool toggle for silph lapras
Closes #4188
2024-02-24 20:14:04 -06:00
Kurt
5334f1ef78 Fix IsMysteryGiftUnlocked checked
Closes #4106
2024-02-24 19:51:42 -06:00
Kurt
276a1952fb GSC: Add setter for daycare occupied/egg available
Closes #3862
2024-02-24 19:47:46 -06:00
Kurt
b435f8c258 Offload gen1/2 event templates to pickles
Thanks @ShadowMario3 for doing the raw data entry for these templates -- see PKHeX.EncounterSlotDumper for the csv -> pkl conversion logic.

Reduces object size by classifying groups of events with specific features, and reduces the explicitness of defining each single encounter.

Hard-code the span of Gen1 VC mew to not need to grab the resource, and add an overload to iterate a single template (skips an array creation).

Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
2024-02-24 17:53:46 -06:00
Kurt
8206427d21 Add display of pla static encounter seeds
Show single shiny roll slots for PLA too

Update MiscVerifier.cs
2024-02-23 22:37:37 -06:00
Kurt
43cd9300fb Display raid seed for valid SW/SH raids
Yay leadslot for making this possible
Sure we do a little bit of extra work (checking seed twice) but it's negligible overall.
2024-02-23 20:54:56 -06:00
Kurt
8da8f34896 Use TimeProvider.System instead of manual impl
Introduced in .NET 8; use it.
Remove unnecessary [Serializable] tags (binary/XML serialization are not used), will eventually be obsoleted by c# ;)
2024-02-23 20:37:29 -06:00
Kurt
1feec26d1a Split StringFontUtil
2700 line file too big; split into context-specific font classes.
2024-02-23 20:05:50 -06:00
Kurt
034658b764 Remove extra Memory forcing
Closes #4133
Refactors most of the `Trade` methods
Fix default egg friendship to 120
Fix Version value exposed for Gen4 saves (and others)
2024-02-23 17:01:36 -06:00
Jonathan Herbert
65d8ab025d
Update PlayerGeoLocation7b To Match Changes To SaveBlock Constructor (#4194) 2024-02-23 14:32:20 -06:00
abcboy101
32e888d871
Check nicknames/OTs against characters in font (#4146)
* Check nicknames/OTs against characters in font

* Update translations

* Do not show warning for Gen4 and earlier

* Use Gen5/7 font for Gen 3-4/1-2 transfers

* Minor style pref

* Remove font legality checks

* Add missing/update Switch fonts
2024-02-23 13:23:50 -06:00
Kurt
4f568b1497 Add slot-set Count update bypass setting 2024-02-23 13:20:59 -06:00
Jonathan Herbert
4974371100
SaveBlock Constructor Changes (#4191)
* SaveBlock Constructor Changes

- Add primary constructor for SaveBlock with default offset
- Update SaveBlock  subclasses to specify offset in contructor rather than as the constructor body

* Fix MyItem Subclasses Using SaveFile Rather Than Specific Classes
2024-02-23 13:20:24 -06:00
Jonathan Herbert
92c964d6fa
Refactor And Deduplicate Some Switch Games Common Logic (#4187)
- Improve Epoch 1900 classes using similar logic from PlayTime7b.
- Move Time Classes into non Gen specific folder since it appears the logic is shared across a few of them.
- Use Epoch1900DateTimeValue for LastSaved in PlayTime7b since the logic is the same.
- Remove TeamIndexes9 since it is a duplicate of TeamIndexes9. Use the similar pattern like Box8 where it is reused in multiple locations.
- Add BlueberryClubRoom9 to ISaveBlock9Main since it wasn't added when the class was introduced.
- Simplify RaidSevenStar9 creation since GetBlockSafe does basically what the if-else block does.
- Change SAV8SWSH Base Raid to RaidGalar to match the same way the SAV9SV does for its Base Raid.
2024-02-23 13:19:17 -06:00
Jonathan Herbert
cf274bba70
Add LGPE Adventure Begin Date (#4189) 2024-02-23 13:19:01 -06:00
Kurt
95fbf66a6e
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD. 

Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
2024-02-22 21:20:54 -06:00
sora10pls
eb673dcbc5 Add latest distribution raid data 🔥🪨🐧 2024-02-15 19:03:30 -05:00
Jonathan Herbert
247340dff4
Handle SwSh and SV Team Locks (#4186) 2024-02-15 08:33:25 -06:00
Jonathan Herbert
704a7036ea
Determine Scarlet and Violet Save Time (#4183) 2024-02-14 22:56:41 -06:00
Kurt
a93a626dad Add dialog message for empty/FF save files
Users incapable of saving in-game and using save states instead, or emulators not flushing save data on in-game save.
2024-02-11 21:55:37 -06:00
sora10pls
a571c2a3cb Add latest distribution raid data 💘🐟 2024-02-11 19:02:08 -05:00
Kurt
069411d42e Modulo time spent for large gaps
Taking too many seconds to beat the storyline -> overflow on ticks. Since we already shave off the days portion, use the modulo to remove the day portion from the time portion.

Closes #4184
2024-02-10 00:25:22 -06:00
Lusamine
da83f1005a Label SV Surprise Trade storage block 2024-02-09 23:43:43 -06:00
Kurt
10c5adadb8 Misc tweaks
Add more xmldoc
Move files/functions to better spot
Less allocation on hover glow
fix honeytree dppt group/slot/shake rand call (ty real.96)
2024-02-03 14:11:17 -06:00
Sakura
3eb6ff2c9e
Add latest distribution raid data🐧 (#4181) 2024-02-02 19:49:37 -05:00
Kurt
6e9ffe6390 lgpe static encounters: Check specified IVs
https://discord.com/channels/401014193211441153/679178558597496872/1202059598941671434
2024-01-30 19:16:17 -08:00
Kurt
aba7c800b3 Add LCRNG distance calculating method
Solution known for over a decade, finally reminded myself that it'd be nice to have this available. Probably will use this for displaying Method J/K/H frame info when that branch is more mature.
2024-01-30 19:14:04 -08:00
Kurt
f99e4e54f3 Batch Editor: Combine simple & complex EC rand
Just pipe everything to the complicated EC pathway and allow it to select for biases. Swap input preferences to retain a proper EC for dudun/maus.
Closes #4179
2024-01-29 17:41:12 -08:00
Kurt
48b0f0c6a3 Pt: Swap roamer indexes (moltres, articuno)
f3604018fe/include/roaming_pokemon.h (L10-L12)
Closes #4176
2024-01-29 16:14:17 -08:00
Kurt
48646fd001 Batch edit: return error code on exception
#4177
2024-01-29 16:10:25 -08:00
Kurt
5706fb2fb5 Gen6: Add mach & acro to usable key item memories 2024-01-25 18:56:57 -08:00
sora10pls
72cf3c5fb5 Add latest distribution raid/outbreak data 👻🤖🥇 2024-01-25 19:04:59 -05:00
Kurt
ab5fd54079 Narrow Dynamax Level compare for swsh den seeds
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=287889

Adjust Showdown import to only set these values to PK8.
2024-01-22 19:06:38 -08:00
Kurt
26e4bf0a6a Add XY friend safari sawsbuck form bypass too
See previous commit.
AO only has Deerling, so remove Sawsbuck from the Species compare.
2024-01-22 18:58:22 -08:00
Kurt
6d2de333bf Add formarg deferral for wild annihilape/kingambit
Closes #4167
Also add form bypass for Gen6 Deerling slot that changed form in SV.
2024-01-22 18:51:55 -08:00
Kurt
560320e2cc Fix gen4 encoding of ? 2024-01-21 23:44:12 -08:00
Kurt
9aa31e8563 Fix phione ball breed permit (back to poke only) 2024-01-19 06:28:51 -08:00
Jonathan Herbert
a00a6a7308
Label Scarlet and Violet Team Names (#4164) 2024-01-17 20:49:38 -08:00
Kurt
c617aa206d Misc tweaks
Re-dump safari slots for HGSS; the repackaged narc accidentally shuffled files so the wrong water tables were output.
Add error log output on reporting exception fail first to always dump an error log file. Don't trust the popup/form.
Permit TID/OT duplication for in-game trades/N's pokemon.
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=287395
2024-01-16 21:43:10 -08:00
Kurt
513a0d6b7a Update EncounterSlot9.cs 2024-01-16 07:10:57 -08:00
Kurt
2aec7572f8 Fix club board fetch for pre-indigo saves 2024-01-15 23:22:00 -08:00
Kurt
3ea44b5eb0 Allow Gourmand mark on Eggs
Flag it if it's affixed though.
2024-01-15 22:50:37 -08:00
Jonathan Herbert
5a5ce7c273
Scarlet and Violet Blueberry Clubroom Support Board + Style (#4162)
* Scarlet and Violet Blueberry Clubroom Support Board + Style

* Sync to master

* Fix BaseballClub2TwirlingNinja Flags

---------

Co-authored-by: Kurt <kaphotics@gmail.com>
2024-01-15 19:29:39 -08:00
Sakura
fe1a5750dc
Add コロコロ Pokémon Date (#4163) 2024-01-15 18:50:30 -08:00
Jonathan Herbert
690de20687
Add Support For SV Throw Style (#4153)
* Add Support For SV Throw Style
* Change Support Board To Club Room
The block contains more than just the support board so correcting name.
2024-01-15 18:50:17 -08:00
Kurt
13f118fffd Reduce wc3 egg strictness for match (fateful)
Closes #4161
2024-01-15 18:49:24 -08:00
Kurt
00c0aefe00 Add simple alolan evo trim for HOME+ permit
Closes #4159
2024-01-13 21:08:45 -08:00
Kurt
08104179b7 Update 24.01.12 2024-01-12 22:37:01 -08:00
Kurt
f2209ec7fd Add better handling for specific GO transfers
No formarg or bad EC evolution peek -> search for higher species rather than from the bottom.
2024-01-12 18:58:23 -08:00
Kurt
c591e9b809 Misc tweaks
Fix ug editor again
b4aeb1ac7c

make framegenerator info a struct (8 bytes); will be rewritten later anyway
2024-01-11 20:38:11 -08:00
sora10pls
b16e1e8746 Add latest distribution raid data 🐔🪽 2024-01-11 19:02:15 -05:00
Kurt
5272a32d40 re-add safari super rod slots
oops, missed these in the rip and no unit tests caught it :)
2024-01-11 09:30:25 -08:00
sora10pls
a39712e5cd Add Mochi Mayhem related content 2024-01-11 09:16:04 -05:00
Kurt
354721e20d Rip hgss safari slots with computed slot numbers
HGSS pickles lookin' pretty hefty
ty admiral_fish & real96 for their impl in pokefinder
2024-01-10 20:35:22 -08:00
Kurt
0ca20ff096 Reimplement applied Markings individual get/set
Closes #4156
Extracts to an interface, varied implementations in the appropriate PKM classes. No longer an abstract property inherited from the base `PKM` class.
2024-01-09 20:53:31 -08:00
Kurt
c66fc2f3bf Add gen4 headbutt slot numbers
All were zero, update dumper.
Extract some logic from other parts of the codebase
Fix wyrdeer level check if originated from GO
2024-01-09 19:07:32 -08:00
Kurt
671c3564ee Echoes of trash-test
Remove glyph remap for Switch gender symbols (none actually)
Might be wise to convert StringConverter to singletons...
2024-01-08 21:55:07 -08:00
Kurt
f80c2820f9 Misc tweaks
Local event db's don't need to absorb the builtin db.
More aggressive generator filtering for fuzzed PB7's from GO (can't fake a GO8 in PB7)
Fix splitbreed relearn suggestion (chain is reversed for Origin, don't bother truncating or anything)
Only check for filtered VC ot's if transferred (not still gen1/2 format)
Remove unnecessary xmldoc, add more xmldoc
2024-01-08 20:01:19 -08:00
Kurt
96aed1e3c5 Set default version ID for gen3 pkm templates
ur welcome matt
2024-01-08 19:56:51 -08:00
Kurt
d7473db6af Add plugin stub for notifying GUI language change 2024-01-08 19:56:04 -08:00
abcboy101
3ba2e8e376
Gen 1/2 VC filtered OT name legality (#4155) 2024-01-08 12:34:44 -08:00
abcboy101
01131e59f0
Modify G1/G2 character mappings (#4154)
### Treat 'ヘ' as katakana
- For consistency with ベ/ペ/リ which are treated as katakana here and in StringConverter12Transporter.cs, map 0xCD to katakana ヘ instead of hiragana へ.
- Allow input of hiragana べ/ぺ/へ/り, mapping them to katakana ベ/ペ/ヘ/リ. Previously, they would be treated as invalid and mapped to the string terminator.

### Swap mappings for 0xE8/0xF2
- Previously, 0xE8 was mapped to U+002E `.` FULL STOP, while 0xF2 was mapped to the special character U+2024 `․` ONE DOT LEADER. Since 0xF2 is used in user input while 0xE8 is only used in `MR.MIME`, swap these mappings so that normal keyboard input maps to the user-enterable character.
- Modifies SpeciesName.cs to produce U+2024 for Mr. Mime in G1/G2.
2024-01-07 23:27:03 -08:00
Kurt
018694b84f One less allocation
compiler can infer correct string concat size both ways
2024-01-07 13:13:21 -08:00
Samuel Magnan
dbb4df6ddc
Add getter/setter for Sav Gen3/4 Trendy Word, Trainer Hill, Berry Blender, Accessory, Backdrop, Wallpaper (#4152) 2024-01-06 16:44:58 -08:00
Kurt
608f7ebe12 Update Roaming8bRNG.cs 2024-01-05 09:47:53 -08:00
Kurt
a4ac8240b8 Allow replacing VC1/2 default transfer version
Exposed via settings
Conversion settings relocated from Advanced; `AllowIncompatibleConversion` will need to be re-set if you want to deviate from official rules.
2024-01-04 19:57:01 -08:00
sora10pls
5bf43cfc19 Master Rank Ribbon: Regulation F
Also fix Roaring Moon/Iron Valiant WC9 minimum start date (please verify all time zones!)
2024-01-04 10:47:49 -05:00
Kurt
c866bd7044 Extract GetEXP w/ Table
Less magic -1
2024-01-04 01:19:38 -08:00
Kurt
528d927a85 Handle self-form pointer
Logic is much more clear now.
2024-01-04 00:00:34 -08:00
Kurt
8fa951bcd7 Refactoring
Catch_Rate => CatchRate
Make Location* classes public
Extract a few methods, make public
Merge EncounterUtil & EncounterUtil1
add xmldoc
add missing deferral for Nest8 templates
improve binlinker span fetch to a single read (-1)
2024-01-03 23:06:09 -08:00
Kurt
424cbcff21 Misc tweaks
ShowdownSet: Fix indentation, use explicit const
ItemStorage8BDSP: Rename GetAll->GetAllHeld to match others
EncounterLearn: Guard against >4 length enumerables, use explicit versions for S/V
EggMoves: Read u16[] directly rather than manually
SaveFinder: simplify expression
SAV_Database: extract func
SAV_Encounters: use RoM to match Moveset generator
2024-01-02 15:45:35 -08:00
Kurt
d56eb0e3c4 Rely on deferral ability check instead of exact
Closes #4144
2023-12-31 13:13:51 -08:00
Kurt
1b176eec53 Only ChangeType if enum is defined
Allows setting 99 (Stellar) to TeraTypeOverride now
2023-12-31 11:03:04 -08:00
Kurt
c021f893f8 Inject rule bypass logic for SV's level100 lvlup
Closes #4143
2023-12-31 11:02:23 -08:00
Kurt
9d83ce1855 Auto-affix might mark for 7star enc->pkm
Missed this encounter type when changing the behaviors for others (see 5316ad6b37 )
2023-12-30 20:26:47 -08:00
Kurt
d25fab0e87 Change box dump to use a form
Closes #4122
2023-12-30 14:36:33 -08:00
Kurt
a24e6e9cef Misc tweaks
Add notransfer for SV-ride legend
Replace dummy '0' in gen3 chartable to match Bulbapedia -- inaccessible char for entry anyways, and the byte never fetched via IndexOf due to the previous occurrence of '0'.
Enhance file namer interface to tag with a display name
2023-12-30 11:41:45 -08:00
Kurt
581d5158dc Pass ribbon temp struct byref
Quicker than creating defensive copies for each Parse call. Do the same for IV-set passing.
Not worth for binlinker as it's never passed multiple times / deref'd often.
2023-12-30 11:40:10 -08:00
Sakura
581f0e2e1b
Add 윈터페스타 Baxcalibur Date (#4140) 2023-12-29 23:30:38 -08:00
Kurt
d3a48968e0 Revise runtime localization language setter
Closes #4138
ty @fattard
2023-12-29 10:17:50 -08:00
Kurt
9897630b08 Fix off-by-1 for Hidden Power hover preview card 2023-12-29 10:07:37 -08:00
Kurt
50209c4f0d Misc tweaks
Fix ranch save load (index out of range on party stat fetch due to bad truncation)
Folder Browser: Reapply filter if active on column sort
Fix inverted VC1/2 cross-check, add missing derived type and ignore Generation==0 (empty/invalid) moves.
2023-12-28 22:39:42 -08:00
rcyggdra
6b1e967a74
Update text_Forms_zh.txt (#4137) 2023-12-28 22:35:05 -08:00
Kurt
f7a888cc57 Extract some logic to SAV4
Closes #4128
I don't want to decipher to manual interactions to the Battle Frontier structures now. Prints were just work values, and fly flags were event flags.
2023-12-28 00:11:56 -08:00
Kurt
61df1981ce Include Ability in fixed pkl, beldum raid moves
Encode beldum's raid moves manually since it's the only one with empty moves (default -> learnset fetch). See pkNX for associated workarounds in pickle build.
2023-12-27 00:29:16 -08:00
Kurt
572b5e98e0 g9 raid beldum moves, g9 shiny trades, g7 kchart
Beldum: Default moves
Gen9 trades were defaulting to Random, not Never
KChart: >= instead of >
2023-12-26 22:30:40 -08:00
sora10pls
807b9031b1 Add more save block labels, Necrozma fusion move handling 2023-12-26 09:36:13 -05:00
sora10pls
007aed07ae Add latest distribution outbreak data 2023-12-24 19:05:00 -05:00
Kurt
5316ad6b37 Set affixed for encounters w/ Gen9 ribbon/mark
Matches S/V 3.0.0 behavior, better to match
2023-12-21 19:04:58 -08:00
Kurt
6d0b4f77e4 Fix Gen2 quick hidden power calc 2023-12-21 19:04:08 -08:00
Kurt
740da4edde Update FormArgumentVerifier.cs 2023-12-21 18:01:03 -08:00
Kurt
35e46c4c4b Add mark deferral for partial match TimeOfDay 2023-12-21 17:42:11 -08:00
Kurt
9f1ad9f6fc Update EncounterSlot9.cs 2023-12-21 16:50:14 -08:00
Kurt
2a13874aee Rewrite evo move double-check
If (evolved into {species}), must have known {move}
I think Swinub->Mamoswine and Mankey->Annihilape might have evaded the check prior; was the only other 3-stage evo (now +Hydrapple).
2023-12-21 16:20:01 -08:00
Kurt
245f267b03 4.5 surskit quirk
int.TryParse no longer correct; `4.5` is a valid `4` per the game filtering behavior.
Surskit: `1,4.5,7`
2023-12-21 16:06:49 -08:00
sora10pls
52d55101d4 Add latest distribution raid/outbreak data 🐧🤖 2023-12-21 19:02:58 -05:00
Kurt
42f809b216 Update EncounterSlot9.cs 2023-12-21 15:39:50 -08:00
Kurt
6e3598d87b Recompute BDSP allowed hatch location list
Dunno what goofiness caused the original bad table.
Took the original hashsets from git and rewrote the table gen, now we have what should be correct.
2023-12-21 15:29:49 -08:00
Kurt
a45215b00d Update SpeciesCategory.cs
#4126
2023-12-21 12:31:10 -08:00
Kurt
7759596ffd Correct minior out-of-battle form 2023-12-21 11:31:37 -08:00
Jonathan Herbert
24a5b05fcb
Handle Seven Star Raids Change From Teal Mask Update (#4119)
* Handle Seven Star Raids Change From Teal Mask Update

* Refer To RaidSevenStarCaptured9.CountAll Rather Than Recalculate It

* Fix Wrong SevenStarRaid Size Variable Referenced

While they are the same value correcting the mistake so that there isn't confusion while looking at the code.
2023-12-21 10:51:09 -08:00
Kurt
d4eccd92ca Update raid minior-0, fixed spawns (stellar/under) 2023-12-20 23:42:20 -08:00
Kurt
2fe0f24301 Fix broken unit tests (location, item, evo order) 2023-12-20 14:40:13 -08:00
Kurt
fb87e9645a Update IHyperTrain.cs 2023-12-20 14:20:37 -08:00
Kurt
5da1ae4849 Handle Gold Bottle Cap 31IV bugfix
HOME fixes anything with 31IVs flagged. S/V no longer in error. Would be an incredible headache to detect "has visited S/V prior to 3.0.0" so just flag it.
It's up to the checker to know about this.
2023-12-20 11:29:50 -08:00
Jonathan Herbert
54d3f377e9
Make Raid Editors Edit Copies Rather Than Origin Save's Data (#4118)
Use an enum to know which raids to use rather than passing the specific raids so that the save changes copy back operation only happens when a user saves modifications and thus won't flag the save as modified if nothing was changed.
2023-12-19 20:53:10 -08:00
Samuel Magnan
90d000d640
Add villa furniture getter/setter for Platinum (#4120)
* Add VillaFurniture to SAV4Pt
2023-12-19 20:50:32 -08:00
sora10pls
41c830fa2c Add BCAT Milcery outbreaks 2023-12-19 22:34:42 -05:00
Kurt
a89b13027b Update gen9 sketch disallow 2023-12-18 20:27:57 -08:00
Jonathan Herbert
80faf97425
Use Explicit Types Instead Of SaveFile For Forms (#4116) 2023-12-18 20:24:24 -08:00
Kurt
10b158f82b Update EncounterTrade9.cs
Update EncounterTrade9.cs
2023-12-18 10:42:22 -08:00
Kurt
cbc63ef0a0 Handle non-nicknamed partner trades & weight/scale 2023-12-18 10:19:47 -08:00
Kurt
e371e87f1b Restrict cavern & labyrinth to inside 2023-12-18 08:03:50 -08:00
Kurt
9c0e9c31da Add weather marks, rebuild fixed encs
Still a few stragglers, but better overall.
2023-12-18 08:00:21 -08:00
sora10pls
09590a46b4 Update Encounters9.cs 2023-12-18 10:47:05 -05:00
Kurt
d95f424c62 Add another sav size 2023-12-18 00:47:53 -08:00
Kurt
f2419db092 Update PersonalInfo9SV.cs 2023-12-17 21:14:46 -08:00
Kurt
61d958e07a Fix blueberry raids & stellar showdown parse 2023-12-17 19:45:13 -08:00
Kurt
b8d370b661 Fix new tm bitflags, torque move check
ty roc for info
2023-12-17 17:51:55 -08:00
Kurt
c892225a55 Oops 2023-12-17 17:26:38 -08:00
Kurt
10cae1316e Update 23.12.18 2023-12-17 17:06:39 -08:00
Kurt
01c82e472e
Add support for Indigo Disk (#4111) 2023-12-17 16:41:15 -08:00
Sakura
4f56aa27f7
Update WC9 Dates (#4102)
* Add Paldea Gimmighoul Date

* Add コロコロ Roaring Moon and Iron Valiant Date

* Update
2023-12-17 16:39:26 -08:00
abcboy101
69cd3455be
Add Chatter Editor (#4101)
* Add Chatter accessors

* Add Chatter Editor

* Update translations
2023-12-17 16:39:15 -08:00
Eelen
30f3354b94
Update CHS Translations (#4100)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-12-17 16:39:03 -08:00
Jonathan Herbert
07cd05d1c1
Fix Some Missed Conversions To Collection Expressions (#4096) 2023-12-17 16:38:53 -08:00
Kurt
59e409bbd7 Update pk3.HeldMailID when not holding mail
https://projectpokemon.org/home/forums/topic/64361-bugs-when-editing-g3-japanese-version-pokemon/?do=findComment&comment=287038
2023-12-17 08:57:56 -08:00
Kurt
0769300803 Handle language-specific fateful bitflag location
Closes #4072
ty @Lusamine for checking japanese and english for complete clarity on this multi-year flip-flop.
historically, we used 0xFB.bit0 until jpn complained, changing it to 0xC9.bit4 to match the pk3 struct. Both were correct, and neither were correct.
2023-12-10 20:58:58 -08:00
Kurt
1fe2b4f29b ArgumentOutOfRangeException
Use the new NET8 API
2023-12-09 15:21:10 -08:00
abcboy101
edf28f74ff
Fix 3DS country/region names (#4095) 2023-12-09 06:22:05 -08:00
Kurt
b3684c58b2 Update EncounterDist9.cs 2023-12-08 17:30:41 -08:00
902PM
52be5b3d40 Update gen2/3 flags 2023-12-07 23:21:53 -08:00
Kurt
09018a4eaa Update EncounterDist9.cs 2023-12-07 23:20:49 -08:00
sora10pls
99b9911aa1 Add latest distribution raid/outbreak data 🌌🌸 2023-12-07 20:17:22 -05:00
Sakura
87efd747c4
Add Darkrai and Shiny Lucario Date (#4094) 2023-12-07 12:57:26 -05:00
Kurt
ef68886554 Add more annotations
Fix typo in swsh block name
2023-12-07 00:07:55 -08:00
902PM
61ab70f6bf
Update const_frlg_ja.txt (#4088)
Translated " const_frlg_ja" into Japanese.
2023-12-06 21:15:39 -08:00
902PM
1085a31a56
Update const_e_ja.txt (#4087)
Translated " const_e_ja" into Japanese.
2023-12-06 21:15:29 -08:00
902PM
50878846bf
Update flags_e_ja.txt (#4086)
Translated " flags_e_ja" into Japanese.
2023-12-06 21:15:20 -08:00
902PM
0be8873b89
Update flags_frlg_ja.txt (#4084)
Translated into Japanese.
2023-12-06 18:27:31 -08:00
Jonathan Herbert
d3452deb80
Document Dojo Watt Donation Related Flags and Values (#4085) 2023-12-06 18:27:17 -08:00
Kurt
762a2a0c41 Fix gen4 complete dex operation for female-only
Closes #4047
SetSeen(species) will set the seen flag but leave both bits 0-0; old code would SetSeen and fail to revise it to 1-1. Since we're setting both to their "complete" state, a "complete" state for a single gender is just a "new" registration operation.
2023-12-05 18:51:32 -08:00
Kurt
c09890366b Fix wc no nickname check, gen3 bvid return
Closes #4081
2023-12-04 18:38:05 -08:00
Kurt
d47bb1d297
Update .NET Runtime to .NET 8.0 (#4082)
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
2023-12-03 20:13:20 -08:00
Kurt
a71597f3a8 Handle gen4 manaphy egg gift pid checks correctly
ty lincoln for bringing this to my attention and explaining the possible actions & outcomes

game checks an un-updated ID32 (original recipient, different if traded hatcher), not "oops Ranger is no longer stored"
2023-12-01 22:33:08 -08:00
Momonopopotee
dcb72b0993
Update Gen5 Event Flags (#4079) 2023-11-30 16:40:19 -08:00
Eelen
41a3196161
Update CHS Translations (#4075)
Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-11-26 11:48:19 -08:00
Jonathan Herbert
39dddf1605
Update Switch Backup Paths With JKSV Path (#4076) 2023-11-26 11:46:42 -08:00
Fábio H. Attard
ef941dc0e6
Naming useful SV blocks (#4060)
* Named a few useful blocks

* Named a few useful blocks

* Renames for consistency as per suggestion

* Withdrawing hidden items blocks for more investigations

* Identification for Hidden Items blocks
2023-11-24 07:50:25 -08:00
Jonathan Herbert
e0fb60cdea
Update Pokétch Unlocked Count (#4073)
Closes #4067
2023-11-24 07:50:04 -08:00
Momonopopotee
4f998e2fe0
Add B2W2 Volcarona Event Flags (#4074)
* Update flags_b2w2_en.txt

* Update flags_b2w2_es.txt

* Update flags_b2w2_ja.txt

* Update flags_b2w2_ko.txt

* Update flags_b2w2_zh.txt

* Update flags_b2w2_zh2.txt
2023-11-24 07:49:40 -08:00
Kurt
2e736a1d4c Allow Colo Heracross lock-in skip
First = no locks; would be duplicate with the original Heracross locks, so just use the First since it's most permissive.

https://projectpokemon.org/home/forums/topic/64263-invalid-encounter-type-pid-mismatch/

ty Johh !
2023-11-23 23:32:06 -08:00
sora10pls
088bc29691 Ow, the edge 2023-11-23 19:06:30 -05:00
Sakura
ef52c390df
Add Team Star Revavroom Date (#4071) 2023-11-22 12:21:29 -05:00
Kurt
48d9368d3d Fix CountTutor3
ty chris
2023-11-21 18:47:14 -08:00
Sakura
684ea363d8
Add Alex Dragapult Date (#4065) 2023-11-18 21:45:30 -05:00
sora10pls
9b8cda39e7 Add Gen5 Musical Prop editor
Closes #4069
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!

Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
2023-11-18 21:41:10 -05:00
sora10pls
2e1e2b74f7 Add B2W2 Medal localizations
Closes #4068
Chinese localizations copied from English (was not an available language until Gen7), contributions welcome!

Fix typo categries -> categories
2023-11-18 21:15:38 -05:00
Fábio H. Attard
002d1d015f
Secondary heuristic to distinguish SAV1 save files between versions RB and YW earlier, if the Starter value was not set yet (#4064) 2023-11-17 10:25:31 -08:00
sora10pls
aec0367085 Add Eevee Day raid/outbreak BCAT data 2023-11-16 19:07:20 -05:00
Jonathan Herbert
876f4f4737
Document Location of Scarlet and Violet Rental Team Codes (#4062) 2023-11-14 19:36:23 -08:00
Kurt
c505b5a49d
Enhanced Slot Hover Preview (#4059)
Adds a new primary Hover Preview tooltip form. Users can change setting to use the old tooltip if they want.

When the user hovers over a slot in their Box / Party, PKHeX displays a tooltip indicating details about the Pokémon. This text tooltip shows the Showdown text (with some localization based on program setting), and includes details about the encounter the legality check matched it to.
2023-11-14 19:36:11 -08:00
sora10pls
d43b78349c Remove unreleased Altering Cave (E) enc slots
See 149c3fec20
2023-11-13 11:30:44 -05:00
Fábio H. Attard
5ede6feb38
SAV1 can implement IEventWorkArray<byte> (#4061) 2023-11-12 23:05:55 -08:00
Kurt
9df8f16ed3 Misc tweaks 2023-11-12 21:11:11 -08:00
Kurt
f0cacef8e2 Use met level if available for Gen2-C enc moves
Closes #4046
gbera allows move relearning via Stadium which hid the issue; old code just used the enc min level instead of actual. If a move was learned between min & actual, was flagged incorrectly.

pass the pkm thru the call chain
2023-11-11 23:02:15 -08:00
Kurt
a01c9ff5c6 Permit Headbutt from Water (Route 47)
See associated dumper commit for unprocessed change:
c06dc6893f

Closes #4058 ty @MaxAkito !
2023-11-11 19:57:56 -08:00
Kurt
40b6c97358 Fix Gen3 min sheen check
referred to wrong const value
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=286554
2023-11-10 19:06:52 -08:00
Kurt
64ed92a566 Minor clean 2023-11-09 22:02:23 -08:00
abcboy101
894ea1d628
Add conversion for Gen 4 saves between KO and JP/INTL formats (#4057)
* Refactor Gen 4 extra blocks

* Replace FetchHallBlock with extra block getter

* Add UI to convert save to/from Korean

* Do not modify uninitialized General/Storage blocks

* Detect invalid extra blocks
2023-11-08 23:33:40 -08:00
Jonathan Herbert
1f6d2de891
Add GUI For XY Roamer (#4056)
* Add GUI For XY Roamer

* Account For Roamer Not Set In XY
2023-11-08 23:33:02 -08:00
Kurt
3df5478d11 Minor tweaks, add Gigantamax info class 2023-11-08 23:32:41 -08:00
Sakura
5ce9619690
Add PokéCenter Pawmi&Charcadet、Korea Bundle Fidough Date (#4052)
Co-authored-by: Joseph11024 <83472295+Joseph11024@users.noreply.github.com>
2023-11-05 14:27:41 -08:00
Kurt
59dc7fb694 Misc tweaks 2023-11-05 14:20:35 -08:00
abcboy101
62df64e6f5
Gen 6/7/8/9 map position/rotation (#4054)
* Add Rotation to Gen 6 map position

* Keep 7 digits of precision for XYZ coordinates

* Scale coordinates in Trainer Data Editor

* Localization for SAV_Trainer.L_R

* Add SWSH map position

* Add LA map position

* Add Rotation to SV map position

* Add GG map position
2023-11-05 12:24:08 -08:00
Jonathan Herbert
9cdb08155e
Document Sword and Shield Swords Of Justice Flags and Values (#4053)
- Rename capture flags to more appropriate name since it is just if they are in the overworld or not.
- Document progress values for each Sword of Justice.
2023-11-05 10:00:53 -08:00
sora10pls
5708310f6f Add latest distribution raid data 🔥👻 2023-11-02 20:03:32 -04:00
Kurt
bced546c63
Memoize Ball Breeding permission tables (#4050)
O(1) lookup for arbitrary species, some edge handling rules for specific game islands/forms. With HOME, there's only 3 islands of permissions. No allocation besides the singletons which aren't really necessary.

No longer need to peek within multiple hashsets, just fetch the "is possible" bit from the species listing and check if the bit is set.

Will be fun if ball shell swaps are added 🤞, get to set all bits for anything that can enter game with that feature (if ever added).

Add unit test for gen67 no-patch exclusion
2023-11-02 15:55:26 -07:00
abcboy101
8e28ca8cf4
Fix Gen 7 map position (#4049)
* Prevent UpdateOverworldCoordinates from corrupting FieldMoveModelSave

* Fix Gen 7 player coordinates

* Fix Gen 7 player rotation
2023-11-02 15:32:45 -07:00
Kurt
e0cf4447ff Explicitly handle mark8 presence (wc9/static9)
Move some files around
WC9 fidough gift sets Classic AND Uncommon, and it doesn't set the lowest ribbon indexes. Nice GUI.
2023-11-01 19:19:50 -07:00
Kurt
be574948db Add more xmldoc, conditional flawless IVs
Rerolling IVs now rerolls correctly for SOS hidden ability encounters.
2023-10-29 20:27:42 -07:00
Kurt
65bc027f22 Improve perf of dummied move check
O(1) of a not-allocated array is faster than O(1) of an allocated HashSet.
2023-10-29 20:25:23 -07:00
Kurt
e448679f4a Minor clean
No alloc EncounterEgg relearn moves (use span instead)
Move HoneyTreeUtil out of root Saves folder
Minor readability tweaks
2023-10-28 22:07:58 -07:00
Kurt
06c36130c5 Add IFixedIVSet; better reroll IVs for fixed sets 2023-10-28 22:02:12 -07:00
Kurt
9cc36578c5 Add GameConsole enum and EncounterDate pivot
Can now fetch a valid date for a context
2023-10-28 22:01:26 -07:00
Kurt
b088a29c88 Gen4 Pt: remove invalid Korean event flag rows 2023-10-28 22:00:14 -07:00
Kokaikokai
a351672721
Add one more SV DLC1 save size (#4045)
Signed-off-by: Kokaikokai <fianity.gani@gmail.com>
2023-10-28 11:27:32 -07:00
Samuel Magnan
be576be88b Add Crystal Mystery Gift item in Simple Editor (#3983)
For Pokémon Crystal international release, add the option to edit the Mystery Gift item in the Simple Editor.
2023-10-27 21:19:13 -07:00
Samuel Magnan
fda815c3e5
Gen2: Add MysteryGiftIsUnlocked flag in Simple Editor (#4007)
The flag indicates whether the option "Mystery Gift" has been unlocked and it is displayed in the start menu.
Note: It is unlocked after talking with the little girl on the fifth floor of the Goldenrod Department Store.
2023-10-27 21:09:15 -07:00
Jonathan Herbert
0015beb8d8
Add Accessors for Black 2 And White 2 Medals (#4043)
Thanks @suloku as the logic this uses comes from their BW_tool.
2023-10-27 21:02:04 -07:00
Jonathan Herbert
fd1f00e1a6
Handle Sun and Moon Legendary At Altar Flags Correctly (#4044)
According to the research by IgnisSpace shown on https://projectpokemon.org/home/forums/topic/64103-sm-battle-flags-and-others-misc-flags/ , Solgaleo and Lunala have different flags for if they are at the Altar of the Sunne/Moone.
2023-10-27 21:01:27 -07:00
Kurt
5c7ce2c0a6 Misc tweaks
Fix g12 str set (jp/en was swapped, oops)
add more xmldoc
minor readability/short circuiting
2023-10-27 21:01:11 -07:00
sora10pls
7fd1c9da1e Add Halloween raid/outbreak data 2023-10-26 21:12:14 -04:00
Kurt
16aba45371 EncDB: Fix colo starter yield
Improve enc->ck3 creation, inline the shiny/gender reroll logic instead of trying again outside the loop.
Rewrite the pidiv logic to be more obvious

colo starters now show up in encdb list
2023-10-26 01:07:20 -07:00
Kurt
325f75e3d3 Gen12 strings: span instead of runtime dictionary
More performant byte->str performance (no longer needing to hash byte and fetch bucket), unmeasured str->byte performance, but it is the same implementation as Gen3 which is not a bottleneck.
Reduces the dll size by 80KB, and RAM usage by an unmeasured (likely similar amount). Better startup speeds since multiple dictionaries do not need to be allocated and created.

Moves Gen1 trainer names (0x5D) to Transporter class, and remove Korean entry (not legally obtainable since there's only Gen2 Korean games and Gen2 Korean VC cannot trade with international).

Hard verify Gen1 trainer name for language, since 0x5D is the ROM transfer language. Nickname can still be from any of the connected games.

This refactor makes it easier to use a different charmap for byte<->str for Boxes (see #4027) and the language differences. We have a master table that "works" for all text name entry, but localizations differ for some glyphs accessible in the box naming UI.
2023-10-25 16:34:11 -07:00
Zazsona
1816aefc25
Ranch level indexing fixes and general API usability improvements (#4041) 2023-10-20 18:28:43 -07:00
Kurt
da27814504 Minor tweaks
I quite like the DeSmuME footer check simplification.
2023-10-14 19:28:46 -07:00
Kurt
0da8c33c52 Use byte span for BinLinker check
Need to change ConstantExpected to Length when NET8 comes out next month
2023-10-14 19:25:39 -07:00
Kurt
b3bbc044ca Misc jp Gen1/2 vc fixes
Fix iterator jump
Allow bu dragonair encounter -- should probably rip out all the old catchrate compare stuff anyway.
2023-10-13 18:39:25 -07:00
Kai
6978db5e9a
Add Trixie Mimikyu Eligible Date Range (#4035) 2023-10-13 19:28:11 -04:00
Kurt
4877c63750 Update 23.10.11
Add sizes for 2.0.2
Add crossover Unown-C location for PLA - Closes #4031
2023-10-11 20:12:51 -07:00
Kurt
0491ab2372 SAV3E: Max Item ID +2
Closes #4033
2023-10-11 19:30:26 -07:00
Kurt
b6a42d414b RNG: Move files & extract some logic
Rearrange some folder organization to extract some common/reusable logic for dealing with RNG operations for specific gens/games.
2023-10-11 19:28:51 -07:00
BlackShark
bf8a5451ed
Updated badwords.txt (#4032)
* Updated badwords.txt

* More clean up
2023-10-10 15:18:45 -07:00
Kurt
abcaaa44cd Extract pokewalker logic from template ctor
Actually searching (instead of brute-forcing) for a spread will forever be haunting.

Add to Legality Check matching with vague partial match
2023-10-07 23:14:34 -07:00
Hendi48
1c097598e7
HGSS: Add support for editing Pokeathlon Points (#4030) 2023-10-07 08:57:38 -07:00
Kurt
707898d4e2 Add Pokewalker IV validation methods
Not yet hooked into the legality analysis (MethodFinder doesn't know about encounter template info).
2023-10-07 00:00:36 -07:00
Kurt
fac682bcad Update WordFilter.cs
Reduces startup alloc by 24KB if we don't allocate an array to store all regex strings
kinda small but ez free
2023-10-06 23:58:13 -07:00
sora10pls
bb5cc7cff1 Add latest distribution raid data 🦉🥋 2023-10-05 20:03:16 -04:00
Lusamine
e64205e504 Fix unsafe camera config block find
Closes #4026
2023-10-05 10:11:34 -05:00
Kurt
c23bae5180 Add Distribution Outbreak type & recognition 2023-10-04 22:49:56 -07:00
Kurt
965039e258 Misc tweaks, fix slot8b ball
Fix Slot8b fallback ball not being Poké (was 0).

Swap eevee & none move sentinels; branch-if-zero easier for compiler.

Lift EV-any-above100 to be checked first; fetching personal and getting EXP is slower than checking 6 indexes in stack. Both branches would check. Most pokemon won't have EVs >100 as users flip through boxes in gen3/4.
2023-10-02 20:54:17 -07:00
sora10pls
e58a1565ad Add ConfigCamera9 2023-10-02 15:55:19 -04:00
sora10pls
8b2b858e69 Update RibbonRules.cs
Closes #4023
2023-10-02 08:07:14 -04:00
sora10pls
57292b23c8 Update Master Rank Ribbon check for Regulation E
Sinnoh starters permitted, Kitakami dex permitted, Legendary/Mythical still disallowed.

Also check for Battle Version on GO8 encounters in SWSH, which while are Gen 8 encounters, require Battle Version since they didn't originate from SWSH.
2023-10-01 09:17:51 -04:00
Kurt
17e0f1feee Prefer cave when finding Fixed origin AreaInfo
see pkNX commit
2023-09-29 22:33:43 -07:00
sora10pls
07191e6aad Label a whole bunch of delivery outbreak blocks
Paldea, Kitakami, Blueberry, BCAT Paldea, BCAT Kitakami, BCAT Blueberry
2023-09-28 21:26:27 -04:00
Kurt
96e74a05d0 Add HoneyTree API 2023-09-28 17:35:29 -07:00
Kurt
963eaaaa40 Merge branch 'master' of https://github.com/kwsch/PKHeX 2023-09-28 16:40:17 -07:00
sora10pls
3debc89e3c Fix sudachi outbreak subjugation block keys
Co-Authored-By: santacrab2 <79347566+santacrab2@users.noreply.github.com>
Co-Authored-By: notzyro <62817135+zyro670@users.noreply.github.com>
Co-Authored-By: Manu <52102823+Manu098vm@users.noreply.github.com>
2023-09-28 10:34:48 -04:00
Kurt
12ee201431 Extract EV limit logic 2023-09-27 22:15:59 -07:00
Kurt
0cda774b97 Misc tweaks
Closes #4016
Closes #4018

Adds interface to fetch 64bit correlation seeds from template
Improves re-entry performance for 64bit seed search
2023-09-26 09:32:49 -07:00
Kurt
c00657f845 Update 23.09.25 2023-09-24 21:19:53 -07:00
Kurt
88a5a1c9e5 Update WC9 ID32 handling for 2.0.1
Seems like
2023-09-24 20:56:35 -07:00
Kurt
f6ee2b1ffa Kitakami Placeholder area weather table 2023-09-24 17:11:52 -07:00
Kurt
bc18cd0ab4 Kitakami: Fixed spawn subzone & crossover 2023-09-24 17:02:42 -07:00
Kurt
b4b72a8fda Clarify Tera Raid crystal middle number 2023-09-23 20:41:50 -07:00
Kurt
7a28a23d5e Add subzone encounters
Yay untagged locations with exclusive encounters
2023-09-23 20:41:00 -07:00
Kurt
dd541e0bf2 Add TryGetBlock fetch method
Improves performance; only a single binary search for the block (instead of one or two).

Remove allcoation for SV flyhashes
2023-09-23 15:50:11 -07:00
sora10pls
0b60161379 Label more sudachi1 save blocks 2023-09-23 15:28:35 -04:00
sora10pls
9510272149 SV TM/Fly cheats: do not modify non-existent blocks
New fly location and TM Machine flags do not exist on older save revisions, which would've thrown an exception
2023-09-23 11:08:25 -04:00
Leidenfrosty
703e2ed5ad
Other Additional G9 DLC Save Sizes (#4008) 2023-09-21 19:47:20 -07:00
sora10pls
26894eb6fa Add latest distribution raid data 🔥🐛 2023-09-21 20:07:11 -04:00
Kurt
a45a7cc2d3 Misc fixes
Pokewalker: defer match if shiny
Jacq egg: recognize unhatched egg, traded
sv-pokedex-old: don't add rows for >1010 species (out of range)
static9: correctly flag scale mismatch

SAV4HGSS: expose pokegear #'s as span instead of alloc
2023-09-21 13:14:34 -07:00
sora10pls
99d4a5ccdc Add sudachi1/2 encount outbreak save blocks
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2023-09-20 22:28:20 -04:00
sora10pls
10147334e6 Add Terastal Cap, add remaining missing fashion items
Co-Authored-By: Pasquale Nardiello <pasqualeomeglio@gmail.com>
2023-09-19 20:35:50 -04:00
Kurt
5fcf82c827 Split meta filter from property filters
Closes #4009
was never implemented to work with SAV_Database... until now!
2023-09-18 20:13:23 -07:00
Manu
ce9a3d0104
RibbonExtensions public accessors (#4006) 2023-09-18 15:56:53 -07:00
Lusamine
11145c2432 Label SV BC outbreak blocks 2023-09-18 09:37:07 -05:00
sora10pls
af8194f241 Add unreleased Tracksuit fashion items 2023-09-18 08:44:43 -04:00
Kurt
685e4cfd95 Add new Raid display requirements (3/4) 2023-09-17 20:23:00 -07:00
Kurt
9ce715f70c Copy phione disallowed bred ball rule from BDSP
only pokeball
2023-09-17 19:49:53 -07:00
Kurt
96c0e199e1 Add Kitakami Raid edits, new dex block edits
Closes #3992

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2023-09-17 19:49:26 -07:00
Kurt
05f9073f31 Add API for home tracker state checking
Correct poltchageist masterpiece comments
swap order of Ogerpon (more likely to be Level 70)
Add methods to filter gameversions by context
add 3 more sizes
2023-09-16 16:53:06 -07:00
sora10pls
ed6674791a Fix Ogerpon-5 and Ogerpon-6 ability text 2023-09-16 15:40:09 -04:00
sora10pls
5c1d165f2d Enhance SV fashion unlocker for DLC 1
No point in having a billion categorizations for fashion, makes things too bloated as more items get introduced.
Add in DLC items, fix giving opposite-gender starting uniforms.
Closes #3994
2023-09-16 15:34:21 -04:00
ReignOfComputer
8084102eb9
Additional G9 DLC Save Sizes (#3995)
* Additional G9 DLC Save Sizes

* Additional Size and Adjusted Diff

* Another Additional Size
2023-09-16 09:40:09 -07:00
Kurt
80eafc5b40 Check fixed nature when fixed for static encounters
Closes #3996
2023-09-16 09:39:50 -07:00
Kurt
71c4b1a97b Update SaveUtil.cs 2023-09-16 00:47:47 -07:00
Kurt
7703576088 Update 23.09.16 - Teal Mask
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2023-09-15 23:36:21 -07:00
Kurt
c09a4646a1 Fix incorrect move reference (Aipom evolve) 2023-09-15 20:35:02 -07:00
Jonathan Herbert
988a0b5718
Fix MsgMysteryGiftSlotAlternate Error In MessageStrings_en.txt (#3987)
Close #3986
2023-09-12 18:37:11 -07:00
Kurt
9f340b592b Evolve-With-Move: Refactor to be memory-like
Evolving with a move requires once knowing the move, should be a much better approximation solution here. Ideally we check in specific contexts as Pokemon may learn their requisite moves after evolution, but this should catch most for now.
2023-09-12 18:14:22 -07:00
Kurt
21725aa1c0 Misc enc template ctor fixes
Static8: Use flawless IVs
Slot8b: set safari ball when required
GBRestrictions: use struct to bypass boxing allocation
2023-09-12 18:12:44 -07:00
Kurt
3a28eee2e9 Remove old GeneratePKMs api methods
Use the GenerateEncounters methods instead, just a single line extra for each consumer.

PokemonGenerationReturnsLegalPokemon now works for all Gen1-7 encounters->PKM (except for Korean WC6 Arceus form mismatch), still disabled from auto-test due to it taking about a minute to generate everything. Future updates can add special methods for SW/SH, PLA, BD/SP, and S/V if the species/form exists in the game.
2023-09-11 18:20:22 -07:00
Kurt
fe7012c3eb Allow hatched Gift2 eggs to have met info
Closes #3985
2023-09-11 01:00:24 -07:00
Kurt
e3f8091971 Misc fixes
Ignore slot match for Swarm3
Honey Tree only yield possible slots via TID/SID
Pick min level for EncounterTrade1
Set nickname for CXD Elekid trade
Set held item for Pt Giratina
Set egg location for Ranch gift hatched egg
Set hidden ability flag for N's Darmanitan
Set XY Vivillon form based on generated geolocation
Force evolve Trade species if encounter requires it
Correctly recognize pikachu-colored-pichu Gen4 gift PID type
Set hatched manaphy egg's met location & date
2023-09-11 00:54:40 -07:00
Kurt
b536388d0d Misc tweaks
Add xmldoc
Simplify some casts
Demote priority of Gen2 event yielding
Remove old EncounterMatchUtil code
Repoint DateTime.Now to console specific date provider stubs
2023-09-10 21:17:47 -07:00
Kai
c7aa497e73
Add Cetitan Eligible Date Range (#3981)
Update wc9.pkl
Closes #3982
Closes #3984
2023-09-09 21:02:58 -07:00
Kurt
19acce85c8 Update LegalityAnalysis.cs 2023-09-07 12:39:13 -07:00
Kurt
ec4eee6047 Update Encounters8.cs 2023-09-06 21:29:27 -07:00
Kurt
7fcde8a447 More Gen1/2 considerations for tree pruning
Need to prune tree for template according to the correct generation (disallow baby pre-evolutions for Gen1)
Also disallow Evolution moves for Gen2 if the evo is the enc species.
2023-09-04 20:34:46 -07:00
Kurt
45216dfa1b Set template version as byte
Be consistent with other templates

Also sets OT details for Static8a
Closes #3979
2023-09-04 18:50:35 -07:00
Kurt
4e0f23cdc0 Handle get moveset for Gen1 Red Trade Jynx
Need to not devolve into Smoochum as the rules are restrictive: no relearn, but we want to allow Jynx to "permit" moves it learns from levels 0-29.
2023-09-04 18:23:10 -07:00
Kurt
91d4ba5f03 More template tweaks
VC1/2: templates with non-hidden return correct ability permissions
PLA set met date (oops)
2023-09-04 14:57:39 -07:00
Kurt
e0e6c51498 Set template moves if provided 2023-09-04 10:15:20 -07:00
Kurt
2b55232998 Add Vespiquen as combee-genderbranch
Remove allocation in SetRandomChainShinyPID

Add Salazzle for completeness
2023-09-04 08:53:06 -07:00
Kurt
3fdfd29e4b Misc tweaks
Gift1: use IVs if required
Gift2: Enforce 0 TimeOfDay
Egg9: Require Egg Location to match encounter
PGT: keep requested gender in the event of antishiny
PGT: never yield Korean Ranger Manaphy for Format4

Simplify ushort range checks
Rename `EReader` bool to `IsEReader`
Extract Gender/Nature fetch for unfixed encounters
Remove Unown PIDIV branch when template has no Unown
Remove unnecessary loop for Pokewalker PID creation
2023-09-04 00:50:26 -07:00
Kurt
63c027879f Account for Snorunt->Froslass Pokewalker PIDIV 2023-09-02 16:46:23 -07:00
Kurt
e1c8f52a07 Misc tweaks
Set met dates for gen9 static encounters (oops)
Check interface implementations for HasProperty
2023-09-02 15:53:51 -07:00
Kurt
0f7e623842 Use Gen8 toxel gift IVs in ctor
ty anubis
2023-09-02 09:30:43 -07:00
Kurt
93ddee4be4 Skip dmax level check for rank 2023-09-01 22:07:25 -07:00
sora10pls
3346e2f895 Mewtwo the Unrivaled 2023-08-31 20:05:01 -04:00
Kurt
1b22453870 IsIVsCompatible -> IsIVsCompatibleSpeedLast
Fix implementation as all uses are checking IVs Speed Last, but the method wasn't thinking like that.

Improve base ROM raids for SWSH to ensure the Rank roll matches the output.
2023-08-30 19:08:00 -07:00
sora10pls
2f0dd1e94f Pokémon GO: Adventures Abound
Permit Great Ball / Ultra Ball for Sprigatito, Fuecoco, and Quaxly
2023-08-30 17:29:50 -04:00
santacrab2
9e230b19f8
Assign fixed nature/Genders to EncounterTrade9 instead of random (#3971) 2023-08-30 07:49:10 -07:00
Kurt
0aa4a15851 Fix cgear skin import loop
byte 255->0 overflow infinite loop if too many tiles are unique
https://projectpokemon.org/home/forums/topic/63828-c-gear-skin-editor-crash/?do=findComment&comment=285181
2023-08-30 04:44:40 -07:00
Kurt
78e7536459 Handle setting egg flag in cxd saves
No longer throws an exception due to EncounterInvalid having an invalid version ID (fails to fetch personal/learnset).
2023-08-29 22:47:07 -07:00
Kurt
978bcfa56f Misc enc template tweaks
Skip string fetch for Trade1
Set gender for Trade8
Add record to wrap Gen8 raid generate params, return & use bool for filtering results, fallback to unrestricted if none succeed
Fix gender comparison for Entree5 slot
Simplify gen2 ResetKey fetch (byte sum of Money/ID/OT(used)
Closes #3970 by filtering gender inside the method like Encounter9RNG with an early return
Adds IV filtering inside the method with an early return like Encounter9RNG
2023-08-29 22:22:23 -07:00
Kurt
5222fdc6ad Add more tagging for IFixedGender, IFixedNature 2023-08-28 21:09:52 -07:00
Kurt
fd02b97ce1 Misc tweaks
Allow nickname->species with span
add ConstantExpected annotations
Correct Gen8b ability set calling CommonEdits instead of direct setter
Slightly better perf on gen5/gen8+ location fetch
Misc pkm ctor fixes for b2w2 trade & wc3 eggs
wurmple evo now has an enum to be more explicit
no recursion for gen5 generator
fix showdown line length check allowing 86 instead of 80
2023-08-27 23:05:50 -07:00
Alexander3a
afc29fb203
Fixed span for PokeDexEntry9SV being too large (#3969)
* Fixed span for PokeDexEntry9SV being too large

Prevents .Clear() from wiping data it shouldnt
2023-08-25 10:08:43 -07:00
Kurt
00bb8ec7de Fix misc matching regressions
Gen4/8b Muchlax tree (&& -> ||)
Colo Umbreon w/ Bite (IMoveset)
WC3 unhatched -> use MysteryGift validator

Remove wurmple defer check for Static3 (no wurmple encounters)
Remove unnecessary spaces for colo enc definitions
2023-08-23 22:03:36 -07:00
Kurt
a7f4d572e7 Set Japanese console region for pk1/pk2->pk7
Also simplifies some logic to reuse methods / use more straightforward. No longer fetches PersonalInfo twice
2023-08-23 20:47:38 -07:00
Kurt
4e13a0261d Update 23.08.23 2023-08-22 21:27:29 -07:00
Kurt
108708dcda Add gsc union cave B2F shore fishing slots
6180be355e/data/maps/maps.asm (L115-L117)

https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=285012

Also handle the SID==0 fishy for VC (which is fine)
2023-08-21 20:09:35 -07:00
Kurt
50608c1b15 Misc encounter tweaks (extract/pass personal)
Removes doublefetch for personal, maybe faster ctor.
2023-08-21 20:07:53 -07:00
Kurt
8dd9e0803d Update dex minmax read offsets
Closes #3943

Also exposes the boolean flag in between the height/weight tuple.
Pretty sure this struct has an unused second half, and is just {byte, bool, byte}[2].
2023-08-20 13:48:01 -07:00
Kurt
86459812c1 Misc tweaks
Ensure GO IVs are respecting the min floor
Add some comments, reuse PersonalInfo reference instead of refetch
Fix Hoopa Unbound SlotWrite changing to 3
2023-08-20 00:31:54 -07:00
Kurt
2777a3e039 Tag some encounter descriptions with more info 2023-08-19 16:43:05 -07:00
santacrab2
aef2cc7066
Add missing fateful setters (#3967) 2023-08-19 15:57:07 -07:00
Kurt
f7d66db7e2 Misc tweaks
Check HT move memories in Gen9 appropriately for deferral cases
Add missing ID32 set for GO8->PKM
Slight pre-work for Mightiest Mark Mew method signatures
2023-08-19 11:13:20 -07:00
sora10pls
910415ea8d Clean up Encounters9 encounter definitions
Pad species IDs to 4 digits, maintain a consistent order of fields
Also re-order trades to match the order seen in the ROM (more to be added in DLC)
2023-08-19 11:10:21 -04:00
Kurt
15faf8197a Update EncounterStatic4.cs 2023-08-18 11:48:49 -07:00
Kurt
0b2d167465 Update EncounterStatic8a.cs 2023-08-18 08:38:00 -07:00
Kurt
07042233be Allow US/UM new moves in Relearn for S/M 2023-08-17 17:43:11 -07:00
Kurt
213234b4d2 Fix USUM max move ID usage for HOME learn
Closes #3966
Closes #3954 (original)
2023-08-17 17:36:39 -07:00
sora10pls
7dc40735f3 Mighty Mewtwo: A Show of Supporters! 2023-08-17 20:04:33 -04:00
Kurt
c4b8cab9cd Set form when appropriate 2023-08-17 11:23:22 -07:00
Kurt
392dfbbb4e Gen4 trade gift nickname 2023-08-17 10:23:29 -07:00
Kurt
ff3081408a Change Gen4 roamer default met tile
the groundtile bit permission was causing the Route 201 to set Water which isn't possible to encounter them on, so use the lowest bit instead of highest bit
2023-08-17 10:15:21 -07:00
Kurt
bfc24dd5c2 Update EncounterTrade4RanchGift.cs 2023-08-17 08:26:50 -07:00
Kurt
9855382b0a Misc encounter tweaks, annotations
EncounterEgg now indicates FixedBall(Poke) for Gen2-5
EncounterSlot2 now indicates Form Random for Gen2 Unown, database
EncounterStatic3 now generates FRLG Gen2 Roamers with correct location
EncounterCriteria now used more heavily for requested IVs
EncounterPossible3 now correctly skips Eggs if eggs are not requested
EncounterGift3Colo now generates Japanese Bonus disk gifts only in Japanese, doesn't validate non-Japanese
2023-08-17 00:07:54 -07:00
santacrab2
57e23cc860
- misc template -> pk tweaks (#3964)
* - misc template -> pk tweaks
2023-08-16 18:57:44 -07:00
Kurt
5637b1775d Fix psk tile choice encode/decode, XY flip
Closes #3953
Add in more annotations & clean up things slightly
2023-08-16 18:51:32 -07:00
Kurt
6a373ee5db Tweak pokerus load indication
Closes #3957
2023-08-15 17:47:12 -07:00
Kurt
0a9300874b Check current level on GB Era event gift eggs
Closes #3963
2023-08-15 16:09:08 -07:00
BlackShark
218a29a16a
Fixed FRLGE Enigma Berry size (#3962) 2023-08-14 23:23:39 -07:00
Buggz Evol
e1499398f6
Add Eduardo Gastrodon eligible date (#3959) 2023-08-14 20:13:46 -07:00
Kurt
c6a961bda6
Add Xoroshiro128Plus Solver, SW/SH Raid verification (#3961)
Due to how the game generates the Pokémon data, the first two (or three) RNG calls are used to set the 32-bit `EncryptionConstant` and `PID`. With 2x 32-bit and 1x 64-bit values, we can algorithmically reverse the movement & manipulation of bits to recover the initial seed. Notably, certain bits of the initial state are not captured by our first two (or three) outputs, so we must brute-force guess at the initial state, and verify the RNG's output yields the expected values.

**With the ability for real-time Xoroshiro128+ seed reversal, we can now validate RNG correlations for SW/SH raid encounters natively within the program.** For now, the legality fail error message is extremely vague and any validated seed won't be "remembered" for the Legality Parse like other RNG methods. These seeds are 64bit, while every other "remembered" `PID/IV` seed-info is 32-bit.

Co-Authored-By: SciresM <8676005+SciresM@users.noreply.github.com>
2023-08-14 20:01:38 -07:00
Kurt
534dc02154 Misc enc template -> pkm fixes 2023-08-13 17:23:16 -07:00
Kurt
3afcfcdfa3 Add setters for Dynamax/Gmax static8 2023-08-12 16:45:43 -07:00
Kurt
f632aedd15
Encounter Templates: Searching and Creating (#3955)
We implement simple state machine iterators to iterate through every split type encounter array, and more finely control the path we iterate through. And, by using generics, we can have the compiler generate optimized code to avoid virtual calls.

In addition to this, we shift away from the big-5 encounter types and not inherit from an abstract class. This allows for creating a PK* of a specific type and directly writing properties (no virtual calls). Plus we can now fine-tune each encounter type to call specific code, and not have to worry about future game encounter types bothering the generation routines.
2023-08-12 16:01:16 -07:00
Eelen
18812550e8
Update CHS Translations (#3956)
Update CHS Translations

Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-08-12 11:35:42 -07:00
Momonopopotee
6d098cc848
Update gen 2 event flags and PLA blocks (#3944) 2023-08-09 00:44:34 -07:00
Eelen
89eff1fe19
Add Foongus and Amoonguss flags (#3952)
Add Foongus and Amoongus flags

Fix translation errors

Translation New flags in CHS

Co-authored-by: Professor Dirty <103500840+wubinwww@users.noreply.github.com>
2023-08-09 00:43:59 -07:00
Kurt
d647f15f23 Fix indexing check for tile rotation
Closes #3950
Does not resolve #3953 , separate issue as caused by the April refactor. Need to debug old & new and see where the data is being copied wrong
2023-08-09 00:43:29 -07:00
sora10pls
a483bf9a24 Mighty Mewtwo: Prepare the Offense! 2023-08-08 20:07:21 -04:00
sora10pls
3e13b1bc29 Add Tatsugiri/Mew eligible date ranges 2023-08-08 17:58:12 -04:00
alvv-z
498391ea04
Add battle subway trophy flags (BW) (#3949)
* Add battle subway trophy flags

* Spelling: posess -> possess
2023-08-02 14:03:21 -04:00
sora10pls
96fa89188a Add latest distribution raid data 🦍 2023-07-27 20:03:28 -04:00
Manu
4ca9f2a905
Add Nontaro's Shiny Grimmsnarl Server Date (#3946)
* Add Nontaro's Shiny Grimmsnarl Server Date

* Corrected end date typo
2023-07-27 07:37:46 -04:00
Kurt
22aaea63df Update LearnGroupHOME.cs 2023-07-21 19:54:19 -07:00
Lusamine
92d65dc6a4 Add legal date range for Dark Tera Charizard 2023-07-21 21:05:58 -05:00
Lusamine
cf4de45c03 BDSP Valley Windworks Drifloon is 3 IV guaranteed 2023-07-21 21:05:06 -05:00