Commit graph

4198 commits

Author SHA1 Message Date
Kurt
34188f275a misc perf improvements
reduce linq usage / reduce obj creation in tight loops
speed++
2017-12-29 10:40:00 -08:00
Kurt
45eee8575a Only promt roto-OT if OT is changed
reduces nag
closes #1731
2017-12-29 10:00:32 -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
Kurt
5ec99b6c1c Refactoring
expose individual types, items, and abilities
2017-12-26 18:54:08 -08:00
Kurt
dbe000d08e Add some overloads for non-specified generation
fetches current gen if used without generation parameter
2017-12-26 18:54:07 -08:00
Kurt
5580d6a7d4 Extend set obj to apply to pkm data
var psimSet = new ShowdownSet(Clipboard.GetText());
psimSet.ApplyToPKM(pkm);
2017-12-26 18:54:07 -08:00
Kurt
cdaba6eb26
Merge pull request #1724 from sora10pls/master
Add XY gift Lapras ability check
2017-12-23 16:25:23 -08:00
sora10pls
c3d5266b89 Add XY gift Lapras ability check 2017-12-23 18:28:00 -05:00
Kurt
ea76d6a899 Misc tweaks
minor perf improvements (don't ToList for encounter slots, store all
slots incrementally); has better performance for legal pkm checks
2017-12-23 11:49:20 -08:00
Kurt
7f21728e84 Add area->location references to remaining slots 2017-12-23 11:48:10 -08:00
Kurt
985883e6ae Refactoring
pull out ability list generating
refactor showdown set to an Action that can be overwritten from
elsewhere
2017-12-21 22:55:33 -08:00
Kurt
9e2bd8f64a fix pokewalker course flag set
07FF_FFFF
not
7FFF_FFFF
2017-12-21 14:28:19 -08:00
Kurt
9457db9059 Fix mystery gift qr export text
closes #1720
2017-12-21 09:49:40 -08:00
Kurt
431baec087
Merge pull request #1716 from smileynation/patch-9
Update text_cxd_00000_ja.txt
2017-12-19 18:42:17 -08:00
Kurt
2e701349db
Merge pull request #1717 from smileynation/patch-10
Update text_rsefrlg_00000_ja.txt
2017-12-19 18:42:10 -08:00
smileynation
0615895dce
Update text_rsefrlg_00000_ja.txt 2017-12-20 11:11:43 +09:00
smileynation
7fb7487e6b
Update text_cxd_00000_ja.txt 2017-12-20 11:08:28 +09:00
Kurt
9429bc6961 Fix showdown import on gen3
https://projectpokemon.org/home/forums/topic/43126-problems-with-importing-rse-showdown-files-from-clipboard-in-pkhex/

Sceptile @ Leftovers
EVs: 4 Def / 252 SpA / 252 Spe
Timid Nature
- Leaf Blade
- Leech Seed
- Substitute
- Hidden Power Ice

also fix apricorn form title
2017-12-19 15:33:23 -08:00
Kurt
5e59e20ea1 Store matched encounter generation
previously was only defined for gen1/2, why not all gens
can now query encounters in Core for encounters per generation via
reflection; can help group encounters for data vis or be faster than
getting individual gen numbers
2017-12-18 16:17:21 -08:00
Kurt
80baaea3b7 add b2w2 n's pokemon PIDs
add b2w2 fixed PID encounters (N's Pokemon), move nsparkle to this class
redo static encounter cloning
2017-12-18 15:25:40 -08:00
Kurt
9263856845 Add apricorn pouch editing 2017-12-18 09:36:53 -08:00
Kurt
60787e652c Add new text ja flag resources to project
re: previous pull requests
2017-12-17 21:35:06 -08:00
Kurt
24b5cc48ed Fix gb encounter move comparison
don't calc NoMoveReminder for non-gen2 formats, also fix comparisons
(gen1 || gen2&&noRemind)
Closes #1707
2017-12-17 21:26:31 -08:00
Kurt
975be16c3c Merge branch 'master' of https://github.com/kwsch/PKHeX 2017-12-17 21:24:56 -08:00
Kurt
453f66e2b4
Merge pull request #1709 from smileynation/patch-3
Create flags_oras_ja.txt
2017-12-17 20:27:51 -08:00
Kurt
a1bf7e1b3a
Merge pull request #1710 from smileynation/patch-4
Create flags_b2w2_ja.txt
2017-12-17 20:27:45 -08:00
Kurt
dc9e83fcfe
Merge pull request #1711 from smileynation/patch-5
Create flags_bw_ja.txt
2017-12-17 20:27:38 -08:00
Kurt
c88024534a
Merge pull request #1712 from smileynation/patch-6
Create flags_pt_ja.txt
2017-12-17 20:27:27 -08:00
Kurt
14acaa6d04
Merge pull request #1713 from smileynation/patch-7
Create flags_dp_ja.txt
2017-12-17 20:27:22 -08:00
Kurt
fd55f1a8a2
Merge pull request #1714 from smileynation/patch-8
Create flags_hgss_ja.txt
2017-12-17 20:27:15 -08:00
smileynation
673147b94f
Create flags_hgss_ja.txt 2017-12-18 13:04:25 +09:00
smileynation
6331758973
Create flags_dp_ja.txt 2017-12-18 13:04:01 +09:00
smileynation
5b4f24e54a
Create flags_pt_ja.txt 2017-12-18 13:03:37 +09:00
smileynation
c545c53121
Create flags_bw_ja.txt 2017-12-18 13:03:01 +09:00
smileynation
54e1410f78
Create flags_b2w2_ja.txt 2017-12-18 13:02:50 +09:00
smileynation
fd33e4e7a0
Create flags_oras_ja.txt 2017-12-18 12:56:52 +09:00
Kurt
e8c4cc8fa8 Fix broken crystal origin pkm test
works fine on a crystal save, the test needs this enabled for crystal
origins
2017-12-17 19:42:31 -08:00
Kurt
810ec39ee0 add recent pr flags resource
#1708
2017-12-17 19:33:26 -08:00
Kurt
e241387c87
Merge pull request #1708 from smileynation/patch-2
Create flags_xy_ja.txt
2017-12-17 19:13:58 -08:00
smileynation
c2031bf347
Update flags_xy_ja.txt 2017-12-18 11:43:03 +09:00
smileynation
037ab76d45
Create flags_xy_ja.txt
I can not understand the meaning of Statuette and can not translate.
2017-12-18 11:31:34 +09:00
Kurt
bd611cf8dc
Merge pull request #1706 from smileynation/patch-1
Update text_Ribbons_ja.txt
2017-12-17 17:45:06 -08:00
smileynation
205f141c44
Update text_Ribbons_ja.txt
Gen3, Gen4 Ribbons transration.
2017-12-18 10:29:57 +09:00
Kurt
47eee3aa98 Add roto powers as held items
not gonna add sprites because these are useless, anyone can submit via
pr (image might need downscaling to <15x15)
Closes #1703

remove useless null checks (throws the exact same exception it would if
it were not there, except without detail)
2017-12-16 19:52:06 -08:00