Commit graph

131 commits

Author SHA1 Message Date
Kurt
66f082e4a0 Add shadow lugia sprite
Closes #2145
2018-10-20 23:05:15 -05:00
Kurt
6f09f7b89e Add catch rate editor control
#2132
has a 'reset' button which tries to set a legal value
has a 'clear' button which sets it to zero, similar to gen2 removing an
item
2018-09-30 10:16:45 -07:00
Kurt
9304101141 Hover species combobox -> show species ID 2018-09-28 21:17:46 -07:00
Kurt
0de49c915a Draw all move items if hax
https://projectpokemon.org/home/forums/topic/47534-move-selection-broken-in-illegal-mode/
2018-09-13 22:10:35 -07:00
Kurt
53216333e6 Misc updates
extract final pkm manipulation logic from pkm editor
add xmldoc to boxmanipulator, add utility class for enum->manip fetching
fix xmldoc referencing removed enum member
relocate boxmanip overview logic to utility class
move SAVPaths file pointer to Main for reuse #2109 , will add to
autodetect in a later commit
open/save dialog with extra extensions: ignore ones already present
2018-09-03 10:30:35 -07:00
Kurt
493bef75eb Misc updates
condense repeated logic
extract properties
extract reusable methods
2018-09-02 18:02:25 -07:00
Kurt
ebae14e6ad Add unnicknamed forced languageID wc7 handling
https://projectpokemon.org/home/forums/topic/47295-bug-event-golduck-name-not-matching-species/
another edge case
2018-08-29 20:36:32 -07:00
Kurt
e9059023eb Add ball selector with legal ball indication
click the ball label/sprite; hovering over ball puts the name in the
subform title bar
2018-08-29 19:30:48 -07:00
Kurt
6abd60cc5c Add ball auto suggestion
click ball sprite/label to cycle through legal balls
hold alt to use old behavior (set to pokeball)
hold shift to cycle through legal balls randomly (default behavior goes
poke->color->poke)

want to randomize setting balls? use the ApplyBallLegalRandom method at
the end :)

can't really get too fancy as only one color is stored in the personal
data, pkm aren't one single color.
2018-08-28 21:13:45 -07:00
Kurt
9dae7dad67 Misc updates
move encountertype datasource providing to core
fix rerolling EC not updating characteristic
remove some repeat logic calls
relocate geolocation name fetch to separate class, add tests to ensure
functionality, add languageID->country/region fetch method
2018-08-25 17:04:01 -07:00
Kurt
c7aea9cad2 add option to hide pid/ec
hides pid & ec in pkmeditor, gamesync & securevalue in saveditor
easier to share screenshots/stream without leaking identifying
information

fix auto-centering of pkmeditor subwindows when a savefile is detected
on program load(tab_otmisc isn't initialized and reads an incorrect
width)
2018-08-19 18:22:07 -07:00
Kurt
1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00
Kurt
0745ba3294 Defer move combobox repop until dropdown
Yay sneaky smart solutions!
Instead of refilling the combobox when the legal move list changes, wait
until the full list is required then repopulate the individual combobox
can't even notice the lag besides the individual tab load. yess
2018-08-01 21:57:15 -07:00
Kurt
0ee9b04bf7 Skip move combobox repop if no changes
cache a hashset to determine if the legally allowed moves are the same.
reuse cache in paint method

previously, was noticeable if you load the Moves tab then check
legality; the legality message was delayed by a couple hundred
milliseconds due to repopulating 4 comboboxes (Combobox.NativeAdd
hotspot triggered by RefreshItems, which happens when we set the
datasource). By skipping unnecessary repopulations, gui lag is lessened.
would be preferred if I can just reorder the list inside, but noo.
2018-08-01 21:22:49 -07:00
Kurt
93c4ec9fec Use version specific personal info
Handling for gen3 deoxys :)
Closes #2082
2018-07-27 21:21:42 -07:00
Kurt
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
c7175fbdb4 Misc reorg
bye bye SAVUtil and PKMUtil
2018-07-20 21:32:33 -07:00
Kurt
229dc96c00 Safe convert current level
Dry startup can cause a crash if the field is somehow not filled in:

