Commit graph

1196 commits

Author SHA1 Message Date
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
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
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
23c04cf809 Add beast ball to wild balls 2019-11-16 22:22:21 -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
31f9a5f4d8 Correctly locate pk8 foreign transfer checks 2019-11-16 16:05:45 -08:00
Kurt
524ceb7bf9 Fix dracozolt species ID
heh dunno how that happened
2019-11-16 15:02:32 -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
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
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
29d52e065f Don't generate invalid sister-pair eggs 2019-11-16 09:00:05 -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
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
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
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
a6b6383538 Handle more messages
un-nest some classes, tooltip/menu disposing
2019-10-27 20:39:15 -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
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -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
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
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
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
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
Kurt
4baf745af8 Use some c#8 sugar
static local functions
switch expressions
using usings :)

nullable next?
2019-10-07 18:40:09 -07:00
Kurt
87f43a47d8 Bump lang version to 8
some lang upgrades
2019-10-04 20:10:50 -07:00
Kurt
255cdc6ae0 Seal r2
https://www.reddit.com/r/csharp/comments/dd5c1o/til_sealed_override_modifier/

only a few instances for now
2019-10-04 15:56:22 -07:00
Kurt
d3b0c392b2 Minor tweaks
no functional change
2019-10-03 22:21:33 -07:00
Kurt
8d8adde2b1 sealed
sealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealed
2019-10-03 19:09:02 -07:00
Kurt
ffe3a4ba15 Relocate resource naming for sprite fetch to draw 2019-10-03 18:23:40 -07:00
Matt
72a751b9ce Update GO Shiny Banlist (#2397)
oddish family
2019-10-02 20:04:49 -07:00
Kurt
03c3610eb5 Handle level20 transferred feebas edge case
Closes #2394 thanks @iiippppk !
2019-09-27 20:22:54 -07:00
Kurt
7013d4f0c8 add 7->8 transfer legality check
currently flags anything transferred as illegal, which is the right
thing to do until home is released.
2019-09-24 23:28:05 -07:00
Kurt
825e06130e Add nullable reftype compiler checks to test proj
New in c# 8
Assert.True(check for null) doesn't give a hint that the obj isnt null
afterwards.
Assert.NotNull does have the compiler hint attribute
could probably use fluentexpression syntax, but resharper doesn't pick
up on the nonnullable hint like vs does.
GeneratorTests: swap FirstOrDefault to First, can keep the fluent style
and resharper gets the hint.

tl;dr : resharper doesn't look at external lib for hints, gotta use
Assert.NotNull or something that doesn't return null
2019-09-23 18:13:51 -07:00
Kurt
ab0b8979e9
Add swsh content placeholders (#2392)
placeholder content until real data is dumped
2019-09-23 16:56:47 -07:00
Kurt
8912f76726 Clean up super training medal checks
Futureproof with transfer considerations
This is just a guess; gen7 didn't update the medal count and if we
assume pk8 overhauls the structure for a new console, they'll drop old
data.

With c#8 later next week, will move SuperTrainingMedalCount() to a
default interface method ez.
2019-09-20 20:55:36 -07:00