Commit graph

218 commits

Author SHA1 Message Date
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
ed1b934374 Misc refactoring
expose some useful IEnumerable methods (sorting / bin->pkm / copy) to
simplify some common operations
change some explicit arrays to IList for flexibility
remove old memecrypto bool (no longer necessary as XP is not supported)
rename some methods for more clarity
2017-09-28 22:20:27 -07:00
Kurt
d8c2cdb8e3 Use EnumerateFiles over GetFiles in some cases
https://msdn.microsoft.com/en-us/library/07wt70x2.aspx

iterating as an ienumerable (ie not consuming the whole collection) can
be more efficient by not waiting for the whole collection
2017-09-23 17:02:28 -07:00
javierhimura
f3743e490b Korean language restrictions
Restriction happens because Korean can not trade with non-Korean GB era games
- There is no Korean release for gen 1 pokemon, included VC
- With no gen1 pokemon means any Korean gen2 is Gen2_NotTradeback, that means no gen1 origin nor moves are Legal
- Crystal was never released in Korean
- Pokemon Stadium 2 was never released in Korean, that means no move reminder for gen 2 korean pokemon

- Generation 4 can not trade between Korean and not Korean games, but Korean games can use the palpark with any language

Chinese language restrictions
There is no Chinese release for gen 1 and 2 pokemon games, VC Chinese games are in Japanese
2017-09-23 20:46:10 +02:00
Kurt
6e579abfc3 Misc changes
* allow gen2 to have evolutions on gen1 when transferred to gen7
(Core.cs)
* handle korean strings on transfer slightly better (pk2.cs)
* auto-set johto location when changing game ID
* auto-detect VC saves (all have extensions with .dat)

