Commit graph

3269 commits

Author SHA1 Message Date
Kurt
52437d1712 Gen3 PCNY: remove OT gender checks
Same as PCJP, uses the recipient's save file gender. Not random.
2024-11-11 08:16:58 -06:00
Kurt
8b09d9467d Misc fixes 2024-11-10 19:22:59 -06:00
Kurt
de57e197ad Fix gen3 reversal exploration for 50% of seeds
line 340 - variable reuse!

In looking at the emerald disassembly, when Pressure/Hustle/Vital Spirit fails, it reduces the max level of the slot by 1 so that the max level doesn't randomly appear. Essentially 50% flat for the max to appear, for varied slots, not 50% + (1/range). Thus we require a separate branch of logic to check for this scenario.

f8119bedd4/src/wild_encounter.c (L298)

DPPt (and assumedly HGSS) do not decrease the random range on failure.

ty TFS for bringing this to my attention on discord
2024-11-10 19:11:30 -06:00
Kurt
947bbc7274 Fix Sirfetch'd deferral, add Tera deferral
Marill and Azurill need deferral cases as they change primary type
(normal-fairy => fairy || water-fairy => water)
2024-11-10 15:32:57 -06:00
Kurt
e4e3d929a0 Handle Gift method2 eggs better
Set PID correctly
Defer on fateful (wynaut egg clash, hot springs)
2024-11-10 15:16:19 -06:00
Kurt
c8726c4e2d Fix T2/Channel jirachi enc->pk3 generating 2024-11-10 15:00:31 -06:00
Kurt
1ffbd46e3c Extract some logic, deduplicate 2024-11-10 13:25:30 -06:00
Kurt
3c574a45f1 Revise enc1/2 -> pk1/2 nickname set
Skip the IsNicknamed evaluation, saving at least 1 string allocation on ctor. Remember the IsNicknamed state when we set false.
GUI: provide the selected language rather than recalculate
2024-11-10 09:32:33 -06:00
Kurt
d77d6b7ce6 Fix MethodJ enc->pkm nature check
silly differences; MethodJ should have been /A3E not %25
Make GetNature public, and have the MethodK esv modulo be uint instead of long for better clarity.
2024-11-09 21:37:03 -06:00
sora10pls
50ff039c1b Adjust HOME Tandemaus gift date range
Like with Shiny Zeraora in the past, the only limitation is the distribution of the gift itself. Once added to your Gift Box, it can then be claimed at any time, giving it no end date.
2024-11-01 09:30:04 -04:00
9Bitdo
26fd23a338
Add PokéCenter Birthday Tandemaus date (#4379)
submitting the date based on

- hard copy serial code issued out at Pokemon center in japan on 1st Nov 2024 1000hr (JST)(operating hous : 1000hr), hence countries in the UTC-11 would be able to redeem it on 31th oct 2024 1400hr earliest

- Serial code expiry date is from 1st Nov 2024 - 31th Jan 2026 (JST) or 1st Feb 2026 (UTC+11 )
2024-11-01 09:28:15 -04:00
Lusamine
451fd0e0a0
Handle crossover encounters in LGPE (#4371)
* Handle crossovers in LGPE

Ty @sora10pls, @LegoFigure11, @Skadiv, and @PP-theSLAYER for research!
2024-10-22 08:13:41 -05:00
Lusamine
34f0c715ef Correct Vermilion City typo in comments 2024-10-21 22:41:38 -05:00
sora10pls
325649b19b HOME: Add Meloetta/Tandemaus legal date ranges 2024-10-16 18:42:01 -04:00
Kurt
bc94f7b9ec Update EncounterGift3.cs 2024-10-16 15:42:41 -05:00
Kurt
b389cd3acd Rework Gen3 Event PIDIV detection & checks
Detect base algorithm (regular, regular-anti, anti, shiny) and check for sub-patterns that differ per encounter (such as OT gender).
Implement PIDIV generators within the Gift3* template, remove old branches
Add Table Weight detection (still need to test) for PCJP 5anniv
Add PCJP GCEA campaign 1-6 templates
Differentiate Mystry Mew seeds; disallow Mews that were deleted b4 cart cloning
Need to double check some gen3 events (esp hadou titans), but is 99% there

Thanks Sabresite, for your continued support
2024-10-16 00:01:10 -05:00
Lusamine
71c9c43eef Add alternate met location for LA static Unown O 2024-10-13 13:18:15 -05:00
Kurt
e5c3c43bda EncounterCriteria: sbyte IVs
Narrow fields to reduce allocation < 16 bytes (maybe make this a struct?)
Add method to get combined IVs (gen3/4 format) for RNG purposes
use ^ method in RNG methods
Change GetExpectedLevel to be generic rather than interface, better codegen
Change Gender to enum for clarity

breaks ALM and potentially other plugins, just need to recompile if using IVs
2024-10-01 00:00:19 -05:00
Kurt
ee00a21f90 Minor clean 2024-09-30 23:54:03 -05:00
Kurt
5b5418cd3f Update EncounterText.cs 2024-09-23 15:27:27 -05:00
Kurt
327585d1b4 Fix gender sanitization
g is `byte`, ternary returns `byte`, not `byte?`
be explicit
2024-09-23 08:21:02 -05:00
Kurt
4594b0d879 Update default version fetch for Gift3 rsbox
Gen3 save file without trainer in database fetching a Gen3 gift -> Gen3/RS -> version fails to determine
just return the RS fallback; add EFL
2024-09-18 16:52:12 -05:00
sora10pls
1e86f80a66 GO: Add handling for Max Battles 2024-09-09 20:49:39 -04:00
Kurt
617914b257 Allow some nidoran/volbeat to mismatch correlation
https://github.com/kwsch/PKHeX/issues/4356#issuecomment-2333031493
fix flow so it is called in format3+
Closes #4356 ty @abcboy101

add another check for EC=0 eggs from Gen4 -- game uses the PID value as the "is egg available" flag, so can't obtain a 0-pid egg from gen4!

remove python paths from gitignore, so I can call one of the test folders `Eggs`
2024-09-05 23:55:46 -05:00
Kurt
86d1e5ce15 Add nidoran/volbeat-illumise gen3/4 gender check
Closes #4356
adds check
revises egg->pk* logic to generate a valid pid for this case
2024-09-05 00:50:08 -05:00
abcboy101
3707ee5eb1
Standardize language codes and improve locale handling (#4353)
Use standard BCP 47 language codes
Move Culture utils into WinFormsUtil
Detect system language on first launch
2024-09-04 18:51:35 -05:00
Lusamine
19882f1c6c Add two additional LA Enamorus met locations
Easy enough to catch it in Bolderoll Slope by throwing a ball and
running that way, and there are multiple easier ways to get the generic
Crimson Mirelands location

Closes #4343
2024-08-21 01:02:49 -05:00
Kurt
04466ac209 Extract some AffixedRibbon logic
const now reused across entire sln
pkm editor GUI no longer crashes on hover of out of range affixed ribbon
pkm editor GUI now indicates the quantity of available affixed ribbons on hover (does not indicate if 1 and already affixed).
2024-08-19 21:11:08 -05:00
Kurt
9d06a2bc2d Add GameVersion.EFL to learn source switch
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=291016
Dumb logic but it works.
2024-08-17 22:08:28 -05:00
sora10pls
8fdcb634f0 GO: Add handling for WCS 2024 timed research encs
f2296ccedb update pickles because Necrozma encounter types had to be incremented by one
2024-08-17 13:58:04 -04:00
Kurt
8dae16102d Fix pokerus to allow evolved untransferrables
PLA sneasel -> transfer, catch virus -> PLA, evolve => was flagged. Need to check the encounter species-form, not the current species-form.
List all the species-form that are of consideration.
Wyrdeer, Kleavor, Ursaluna, Sneasler, Overqwil, Basculegion
2024-08-17 08:23:33 -05:00
Kurt
c524c37013 Misc tweaks
Remove GameVersion from IShadow3, lessening usage of fake gameversion IDs
fix sav3 with absurdly high record values (int.MaxValue -> uint.MaxValue)
2024-08-16 21:19:08 -05:00
9Bitdo
4330106d7d
Add WCS 2024 Steenee & トモヤ Sylveon date (#4342) 2024-08-16 20:29:50 -05:00
Kurt
c9f3894076 Remove nature from FRLG Unown method loop
Only checks for Form.
c6a2f50491/src/wild_encounter.c (L238)

Closes #4332

make the private FrameCheckDetails<T> actually <T> instead of specific, to match MethodJ/K.
2024-08-07 17:03:27 -05:00
9Bitdo
f501c8a6b1
Add Roy's Fuecoco date (#4329)
Add Roy's Fuecoco date
2024-07-26 15:22:52 -05:00
Kurt
a84f440746 Update EvolutionGroupHOME.cs 2024-07-23 20:33:21 -05:00
Kurt
bf1dcf0737 Clamp level range to slot for 3/4=>5+ transfers 2024-07-22 16:09:37 -05:00
Kurt
ea4ff5714c Add targeted generator methods for CXD pidiv
If IVs are specified, will try to search for all seeds that originate them.
Same as was done for Method H/J/K of mainline games, this allows sets to be more-quickly generated if the criteria is provided.
2024-07-21 21:13:53 -05:00
9Bitdo
5702955723
Add Japan's Pokéss Summer Festival Eevee date (#4326) 2024-07-19 18:14:00 -05:00
sora10pls
6930afd2bd Add handling for GO Fest Necrozma encounters 2024-07-15 07:33:00 -04:00
Kurt
2205332326 Update EncounterSlot8b.cs 2024-07-13 16:20:56 -05:00
Kurt
3a131f61aa Add duking glyph remap check for Colo Plusle
Only applies to Spanish; other languages don't use special accent-mark chars.
make logic flow easier to understand for this if-duking case.
2024-07-13 10:34:55 -05:00
Kurt
6e880f8e14 Add Emerald|FireRed|LeafGreen version group
Add new enum value to end to not break plugins using lumped values.

I think GameVersion needs to be reworked to remove all lumped values, and to instead implement a per-format enum (joy...)
2024-07-09 22:04:08 -05:00
Kurt
6568940d0b Rename WC3 to EncounterGift3, add PCNY
Adds PCJP class for whenever I get around to encoding that.
2024-07-07 01:07:02 -05:00
Kurt
298a0e6291 Allow HGSS hatch location Global Terminal
https://projectpokemon.org/home/forums/topic/65420-hgss-encounter-met-location-error-global-terminal/

only allow cross-version hatch locations if the egg location indicates it was traded
2024-07-06 12:15:44 -05:00
Kurt
e9a3192a95 Decouple WC3 enc from Mystery Gift, add jpn events 2024-07-06 02:36:33 -05:00
Kurt
52e22086e9 Extract IMetLevel for level!=met encounters
No longer marks Ranch gifts as Fishy for leveled @ threshold.
Encounter range check now ignores the MetLevel if it can't exist that low.
2024-07-06 01:40:12 -05:00
Kurt
99ebc47866 Extract TrainerName const to static class
Central location for where these values are defined.
2024-07-06 01:35:50 -05:00
Kurt
3f49a01ae8 Sanity check save file personal info
https://projectpokemon.org/home/forums/topic/65409-2-exception-logs-found-on-latest-pkhex/?do=findComment&comment=290422
2024-07-04 18:42:27 -05:00
Kurt
66e8bf2645 Update 24.07.03
Update wc9 pkl
update dependencies (qrcoder got some perf improvements)
deduplicate HOME tracker message in SV by consolidating the methods
2024-07-02 23:51:10 -05:00