Commit graph

2993 commits

Author SHA1 Message Date
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
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
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
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
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
213234b4d2 Fix USUM max move ID usage for HOME learn
Closes #3966
Closes #3954 (original)
2023-08-17 17:36:39 -07: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
0a9300874b Check current level on GB Era event gift eggs
Closes #3963
2023-08-15 16:09:08 -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
sora10pls
3e13b1bc29 Add Tatsugiri/Mew eligible date ranges 2023-08-08 17:58:12 -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
Kurt
c596804578 Minor clean
Inline logic for Meowstic form branch evo
Pass levelup byte value directly instead of recompute
With EvolutionSet all shared, reorder the constructor so the primary ctor doesn't need manually ordered properties (8 byte total struct size)
2023-07-21 15:19:12 -07:00
Kurt
171ee0d222 Misc tweaks 2023-07-21 13:41:19 -07:00