Commit graph

35 commits

Author SHA1 Message Date
Kurt
8312c52cc1 Make Move[] readonly list
contract: don't modify the template movesets
mystery gift now exposes IRelearn, remove unnecessary type checks
2020-01-18 16:46:38 -08:00
Kurt
3d581283c2 Minor clean
move Text.cs manual Courier new() to the designer, have it dispose when form is disposed. Set it as the numericupdown's font and just reuse that :)
2020-01-05 18:46:30 -08:00
Kurt
bfd9bf6b53 Simplify formchange calls
Don't use the dex chain for certain checks, it's unnecessary.
2019-12-28 19:00:01 -08:00
Kurt
827a7649c1 Export PCD/PGT as encrypted format
add Write method for writing the data outside the program; only use Data
if you know what you're doing!
2019-12-24 23:24:28 -08:00
Kurt
53cec64e5e Add recognition for dropped wc8 files 2019-11-16 09:35:14 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
4be35890e7 Make some usages generic 2019-10-24 18:10:23 -07:00
Kurt
02420d3e93
PKHeX.Core Nullable cleanup (#2401)
* Handle some nullable cases

Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization

* Handle bits more obviously without null

* Make SaveFile.BAK explicitly readonly again

* merge constructor methods to have readonly fields

* Inline some properties

* More nullable handling

* Rearrange box actions

define straightforward classes to not have any null properties

* Make extrabyte reference array immutable

* Move tooltip creation to designer

* Rearrange some logic to reduce nesting

* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum

* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case

* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable

* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator

* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever

* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)

* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
2019-10-16 18:47:31 -07:00
ReignOfComputer
2b39d75141 Allow Open WB7Full / WB7 (#2304) 2019-05-13 15:35:40 -07:00
Kurt
332784d34b Misc updates
parameter name lowercase
simplify some comparisons/calcs
reuse comparison methods
wrap memory dump into readonly struct
2019-05-11 00:59:07 -07:00
Kurt
d975081a86 Add short/long name property differentiation 2019-03-17 22:19:37 -07:00
Kurt
e7531dca30 Add wr7->pkm
Not sure if one of the 'level' fields is a move ID instead. Pound=1,
Level=1
Maybe a Chansey record would shed more light.
2018-12-29 23:33:36 -08:00
Kurt
78ff441e8b Update iencounterable api with new criteria arg
rearrange some logic for clearer function (extract some methods)
2018-12-29 22:24:34 -08:00
Kurt
2d75e93ef0 Move encounter matching logic to iencounterable
generator logic is now clean
2018-12-27 01:00:08 -08:00
Kurt
59af7fef35 Remove unnecessary properties 2018-10-05 19:57:45 -07:00
Kurt
1fe304e78f Rework mg nick/lang checks
add common interface

https://projectpokemon.org/home/forums/topic/47295-bug-event-golduck-name-not-matching-species/
2018-08-30 18:09:52 -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
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
8e950e83b3 Rewrite ability verification
Closes #2040 , adds test cases:

invalid bulbasaur.wc3: hidden ability
invalid charmander.pcd: hidden ability
valid camerupt: gen3->4 unevolved mismatch
valid leafeon: pcd mismatch -> evolved now matching

should be much easier to maintain; methods are reused with less overall
nesting
2018-07-02 20:34:41 -07:00
Kurt
177604e2cb Refactoring
Simplify some verifier logic
2018-06-30 15:01:16 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
a0eb658ef2 Extract minimum trainer information requirements
If one wanted to extend ConvertToPKM to other IEncounterables, this
would be the provided obj containing the receiver's info

allows pkm gen without a savefile, which is nice?
2018-03-28 15:55:19 -07:00
Kurt
0f21fc2217 add location interface for verbose analysis output
indicates met location for transferred mons
most gen1/2 encounters won't show values due to the location not being
stored respective to the string tables (anyone wanna do a location remap
after initial load?)
2018-01-02 12:00:41 -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
6394dac19f Rework mysterygift pkm sprite generation
don't bother converting to pkm then generating the sprite off that; use
the overload with int/bool

removes sav/pkm dependency for generating gift descriptions, and
standardizes the names a little. maybe a PKMBase interface would be
useful...
2017-11-18 11:34:23 -08:00
Kurt
9ef4152736 add more xml docs 2017-11-06 22:44:51 -08:00
Kamron Batman
83e06b4436 Adds WC4 support. 2017-11-06 16:26:34 -08:00
Kurt
a46e56c917 Add xmldoc for mystery gift class names
refactor pattern checking to simpler representation, add null abort when
extension is not provided.
2017-10-23 15:45:58 -07:00
Kurt
1e377c2963 interpolation++
no functional change (assumed)
2017-09-29 22:58:25 -07:00
Kurt
2a2f5669e4 Add wc3->pk3 conversion
fixes 10ANIV pikachu having Thunderbolt twice
un-duplicates CHANNEL event data
adds seed->PIDIV generator template for M1/2/4, CXD, Channel, and BACD

improve pkm converter to update nickname of hatched eggs. isn't perfect
(farfetch'd) but works better than before
2017-07-15 18:36:55 -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
82750de1b8 Add initial gen3 event detection
egg events supported, only some gen3 event distros supported
will eventually flag for PIDIV type mismatching

@kamronbatman
2017-05-29 00:48:25 -07:00
Kurt
a70a4d5e3f Switch to c# 7 get/set expressions
Add gen5 battle box locked flags
no functional change otherwise, just shorter
2017-05-12 20:32:43 -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
Renamed from PKHeX/MysteryGifts/MysteryGift.cs (Browse further)