Commit graph

873 commits

Author SHA1 Message Date
Kurt
0e7350ee9e Update korean vc string checks
https://projectpokemon.org/home/forums/topic/43610-legality-about-gen-2/
2018-01-27 09:45:33 -08:00
Kurt
c066df243f Misc fixes/updates
Fix crystal lacking met level<->current level checks
Fix met location loading for gen2 saves (gen7 sav loaded gen1/2 pkm ->
load gen2 sav)
refactor some logic with pattern matching/consistent method names
2018-01-26 09:19:20 -08:00
Kurt
48564d7e30 Fix celebi iv check
update version ID as well
Closes #1775
2018-01-25 20:39:32 -08:00
Kurt
9b7b0b25d4 Flag iv<5 celebi
thanks @sora10pls
2018-01-25 19:34:18 -08:00
Kurt
58e374bcc6 Add celebi / more crystal legality handling
Closes #1772
2018-01-25 19:25:10 -08:00
Kurt
802105d22d Allow pay day mewtwo, disallow dizzy punch
#1772
transfer pk1->pk2->pk7 for mewtwo knowing dizzy punch, just so we can
keep Pay Day
2018-01-25 19:17:42 -08:00
Kurt
4c93183575 Add jp vc gen2 sizes
so many so consistent
2018-01-25 18:30:09 -08:00
Kurt
5472f869cf Remove some crystal vc checks
now legal
assuming x->kor7 sets the language val based on the cart language,
should be good for the kor crystal checks.
2018-01-25 09:14:25 -08:00
Kurt
1db5161a59 Add shiny star to pk1 filename export
closes #1770
2018-01-25 08:50:17 -08:00
Kurt
b69a6df6e7 Add roamer glitch IV collision detection
M1 is checked before M1R. A M1R PIDIV can also be a M1 PIDIV, so check
that collision.

https://projectpokemon.org/home/forums/topic/43567-gen-3-suicune-unaffected-by-roamers-glitch/
2018-01-24 19:07:03 -08:00
Kurt
713e9ea209 Compress box padding 2018-01-23 17:18:37 -08:00
Kurt
b229a947f2 Fix pt/hgss egg location handling 4->5
Closes #1766
pt/hgss egg location data is lost on transfer, retaining faraway place
only.
2c8e2176e9 fix was incorrect
2018-01-21 11:57:34 -08:00
Kurt
e616b56bfa Remove uncatchable grubbin static encounter
#1763
2018-01-18 14:06:17 -08:00
Kurt
2063cef3e4 Fix arrays not being cloned
don't use the existing data array silly -- i was paranoid long ago for a
reason
all other SAV clone methods don't return the Data array, only these
#1764 additional behavior noted
2018-01-18 14:05:34 -08:00
Kurt
387030e16f Fix 7th gen pikachu altform check
https://projectpokemon.org/home/forums/topic/43498-bug-about-event-pikachu/
2018-01-18 13:50:29 -08:00
Kurt
75c67b02b9
Merge pull request #1760 from smileynation/patch-11
Update flags_dp_ja.txt
2018-01-16 19:32:41 -08:00
Kurt
b74bf7d499 Misc simplification
no functional change, just compute hash over array span instead
2018-01-15 17:51:33 -08:00
Kurt
17e4bdbe3a Add pikachu7 forme nongift check
other branch was unhandled, flag if we have a mismatch
closes #1762
2018-01-15 17:50:33 -08:00
smileynation
d01ad5c4ae
Update flags_dp_ja.txt 2018-01-14 15:55:47 +09:00
Kurt
06733d6e34 Refactoring
Split up c-gear skin bitmap, move generic handling to core
2018-01-13 21:31:02 -08:00
Kurt
6caefef181 Add cgb->psk & misc clarifications
Closes #1699
tested on black2 & white, skin isn't corrupt on game boot and appears
correctly

still don't like setpixel/System.Drawing reliance (maybe split logic to
CGearSkin & CGearSkinVisualizer) for PKHeX.Core compat
2018-01-13 16:32:57 -08:00
Kurt
029539003b FormChange check: use original form not current form
Closes #1758
noticing the different usage for species (encounter species vs current),
iterating over possible dexlevels (unnecessary?)
2018-01-13 12:10:17 -08:00
Kurt
fb6738f18b Add unown 2->7+ shiny check
closes #1755

also:
fix vc transfer checks not being called (EncounterOriginalGB is no
longer GBEncounterData).
remove usages of GBEncounterData -- class is (as of a ~~month ago) now
never leaked out of the EncounterGenerator -- always returns the actual
encounter data as the wrapper is not needed.
simplify logic flow / references
2018-01-10 16:16:35 -08:00
Kurt
c751c987a9 Add DebutGeneration get
https://projectpokemon.org/home/forums/topic/43378-generation-search-in-pkmdb-andor-batch-editor/

