Commit graph

280 commits

Author SHA1 Message Date
Kurt
44c0b53852 Provide map for Z Crystals KeyItem->HeldItem
allows for loading sprites for the key items (they're smaller than the
key item but better than missingno sprite)
Closes #1504
2017-09-30 20:57:32 -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
ccf9cd2284 Update japanese translation
Thanks smileynation!
2017-09-24 14:44:27 -07:00
Kurt
499126f9a4 Update gen1/2 move fetch
recent commit changed GetEncounterMoves to return 4 always rather than a
variable size array; double check the output for actual movecount
2017-09-24 12:39:12 -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
9ef2016d35 Encounter Learnset move duplication fix
a level 15/16 magmar has leer/smog twice in its learnset (at level 1 and
at actual levels); returning just the 4 previous learned moves at level
15/16 yields duplicates for Smog. [Smog, Leer, Fire Punch, Smog | Leer,
Ember]. By ignoring moves already added, the true movepool is acquired

also fix TradebackType getting overwritten at the end of the method (in
case of nontradeback like korean/egg)
2017-09-24 10:36:16 -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
d8c2cdb8e3 Use EnumerateFiles over GetFiles in some cases
https://msdn.microsoft.com/en-us/library/07wt70x2.aspx

iterating as an ienumerable (ie not consuming the whole collection) can
be more efficient by not waiting for the whole collection
2017-09-23 17:02:28 -07:00
Kurt
7974943bcf Refactoring
slight simplification related to #1486
2017-09-23 16:24:22 -07:00
javierhimura
ea86032480 Comments and a fix for AllowGen2Crystal function 2017-09-23 21:00:57 +02:00
javierhimura
153206be6c Merge remote-tracking branch 'remotes/kwsch/master' into VC1withVC2tradeback 2017-09-23 20:46:39 +02: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
4a467fcf43 Fix gen5 HA checking for male only species 2017-09-23 07:58:55 -07:00
Kurt
756f9bb8dc Allow gen7 ribbons on gen2 transfers 2017-09-23 07:54:31 -07:00
javierhimura
eda97f4b49 Do not allow gen2 preevolutions for VC1 pokemon in generation 7 2017-09-23 13:16:33 +02:00
javierhimura
f129701ee6 Do not allow gen2 evolutions in generation 2 for VC1 pokemon, gen2 preevolutions are allowed 2017-09-23 13:12:03 +02:00
javierhimura
efc60c3bf8 Change VC1 pokemon tradeback initial status to allow VC2 origin, there is no way to know if the pokemon was traded to gen7 after or before VC2 release
Do not allow gen1 evolutions for VC2 pokemon without gen1 evolutions or preevolutions
2017-09-23 12:58:46 +02:00
Kurt
6e579abfc3 Misc changes
* allow gen2 to have evolutions on gen1 when transferred to gen7
(Core.cs)
* handle korean strings on transfer slightly better (pk2.cs)
* auto-set johto location when changing game ID
* auto-detect VC saves (all have extensions with .dat)

Closes #1478 , thanks @NinFanBoyFTW !
2017-09-22 17:54:43 -07:00
Kurt
a21a70ee4c Fix gen2->7 encounter move args
#1476
suicune water gun
2017-09-22 15:33:33 -07: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
7b6d393b2f Add Hong Kong to Taiwan countries list
Closes #1473
2017-09-20 15:18:33 -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
772f7d9d87 Add gen3 fateful bypass
no flagging that it's missing (via ingame clearing), implying that it
was traded to RS to hatch.

Thanks @kamronbatman !
Closes #1469
2017-09-19 19:18:13 -07:00
Kurt
6611e874c3 more usum prep
species added requires the 'latest personal table' reference to be
USUM's; the other referencs for .SM are fine as there's no possibility
to have a species ID high enough for it to matter.
2017-09-18 22:36:06 -07:00
Kurt
ad69420ad9 Update gen5 shiny PID generating
Closes #1460
https://pastebin.com/GgcMjmwd
2017-09-17 14:43:28 -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
c55b3df939 Add nyx antishiny pidiv detection
( ͡° ͜ʖ ͡°)
2017-09-12 00:27:16 -07:00
Kurt
4f9dc69504 misc kor improvements
pk2 objects now detect if they are korean or not
2017-09-10 22:30:41 -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
09bbd57eb7 Fix grammar of new lc strings
thanks @sora10pls !
2017-09-08 09:01:46 -07:00
Kurt
4b83fdbe2c Add preliminary VC2 legality checking
Surprisingly easy to toggle on
If VC, provide possible version the encounter was matched to (to
indicate GS vs RBY).
2017-09-07 23:53:12 -07:00
Kurt
e517b45e51 Add GSC version IDs (supposed)
This is speculation and for preparation purposes only
2017-09-07 23:38:57 -07:00
Kurt
fd2da22d3a Update PKMConverter internals
[insert lenny face here]
2017-09-07 23:18:04 -07:00
Kurt
ddf55ee75a Improve gen1/2 invalid string detection
also spit out recommended TID/SID for c/xd starters
Closes #1443
2017-09-07 21:42:05 -07:00
Kurt
311ea4bc50 Refactoring
relocate memory type detection tables out of MemoryAmie editor
remove casting reference to get text (invalid memories no longer throw
exceptions)
2017-09-07 17:46:21 -07:00
Kurt
c3043b05e3 Staravia->Starly dream ball inheritance
Closes #1445
2017-09-06 21:18:22 -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
423be8b2c0 Add VC1 tradeback shiny check
tradeback implies it was transferred to GS for a bit, thus had to be
transported with the new transporter
2017-09-06 20:02:41 -07:00