Commit graph

3557 commits

Author SHA1 Message Date
Kurt
324ce9d6ac Minor clean 2020-12-23 09:34:29 -08:00
Kurt
e34c8df044 Revise some method signatures 2020-12-22 20:50:33 -08:00
Kurt
105e8b3818 Move version forcing for unavailable encounters to es4 2020-12-22 20:15:56 -08:00
sora10pls
dcd20a3649 Update PogoTypes and their respective requirements
For more context, see 62e84309d7
2020-12-22 15:20:15 -05:00
Kurt
d288a32ef5 Permit TR flags for "Can Relearn", split branching for TR checks 2020-12-22 09:10:10 -08:00
Kurt
53e0046a48 SWSH has some form entries with different base friendship (stunfisk) 2020-12-22 09:09:49 -08:00
Kurt
2bc7110884 Remove unnecessary overrides 2020-12-21 23:40:58 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
514b60b447 Merge type check with usage in if statements
if x is y with z property true, then :D
2020-12-21 22:33:48 -08:00
Kurt
4890e0e952 Change move source requests from a bunch of bools to bitflag enum
little more sane & clear
2020-12-21 21:24:16 -08:00
Kurt
cd76e49388 Strengthen know move check 2020-12-21 19:50:56 -08:00
Kurt
351637900f Downgrade swsh move memory verification severity
Some special encounters don't set the Relearn Moves, so we can't really check the memory-moves unless we somehow late-reject a matching encounter. Not really worth the effort to try and verify cosmetic mismatches; just tag them as Fishy.
2020-12-21 19:20:11 -08:00
Kurt
d225f3391a Split up DataUtil to separate files
ya i know there's already a localizeutil class, whatever
2020-12-21 19:13:18 -08:00
Kurt
594db92ad0 Minor clean
Handle some stragglers
2020-12-21 17:48:08 -08:00
Kurt
98be0f6739 Target type'd new 2020-12-21 17:17:56 -08:00
Kurt
0303eada32 this is not that
clearer than before, yay
2020-12-21 17:12:39 -08:00
Kurt
1854d172bd Add missing property set
lol oops
2020-12-21 17:12:21 -08:00
Kurt
68ee8cfcc4 Change setters to init only 2020-12-21 17:05:05 -08:00
Kurt
c6b702ae54 Create cosplay pikachu rather than clone 2020-12-21 17:04:37 -08:00
Kurt
133b8e6ba0 Rework Pokewalker/Dream Radar static encounters to own class 2020-12-21 17:04:09 -08:00
Kurt
5729718d68 Simplify ternary byte casts
No longer needed to explicitly cast, thanks c#9 !
2020-12-21 16:53:28 -08:00
Kurt
6d030831ab Bump PKHeX.Core to C#9 language version
Add FrameworkUtil.cs which is compiled if the build isn't net5+, needed to support init setters & records
2020-12-21 16:52:11 -08:00
Kurt
b71df7b064 Allow shared moves from daycare as "can know move"
See b58f3bbc22
2020-12-21 16:49:42 -08:00
Kurt
8a0e7d90e0 Move Shiny override set to constructor 2020-12-21 14:40:34 -08:00
Kurt
b58f3bbc22 Add memory checks for GO->HOME transfers
Also add checks for the new memory types introduced in swsh
2020-12-21 14:22:24 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
7c4c1e0913 Minor prep clean 2020-12-10 19:49:53 -08:00
Kurt
ebc1cec3da Extract breeding info to separate class
Remove splitbreed check in encounteregg2 generator; gen is always 2, never >=3, so the splitbreed check is never executed
2020-12-07 20:54:55 -08:00
Kurt
a13c2c852c Add some comments, clean a little 2020-12-07 20:14:12 -08:00
Kurt
98ef0299b6 Add xmldoc for save meta/state tracking
Move some logic around to the more appropriate spot
2020-12-07 19:49:04 -08:00
Kurt
6f7602f2ad Change signatures to use readonly if possible
Extract get/set team methods for battle video
2020-12-05 06:09:33 -08:00
Kurt
e72c80613e Extract metadata/state tracking from SaveFile obj 2020-12-05 05:36:23 -08:00
Kurt
44473d1593 Add CHS armor trade OT name
Closes #3100 ty @FeralFalcon !
2020-12-03 12:50:07 -08:00
Kurt
9cd6d34f1d Disregard ability bit checks if was shadow
only really pertains to xk3/ck3 and this doesn't really impact legality once transferred
2020-12-02 21:40:35 -08:00
Kurt
3d87070cc8 Require strict match for hidden ability encounters
Metagross collision with wild beldum