https://projectpokemon.org/home/forums/topic/46313-pkhex-ver-180716-wont-run/
2018-07-19 16:46:56 -07:00
Kurt
93ed2a8bb9 Restore location suggestion
closes #2064
2018-07-16 15:07:20 -07:00
Kurt
4d73fa70d8 Simplify binding to ComboItem logic
could probably look into better binding but meh
2018-07-14 16:00:28 -07:00
Kurt
8c2b74c149 Refactoring
max IVs use flawless method directly with 6 IVs specified
move color blend/stat calc to ImageUtil
move potential string to commonedits
expose color properties for pkmeditor
don't constantly create/dispose brushes for drawing legal moves
2018-07-14 15:08:14 -07:00
Kurt
e588565657 Refactoring
reduce pk3/ck3/xk3 logic, share AbilityBit property within _K3, and when
loading, type check (favored over hardcoding individual load cases)
pull some non-gui code from PKMEditor to core/etc for general data
fetching
2018-07-06 17:37:07 -07:00
Kurt
9f8edc89bf Refactoring
put some string[] behind IReadOnlyList to prevent any consumer from
modifying it
2018-06-30 09:59:48 -07:00
Kurt
9728d7a09f Fix gender formes carrying over to others
Closes #2022
Thanks @iiippppk !
2018-06-19 17:27:44 -07:00
Kurt
b81cad84ab Fix arg providing for GetRandomPID call
Closes #2012
2018-06-16 10:51:53 -07:00
Kurt
f8a1d26694 Fill empty ability values with ability1
update handling that checked for this case to instead check for
equivalence to ability1 instead of 0

was generating a PGF with ability[1] = 0, which is not correct. Just fix
the binaries to behave and get rid of all the workarounds since future
tables don't have missing values.
2018-06-15 23:41:07 -07:00
Kurt
cb5e1239ae Refactoring
Extract game value limits
Rearrange GameVersion util logic extensions
add better gameversion fetch for generator (equivalent to pkmeditor)
2018-06-15 16:00:28 -07:00
Kurt
19e9e4e761 Update form gender update
#1982
2018-06-06 18:59:01 -07:00
Kurt
27e917551f Simplify conteststat editor usage
make consistent with interface names
2018-06-02 22:04:32 -07:00
Kurt
2061f23e26 Misc simplifications
fixes suggestion requests for invalid gameversion pkms
2018-05-27 17:57:45 -07:00
Kurt
1b8fe201c0 Misc simplifications
Simplify some pkmeditor logic, pull out togglemarking
2018-05-27 10:24:28 -07:00
Kurt
bb55532c4a Rework TID/SID loading
Move TID/SID load to after version set (special handling for pk1/pk2
which don't store version, just call manually).
Update TID/SID on every gameversion change anyway
Rename LoadOTID to LoadOT since it does not deal with ID.

Closes #1962
2018-05-24 16:53:54 -07:00
ReignOfComputer
044ae4e6fe Correct Control Switching for G2->G7 (#1957)
Is there a reason for having GSC newTrack as USUM? This causes `origintrack = newTrack;` not to happen and thus controls don't switch from G2->G7 correctly.
2018-05-21 20:19:00 -07:00
Kurt
199b6f2caf Add move rand for batch editor
Also add Move Rand & Move Reset to box modify contextmenu
2018-05-20 14:29:13 -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
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
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -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
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
02dc49641c Rearrange version changing logic
set the new version, then update the controls
#1923 ; exist logic overrode rby/gsc to gen7 locations, which didn't
trigger the TID view update.
2018-05-04 17:59:04 -07:00
Kurt
8dcee4e0ee Add 3 more advanced sorters
Primary->Secondary typing
Generation->Version
Base Stat Total
2018-04-30 21:20:28 -07:00
Kurt
116f600cb7 Apply default language if none
Closes #1920
2018-04-30 18:48:21 -07:00
Kurt
43507a5ae5 Add TrainerID control
Now shows tid7/sid7 when gen7+
2018-04-28 09:34:54 -07:00
Kurt
3f6b1acc93 Add fixed gender checks for non-GBA/NDS games
Closes #1912 , genderless ~= fixed gender I guess; shouldn't get these
gender-errors unless it's manually tampered data/ShowdownSet

remove unnecessary code in:
* PKMEditor (>=255 is already covered by == 255 and the fact that gt is
always <= 255)
* VerifyGender (3 <= x <= 5) check is already early-returned via
PIDGender check above

Update IsGenderValid knowing that VC mons have a gennumber <= 2
2018-04-23 19:58:29 -07:00
Kurt
bb03505144 Better handle g2 unown form changing
Closes #1897
2018-04-16 16:01:30 -07:00
Kurt
508f056d33 Clear move pp on move deletion
closes #1894
2018-04-09 06:10:26 -07:00
Kurt
5e96c6e035 Extract main window strings to translatable class
Similar to LegalityCheckStrings
no resource files yet, will generate those tomorrow(?)

some strings are not translatable (useless gen6 passerby export text),
not really worth
2018-04-05 21:25:18 -07:00
Kurt
e026a8ab49 Add default trainer info
use in pkmeditor and utilize
2018-03-28 18:52:50 -07:00
Kurt
99a4c55579 Relocate some logic to core
party stats set when setting a slot to a save file
simplify set/delete slotchange duplicate logic
suggest better met locations beyond VC transfers
hatching a gen6 egg applies memories automatically
2018-03-25 19:05:49 -07:00