replace linq for Encrypt/Decrypt pkmdata fetch with faster length check
& optional resize (Span pls!?)
update pk6 comment for why affection is not cleared
use 'u' to denote uint values, so that less IL ops are required
~(21->17) in the case of IVs
no functional change, just a fun exercise looking at generated IL and
finding ways to use less ops
hide setters for LegalInfo outside assembly (shouldn't overwrite the
stored values)
update GenNumber to Gen* if appropriate; GenNumber checks for first Gen*
to match, is a little more explicit and quicker than calling twice when
checking a range
Set default values to prevent any properties from being null
extract ClearNickname logic for hot path & reusable method
extract item conversion and move to appropriate logic class
be explicit that the string is empty rather than possibly missing
disallow encrypted export for BK4 (they're not encrypted), removes type
check
simplify replaceall in showdownset (don't call ReplaceAll 4x, just get
valid chars and rebuild)
simplify get ribbon sprite name (precompute ToLower and appended values
still isn't close enough, but removes the usage of decimals for cp calc.
redd.it/ahac9i
CP calc doesn't flag anything I have that is legal, but the calc is
still off by 2 bits at most... whyyyy? Even the same code run in cpp
results in the same inaccuracy? Maybe this is some arm64 difference?
showdownset: contains char instead of string
gameinfo: static readonly array instead of redefining new on update
legality: order of operation / value reuse / simplification / comments
pkx: compare char instead of single character string
header/footer: move assignment into method as an out instead of ref
Update handler after friendship update (CurrentHandler needs to update
afterwards)
Fix argument order (gender & nonpresent region data)
#2235 side effect
don't continue; instead seek forward
#2235 part 1, need surgery for part 2 (starter/locked prevents writing
data to the slot, but the slot can still be swapped)
reducing allocations, increasing clarity by removing some magic numbers
probably can rewrite some of the evo loading/checking for even less, but
good for now.
All IVs are flagged in LGPE even if they're perfect :(
Might have to revisit this for future games and if LGPE transfer out and
maintain these bad flags (this is bad for inspecting parents before
breeding).
Closes#2229 , thanks @SteelPhase (report) and @sora10pls (verified)!
rearrange pkm version groups for clear break between
twins/siblings/family
clear pokelist for sav7b on non-exportable saves (prevents b1s1 from
showing markings)
rename horohoro (pgo) to non romaji lol, hide daycare/party tabs on
nonexportable save
remove some unnecessary operations
rewrite getallcontrolsoftype to remove ToList() and make generic
remove linq for characteristic calc (get max IV) and others
remove some reliance on new[] for iv/ev
pk5 replace bitmagic with property get->set copy for cleanliness
how did this get forgotten so easily lol
added legality check; eggs can't participate in pokestar studio.
not editable from GUI, use ExtraBytes editor.
Re-add 0x86 (array was copied from pk4?) and reorder/comment
Didn't really feel like pulling out the shared structure get/set
operations, only the derived properties & overall fixer methods. Should
be easier to maintain if any handling updates.
Clean up pb7 unused stuff; removes ribbon logic since none are used.
c# 8.0 interface defaults can maybe pull out more logic (ex making
FixRelearn and relearn moves into an interface); multiple inheritance
can be useful as features are added/dropped between generations.
Make extrabytes a pkm property (don't mutate array pls)
reconfigure startup loading to only initialize after initial load of sav
& pkm (using blanks if not provided)