Commit graph

146 commits

Author SHA1 Message Date
Kurt
5b5c9d0017 Move ribbon name resources to string dictionary
multilang support now possible, other language translation files added
from existing form translation file

feel free to submit a pull request to change anything for your native
language :)

Closes #1250
not gonna add the alt sprites/names for pk3's
2017-06-22 21:56:41 -07:00
Kurt
0aec466965 Fix loading boxdata/pcdata
the input == 0 checks only applied to gen4+; pk1/2/3 do not have a
sanity at 0x4
Closes #1262
2017-06-22 17:52:11 -07:00
Kurt
aa67a63893 Allow alt-click preview to import showdown
Alt-Click species may not always be visible, simple enough
2017-06-21 21:57:59 -07:00
Evan Dixon
2636e7ded8 Fixed another potential blank error message
I also added comments where appropriate, because it took far too long to understand what was going on when reviewing the commit that fixed the original bug.
2017-06-20 20:38:33 -05:00
Kurt
2db061d15d Fix blank error message
Closes #1251

Thanks @ReignOfComputer for finding the source :)
2017-06-20 18:16:29 -07:00
Kurt
b4222c756a Refactoring
reduce cross-class chatter, simplifly large methods to smaller pieces
some speed improvements
2017-06-18 22:27:40 -07:00
Kurt
5b4cedf14b Refactoring
Rewrote showdown set exporting to be much clearer, added auto-fixing of
relearn moves when importing showdown set (applies suggested relearn
moves)
Simplified main form loading routine (from ~160 to ~25 by extracting
methods)
2017-06-18 13:02:02 -07:00
Kurt
258f660a90 Misc fixes
Immediately hide legality indication if hax
invert blank sav check (refactoring oops)
Closes #1238
2017-06-17 19:20:37 -07:00
Kurt
3f38b123a3 Refactoring
mostly renaming things, includes a little bit of added sugar and
splitting methods to simplify the codebase.

all methods are now PascalCase
2017-06-17 18:37:19 -07:00
Kurt
8a4c40908b Enforce met location matching for crystal data
Only while format == 2
improve detection for gen1/2 ingame trades
2017-06-12 18:15:26 -07:00
Kurt
0f040fb6e0 remove typo
Closes #1210
2017-06-09 08:56:28 -07:00
Kurt
63b18ff51f Fix misc problems
flag undistributed gen3 events
fix gen3 string writing (resized then expanded yields 00, missing
terminator), closes #1204
fix stackoverflow, fix pkmeditor template loading save prompt, closes
#1207
2017-06-08 20:57:30 -07:00
Kurt
1433ffd823 Remove double close event
Closes #1203
2017-06-07 22:19:49 -07:00
Kurt
0c3333137b Relocate legality request to main form
changes to an event; no longer duplicates the behavior for the pkm tabs
show legality
#1193
2017-06-04 13:35:51 -07:00
Kurt
14225bbc2e misc fixes
encounterinvalid isegg no longer throws exceptions when parsing moves
dropping invalid file paths to main window are now ignored (downloads
from chrome can be manually deleted but still dragged from the downloads
bar)
add pidiv case for manaphy gift
2017-06-04 00:12:37 -07:00
Kurt
e522094679 Fix pkm editor behavior
Closes #1180
2017-05-30 20:50:15 -07:00
Kurt
550153e3bc Improve gen3 sav detection
better detect RSE collisions
add auto-detection for japanese games
Closes #1172
2017-05-29 10:33:27 -07:00
Kurt
11b2dc35d7 Refactor main form into smaller pieces
pkm editor, sav editor, menus, and a manager to glue the storage slots
together
decouples the pkm/sav editors from a static savefile reference.

improves dragdrop/click view/set/delete indication, hides unavailable
contextmenuitems, and fixes a few incorrect references. Box Subviewer
slots now have all the indication/events that the main save editor slots
have.

pls report behavior bugs 👍
2017-05-22 21:55:12 -07:00
Kurt
da3d8c99be Misc refactoring
move some open/save file dialog events out of the main form
update main form logic to reflect newly flagged pkm cases
2017-05-17 22:00:06 -07:00
Kurt
7edc2eb14f Add report exporting to clipboard
Closes #1141
cleaner look maybe in the future (colorized)
2017-05-16 21:15:32 -07:00
Kurt
f674d45854 Misc changes
Properly handle egg hatch counters for generated mystery gifts, as well
as HT friendship for gen6+
fetch form specific (friendship doesn't change but abilities fetch
species specific data later, so just fetch once up front). Do not depend
on save file as SAV7 importing PGF may have different abilities
allocated
Pad buttons for folder popup
fix double Japanese/International error message for importing jpk1<->pk1
2017-05-16 20:34:24 -07:00
Evan Dixon
e254ec7c37 Activate illegal mode with commandline arg
Workaround for PKHaX being broken. Trimming each argument allows "hax", "-hax", and "--hax" to all work for activating illegal mode.
2017-05-16 20:55:24 -05:00
Kurt
1659405dc4 Add quick folder open menu item
Closes #1137
allows loading of tab separated value text file "savpaths.txt" which can
also be used to 'favorite' locations (ie, the program checks for
duplicate paths and only adds the first).
folder availability checked on form creation

