Commit graph

144 commits

Author SHA1 Message Date
Kurt
d2ebb6340e Add gen5 nick/OT info (trades)
#1249
appears b2w2 is the first game with fixed nature & nonfixed PID (based
on RoC's specimens), so can't filter by PID on those.
2017-10-28 21:43:47 -07:00
Kurt
e4319fd929 Add gen3 nick/OT info
#1249
2017-10-28 19:51:55 -07:00
Kurt
2c73e130af Add gen4 nick/OT info
#1249
2017-10-28 19:02:18 -07:00
Kurt
9d0b153eab Add egg hatch suggestion for b2w2 2017-10-28 14:00:44 -07:00
Kurt
a401db608e Split trade encounter nick/OT verification methods
#1249
2017-10-28 13:15:51 -07:00
Kurt
0e9960909b Refactor encountertype check to bitflags
#1379
need to double check none permissive later
2017-10-27 23:57:21 -07:00
Kurt
00a4c1adf5 Add multilang c/xd ingame gifts
save space by just using a loop
closes #1529 , pokespot proc discussion relocated to associated issue
(as previously noted in comments)
2017-10-25 21:53:55 -07:00
Kurt
a6ef105544 Update gen3/4 encounter generators
revisit for simplification now that EncounterTrade matching is more
precise (PID required to match).

#1249
2017-10-24 22:25:52 -07:00
Kurt
59319a614a Add PID values for Gen3/4 ingame trades
#1249
2017-10-24 22:24:29 -07:00
Kurt
933bfba8e1 Misc cleanup
check gen2 stadium names, use pkm.Japanese when favorable
2017-10-24 18:27:40 -07:00
Kurt
69cf1eaa9c add more pkhex.core xml documentation
adds a bunch of documentation useful for those unfamiliar with the core
library
2017-10-23 23:12:58 -07:00
Kurt
60562fb44e Use empty enumerable when appropriate
no allocation == no pressure for garbage collector
2017-10-23 15:44:01 -07:00
Kurt
a03ac10fc5 Misc refactoring
no functional change
2017-10-22 23:26:37 -07:00
Kurt
515a694afa Add LanguageID enum
no functional change, just less-magic-numbers for easier to understand
src
2017-10-22 21:01:08 -07:00
Kurt
096f6bbd18 Add RANDY Gen2 ingame trade
closes #1538

rename pid deferral to pidiv deferral for clarity
2017-10-22 10:41:27 -07:00
Kurt
c5b0ed6c35 Move encountertype deferral to main generator
gen4->gen5/6 electrode will match static & wild slots, but deferral only
defers within the same IEncounterable group.
2017-10-22 09:42:15 -07:00
Kurt
39279a7ad4 Add VC transfer checks
checks were previously only performed when finding the encounter, once
found, the GB encounter was validated. the transfer encounter is derived
after all encounter checks, thus remaining unchecked (really, only for
Locations).

Move generating logic to the generator, and double check the locations
are valid.

#1535
Thanks @DJPanda065 !
2017-10-20 21:07:15 -07:00
Kurt
ae0bf5c75c remove (None) egg gen4 hatch location 2017-10-19 22:00:31 -07:00
Kurt
a75614ed77 Modify eggmove fetch
fetch is exclusively done with version already known; there are cases
where version can change for eggs so it's safer this way.

version change reference (gen6+):

212a489335
2017-10-19 21:20:47 -07:00
Kurt
a53e8ddb7e Fix grotto mienfoo level range
Thanks paf!
2017-10-18 21:16:52 -07:00
Kurt
5a09cd9122 Add deferral case for gen6 magmar classic ribbon
use "when" for easy src code

Thanks Nessus!
2017-10-18 18:28:17 -07:00
Kurt
4d91aad876 Flag gen2 egg moves when transferred from gen1
move must be removed 2->1 so cannot be permitted as egg move.

remove unreachable code (ParseMovesRelearn only is called for Generation
>= 6, and thus Format != 2).
2017-10-16 17:24:19 -07:00
Kurt
b63e444e15 Add hatch location check for static egg gifts
to match mysterygift check
2017-10-08 14:48:35 -07:00
Kurt
c7dfc3d9b0 Cleanup
union / count usages
remove unnecessary stuff
2017-10-06 21:03:23 -07:00
Kurt
a816f4cea6 Misc event egg tweaks
Thanks Kirzi!
2017-10-05 23:13:48 -07:00
wwwwwwzx
384605b127 Misc gen1/gen2 fixes
- G1/G2 only have Hiragana letter he -> fixed Houndoom(ヘルガー) /Heracross (ヘラクロス) default name mismatch
- Fixed Stadium2 Farfetch'd move (Thrash -> Slash)
- Added VC Mew TID check
- Update Chinese legality strings
2017-10-04 00:14:50 -07:00
Kurt
593f31ff02 hashset contains over array contains
faster++, reduces some linq ToArray() allocations
2017-09-30 14:08:35 -07:00
Kurt
3552e6396c Move pidivmatches check outside secondary check
gen3/4 generators auto-defer bad PIDIVs to end, so no need to keep
skipping to the very end
2017-09-30 13:42:57 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
212a489335 Add gen6+ link trade egg edge case
slakoth with play rough with x/y version
why u modify game origin when hatched???
2017-09-28 17:11:30 -07:00
Kurt
a52f88dd5c Add ice punch feraligatr non-relearn link gift move
Thanks cicciochiave!
2017-09-27 08:32:35 -07:00
Kurt
9699cdefae Gen2 egg gift bypass fix
Gen4+ static encounter eggs could slide through the VC case
prevent empty moves from appearing before suggested moves (relearnbase
being empty)
2017-09-26 20:09:18 -07:00
Kurt
1b354624b1 Korean move validation fixes
Korean g/s cannot access gen1 movesets, so pruning gen1 was necessary.
Rather than rebuilding the array (slow), just futureproof the entire
method to not rely on '7' (in case this code is ever used on Gen8).
2017-09-24 10:52:39 -07:00
Kurt
16341b4d91 Add SPA/ENG Oct16 Diancie collision handling
Card 0525 was accidentally uploaded without the 3 flawless IVs setting;
sometimes when the internal event binary is built, the 3IV card comes
before the 0IV.

Play favorites with the 0IV.
2017-09-23 17:11:19 -07:00
Kurt
7974943bcf Refactoring
slight simplification related to #1486
2017-09-23 16:24:22 -07:00
javierhimura
f3743e490b Korean language restrictions
Restriction happens because Korean can not trade with non-Korean GB era games
- There is no Korean release for gen 1 pokemon, included VC
- With no gen1 pokemon means any Korean gen2 is Gen2_NotTradeback, that means no gen1 origin nor moves are Legal
- Crystal was never released in Korean
- Pokemon Stadium 2 was never released in Korean, that means no move reminder for gen 2 korean pokemon

- Generation 4 can not trade between Korean and not Korean games, but Korean games can use the palpark with any language

Chinese language restrictions
There is no Chinese release for gen 1 and 2 pokemon games, VC Chinese games are in Japanese
2017-09-23 20:46:10 +02:00
Kurt
496da9e4ab Add ranch ingame trades
debut of the long awaited EncounterTradePID class

gist to generate trades from folder (using LINQPad):
https://gist.github.com/kwsch/d778f1f63e4c393e5440dfb0e14cfcc3

Closes #1458 , although Mew/Phione's PIDIV method is unknown.
2017-09-20 21:28:29 -07:00
Kurt
69e8c071f7 Misc tweaks (apostrophe & vc2 pre)
farfetch'd apostrophe mapping disabled for gen5 and prior
Closes #1474

flag gen2 new moves as not obtainable if transferred from RBY (VC1) as
they must be removed before transferring 2->1.
2017-09-20 16:19:50 -07:00
Kurt
1149845db5 Misc database fixes
Initialize move array for WC3 if none are present
Closes #1472
More gracefully handle invalid version pkms in a given format (gen5
origin version pkm on gen4 format no longer throws an exception).
2017-09-20 09:04:30 -07:00
Kurt
b63e53af95 misc tweaks
no functional changes
2017-09-19 23:19:22 -07:00
Kurt
ddb496692d Fix yellow starter pikachu catch rate check
Closes #1470
2017-09-19 22:55:05 -07:00
Kurt
c23cc81212 More usum prep
I think egg hatch location checking is wrong for traded eggs (see gen3
vs future games, origin game shouldn't change but could hatch ORAS egg
on XY at XY location?)
2017-09-19 21:35:30 -07:00
Kurt
eafc28422e Misc gen4 handling updates
Cross-game trading for egg locations (duh)
Volt Tackle AND Fakeout pikachu from yellow forest
Nidoran fullwidth handling in gen4

Thanks Britty!

https://projectpokemon.org/home/forums/topic/41407-pkhex-legality-errors-on-gen-6-updated/?do=findComment&comment=220094

Replicate gen4's string setter for the bigendian variant
2017-09-16 09:58:06 -07:00
Kurt
aa3393e5b2 Misc languageID legality checking update
Checks for max language ID on transferred pkm (gen5 pkm on gen7 can't
have CHS/CHT etc)
handles edge case for JPN B/W ingame trades
update pk5->pk6 transfer logic to bump langID 0 to 1.
Thanks HaxAras & Britty for providing samples!
2017-09-15 17:43:31 -07:00
Kurt
5665481cab Reduce machoke trade minlvl gen1
Thanks Mewtwo!

https://projectpokemon.org/home/forums/topic/41636-ricky-machamp-unable-to-match-encounter
https://bulbapedia.bulbagarden.net/wiki/Kanto_Safari_Zone
2017-09-15 06:42:00 -07:00
Kurt
387d9375c3 Refactor split gender breeding logic
Inherit Levelup moves & hidden ability (gen5) issues addressed
2017-09-14 18:52:34 -07:00
Kurt
1769bcd306 Add no-deferred early break for gen3
c627a86f said it added for both 3 & 4, but was only added for gen4.
2017-09-09 19:27:28 -07:00
Kurt
fd2da22d3a Update PKMConverter internals
[insert lenny face here]
2017-09-07 23:18:04 -07:00
Kurt
f78e017e47 Fix GSC table loading
Was ignoring G/S slots (only had crystal) thus some special G/S
encounters (underleveled examples being Magmar lvl14) were not
recognized.
Thanks HaxAras!

https://projectpokemon.org/forums/forums/topic/41579-pokemon-silver-under-leveled-pokemon-flagged-as-illegal/
2017-09-06 20:03:36 -07:00
Kurt
76ff629006 Flag invalid nsparkle
previously would only flag if it was missing on npokemon
also fix gen5 traded egg locations
move egg ribbon verification to the new class
2017-09-05 20:32:07 -07:00