Closes #1478 , thanks @NinFanBoyFTW !
2017-09-22 17:54:43 -07:00
Kurt
b13a7c9624 Add gen2 VC/Physical selection prompt
#1477
2017-09-22 15:50:19 -07:00
Kurt
28dbdcf992 Disable box dump for saves without boxdata
really only orasdemo only; all others were already disabled
2017-09-21 21:35:01 -07:00
Kurt
7efd771bf4 Misc refactoring
add docs, move some data fetching to more appropriate class
remove old XP memecrypto support handling, was previously removed due to
net standard/core split
refactor memecrypto to handle multiple save sizes (USUM won't be the
same size save file); placeholder -1 for USUM size
2017-09-16 11:38:58 -07:00
Kurt
35049a5b5b Update thread path
Closes #1382
2017-09-07 21:47:18 -07:00
Kurt
432ca847f6 Add debug build identification
shows up prefixed by "d-" and the date modified (compiled)
helps identify shared non-release builds
2017-09-04 13:40:04 -07:00
Kurt
249c08b062 Add gen-sensitive deoxys sprite fetching
Closes #1327
2017-07-16 14:05:29 -07:00
Kurt
8ffe2257db Add cancel abort
Cancel no longer defaults to the latter (no/LG) option
closes #1321
2017-07-11 18:01:20 -07:00
Kurt
502093b8b2 Misc tweaks
fix pcd detection (yield brewk needed to be inside brackets
remove brackets from single line lambda expressions
2017-07-05 23:05:49 -07:00
Kurt
80e2d55999 Tweak alt-click preview sprite behavior
Closes #1293
2017-07-02 21:27:22 -07:00
Kurt
4e9b6be8e5 Convert console output to debug output
output messages are now no longer in release builds, as they are only
visible when debugging in an IDE.
2017-07-01 19:43:51 -07:00
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
wwwwwwzx
06f54bb3d0 Gen3/5 Ability Check Fixes (#1056)
* Fix gen3 abiltiy legality check

Seperate Ability (AbilityBit i.e top bit of IV32) and AbilityNumber
(PID)
Fix in-game trade Electrode's ability

* Fix function deal with "encountermatch is int"

Keep encountermatch as null after UpdateEncounterInfo

* Fix gen5-7 ability check

Consider ability capsule
gen5 personal table have HA, ability_count won't work
Some simplification and avoid duplicate invalid message

* Simplify ability check

Use bool? to mark 3 states
GameVersion CXD needs more info

* Temp fix gen3 in-game trade ability check

Lickitung have 2 regular ability at gen3, there is a AbilityBit and
AbilityNumber mismatch
Guess those ingame trade have static PID

* Change abilitybit to bool and revert change

revert change in UpdateEncounterChain.
let egg encounter / null encounter choose vs.Last().Species as before

* Update Chinese legality translation strings
2017-04-14 16:24:41 -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
wwwwwwzx
015bdc606b Misc gen4 legality checking fixes (#1025)
* Fix hgss safari zone encounters

* Add fishing slots at night (hgss)

* Fix Japanese Special Character (gen 4)

* Add gen4 ball with HA legality checking (gen7)

Males can pass the ball with HA females ONLY when they have the same
pokedex number

* Add safari ball with HA checking (gen7)

* Fix ball legality checking for shedninja

Poke Ball only

* Map Unicode Chinese characters to in-game chars

Chinese species names in sun/moon were remapped by GF.

* Add nickname legality check for east asia language

Can not give Chinese or Japanese kanji nickname to pkm.

* Remove hiding nickname textbox for chs/cht

Since remapping and legality checking are implemented, There will be no
strange character or misunderstanding.
2017-04-03 20:02:40 -07:00
Kurt
3ae6256459 Refactoring
Adds game selection subform for RSEFRLG/Memcard game selection
Backs up entire memory card instead of just gci when loading from
memcard
Reduce string usage (easier dialog translation if that ever happens)

Does the memory card store date last saved? Could be used to autodetect
the last saved game and load directly instead of selecting.
2017-04-02 13:42:42 -07:00
javierhimura
ab67bf0d60 Split memory card files extension for bin and raw files.
Raw is the extension used by Dolphin and Bin is used by Wii Devolution, both have the exact internal format and size
2017-04-02 17:36:50 +02:00
javierhimura
699dadcccb The UI was checking wrong if a pokemon is shadow or purified
The internal data of GC games for purification for shadow pokemon does not have values from 0-non shadow to 100-total shadow, it have values sarting from the initial shadow hearth gauge to 0-non shadow.
2017-04-02 17:10:40 +02:00
javierhimura
a38e923e83 Load pokemon savegames directly from gamecube memory card files. This files can be saved again in the same memory card file or exported as a gci file with only the savegame.
Do not allow to resize memory cards nor create a new memory card from a gci files
If the MC contains multiple save files the program ask the user what game he want to edit
2017-04-02 16:53:46 +02:00
Kurt
288aee8c3b performance tweak
only do the flicker hack if the combobox is actually visible
delay form appearing until initial files are loaded
2017-03-29 22:23:18 -07:00
Kurt
f2c072bc8a Fix gen2 slot set
Fixes #1007
Closes #1008 with a slightly different implementation of the validation
check; other fixes for legality incorporated. Thanks @javierhimura !

Note for the Electrode encounter: both PIDIVs should be method 1 (not
J/K) thus only one is kept in the array.
2017-03-29 17:43:17 -07:00
javierhimura
aecd3f9738 Fix error loading save from gen 2 when pokeball does not have elements 2017-03-26 18:24:02 +02:00
Kurt
7d45b5c4fb Fix levelup egg pre-relearnmove check
Closes #991
2017-03-25 19:57:41 -07:00
Kurt
047d7a0ae5 Add more event recognition
Transferred events 4->5+ now recognized (met location checks for
transfer value)
Re-mapped gen3 AbilityNumber to gen6 style (1/2/4)
Add gen3 egg hatch location suggestion, gen3/4 met level
2017-03-24 22:41:45 -07:00
Evan Dixon
056318d108 Altered the order of operations in language changes
Fixes a bug where language changes would not apply in new implementation of legality string translation
2017-03-24 13:18:14 -05:00
Evan Dixon
a80a2489a4 Refactored implementation of #959 2017-03-24 12:59:45 -05:00
Kurt
121a821180 Fix clickOT order of operations
Closes #976
subregion was set first, but changing the country caused it to reset the
subregion to 0/existing value.

thus, load country first then subregion (why not move 3DSReg first 👍
)
2017-03-23 18:10:14 -07:00
Kurt
38bcfe30cc Add setting for unset changes notification
opt in setting
resx too goofy

Closes #970
2017-03-22 18:02:05 -07:00
Kurt
eb8b9602b2 Add pkm modified & unset alert
Same for save edited check on closing, this will alert the user if View
is called without the data being Set first.
2017-03-21 23:25:17 -07:00
Kurt
503a9b9d71 Finish legality string translation feature
Same " = " separator as the main form translation, uses the cache style
in GameStrings to only load once.

Closes #959, feel free to discuss there.
2017-03-21 21:40:33 -07:00
ReignOfComputer
6f7c8e73a0 Dump Single Box (#962)
* Dump Single Box

Probably can be better optimized or something. The code works, the thing
is I can't seem to edit the Menu Items to add this in as it causes the
view to go haywire. VS can be silly sometimes. For your consideration :)

Related:
https://projectpokemon.org/forums/forums/topic/40358-how-to-export-all-pokemon-in-boxes-as-pk7/

* Manual Design Edit of Main
2017-03-21 00:21:03 -07:00
Kurt
3027eadb8d Refactory legality strings
For future translation feature as per #959
3 helper methods provided to facilitate the localization (import /
export / update)

I decided to simplify some duplicate-function sections
2017-03-21 00:18:44 -07:00
Kurt
127d2c2aaa static analysis fixes
fixes the friend safari form checks (if else were chained incorrectly)
argumentorder of some unused sections (BV date, canlearnmachinemove)
2017-03-20 00:03:31 -07:00
Kurt
deac1724c7 Add gen4/5 event concatenated binaries
events now show up in the event browser too

pcd(4)/pgf(5) will be used for encounter matching by the legality check.
2017-03-19 16:19:59 -07:00
Kurt
ab88f5b4e2 Fix application path detection
Launching from args sets the Environment.CurrentDirectory to that of the
files that launched the program; instead we want the
Application.StartupPath (where the exe is, which is where our backup
files are).

Closes #948
2017-03-19 10:42:48 -07:00
Kurt
a099d18c9c Alpha 3-5 legality checking
Incorporates files from #190
Skeleton added for future implementations; currently missing gifts,
encounter info, and the fine tuning that follows.
Basically sets up areas for future implementation... feel free to submit
pull requests filling in the EncounterStatic/EncounterTrade blocks with
the basic info. I'll probably focus on gen5->4->3 in terms of priority.

Encounter slots need to be marked up for encounter slot legality (yay
32bit RNG), and will be used for PIDIV detection too.

XD/C is not in this round of implementation. Pretty much every pkm 3-5
will show up as invalid until this round of dev is finished.
2017-03-18 16:50:34 -07:00
Kurt
9106896909 Update 170318
Updates event binaries
Clear AllowGBCartEra if not gen2.

lookin at u 3-5, 4/7 over 50%! /cryptic
2017-03-17 22:27:59 -07:00
Kurt
5423390863 Misc tweaks
Remove duplicated SAV pkm set method (byte[] instead of PKM, was unused.
All it did was getPKM(decryptPKM(data)).)

Tweak Seen/Caught count expression body to use the HasPokeDex bool, as
GB(A) games did not use the PokeDex int offset. Things were simpler back
then :)

Remove unnecessary toarrays

fix 3->4 items being deleted even if they were valid
be nice and allow held item to transfer 4->5 if it can still be held

invert purification values, heart gauge is [-100,0] not [0,100]
2017-03-16 21:20:16 -07:00
Kurt
cc5b065a39 Force validation when exporting data
Apply same logic to PKM exporting; the existing setup was manually
triggering validation by changing focus; now just call the
ValidateChildren method on the form.

Closes #936
Thanks @Storm-Eagle20 !
2017-03-12 17:01:48 -07:00
Kurt
fe66a65464 Misc updates
Closes #860 by adding in prompt for Gen1 saves to determine if the save
originated from VC. Will disable Gen2 legality sources when checking pk1
files.

--

Fixes froslass/gallade evolution tree pruning movesets. For whatever
reason, the level argument of the Evolution is not 0 when using the
item; I manually edited the evos_sm.pkl binary to set the 2 evolutions
from [XX] -> 00.

Fixes gen1 ingame trades slipping through the getEncounter12 preference.
Gen2 has set TIDs, so check if TID is set.

Loosens checks for Gen7 trades (including prior transfers) as trading
between games clears the memory.

Add 3 more g7 trainer stat records too.

Thanks Holla!

--

Add getMoves(100) optimization as gen7 learnsets can grab 1->100, better
than looping over the range every time it's checked.
2017-03-12 16:36:23 -07:00
Kurt
bcbebf73ff Refactor qr server fetch & add notification 2017-03-10 20:35:18 -08:00
Kurt
0715f133d2 Add misc info editor for gen3
Closes #193
If there's more offsets found, this would be the place to edit oddball
stats.

Also threw in BP/Coin (& Rival Name FRLG only) editing.
2017-03-09 19:38:57 -08:00
Kurt
4874c174d8 Add gen4 pokedex editor
Fixes the setDex implementation for gen4
why u have to be so weird gen4
hgss has 0x1C extra form flags in the first form array... unused?
2017-03-06 22:43:46 -08:00
Kurt
199257fabd Re-add selectionlength
only use it when repopulating move legality
skip repopulation when clicking moves or met location since it's updated
at the end of the respective method
2017-03-05 20:00:27 -08:00
Kurt
5ecf01e481 Add gen5 pokedex editor
Cloned and modified from XY's editor

might as well simplify the dex setting for gen5. / -> >>, % -> &
2017-03-05 17:34:30 -08:00
Kurt
8550253842 Add gen3 pokedex editor
Uses SimplePokedex form since the pokedex is currently simple
2017-03-05 16:40:57 -08:00
Kurt
a76b549a49 Switch MessageBox usage to util
Use the WinFormsUtil implementation of alert/prompt
2017-03-04 17:21:33 -08:00
Kurt
529f8d1348 Misc profiling improvements
ResetBoxes reduce method calls for new blank/setting, just set data.
160ms->4ms

ComboBox Validation calling SelectedText.Length=0 no longer needed 3y
after it was originally added.
268ms->0ms

speeds up main thread by a third of a second (wowww), but the
selectedtext removal makes the program snappier during regular use
(loading/modifying)
2017-03-04 09:38:39 -08:00