Commit graph

1180 commits

Author SHA1 Message Date
Kurt
30dc87df7e Misc ui fixes
move distinct filter to reflectutil as it is spitting out
inherited(overriden) property names after the current class' property
name.
remove original (default) memory strings; had removed Items.Clear()
earlier (why would I need to clear if there was nothing there?) but
there was something there needing to be cleared. Remove the useless
initialization to fix that :)

Thanks Davil!
https://projectpokemon.org/home/forums/topic/45321-distsupertrain/
2018-05-20 07:46:59 -07:00
Kurt
1f8c72af5a Handle EncounterTrade without moves specified
Similar to EncounterStatic handling
Thanks @architdate for pointing this out
2018-05-19 21:49:26 -07:00
Kurt
e216c38151 Misc updates
Add GetShowdownSets text output methods
Add party/box overload methods for easier slot setting api
Protect locked slots when importing BoxData
Misc saveditor simplifications
Add wc3->pk3 test
2018-05-19 20:48:03 -07:00
Kurt
9fd5df6e99 Misc pbr ui fixes
remove todo comment
fix exception when refreshing slot coloring
update box when saveslot index changed, not validated.
update boxviewers when saveslot changes
2018-05-19 16:33:06 -07:00
Kurt
047272c2ba Add batrev party viewing/handling
ezpz

party 4 bytes at end:
pkm, 0 (b) party index (b), 0x8000 (be u16)

not sure if there's a better way to detect party count...
2018-05-19 14:42:21 -07:00
Kurt
a7f9f69b02 Remove Type property
verbose summary uses the encountermatch's current type; the "x is y"
check is more than sufficient.
2018-05-19 12:21:16 -07:00
Kurt
b670f525fb Split up evolution classes
Too many classes in the same file, break up.

simplify things a little in EncounterArea (remove passing thru nulls,
should throw excpetion immediately if misconfigured).
2018-05-19 12:07:50 -07:00
Kurt
ca14b43b62 Relocate memory specific data to own file
allows easier handling for memory interactions
2018-05-19 10:04:07 -07:00
Kurt
be0f864b42 Relocate memory datasource to core 2018-05-19 08:30:36 -07:00
Kurt
23083317d7 Refactoring
pull out GameStrings

add debug output for crystal headbutt trees
fix qrpkm item access
2018-05-18 21:35:57 -07:00
Kurt
95b4d0820d Minor reorganization
amount of pkm obj classes is pretty high, move the static utility
classes to another folder

breaks usage of pkm.ShowdownText; removes a dependency from PKM.
2018-05-18 19:33:11 -07:00
Kurt
8cf70770cf clean up batch editor
refactor some logic to make it easier to reuse
add some xmldoc
2018-05-18 19:19:15 -07:00
Kurt
d772a82953 Move batch editor logic to core
previous hurdle a year ago was propertyinfo fetching not looking at the
base class's properties; dig deeper for all properties to mimic existing
code for netframework

end result is batch editing now possible without gui
2018-05-17 22:43:07 -07:00
Kurt
51a4d8095d Handle jp OT string length copy
Closes #1949
was using international length (11) instead of (6)
2018-05-16 16:58:00 -07:00
Kurt
78c4dbd69c Update plugin interface
now is notified during a file load event (can handle itself)
2018-05-14 17:30:56 -07:00
Kurt
c10b01dc83 Fix control name reference
Thanks Davil!

https://projectpokemon.org/home/forums/topic/45237-slottext-slotcry-languagefile/
2018-05-13 22:00:16 -07:00
Kurt
3ee6070b98 Fix poketch write
1123c24b0c
had addressed the loading, however, it did not address the saving

update pkx to not create a new array every time IsPKM is called
(possibly a lot)
2018-05-13 20:35:09 -07:00
Kurt
857919bd28 Add basic plugin sys
reference PKHeX.Core, main window loads assemblies & initializes
providing an ISaveProvider and the menustrip control (to insert controls
into)

pretty rough but should allow for inserting external control buttons &
allowing it to edit the UI a little

