Commit graph

1725 commits

Author SHA1 Message Date
Kurt
ea9076ad4c Account for revised evolution conditions for gen4 new-evos in gen8+ 2020-10-08 14:28:34 -07:00
Kurt
9e4ec32e94 Revise nickname check; language-source retained in gen8+ 2020-10-08 14:14:59 -07:00
Kurt
b4eeaf847c Disallow lang-traded eggs mismatching nickname on gen8+
Starting in Generation 8, hatched language-traded eggs will take the Language from the trainer that hatched it.
Transferring from Gen7->Gen8 realigns the Nickname string to the Language, if not nicknamed.
2020-10-08 14:01:36 -07:00
Kurt
0de76b57b1 Handle incorrect bred stunfisk local form value
The game uses 0x5E if 0x5A+everstone, otherwise it uses 0x58
For determining the seed species-form, we want to use everstone breeds as that resolves to the correct species-form values.

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
Co-Authored-By: Marty-D <1645989+Marty-D@users.noreply.github.com>
2020-10-08 13:12:25 -07:00
ShadowMario3
482dbf0b17
Update Encounters2.cs (#3017)
Fix OT for PCNY eggs
2020-10-08 08:32:18 -07:00
ShadowMario3
9516458491
Changed es1e to allow multi-OT (#3016)
* es1e allows multi-OT, merged Stadium Psyduck OTs, added Yoshira Mew

* fixed spacing on Gen 1 event OTs
2020-10-08 07:10:10 -07:00
ShadowMario3
7aac80769b
Update Encounters2.cs (#3015)
Met + Current level data for non-Egg PCNY Pokémon and Egg legality for PCNY Pokémon fixed.
2020-10-07 18:42:14 -07:00
Kurt
e3ef9bbbff Add current level property for met:X current:Y 2020-10-07 15:35:12 -07:00
Kurt
dad01cb522 Check egg state, reduce verbosity for language type 2020-10-07 15:28:58 -07:00
ShadowMario3
a81e675d26
Update Encounters2.cs (#3014)
Added the remaining PCNY events. Still need to fix shiny Pokemon where Met Level is 5 but current level is 40, 50, or 70 depending on Pokemon).
2020-10-07 11:43:34 -07:00
Kurt
5d40009a0c Add multi-OT for es2e, apply special details on enc->pkm 2020-10-07 10:36:28 -07:00
ShadowMario3
4bae0e823a
Update Encounters2.cs (#3013)
Started to add some Gen 2 PCNY Event Pokemon and fixed Stadium 2 events.
2020-10-06 22:12:05 -07:00
Kurt
6616996905 Relocate N OT logic
Make Legal.cs not care about encounter data :)
2020-10-06 20:09:14 -07:00
Kurt
fe7a4df17e Clean out some gb era version flagging 2020-10-06 20:05:38 -07:00
Kurt
6e1cbfcfe5 Split GB event types and segregate per VC/GB
Handle yielding in the moveset generator as well

Future commits will trim down unused values/abstractions; probably can get all the stadium stuff handled innately
2020-10-06 19:35:03 -07:00
ShadowMario3
1681fc776b
Update Encounters2.cs (#3011)
Fix Sing Pichu index number.
2020-10-06 10:59:18 -07:00
Kurt
aa43904869 Add stad2 boxnames, registered flag handling 2020-10-05 08:29:17 -07:00
Kurt
6938d2f94d Split VivillonTables into two classes
Indicate that the content is for 3DS specific logic
Reduce restriction for parameters requiring IGeoTrack => IRegionOrigin
2020-10-04 14:15:13 -07:00
Kurt
36827f795d Remove gen1 flagged moves if they can originate from egg
Revises the tradeback status to remove any index that could have been sourced from egg moves instead.

really should refactor this TradebackStatus away, but Move validation still remains one of the un-refined parts of the legality checks :P
2020-10-04 12:21:05 -07:00
Kurt
757456bf06 Move reset action to class 2020-10-04 12:08:16 -07:00
Kurt
f8de9fe1bf Minor tweaks
now that stadium saves all expose registered teams, can just call from the parent class
rental sk2's have no TID; add that to the requirement to not get flagged for missing OT
2020-10-04 09:26:15 -07:00
Kurt
d13b893351 Use PKHeX as blanksav language
Closes #3009

Make QRPK7 implement IEncounterable and remove hardcoded PKHeX strings
Let force hatching for WC3 eggs try to hatch from the savefile's language, then revert to english if failed to set an OT.
2020-10-04 08:59:33 -07:00
Kurt
5853888020 Minor Stadium behavior enhancements
Use underscores for enum for ToString replacing with spaces
Don't flag empty-OT as SK2; Stadium0/1 use the "TRAINER" as rental, but leave it blank for SK2.
Don't set any terminators for an OT string if the string is empty; just wipe the buffer.
2020-10-03 21:56:57 -07:00
Kurt
833789b1b9 Fix cxd antishiny method detection
Closes #3008 ty @Sephirona !

Do the tsv-psv compare as uint to remove the need for later casts to int
2020-10-03 09:29:26 -07:00
Kurt
2f04ef7a32 Check PK4.EncounterType for BK4 format 2020-10-02 18:09:00 -07:00
Kurt
52a67f2425 Add Stadium2 Support
Introducing a new PKM format: SK2
Split ICaughtData2 off of PK2 so it can be shared with SK2 when type-checks occur
Add conversion for PK2<->SK2
Split the split-buffer handling for GBPKM to GBPKML (what a name), so that I can reuse shared accessor logic for SK2.
2020-10-02 18:08:40 -07:00
Kurt
af4fa8078e Add 10/1 raids
spooky
2020-09-30 17:08:04 -07:00
Kurt
cc3a807fa9 Add default met location for gen3 roamers
Closes #3004
2020-09-29 23:07:42 -07:00
Matt
4888d2368a
Restrict Isle of Armor Raichu-1 Ability (#3006)
Only allows Ability 1 (all slots are Surge Surfer).
2020-09-28 12:13:15 -07:00
Kurt
cafcd3df2e Change affixed ribbon-mark check to also consider ribbons 2020-09-27 18:19:10 -07:00
Kurt
6243135f28 Minor clean
Move Home8 location to Locations.cs for documentation
Move FestaFacility to correct folder
Remove unnecessary public modifier on interface method
Pass the program's Version to any loaded plugins, if they wanted to check compatibility...?
2020-09-25 23:55:31 -07:00
Kurt
7b19e3fb7f Add affixed ribbon legality check
https://github.com/kwsch/PKHeX/issues/3001#issuecomment-698749761
2020-09-25 19:37:38 -07:00
Kurt
6ed60fd35d Flag suspicious PIDs for shiny VC transfers
Configurable setting

Closes #3002
2020-09-25 18:04:44 -07:00
Kurt
fbf7a3658a Check species for static enc match
like all other IEncounterable types, before calling the match method, check species directly
2020-09-24 19:44:48 -07:00
Kurt
fd5e38fdda Remove artist ribbon restriction requiring master ribbon
Closes #2997 ty @sarahlicity for an interesting bypass mechanic :P
2020-09-23 20:47:48 -07:00
Lusamine
b915f3c363
Tower of Waters / Tower of Darkness are valid Met Locations (#2996) 2020-09-23 09:15:49 -07:00
Matt
185c499bff
Unban GO Shiny Doduo (#2994)
Mega Buddy Challenge
2020-09-22 09:23:58 -07:00
Matt
150ff88235
Unban GO Shiny Porygon (#2993)
September 2020 Community Day
2020-09-19 17:27:25 -07:00
Kurt
b039dd28b6 Use reference to personal info rather than fetching again 2020-09-19 07:52:50 -07:00
Lusamine
b90419ba63
Akala Meadow does not exist (#2992) 2020-09-18 19:50:10 -07:00
Kurt
416f5fe183 Check Winning/Victory ribbons for gen3 origin based on encounter
Closes #2990 ty @Atrius97 !

Remove the `object Content` accessor only used for Mystery Gifts (used to trickle up the PKM object since the two ribbon interfaces weren't implemented on the IEncounterable). Just make PCD/PGT implement the ribbon interfaces and delegate the get/set to PKM directly.

Rewrite the national ribbon check for clarity
Optimize invalid/missing ribbon string replace to operate on the final string rather than do linq and replace each input. With this we make 1 temp string only, rather than 1-per-ribbon.

Replace hardcoded "Ribbon" strings to use a shared const string in a central spot.
2020-09-18 16:23:17 -07:00
Kurt
1a6f5163a4 Add mid-september raids 2020-09-17 18:16:16 -07:00
Kurt
e125424423 Refine zygarde encounter form checking logic
Closes #2984
ty atrius & matt via discord

Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-09-13 15:45:15 -07:00
Kurt
2e6d1fce1f Flag non-Poké Ball XD teddiursa
Closes #2983 , nice catch @soopercool101 !

Co-Authored-By: soopercool101 <soopercoolstages@gmail.com>
2020-09-13 14:43:48 -07:00
Kurt
7fc8001806 Continued refactoring
EncounterTrade: don't init Location to -1; keep as default 0 and use that as the pivot for default met location. Move Fateful property to the sub-type that uses it (EncounterTrade4, for Ranch).
Move some EncounterStatic->PKM logic that is per-type to the associated type overloaded methods. Rearrange order of properties to be more consistent with interfaces
Gen3: Initialize some classes without using post-constructor setters. The `init` setter functionality coming in c#9 won't be usable as the net46 runtime/netstandard2 doesn't support it on current previews. Do it this way so we can explicity initialize some required properties rather than apply version on a second iteration.
2020-09-13 14:40:10 -07:00
Kurt
346c284994 Allow pkrs on gen2 eggs
See #1257 item 7; it appears this info on Bulbapedia is incorrect -- disassembly does not care if the pkm slot is an egg or not.

5f197c53f4/engine/events/pokerus/pokerus.asm (L7)
2020-09-10 21:53:43 -07:00
Kurt
ec16202f73 Check for missing gen1 OT names
oops
2020-09-09 22:43:32 -07:00
Kurt
01fb233e48 Minor tweaks
Extract some interfaces
Suppress some warning messages with commented reasons if appropriate
2020-09-09 12:47:24 -07:00
Kurt
5d3bc289b6 seal hunting
Mark things as sealed as they shouldn't be inherited from or overriden in a derived class.
2020-09-07 13:51:13 -07:00
Kurt
03e227c744 Allow steel-typed magnemite for gbera
ty MrPerson0!
2020-09-06 18:36:37 -07:00