shortcut: press ctrl-F on main window

Thanks @sora10pls !
2017-05-16 16:27:43 -07:00
Kurt
2bfa98db09 Refactor dragdrop managing logic
Relocate class out of main form for reusability/less lines in main.cs
refactored to be a bit more oop
2017-05-16 08:56:13 -07:00
Kurt
6f64c9be8e Fix update check url
version txt was in core project prior to refactor

Also restrict 3IV randomization to gen6+ (sub)legends.
Closes #1131
2017-05-15 08:27:19 -07:00
Kurt
404651774a Further simplifications
Gender color display was copypasted everywhere, now just call the gender
color method.
2017-05-13 12:51:33 -07:00
Kurt
5ec3521d48 More c#7 shorthand
outs & pattern matching, other simplifications
2017-05-13 10:20:25 -07:00
Kurt
aeb90d262c Cleanup 2017-05-12 09:33:12 -07:00
Evan Dixon
52c4fbbe97 Converted PKHeX.Core to .Net Standard
Refactored and rearranged things as needed to allow the change
2017-05-11 23:34:18 -05:00
Kurt
1b7e0e630c Add template loading when sav loaded
Closes #1114
Loads a template file (if it exists) instead of applying default
template info when a new save is loaded. No formats are hardcoded, as
ck3!=xk3!=pk3!=bk4
2017-05-10 19:24:58 -07:00
Kurt
6d9cbaaec0 Add IOException type write protection check
per recent forum thread
2017-05-10 19:01:01 -07:00
Kurt
d05d6c44f4 Misc ec/pid tweaks
use the encryption constant (pk3-5 return PID on get), fix gen4 using
gen5 correlation
2017-05-03 23:14:34 -07:00
javierhimura
758adf2cff Encounter Type fix and detection of pokemon that should have evolve on trade (#1105)
* Detect encounter trades that evolve on trade and have not been evolved
Detect generation 1 pokemon with special catch rates : krabby trade and Pokemon Stadium
Detect generation 1 pokemon that evolve on trade and have been traded but not evolved
Detect pokemon with tradeback status any but with only encounters from the other GB generation, that means they are WasTradeback
Detect pokemon with moves from the other GB generation, change tradebackstatus to WasTradeback

* Fix dppt surfing and fishing encounter type, is is surfing because the battle background is the same as other surfingfishing encounters

Fix headbutt encounter type, the encounter type depends on the battle background used when battle a pokemon, for headbutt it changes with the player tile, is the player is in a city it will be building encounter, in a grass tile tall grass, in water it is surfingfishing and cave inside a cave. Some locations have more than one possible encounter type, for example routes with trees near the grass, near the water and near non-combat tiles.

Also added slot type headbutt special for the special trees, those trees are all in routes and are only adjacent to non-combat tiles

* Fix encounter type for missing areas with multiple grass encounters types: Mt Coronet, Mt Silver Cave and Stark Mountain (Issue # 1095)

* Fixes and typos

* Check for non-japanese e-reader pokemon, is unreleased
2017-05-01 08:07:20 -07:00
Kurt
6efdf64bab Cleanup
Update some comments, adjust performance/flow. No functional changes
2017-04-26 22:05:32 -07:00
javierhimura
b14ac67c1f Generation 1 and 2 legal Improvements (#1099)
* Refactor parseMovesForEncounter to gather valid moves for species encounter, some Pokemon can have valid encounters with different source species from the encounter, the valid moves change if the encounter species change because some preevolutions moves are illegal if pokemon caught already evolved.
Example, generation 1 Pikachu that can have a RBY Pikachu encounter and GSC Pichu encounter, the valid moves for the first encounters should not have any Pichu exclusive evolution moves

Also assign the encounter match from gb when parsing moves like the variable Encounter Match, to store the encounter that is valid for the pokemon moves instead the first encounter.

Store the species encounter, this will be needed to check if the evolution is valid for species that evolve leveling with a given learned move

* Add Tradeback Status to the pokemon, this variable for generations 1 and 2 use data like the catch rate to determine if trade between generations 1 and 2 was possible.
If analysis is for VC games tradeback have value NotTradeback for every gen 1 pokemon, but for cart saves some pokemon can be determine that have not been tradeback, if catch rate match species catch rate but do not match a valid generation 2 held item that means the pokemon habe been never traded to generation 2 games, that allow to discart encounters and moves from generation 2.

Also if is not tradeback catch rate is used to filter encounters, catch rate determine in what species was captured the pokemon discarting some preevolutions moves

Also add option for generation 1 cart save analysis to check legal status not allowing generation 2 games, like VC games but with Stadium allowed, like the generation 1 non tradeback rules from Smogon

Also change evolution chains to included generation 2 preevolutions for gen 1 pokemon if tradeback was possible, it is needed to avoid parsemoves to check illegal pokemon like Hitmonchan with Tyrogue level up moves

* Check legal values of generation 1 type and catch rate
Replace pokemon catch rate after changind pokemon species always if pokemon was not tradeback from generation 2, the catch rate will keep unchanged only if it can be a held item and do not match species catch rate (default item)
Also if catch rate is changed use base species catch rate to avoid legal errors if the catch rate of the evolution species if is not possible with the current moves

* Filter ingame trades and static encounters with catch rate for generation 1 non tradeback

* Fix min moves for generation 1 metapod encounter

* Clean up

* Fix encounter level for generation 1, valid moves are those with one level after the encounter level, pokemon can not learn a new move until level up
Clean up type validation
Fix generation 3 fatefull encounter eggs, the pokemon lost the fatefull mark when it hatch

* Clean-up

* Use new variable EncounterSpecies when it is needed to detect the species of the encounter, the old code wont work if the encounter is a wild slots array

* Fix generation 1 evolution chains and catch rate as default held item

* Fix Generation 1 Yellow Pikachu and Kadabra catch rates
2017-04-26 21:27:59 -07:00
pokecal
c2f1fb4df6 add G4 BattleFrontier controls
Editable many values. It seems a batch button needs,
but little demand, I have not made it.
2017-04-22 21:40:02 +09:00
Kurt
ef35055d4e Fix directory not found issue
Thanks ArcticLoveBunny!
2017-04-19 18:47:42 -07:00
Kurt
757cf11f52 Database improvements
Reduce linq usage (toarray) and just use the actual index
Implement GetHashCode for Mystery Gifts to only add unique data arrays
#1071
2017-04-19 03:15:54 -07:00
Kurt
5d9962d102 Mark SAV as unmodified upon load
Closes #1076
seems kinda lazy as I didn't bother tracking down the suspect that
modifies the save (presumably the hex seed values); those should load
correctly and not change any bytes.
2017-04-17 23:36:46 -07:00
Kurt
8a8b43948b Improve visual interactivity with storage slots
* Replace the background with a frosty partially transparent image to
snap user attention to the hovered slot
* change cursor to hand symbol when over a draggable box slot
* remove duplicated resource references
* remove unused line in rtc3
2017-04-13 23:05:19 -07:00
Kurt
bbc6915114 Add RTC Editor for Gen3
FRLG doesn't have an RTC, so only permit the editor on RS & E.
2017-04-13 19:11:01 -07:00
Kurt
bb97c0ffef Update wurmple check
wurmple index was calculated incorrectly
update main form EC reroll; now that legality checking (and gen1->7) is
implemented the legality indicator will alert the user to their error
instead.
2017-04-12 21:38:53 -07:00
Kurt
dbae1fb932 Tweak gameselect parameters
Combo items are now localized automatically by specifying the game IDs
and using the gameinfo values. (odd style is to support eventual message
localization).
program title now indicates XD/C/Batrev instead of just SAV(generation)
2017-04-10 16:28:44 -07:00
javierhimura
5e87608079 E-reader Berry (#1050)
* E-Reader berry improvement
Load from the savegame the name of the e-reader berry and show in the item list that name instead of enigma berry if there is any e-reader berry data stored
Also check Legality of the berry, as enigma berry is unrelead in generation 3, but if there is e-berry data if check if the e-berry name is from one of the released cards

* Fix Shedinja moves check in generation 3 format

* Update comments, e-berry code is based in Suloku work for the gen 3 wc-tool

* Move e-reader comunication with Legality class to Main.cs
Remove curly braces in GameInfo

* Undo all changes in SaveUtil.cs
2017-04-10 15:59:16 -07:00
Kurt
0d8a58d3ab Cleanup
reduce nesting & complexity by splitting into smaller methods
fetch species list on boot instead of every gen1pkm
misc style fixes
2017-04-09 17:43:05 -07:00
Kurt
06f778ac92 Add event nicknamed fishy flag
Also updates lang translations for incorrect/missing strings

(ps: uncomment the line in main to copy the current localization strings
to clipboard for ez paste replace into notepad)
2017-04-09 16:38:29 -07:00
Kurt
691493cafe String editing refactor
Move all sanitization operations from PK* and SAV* to PKX; add general
method for fetching a generation specific string
Changes the Text subform editor to show trash bytes when appropriate.
Special characters to be shown can be easily inserted in the future.
2017-04-09 14:06:50 -07:00
pokecal
7d430387f8 add Gen4 MiscEditForm
there is now only a tab Poketch.
2017-04-08 18:20:16 +09:00
suloku
1dc5831921 Added Honey Tree Editor for DP and Pt savegames. (#1029) 2017-04-06 17:39:36 -07:00
Kurt
b789478a25 Add friend safari cheat macro
Thanks @suloku !
#330
resx stop being goofy
2017-04-04 18:58:32 -07:00