Commit graph

3144 commits

Author SHA1 Message Date
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