Commit graph

3269 commits

Author SHA1 Message Date
Kurt
9231f37be4 Move outbreak iteration after slots
essentially wild slots... can have wild marks like slots
need to check before static encounters (cannot have marks)
2024-04-28 16:44:28 -05:00
Kurt
e7f79be41d Minor clean 2024-04-28 00:35:26 -05:00
Kurt
bb6e45db60 Refactor out legality settings, add more settings
Extract PP verifier
Add disabling of wordfilter for formats < 6
Add context-specific bypasses for nickname/handler checks
2024-04-26 14:33:03 -05:00
Kurt
94f93d41c5 Update EvolutionGroup4.cs
Handles arceus-9 in future generations (reads as "not present in current game" via personal info if not stripped).
2024-04-26 08:35:54 -05:00
Kurt
3358038172 Add ball deferral & met level leniency for gen3/4
Fixes some issues reported via discord
2024-04-26 01:33:19 -05:00
Kurt
1b294f7c97
Refactor: Split Gen1/2 string & pokelist conversion methods (#4251)
* Split Gen1/2 string & pokelist conversion methods

* Refactor pokelist to direct read/write, skip on save if blanked

* Add settings editor for SaveLanguage overrides
2024-04-22 14:42:22 -06:00
Kurt
54525da20b Add tradeback wipe of Gen2 initial moves 2024-04-20 14:04:54 -05:00
9Bitdo
8f65874ba4
Add Marco's Iron Hands distribution date (#4238) 2024-04-10 22:01:19 -04:00
Lusamine
a6868834c8 Add alternate met location for LA static Unown N
Closes #4237
2024-04-06 15:53:59 -05:00
Kurt
0552dcd37c Crystal: Add e-speed-less dragons den dratini
VC has no move relearner so can't unlearn espeed & relearn the level up move to look the same.
Rearrange moves to match how the game gives them.
2024-04-06 09:06:45 -05:00
Kurt
9c1538f503 Disallow HOME move share w/ battleversion & <=Gen7
HOME's SWSH moveset is disqualified from having <=Gen7 moveset permissions if the battle version was applied in SW/SH.
2024-04-05 14:49:46 -05:00
Kurt
5f4cf2af29 Better guard against bad gender requests
Can infinite loop gen3/4 generators by requesting from an invalid gender (eg Male Blissey) in Gen5+
2024-03-30 17:44:21 -05:00
Kurt
a2f36760e6 EncounterCriteria: ignore genderless gender values
Shedinja (genderless) was filtering when trying to generate gendered nincada
Also fix method2 reattempt & comments while we're here (comments were copypasted from Unown's method)
2024-03-30 11:28:15 -05:00
Kurt
8f60ad546c Extract DEntry reading logic 2024-03-28 23:07:13 -05:00
Kurt
d8689e4074 Update EncounterTrade2.cs 2024-03-28 00:41:23 -05:00
Kurt
69f7413387 Revise Gen8 HOME gift 0/0 scale rolling 2024-03-25 23:12:59 -05:00
Kurt
af228b0fec Re-add gsc rock smash
ede3296c31

also sneak in SV Ride legend having trash bytes/HT data
2024-03-25 22:28:51 -05:00
Kurt
fed6b41950 Update EncounterTrade2.cs 2024-03-25 19:27:23 -05:00
Kurt
45444578ab Handle Gen8 ability tradebacks
HOME 3.1.0 change (Teal Mask)
https://www.smogon.com/forums/threads/pokemon-home-update-adds-ability-tradebacks-to-swsh.3727789/