deferral API is kinda crude, hence these janky workarounds. Was originally intended to hold onto close matches when there's no more possible matches to check.
I think a priority-deferral while only retaining a single encounter bad (instead of a list of retries) may work better than the current setup, but that would require more abstraction
2020-12-02 21:39:45 -08:00
Kurt
d5bd36143e Add language check for jp-blue gameversion, non-crystal female
Closes #3099
Ty @CarlosofKalos !
2020-12-01 16:55:10 -08:00
Kurt
e54e94a734 Don't waste alloc on clearing titlescreen slot
Revisiting #3098 #3086
2020-12-01 07:19:21 -08:00
CanoeHope
228042b111
Properly set empty slots to Trainer Card (#3098)
#3086 
Was only partially addressed -- it was only done for Title Screen and not League Card too.
2020-11-30 21:38:15 -08:00
Kurt
c77461808d Update Encounters8NestDist.cs 2020-11-30 21:38:03 -08:00
Kurt
5e32e64ac8 Handle MANôA and FALCçN SPA->FRE Gen2 Trades
Transporter remaps certain locale specific chars depending on the source ROM's version.
Since VC can trade between languages, there are 2 Spanish in-game trades that have glyphs subject to remapping, if it's transferred from a French game.

If the spanish trade is transferred from a french game, it must match the mutated string.

ty @Lusamine & helpers :D
2020-11-29 18:17:15 -08:00
Kurt
4f7e34dd47 Simplify slot init to reduce re-allocation
Slap in friend safari at the end during object construction; saves about 1KB of allocation on startup (lol)

Change internal array types to match object types, similar to other encounter-generation definitions.
2020-11-29 15:05:53 -08:00
Kurt
5bc5b611cb Make RefreshAbility virtual, add overrides for gen3&5
Gen5: set HA bit if hidden ability
Gen3: prevent setting AbilityBit if it doesn't have 2 distinct abilities

Failed test now passes; all tests are passing!
2020-11-29 15:02:57 -08:00
Kurt
fefc38bacb Minor debug optimizations
Trees:
- Only retain the objects needed after calculation
- Reduce size of TreeCoordinates and remove allocation penalty (now a struct)

No more warnings for Release compilation :D
2020-11-28 14:55:09 -08:00
Kurt
8778d8c6b7 Update 20.11.28 2020-11-27 21:40:36 -08:00
Kurt
3d6bb0ec00 Ignore bad evolution slots 2020-11-27 21:04:06 -08:00
Kurt
016ebb86ad Update AbilityVerifier.cs 2020-11-27 20:44:44 -08:00
Kurt
8eb582c997 Move species/move names to parsesettings 2020-11-27 18:45:06 -08:00
Kurt
67b7d44ced Fix accented-a/i for spanish in-game trade
I think this was a PKHeX issue that went unnoticed; originally, we didn't include the Á and Í chars in the dictionary.

I checked the transporter code:
The app maintains the international & japanese character tables, and depending on the ROM language, it may change a char to the language-specific entry. Refer to Bulbapedia's notes on the char tables for different languages:

https://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_II

However, none of these char-changes are able to be reached with a legal char.

Á and Í (only accessible from the Spanish in-game trades) and the german 0xC0 && z <= 0xC6 chars are already in the international table. Every single difference in the VC1/VC2 table is an un-enterable char.

tl;dr -- all possible char codes are transferred fine with the VC2 table without extra language logic. We just keep out any inaccessible char (replaced with space).
2020-11-27 16:49:06 -08:00
Kurt
e9075436b7 Split off g7 transporter string handling
Add katakana / hiragana sensitive transferring

var check = CheckKata("ぐリお") == "ぐりお";
check should be true, dugtrio case !
2020-11-27 15:37:55 -08:00
Kurt
110d25d50e Add placeholder duplicate relearn move check 2020-11-27 13:05:36 -08:00
Kurt
26d6143325 Indicate static encounters disallowed from marks
Includes gifts by default
2020-11-27 12:48:47 -08:00
Kurt
3680048c0a Add local pickle loading if compiled as debug
Same dangers about "what is the root path"

Bump the level cap while we're here.
2020-11-27 12:14:13 -08:00
Kurt
c2867f7899 Move EvoBase to Evolutions folder 2020-11-27 12:06:52 -08:00
Kurt
6ebeb73293 Rename split legality class files 2020-11-27 12:01:30 -08:00
Kurt
fa36b70b29 Split Analysis into two separate classes
Will rename in next commit
2020-11-27 12:00:49 -08:00
Kurt
9b178fefe2 Xmldoc, minor tweaks
Move form-info logic from FormConverter to AltFormInfo; now FormConverter is entirely form=>string[]
Add a bunch of xmldoc
Make pogo no-end-date cmp agaisnt UTCnow rather than local now.
2020-11-27 11:51:02 -08:00
sora10pls
a437cbb9ca Update FormConverter.cs
Display 0-9999 for Galarian Yamask formarg values.
2020-11-26 18:41:45 -05:00
Kurt
771086a222 Show all valid yamask-1 formarg values
from 319 (max HP-1) to 9999 (max saved value).

Causes a little bit of GUI lag when loading 10k items to the combobox; could be a number entry but meh. Lazily allocate the 10k strings; wait until it's requested.
2020-11-24 12:40:56 -08:00
Kurt
d6294d42f7 Update SAV1.cs 2020-11-24 10:51:31 -08:00
Kurt
1bde155c4d Move tolerance permissions to pget 2020-11-23 16:25:34 -08:00
Kurt
21669d3f77 Update EncounterTrade1.cs 2020-11-23 13:24:02 -08:00
Kurt
624c65b937 Update EncounterMovesetGenerator.cs 2020-11-23 12:53:32 -08:00
ShadowMario3
80c0d73e18
Fix order of RB Ingame Trades (#3095)
* Fix Gen1 traded JPN Dugtrio nickname

* Fix order of RB Ingame Trades
2020-11-23 10:29:59 -08:00
ShadowMario3
ba8b8f706b
Fix Gen1 traded JPN Dugtrio nickname (#3094) 2020-11-23 08:44:15 -08:00
Kurt
69ad16c30f Remove has move check for static encounters
Event Move special encounters are yielded after static encounters by the generator, so this iterator-picker will never behave as originally intended.

Since the encounter generator works fine for these events in its current form, we can just remove it. If we need to prefer GB era events before static, then we'd reinstate the priority and move the GenerateGBEvents before the static yielder.

bla bla bla this is just a cleanup from old preference code where we wanted to recognize the encounter as an event/trade as they're more recognizable. We just want to track the progress of the iterator so that g1/g2 follow a merged yielding order
2020-11-22 17:03:30 -08:00
Kurt
37782f0ce4 Consolidate EncounterTrade1 level objects
Adds Nickname checks, thanks @ShadowMario3 for grabbing these into separate text files from Bulbapedia.

I reordered all the encounters to match Bulbapedia; each level is denoted if different if it can be sourced from RBY.
2020-11-22 16:19:03 -08:00
Kurt
e701bf2725 Add Frostpoint Field for dens 175/176
Closes #3091
2020-11-20 18:20:00 -08:00
Kurt
dba7dc9911 Forest distribution raids 2020-11-19 16:06:43 -08:00
Kurt
ce17fd4050 Minor tweaks
Enc static 4 should check met location, since locations are flexible for roamers
Simplify expressions
Disallow 0 moves in "needed moves" list.
2020-11-19 15:34:06 -08:00
Kurt
9d8b528437 Update EncounterMovesetGenerator.cs 2020-11-19 07:33:35 -08:00
Kurt
0af0c05bac Update go slot list yield and move fetch 2020-11-18 21:34:40 -08:00
sora10pls
f8dd2cf977 Update PogoType.cs 2020-11-18 21:05:46 -05:00
zzzzRuby
34321ee52c
Add some event flag of gift pokemon for Platinum version (#3088) 2020-11-18 08:28:38 -08:00
sora10pls
3b66e2e9b1 Add min. Level requirement for PogoType FieldP
Mew, Celebi, Jirachi and Victini (one-time Mythicals) require Lv. 15 with at least 10/10/10 IVs.
2020-11-17 21:56:47 -05:00
Kurt
4a8ad8b149 Expose raw evolution chain methods 2020-11-17 14:23:15 -08:00
Kurt
037db7b8a3 Add xmldoc for new obj/func related to GO legality 2020-11-16 21:17:45 -08:00
Kurt
e6a60ec210 Add single day tolerance to end of appearance period 2020-11-16 15:41:39 -08:00
Kurt
26e0f31c95 Include date legality parameters for LGPE
Extract common abstract class for GO transferred encounters
Clamp minlevel instead of met level
Add optional parameter for GO IV randomization
Update go legality binaries with latest
2020-11-16 15:32:22 -08:00
Kurt
770f7584c9 Behavior tweaks 2020-11-16 14:33:21 -08:00
Kurt
f25a7c7cf2 Apply valid ball on create 2020-11-15 20:51:07 -08:00
Kurt
d393773fb0 Update EncounterSlot8GO.cs 2020-11-15 18:32:30 -08:00
Kurt
d7dc69104b Fix year check
still testing
2020-11-15 18:12:58 -08:00
Kurt
0ba2f6a53a Update EncounterSlot8GO.cs 2020-11-15 17:44:13 -08:00
sora10pls
a4125472f4 Add PogoType for GO Battle League Mythicals
Covers Darkrai and any other future Mythical rewards from GBL.
2020-11-15 18:48:33 -05:00
Kurt
b1ae53ec63 Set empty slots if party not full
Closes #3086
2020-11-15 14:31:33 -08:00
Kurt
b6da6c1207 Add raticate form list for gen8+ 2020-11-15 08:31:58 -08:00
Kurt
760adb4945 Check date legality 2020-11-15 08:31:48 -08:00
sora10pls
d5e1447f7c Add additional PogoType enums, add min Lv/IVs 2020-11-14 19:36:07 -05:00
Kurt
cb57e807ce Update EncounterSlot8GO.cs 2020-11-14 15:33:32 -08:00
Kurt
377ec02c9b Minor clean
Remove GoPark as a "Type" since it is now baked into the encounter object type
2020-11-14 12:55:30 -08:00
Kurt
ad9e9ddfa0 Relocate go encounter maintenance outside of pkhex.core
PKHeX.Core now accepts generated pkl binaries from PoGoEncounterTool (PGET).

Refer to pporg's repo. This will be treated like event data; occasionally updated.
2020-11-14 12:51:24 -08:00
Kurt
5e22c119be Continued refinements 2020-11-13 08:20:51 -08:00
Kurt
67a796e982 Update EncountersGO.cs 2020-11-12 22:08:13 -08:00
Kurt
82c016639d Update EncountersGO.cs 2020-11-12 22:00:09 -08:00
Kurt
f366d27bdb Revert Mothim form 2020-11-12 22:00:02 -08:00
Kurt
3e4d685d37 Update EncountersGO.cs 2020-11-12 20:50:39 -08:00
Kurt
01c597cba7 GO checks round 2 2020-11-12 20:41:01 -08:00
Kurt
7db746b9d4 Downshift types to remove curse type from g4 personal vals
kchart for gen4 games now shows the correct typings
2020-11-12 15:46:12 -08:00
Kurt
98f602fc87 Require tracker for HOME gifts too 2020-11-11 21:27:33 -08:00
Kurt
72e209a156 Split some methods, handle flow for go enc 2020-11-11 21:22:13 -08:00