Commit graph

2421 commits

Author SHA1 Message Date
Kurt
a368b81519 Minor clean 2019-11-18 22:48:03 -08:00
ReignOfComputer
0ef6f024d6 Wild Area Updates from #2416 (#2459)
https://github.com/kwsch/PKHeX/issues/2416
2019-11-18 22:21:13 -08:00
Kurt
f88388cb70 Add Form (AltForm) to IEncounterable interface
All of the encounterable templates have Form anyway; funny that I was
consistent naming them all differently than pkm.AltForm :)

Closes #2452
2019-11-18 22:20:55 -08:00
iiippppk
4a82b424ce Use simplified Chinese characters (#2458) 2019-11-18 21:35:21 -08:00
ReignOfComputer
6d95fa5884 Wild Area Updates from RoC's PC (#2456) 2019-11-18 20:26:38 -08:00
Kurt
1df90199e3 Rework GetBaseSpecies to return EvoCriteria
#2452
2019-11-18 20:26:11 -08:00
Kurt
5a4c026dc7 Restrict egg related species fetch to EvoCriteria
#2452
2019-11-18 20:10:39 -08:00
Kurt
535397cf5e Consolidate egg ctor with args
Form is an absolute requirement for the encounter data.

#2452
2019-11-18 20:01:48 -08:00
Kurt
2b76fe148d Fix property reference for Darmanitan-G
lul
Closes #2453
2019-11-18 19:29:05 -08:00
Kurt
5e1937d8b4 Fix fossil8 to unbreedable
Not needed in the HA banlist table since it can't breed.

Closes #2451 thanks @iiippppk !
(undiscovered egg group)
2019-11-18 19:26:01 -08:00
Kurt
1ea3976805 Split up Encounters8
Nests in their own file
Encounter types in their own files
2019-11-18 19:23:01 -08:00
Kurt
e9fdc721df Add chewtle 2019-11-18 18:42:10 -08:00
Kurt
86796cd67a Add accessor for TrainerCard block 2019-11-18 17:57:33 -08:00
Kurt
adf33404b3 Add Trainer Card block 2019-11-18 17:57:18 -08:00
Kurt
21c3b4e1b1 Add Ribbon interfaces to WC8
pretty silly but gets the job done
Closes #2446 by fully implementing all ribbon checks possible
2019-11-18 17:37:38 -08:00
Kurt
d7d2db8764 Add ribbon index enumeration and extension methods 2019-11-18 17:00:57 -08:00
Kurt
674152aa25 Add Mark interface 2019-11-18 17:00:16 -08:00
Kurt
fac5182d4b Add a ChangeAllCount to current value dropdown 2019-11-18 16:25:27 -08:00
Kurt
5cf58dbb5f Fix dex clearing on setting altform/gender 2019-11-18 16:21:11 -08:00
Ammako
acf5df07be Box Layout fixes (#2449)
* Enforce box name length in Box Layout

* Fix G4 box renaming

* Fix G7 box renaming
2019-11-18 16:01:36 -08:00
Kurt
3aa3a29264 Add 3 more static enc locations 2019-11-17 22:04:52 -08:00
Kurt
38abafab99 Catch some evolution edge cases 2019-11-17 22:04:41 -08:00
Kurt
47be249331 Rework evo tree chaining to track form
Now recognizes & reverses form-changing evolution chains like Sirfetch'd

basically the whole process is to build the tree but point in the
opposite direction (for de-evolution paths)
2019-11-17 21:45:53 -08:00
Kurt
2c11632a3c gen6 Un-truncate box names
Closes #2445 ty @Ammako
2019-11-17 20:41:40 -08:00
Kurt
4bcf60746b Add egg move sharing checks
Was referencing wild caught mons that are given a single egg move; this
logic handles shared egg moves too via daycare.

Probably need to rework SplitBreed into a dictionary; this might not
catch Mime/etc split breeds if they have different tables.
2019-11-17 17:14:21 -08:00
Kurt
c2dce518c2 Invert sign of fake met locations
Suggested encounters check < 0
2019-11-17 16:03:53 -08:00
Kurt
d4c5919e5e Revisions for some static encounters
Identified a few more
2019-11-17 15:50:41 -08:00
Kurt
fa169ff61c Fix box binary / pcbin export
19784aaa41 (diff-37bd5b548e2b340e5c38fd0961a3eb04L880)

Was just exporting blank data, lol

https://projectpokemon.org/home/forums/topic/55436-issue-with-box-data-binary/
2019-11-17 14:04:04 -08:00
Kurt
13adc38ee8 Add elemental tutors
Closes #2443
Capture some array references to avoid re-fetching array -- array
reference is readonly so it probably won't matter
2019-11-17 11:13:57 -08:00
Kurt
ea822e9fcd Add raid flawless IV check (speculation) 2019-11-17 09:55:27 -08:00
Kurt
86a20afe8e Minor style fix 2019-11-17 09:47:10 -08:00
Kurt
d077d8549e Add alcremie form display for dex edit
Nothing for the PKM Editor; not sure how I want to handle the reused
FormDuration work value.

For the meantime, just use the Batch Editor for a targeted write.

Closes #2441
2019-11-17 09:34:04 -08:00
Kurt
23c04cf809 Add beast ball to wild balls 2019-11-16 22:22:21 -08:00
Michael Scire
4227343a62 WC8: Add SWSH Pokeball Plus Mew 2019-11-16 22:13:44 -08:00
Kurt
f20f6cd4bb Only check east asian script chars on gen7&below
Closes #2437 thanks @iiippppk !
2019-11-16 17:47:26 -08:00
Kurt
31c09c52e8 Add initial nieve check for ball inheritance
Closes #2438
2019-11-16 17:45:51 -08:00
Kurt
915c2d52b1 Update handling for non-competitive set import
Gen3 item paste -> Gen3 item import => take item ID as is
once parsing moves starts, break if any following lines are not move
lines
Closes #2412 , thanks @The-Fireplace  !
2019-11-16 16:34:28 -08:00
Kurt
d981dc57e1 Handle ’ ' edge case
#2412
2019-11-16 16:21:17 -08:00
Kurt
31f9a5f4d8 Correctly locate pk8 foreign transfer checks 2019-11-16 16:05:45 -08:00
Kurt
08c1534cee Lock sha256 for multithreaded use
Opening the database can result in multiple threads trying to hash at
the same time with the same sha256 object, so just gate it behind a lock
2019-11-16 15:46:45 -08:00
Kurt
524ceb7bf9 Fix dracozolt species ID
heh dunno how that happened
2019-11-16 15:02:32 -08:00
Kurt
3e4127b9e1 Track Gigantamax flag for set data
Closes #2436
2019-11-16 14:37:33 -08:00
Kurt
dbda5e6934 Update comments
align all, add location text for motostoke 3(4) encounters
2019-11-16 14:37:00 -08:00
Kurt
025cf69eeb Switch pkm export formats to party format
Now dumps party format bytes
Cons: more space
Pros: stats are retained, especially when users drag-drop.

Closes #2419
2019-11-16 14:03:25 -08:00
Kurt
22fb1c8e8f Fix - show daycare tab on sav5/7
Closes #2434 thanks @Ammako !
2019-11-16 13:19:41 -08:00
Ammako
6d61a97247 Fix Gen. 2 key items and balls (#2432) 2019-11-16 13:15:09 -08:00
Kurt
0716e50fd6 Add Gigantamax owned flag logic
Closes #2430 ty @igniscitrinus !
2019-11-16 13:10:46 -08:00
Kurt
e5bd026eec Add static crustle location
ty @ReignOfComputer
2019-11-16 12:46:24 -08:00
Kurt
ce4cd2c60f Add non-levelup evo methods to validator 2019-11-16 11:52:40 -08:00
Kurt
83388cc6fe Add missing memecrypto clear
See the SAV7SM.cs constructor... yeah oops!

A hotfix has been posted (committing after I upload!)

Closes #2415 thanks @Ammako !
2019-11-16 11:44:48 -08:00
Kurt
d65e3369c9 Add toxtricity evo check
refer to sub_71007805B0 for algo
2019-11-16 11:01:00 -08:00
Kurt
3be4fde2d5 Prevent non-galar forms for wild match
uses the same logic as the wild area boost lines above
2019-11-16 10:35:08 -08:00
Kurt
53cec64e5e Add recognition for dropped wc8 files 2019-11-16 09:35:14 -08:00
Kurt
b172008981 Fix Check All behavior
- Gender specific forms now set the correct flags
- Regular click on Check All doesn't set shiny flags
- Shift click on Check All sets shiny flags too.

Closes #2425 thanks @igniscitrinus !
2019-11-16 09:28:32 -08:00
Kurt
29d52e065f Don't generate invalid sister-pair eggs 2019-11-16 09:00:05 -08:00
Kurt
dfcd93bfff Fix alcremie form list, use toxtricity0 amped
https://projectpokemon.org/home/forums/topic/55410-alcreamie-mismatches/
2019-11-16 08:46:59 -08:00
Kurt
ab25038b58 Update max gen, add pk8/wc8 to dropdowns 2019-11-16 08:25:05 -08:00
Kurt
502adc6d74 Don't throw exception on setting giftused
needed in mystery gift db to clear flags (why idk)
2019-11-16 08:24:46 -08:00
Kurt
d7657f948d Update documentation for techrecord flag methods
Allow an ienumerable of moves rather than a readonly list
2019-11-16 08:18:57 -08:00
Kurt
d1e9bc3877 Update evo dictionary and unreleased list
#2416 thanks @AnalogMan151
2019-11-16 08:18:12 -08:00
Kurt
d3b2a798fa Fix evo via move check (tsareena)
Closes #2427
2019-11-16 08:01:49 -08:00
Kurt
87bb8f3b3f Fix record clear 2019-11-16 08:00:58 -08:00
Kurt
981ed9a253 Add technical record flag editor & api 2019-11-15 23:12:28 -08:00
Kurt
848737b2a0 Remove giga gender lock
can be female
2019-11-15 21:05:19 -08:00
Kurt
19784aaa41 Update box format size get
fixes importing and exporting concatenated binaries
2019-11-15 21:01:22 -08:00
Kurt
025e36c5fc Add treasure items to valid held item table 2019-11-15 19:50:22 -08:00
Kurt
ab7e920410 Update toxel static encounter def
flawless attack IVs, yay
2019-11-15 19:43:09 -08:00
Kurt
451694da28 Flag past gen transfers
not valid yet
2019-11-15 19:37:04 -08:00
Kurt
522d219b3c Re-cap berries at 999
Closes #2414 , thanks @SatoMew !
2019-11-15 18:06:31 -08:00
Kurt
199570b12d Update 19.11.15
Introducing Sword/Shield support!

Legality is still a work in progress, and documentation of encounters
and game features with respect to save data is ready for community
effort!

-Kurt
2019-11-15 17:52:08 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
d59764f25f
Fix keyitem reference
Closes #2410 ty @PKMWM1
2019-11-01 23:12:31 -07:00
Kurt
a6b6383538 Handle more messages
un-nest some classes, tooltip/menu disposing
2019-10-27 20:39:15 -07:00
Kurt
b8835facd5 Rename public "pkm" properties to non-lowercase
lowercase = local variable or private member
2019-10-27 12:57:04 -07:00
Kurt
ba593800d8 Keep text/value as get properties
Needed for binding in winforms, oops
2019-10-27 12:47:09 -07:00
Kurt
9401b7a790 More readonly struct tweaks
help dat compiler
minor clean elsewhere
2019-10-26 23:18:25 -07:00
Kurt
46640d48a3 Misc clean
un-nest classes,
move some logic to core,
update some get-only properties that return arrays to methods
2019-10-26 12:58:55 -07:00
Kurt
fcc993784b Rename abstract pkm inherited class names
leading underscore for a class name = pls no
2019-10-26 12:42:33 -07:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
64a5c30356 Add 4th uint of fashion data
struct is really 16 bytes, and female uses 8 bits of the final uint
Closes #2407
2019-10-25 19:54:50 -07:00
Kurt
1c418e8394 Add advanced format output
groups together by encounter slottype (grass, water, etc) for a little
more detail
2019-10-25 19:53:32 -07:00
Kurt
5dcee4fb9a Set random moves if GetMoveSet yields invalid set
Closes #2406
No clean way to check for these edge scenarios, so just double check the
moveset and return random moves if we fail
2019-10-24 18:11:25 -07:00
Kurt
4be35890e7 Make some usages generic 2019-10-24 18:10:23 -07:00
Kurt
f0b320eb28 Remove [Relic Gold] from g7 item banlist
Closes #2404 ty @CaptainBarnaklez (aka Glitch Guide Gabe on Discord)
2019-10-20 15:55:13 -07:00
Kurt
bb84ec4e89 Handle some vs message suggestions 2019-10-19 20:33:17 -07:00
Kurt
12a8dc66b6 Fix displayed bit set for gen6
Zukan5/6 was pushing 0 for the formBit, which was an incorrect value. I
probably should have abstracted things since gen5/6 don't behave the
same as gen7

rewrite the SetDisplayedFlag for more clarity, and to early-return
without checking displayed state if the flag is being cleared.
2019-10-19 18:24:37 -07:00
Kurt
923b581fed Fix language flag set
looks like it was unfinished
2019-10-19 18:18:44 -07:00
Kurt
f77f0e8a4b Keep gen6 dex form flags
oops, forgot to include ...(+ i)

ty @Ammako

https://projectpokemon.org/home/forums/topic/55244-pokedex-displays-shiny-version-of-transfered-pokemon/?do=findComment&comment=249665

no need to set editing flag as I'm not changing anything

have sav6xy use the sav6xy accessor interface instead of the main one
2019-10-19 17:38:01 -07:00
Kurt
3b0fd81aae Rework & fix party slot deletion
Two birds with one stone:
- sav4 doesn't use Data (instead uses General/Storage), so we need to
use the abstracted method calls instead of trying to do things manually.
- setting a blank pkm at a party slot will decrease the party count!
don't decrease things twice.
2019-10-18 21:10:39 -07:00
Kurt
c3a6fd2a64 Handle bad gennumber indexes
Maybe returning 0 for "bad gen" will prevent bad array indexing...
2019-10-18 20:50:38 -07:00
Kurt
d4ce0644c8 Simplify block property names
[...]Block -> [...]  since it's kinda redundant, we already know by its
type.
Rename offset ints that collide
2019-10-18 20:42:03 -07:00
Kurt
4302347366 Show missing editors
yay useless integer stores instead of checking if an interface is
implemented
2019-10-18 20:26:41 -07:00
Kurt
abe87eb369 Relocate maison stats to block access 2019-10-18 20:13:21 -07:00
Kurt
e05d75eeb7 More training bags
giff swsh
2019-10-17 23:02:01 -07:00
Kurt
c24851129f Add super training block details & to block access
Use some properties in the super training editor, not gonna rewrite that
even though it really needs it :)
2019-10-17 20:13:17 -07:00
Kurt
fee92e4f32 Handle past gen transfer evochain for new evos
basically Math.Max(2, format);
we always want permissible evo chains when fetching encounters
Closes #2403 ty @Rayqo !
2019-10-17 18:23:50 -07:00
Kurt
cf955e9fc7 Fix sav7 init
guess I never launched this format the entire week
2019-10-16 19:08:13 -07:00
Kurt
2367fbd69a Add docs for super training block 2019-10-16 18:49:01 -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
Kurt
a70769dc76 Remove static encounter voltorb def
unused ingame; only electrodes are static

Closes #2399, ty @steph9009 !
2019-10-11 08:19:35 -07:00