example: https://github.com/kwsch/PKHeXPluginExample
feedback is appreciated
2018-05-13 12:49:29 -07:00
smileynation
9d0ab043e7 Update lang_ja.txt (#1941)
Minor Update.
2018-05-13 09:22:02 -07:00
Kurt
28ef791014 Update hovered slot on box change
using keyboard instead of mouse can change box without moving mouse
outside the slot picturebox
trigger an update when the box is changed, but only if the updating
parent has the hovered child (ie a boxviewer changing box while hovering
the main window won't re-cry the main window slot since it wasn't
updated)
Closes #1940

add some gender threshold properties to personalinfo
2018-05-13 08:14:46 -07:00
Kurt
19f2420670 Add settings for slotText & slotCry
Closes #1939
2018-05-12 20:04:58 -07:00
Kurt
0e6db90de2 more minor tweaks
add 2 overloads for encounter generator
more simplifications
2018-05-12 18:11:47 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
e2f11edc43 Refactoring
discards, Array.Find over FirstOrDefault
2018-05-12 08:41:29 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
wwwwwwzx
997d41b6db Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6 (#1938)
* Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6

30: level + dark type in the party
32: level + day
33: level + night
34: level + female
Note Meowstic isn't affected due to another entry of level + male (23)

* Minor text usage fix

* Fix xorPID flipping in TransferEC check
2018-05-12 06:57:11 -07:00
Kurt
e32495252f Set altform before gender
bb5622f5db (commitcomment-28951163)
2018-05-11 21:48:58 -07:00
Kurt
9c5814346b Add showdownset parse case template test 2018-05-11 21:44:09 -07:00
Kurt
bb5622f5db Fix greninja import
pass null forms thru the converter
Closes #1937
2018-05-11 21:09:39 -07:00
Kurt
c2644cc9f0 Flag gendered pkm without gender
for lack of a better message
#1936

add some docs & trycatch bad wavs
2018-05-11 21:05:15 -07:00
Kurt
7ce89f0e16 Fix frlg inventory encryptionkey offset
72af1f7880/include/global.h (L219)

0xAF8 is berry powder! Thanks HaiPhuong!
2018-05-11 19:55:40 -07:00
Kurt
4ae1b79ad5 Handle mimikyu totem export
Closes #1935
2018-05-11 17:44:27 -07:00
Kurt
f82e545ab0 Update gender handling
Closes #1934 , unrelated tho
2018-05-10 20:22:32 -07:00
Kurt
815705bc5e Fix gender handling
Closes #1933

if not allowed to be genderless, flag as invalid gender
only permit valid genders after genderless is ruled out
(both done by checking the low bit)
2018-05-10 18:53:23 -07:00
Kurt
9fb7056837 Add test living dex generator
doesn't generate everything due to the evo chain not being 'full'
(instead is unevolved singular pkm), nor does it evolve pkm
2018-05-09 21:02:35 -07:00
Kurt
79b2576c31 add overloads for GetPossible
Remove edge case handling for level 2 blissey; updates over the past 2
(yay 2 years of legality checking) can now handle that case without
special handling.
2018-05-09 20:37:11 -07:00
Kurt
9f8e86b2b5 Finish rough generator
* handle gen6+ egg case where egg move count < 4 (cannot displace
Levelup lvl1 moves)
* handle minior altform case

generates all species/encounters possible, yielding 144,094 pkm files
(all detected as legal!)
2018-05-09 19:21:44 -07:00
Kurt
16ed4353b2 More generator updates
Store 4g giratina held item for enc->pkm legality
revise usages of GetSaneGender
Rearrange some logic
Better handle impossible version encounters (gen4)

gen 1-5 done, stuck on 659 - bunnelby egg...?
2018-05-09 17:50:56 -07:00
Kurt
4913ef9647 More generator updates
* B2 has an error in the encounter table for Route 3 Corphish Special
water encounter; GF edited from Basculin-1 to Corphish-1 and forgot to
update the form to 0.
* Ranch Trade egg locations
* Trade gender-PID set correctly
* static roamer glitch does not apply for emerald
* Mirage Island wild Wynaut case now allowed (collision with Gift Wynaut
egg hatched on Mirage Island?)

gen1-3 done; now at 413 (Wormadam) which currently yields an
EncounterEgg AS wormadam, which isn't right...
2018-05-08 21:17:31 -07:00
Kurt
c21f8bf45f More generator updates
Blazing past 251, now stopped at 280 (trade ralts, gender mismatch??)
2018-05-08 20:13:55 -07:00
Kurt
4d60a5a64e More generator updates
* first case of EncounterLink, now works (version, ability, OT memory)
* handle gen2 gb events (not even sure if they pop up, just in case)
* handle gen3 ereader shadow mons
* handle gen4 spiky pichu PID type
* handle gen2 crystal egg met level
2018-05-07 22:53:36 -07:00
Kurt
8902e9662c Add exclusive encounter handling
Handle Faraway Island Mew, handle DP Darkrai/Shaymin & Arceus, handle
not-distributed WC3s.

Now stopping at dex 154 -- one full generation of PKM species IDs can be
completely spawned directly from IEncounterable data!
2018-05-07 22:12:12 -07:00
Kurt
3c31d5798f Continued pkmgen updates
* adds g4 forced shiny seed->pid (Chain Shiny Lake of Rage Gyarados)
* adds cxd starter pid generating handling
* adds g5 forced shiny seed->pid (MG5Shiny Shiny gift Dratini)
* excludes gen4 route45 surf impossible encounters
* actually use ingame trade edge case handler

Up to dragonair (147) yay; yellow dragonair is likely the catch rate
edge case.
2018-05-07 21:16:54 -07:00
Kurt
86bf4201e2 Remove encounterstatic-encounterslot collision case
Exeggutor Island has wild & one static with a fixed ability; the fixed
ability is returned first which causes wild lv40 exeggutors with
ability2 (1/2/H) to be flagged as illegal.
2018-05-07 21:12:42 -07:00
Kurt
3e885a8440 Update forme parse
Closes #1931
2018-05-07 18:24:30 -07:00
Kurt
734edfae20 Remove cutecharm swarm restriction
only affects species (can't force gender on a fixed gender swarm slot)
https://github.com/kwsch/PKHeX/pull/1314

https://projectpokemon.org/home/forums/topic/45153-bug-cute-charm-swarming-illegal/

Add swarm cutecharm test cases from thread, thanks @PP-theSLAYER !
2018-05-07 16:14:31 -07:00
Kurt
19a0560474 Misc cleanup
extend byte[]->pkm iterator for specifying start/stop
clean up some in main window
2018-05-06 22:24:25 -07:00
Kurt
7e9b5362d0 Simplify showdownset form handling
replace all dashes with spaces, and vice versa
Closes #1930
2018-05-06 18:46:51 -07:00
Kurt
5cb232d474 Sanity check some showdownset import values 2018-05-06 18:40:51 -07:00
Kurt
232427d002 Rework slot interactivity a little
decentralize some logic, individual view providers now provide the
details rather than detecting from a huge array.

#1925
2018-05-05 08:07:22 -07:00