delete all the handling for 3.0.0 tradeback gating since it's no longer correct.
2024-03-25 17:18:44 -05:00
Kurt
bf476f4de5 Update ChannelJirachi.cs 2024-03-25 12:52:59 -05:00
Kurt
2b4ecee899 Rename EggEncounter to IsEgg 2024-03-25 00:39:30 -05:00
Kurt
024bd85cc3 Minor tweaks
make PL6 use memory instead of byte[]
make GP1 use memory instead of byte[]
move IEncounterable properties higher to IEncounterTemplate
2024-03-24 20:12:33 -05:00
Kurt
905c80521e Trade2: hard match on nickname, not OT
Webster (RANDY) Spearow in Italian uses the same OT, with different nickname.
2024-03-24 14:46:23 -05:00
Kurt
c6f12515c6 Flag invalid mystry mew seeds, like channel 2024-03-23 21:35:46 -05:00
Kurt
2ff2815dbe Add Channel Jirachi menu pattern verification
Sitting on my todo-list for far too long
see pokefinder for similar implementation
PKHeX has a forward & reverse implementation available for 100% documentation purposes :)

The seed indicated in hover previews now matches that of the true Origin seed for the encounter (pre menu & accept dialog), similar to Method H/J/K encounters.

Co-Authored-By: Admiral-Fish <24730718+Admiral-Fish@users.noreply.github.com>
2024-03-22 16:12:56 -05:00
Kurt
84363eb8eb Next seed if activation fails
ty santacrab for pointing this out
2024-03-21 21:22:56 -05:00
9Bitdo
f0f341f6f2
Add Liko's Sprigatito distribution date (#4228) 2024-03-21 07:57:02 -06:00
Kurt
205e9b433d Set ability bit, precheck for encounter activation 2024-03-21 00:18:16 -05:00
abcboy101
8a3a338c0b
Fix encodings for Gen 3/4/5 transfers (#4220)
Adjust Gen 3/4 encodings to be consistent with Gen 5 Unicode encodings
Gen 3 quotation marks are displayed differently based on the game language
Implement how Pal Park handles invalid characters and corrupts certain accented characters
Implement how Poké Transfer handles invalid characters
Use U+25BA BLACK RIGHT-POINTING POINTER, since this character is used as the pointer in menus/etc., rather than as a bullet or generic shape
2024-03-17 22:34:13 -06:00
Kurt
2b6f153831 Don't remove <=g7 move if swsh context 2024-03-17 17:30:04 -05:00
Kurt
9e7046564c Revise naive ability deferral logic for gen9
Closes #4221

HA->1->2 requires a 2-step check
2024-03-17 14:44:54 -05:00
Kurt
bc7118b493 Add specialized PIDIV generator for gen4 slots
extract gen3's to a static class
2024-03-17 13:54:36 -05:00
Kurt
c3c7fac86f stadium: grgs psyduck all languages 2024-03-16 20:21:44 -05:00
Kurt
9352301b65 Add special generator for Gen3 unown
Removes incorrect slots ( see 2bf963009f )
Allow Unown of any form through (unspecified in Possible generator)

Adds SlotRange get method for Gen3/4 methods.
2024-03-15 21:21:34 -05:00
Sakura
b7f31f335f
Add YOASOBI Pawmot Date (#4218) 2024-03-13 09:51:25 -05:00
Kurt
10e108939b Move fallback pressure check to near end 2024-03-13 00:18:58 -05:00
Kurt
7ac5da37b3 Fix check order for Pressure/Hustle/Vital Spirit
what a silly set of conditions for it to matter -- we need to permit matching of boosted slots, then enforce that the boosting is valid for the slot, and disallow any other lead. If it couldn't be boosted, then ignore the slot.
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=288731
2024-03-12 23:33:47 -05:00
Kurt
5b89b279d1 Update LearnGroupHOME.cs 2024-03-12 08:33:33 -05:00
Kurt
a62e169258 Use precompiled rand for honeytree rand level
Add note that No Guard works the same as Illuminate and Arena Trap.
2024-03-12 00:46:52 -05:00
Kurt
819f6009bf Fix some gen4 fish slot check inaccuracies
Pt doesn't do Sticky Hold/Suction Cups right for fishing (not just D/P)
HGSS has a follower boost that is now implemented
lol at my GetSuperRod comparing range wrong for slot4

For HGSS follower boost, don't bother indicating differently even though it's not entirely transparent. We just assume the most permissive case (+50) even though people looking to replicate in-game might not have >= 250 friendship.
2024-03-12 00:03:09 -05:00
Jonathan Herbert
4435f032a5
Rename Obedience_Level To Match C# Naming Standard (#4215)
Change from Obedience_Level  to ObedienceLevel since it was missed when other properties we changed to match C# naming standard.
2024-03-11 20:39:31 -06:00
Kurt
353c00ef67 Fix HOME-sharing rules allowing initial egg moves
Were originally permitted because Generation == 0; now we properly indicate the origin of all Initial/Encounter/Shared moves and use that to remove anything not from the environment. Invalid/Sketch moves are still permitted to be Gen0 and skipped because their verification is a different branch.

ty notflyy (discord)
2024-03-11 12:50:38 -05:00
Kurt
5d2c20d449 Fix DexNav max level boost
Closes #4204
flute actually applies in this case
2024-03-11 12:45:43 -05:00
Kurt
9127f6548a Handle fixed-moveset missing move cases
Stadium Eevee has less moves than if populated by initial moves; need to use the encounter moves for moveset mons.

Co-Authored-By: ShadowMario3 <36941677+ShadowMario3@users.noreply.github.com>
2024-03-10 23:22:37 -05:00
Kurt
8e32ab5008 Misc tweaks
Gen1 VC mew OT name set
Gen1 Japanese stadium language get
Tab control edge case index redraw
Home Tracker & EC control ordering now grouped by flowlayout panel
2024-03-10 21:28:50 -05:00
Kurt
c432c56ca5 Update 24.03.10 2024-03-10 18:38:47 -05:00
Kurt
564025ae72 Fix ruins of alph unown form check 2024-03-09 23:10:01 -06:00
Kurt
30d85c95a0 Handle radar slot bypassing / chain shiny 2024-03-09 18:13:09 -06:00
Kurt
6d8504bf82 Misc tweaks for slot4 level check 2024-03-09 13:50:15 -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
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
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
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
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
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
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
5706fb2fb5 Gen6: Add mach & acro to usable key item memories 2024-01-25 18:56:57 -08: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
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
3ea44b5eb0 Allow Gourmand mark on Eggs
Flag it if it's affixed though.
2024-01-15 22:50:37 -08:00
Sakura
fe1a5750dc
Add コロコロ Pokémon Date (#4163) 2024-01-15 18:50:30 -08:00
Kurt
00c0aefe00 Add simple alolan evo trim for HOME+ permit
Closes #4159
2024-01-13 21:08:45 -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
a39712e5cd Add Mochi Mayhem related content 2024-01-11 09:16:04 -05: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
abcboy101
3ba2e8e376
Gen 1/2 VC filtered OT name legality (#4155) 2024-01-08 12:34:44 -08:00
Kurt
608f7ebe12 Update Roaming8bRNG.cs 2024-01-05 09:47:53 -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
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
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
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
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
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
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
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
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
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
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
Jonathan Herbert
07cd05d1c1
Fix Some Missed Conversions To Collection Expressions (#4096) 2023-12-17 16:38:53 -08:00
Kurt
1fe2b4f29b ArgumentOutOfRangeException
Use the new NET8 API
2023-12-09 15:21:10 -08:00
Kurt
b3684c58b2 Update EncounterDist9.cs 2023-12-08 17:30:41 -08:00
Kurt
09018a4eaa Update EncounterDist9.cs 2023-12-07 23:20:49 -08:00
Sakura
87efd747c4
Add Darkrai and Shiny Lucario Date (#4094) 2023-12-07 12:57:26 -05: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
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
Sakura
ef52c390df
Add Team Star Revavroom Date (#4071) 2023-11-22 12:21:29 -05:00
Sakura
684ea363d8
Add Alex Dragapult Date (#4065) 2023-11-18 21:45:30 -05: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
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
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
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
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
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
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
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
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