(less than) < and (greater than) > not currently supported (no plan to
add, would need to rewrite value eval logic)
2018-01-10 15:40:33 -08:00
Evan Dixon
5a4ddd685c Update Project Pokemon URLs in comment 2018-01-08 13:15:19 -06:00
Kurt
701edbc592 Remove KOR language from gen3 selection
add flag for non japanese lang gen3 eggs
Closes #1747
2018-01-06 22:43:48 -08:00
Kurt
63a983749e Don't generate encounter slots for eggs
Closes #1749
2018-01-06 21:51:58 -08:00
Kurt
659f2098a9 Fix sav4 coin read
#1746
2018-01-06 21:36:44 -08:00
Kurt
218c20d804 Add sav4 coin edits to misc4
closes #1746
2018-01-06 14:02:55 -08:00
Kurt
8cf97f3761 Add pom-pom edge case
dash was stripped out during conversion
closes #1744
2018-01-06 09:40:30 -08:00
Kurt
6a9e2ed4b9 Refactoring
improve speed for resource fetch, add optional Shiny parameter
(currently unused)
#1735
2018-01-02 16:53:39 -08:00
Kurt
0f21fc2217 add location interface for verbose analysis output
indicates met location for transferred mons
most gen1/2 encounters won't show values due to the location not being
stored respective to the string tables (anyone wanna do a location remap
after initial load?)
2018-01-02 12:00:41 -08:00
Kurt
5888898e7d fix gen2 egg met level mod
https://projectpokemon.org/home/forums/topic/43278-gen-2-hitmonlee-and-hitmonchan-flagged-as-illegal-if-location-is-mt-mortar-at-level-10/?tab=comments#comment-225577
2018-01-01 21:51:36 -08:00
Kurt
76385a6b4a Fix gsc pre-evo species chain filtering
simplify gsc check to do only once

https://projectpokemon.org/home/forums/topic/43278-gen-2-hitmonlee-and-hitmonchan-flagged-as-illegal-if-location-is-mt-mortar-at-level-10/
2018-01-01 13:53:28 -08:00
Kurt
e79a35d387 Fix long OT name length setting
StringLength is the raw buffer size, needs to be offset by 1 as the
string length enforced does not consider the terminator

12char OT name in sav7 loaded to tabs -> load gen1/2 save = exception
(now fixed)
2018-01-01 11:27:45 -08:00
Kurt
cfe78a7a0c Add rby power plant static encounters
https://projectpokemon.org/home/forums/topic/43272-small-electrode-legality-bug/?tab=comments#comment-225537
2018-01-01 10:38:38 -08:00
Kurt
1b409dd327 Ban phione egg in non-pokeball
Thanks Davil!
https://projectpokemon.org/home/forums/topic/43262-bug-phione-ball/
2017-12-31 09:56:27 -08:00
lilymaniac
e58696cd56 Update Korean translation 2017-12-31 15:17:04 +09:00
Kurt
14821dfb82 Fix catchrate set auto-fix
https://projectpokemon.org/home/forums/topic/43252-pk1-pokémon-files-arent-holding-items-when-imported-to-gen-2/?tab=comments#comment-225459
2017-12-30 10:40:28 -08:00
Kurt
ca20e78269 pkm crypto Refactoring r2
condense repeated logic, reduce overall operations
removes 1 array alloc for pkm encryption (shuffle clones the array, so
don't clone->clone)
removes 1 array alloc for pkm decryption (mutate encrypted array), be
aware that no current use cases input an encrypted region and expect the
reference to stay encrypted (always was a temp array).
remove duplicate bounds checks (early return & for loop)
2017-12-29 15:29:31 -08:00
Kurt
0c2b16391f fix spanish ranch gift name check
oops
2017-12-29 13:08:06 -08:00
Kurt
90260187f7 Add light of ruin & plasma fists as invalid sketch
moves not available for sketch without hacking a specimen in

https://projectpokemon.org/home/forums/topic/43244-two-problems/?tab=comments#comment-225421
2017-12-29 12:00:06 -08:00
Kurt
34188f275a misc perf improvements
reduce linq usage / reduce obj creation in tight loops
speed++
2017-12-29 10:40:00 -08:00
Kurt
1d405d63c8 speed up pkm crypt
GetBytes returns an array that is immediately discarded (GC pressure)
reduces overhead when loading large pkm collections from save files
(shaved off a couple seconds from my loading from 200+ bak saves)

could probably go faster with unsafe code to r/w ushort directly
then again im profiling under debug but i'd assume the improvements made
actually do improve speed for release builds
2017-12-28 23:24:12 -08:00
Kurt
dccad6c2f4 Simplify/fix UnSanitizeString
Species and Nicknamed params were never used; foreign always resulted in
true for cases when it actually mattered.

Filter to the non-fullwidth characters, check the char type (latin base
vs jp/zh/ko) in order to determine if the full/half symbols should be
squished

could be faster replacing char instead of string, so change those

add two test cases for half width & full width string
sanitization/unsanitization
2017-12-28 22:50:32 -08:00
Kurt
43cb0e8d7d Provide more accurate met level for eggs
Gen6 egg with met level != 1 (ie 98) will use the gen3-4 metlevel
branch.
fuzzed input from #1728 to be hacked (met level = 98)
2017-12-28 10:01:48 -08:00
Kurt
a1f2f8708a Refactoring
pass identifier on cloning pkm
remove unnecessary ref for passing Data (not modifying array reference)
const some magic numbers
2017-12-27 16:36:24 -08:00
Kurt
61b65198f2 Allow box name editing on gen2 2017-12-27 15:52:29 -08:00
Kurt
1e388fb85a Add first unown seen on dex set
immediately after unown dex:

c2a7216d9b/wram.asm (L2714-L2722)

per discussion on forums:

https://projectpokemon.org/home/forums/topic/43179-bug-unown-sprite-glitched-in-pokédex-in-gen2/?tab=comments#comment-225342

expose some useful properties for the pkhex.core api (unlock all, unlock
individual, define which unown shows up)
2017-12-27 09:56:04 -08:00
Kurt
3445b46526 Remove unnecessary array cloning
new objects would always clone the input array; only clone on object
cloning (keep the original array reference on initial creation from
bytes)
2017-12-26 21:38:19 -08:00