Now accounts for the shiny locks & associated restrictions, abusing the
recursion by setting & unsetting the required CPU Trainer's shiny value.
Repoint all test methods to use the new obj methods
A lot of internal information is nice to have saved; create a copy of
the static class's logic and pepper in some state variables (Required
CPU Shiny Value) to account for the weird edge cases.
Code is essentially the same as the static methods, except for more
fleshed out logic in the AllLock interrupt checking and the eventual
Trainer checks.
Now gets count=2 tests working
yield return new SeedFrame { FrameID = ctr + (l.Seen ? 5 : 7), PID = pid
};
used to be ctr + 6, needs to alternate even-odd
all 2 lock cases pass, but didn't make lock3's pass. Something else is
still amiss :)
break out some classes for the solidified lock objects
Check max case for level first, then iterate upwards (eliminates inner
if)
change wc* nature to sbyte (update comparisons, 0xFF too magic-y)
use Rand.Next(x) instead of (0, x)
More languages than Italian have a rule-breaking name. Rework checks a
bit
Flag eggs more accurately
Update force hatch to move Link Trade met location to Egg Location
fix Ho-oh -> Ho-Oh text strings (correctness is key!)
Thanks @ijuintekka ! Closes#2148
Will check later for commented out tests that should pass.
May end up turning on the first-shadow-lock check feature prior to
release.
Currently toggled off, can be optionally toggled on (I'm not sure that
it's perfect? Random save files have stuff flagged since they don't
match the lock; will have to investigate later)
commented out test calls = not working
will have to debug in more detail later; the first lock is always
working at least.
data sourced from
https://github.com/ijuintekka/Eligor/blob/master/Eligor/Spread.cs , not
sure if it's perfect.
can't cleanly condense deviating team appearances as double-shadow leads
can't be selectively encountered. didn't feel like modding lockfinder's
recursive algo to be smarter.
rearrange getmove with respect to tutors; verifycurrentmoves was getting
tutor moves in levelup
extract not-found hint fetch
Expose gen5 block objects (so I can play with saves in linqpad)
Move logical checks using encounter data out of Core.cs
might be possible to excise legality checking objects from
Legal/PKHeX.Core so that a 'slimmer' core can be made
location ID was originally added by:
afde4514e2 (diff-83a32d69355a64376bc77bd07e338a33R446)
I
have another save file that uses met location 110 (like this one) so I
assume it was originally a copypaste error from Sudowoodo.
Change Trade strings to not allocate separate empty arrays.
can't just re-call base.SetEventFlag with an adjusted flag ID since the
exception checks max.
just override the geteventflag method with a silly adjustment -- we
can't be sure if Block2 is immediately after Block2, so just adjust the
flag r/w to a different offset&flag when appropriate.
fixes r/s badgeflag get/set, oops, meant to modify FRLG's value in the
last commit.
was block2+0x64
8*((0xF80-0xEE0)+0x64) = 0x820
this highlights a critical flaw in event flag reading; it expects the
region to be contiguous in the savedata. it's not. that's super bad, and
event flag r/w for flags >1280 won't work until I work something out
#2128
it's still an imprecise thing, as ingame gifts aren't counted by either
release count isn't tracked, so the number should be roughly >= total
box+party count.
#2126
Receiving a lower leveled species from GSC will evolve it away from the
required species, ruling it unavailable.
Receiving a Machoke will evolve it, so can't reuse for Haunter trade
results in:
- precomputed GetTable() reference
- no casting when iterating for matches
- no db null checks, as they are initally Array.Empty<T>();
reduces noise a little & slightly faster
Remove unused sav properties
Add translatable strings for autodetect SAV error suggestion
add speculated gg dex formtable
- no eevee forms
- increments 1 for pikachu since it already exists in table
- stops at mewtwo (no other formed-species available)
im currently setting up skeleton stuff for lgpe since we're <70 days
from release; by doing some pre-work like prior games I can get a good
idea of what needs to be adjusted prior to crunchtime!
can now check individual strings / identifiers in a LegalityAnalysis
object by:
var la = new LegalityAnalysis(pkm);
var parse = la.Info.Parse;
if (parse.Any(z => ReferenceEquals(z.Comment, LegalityCheckStrings.X))
...
should be faster than doing string.Contains
Closes#2109
Program boots -> load extra locations rather than constantly fetching.
These files won't change location or presence (not an external drive).
just store the locations instead of constantly fetching, we already call
detect once when loading the form anyway.
extract final pkm manipulation logic from pkm editor
add xmldoc to boxmanipulator, add utility class for enum->manip fetching
fix xmldoc referencing removed enum member
relocate boxmanip overview logic to utility class
move SAVPaths file pointer to Main for reuse #2109 , will add to
autodetect in a later commit
open/save dialog with extra extensions: ignore ones already present
V### names weren't enjoyable to work with; use similar verbose style as
the program message strings.
updating the translation files with the remapped variable names shortly
remap list: https://pastebin.com/jybkVDAK
click ball sprite/label to cycle through legal balls
hold alt to use old behavior (set to pokeball)
hold shift to cycle through legal balls randomly (default behavior goes
poke->color->poke)
want to randomize setting balls? use the ApplyBallLegalRandom method at
the end :)
can't really get too fancy as only one color is stored in the personal
data, pkm aren't one single color.
0, [9,19] are set (didn't see 15), but there's also a switch case which
references all values 0-19.
these values are used by a 80 sbyte array (4*20) in the Resort.cro
remove usages of "goto case"
use shared class for pk1/2 setnotnicknamed
fix extendedeurope values (copypaste from extendedAmericas)
move ball out of verifiers, move nature/movetype with ball
move encountertype datasource providing to core
fix rerolling EC not updating characteristic
remove some repeat logic calls
relocate geolocation name fetch to separate class, add tests to ensure
functionality, add languageID->country/region fetch method
could use concurrentdictionary but after reading some perf drawbacks vs
manual locks, just do it manually. regex checking is the real slow part,
whatever
add some comments to describe
hides pid & ec in pkmeditor, gamesync & securevalue in saveditor
easier to share screenshots/stream without leaking identifying
information
fix auto-centering of pkmeditor subwindows when a savefile is detected
on program load(tab_otmisc isn't initialized and reads an incorrect
width)
egg sprites can be a little difficult to see what's underneath (glance
value)
make the new egg sprite method the new default; adds setting to revert
to old behavior
adds translation text for the mega rayq control from #2098
Closes#2095
split out unsketchable moves (struggle/chatter) to separate array
remove trailing spaces (auto fixed by my visual studio plugin), add
space before comment //
use trainerstat editor control in gen6 editor
fill in some details from the disassembly via setrecord usages
still slightly fuzzy on some:
fureai (based on usum idb name, similar logic)
soaring sky counts
looks like there's some other usages of the fields which were outside
the stat range, throwing an exception when loading to NumericUpDown,
added bypass logic
Thanks Holla!
calling Japanese ? X : Y on every single access is too excessive, just
compute one layout for each type whenever the first sav1 requires it.
could probably reduce the amount of properties by reusing others + shift
value; offsets are different due to string lengths being different
Logic is essentially identical; implement a base class and have the
generation specific structures implment the differences.
Reduce the verbosity a little
pk1 boxdata stores current level & current hp, which is only present in
pk2 party data.
if the user drops in pk2(boxdata), the transfer leaves 0 for both
values, which isn't correct.
detect stat_level to determine if values should be regenerated or not.
Thanks HaxAras for finding this :)
some cards may permit being recieved on incorrect games
some wcxfulls permit games they shouldn't (tapu koko flags permit USUM
but games released after the distribution window)
lots of wcx lacking restrictions completely
tested flagging USUM rockruff & zeraora
might be worth discarding MysteryGiftVerifier and instead just using
unused fields for prior formats to supply the data.
use some close synonyms (Reiniciar -> Borrar)
omit some words (potential / training) to keep layout compact
capitalize Equipado to match main window
Closes#2080