Manu
2f44d7486f
Italian translation for lang_it.txt and LegalityCheckStrings_it.txt ( #3508 )
...
* Italian translation for lang_it.txt and LegalityCheckStrings_it.txt
* Readme update
* Update README-it.md
2022-06-01 11:51:08 -07:00
Kurt
dc7889cc70
Extract common logic from sidegame struct
...
Fix size & offset on blank gamedata ctor
SIZE is the inner struct size, not including the 3byte header for type+len.
2022-05-31 19:03:56 -07:00
sora10pls
7d20363d6b
Update プロポチャ Piplup end date
2022-05-31 20:21:55 -04:00
Kurt
cd8797da30
Fix PKH clone & crypt check when decrypted
...
Closes #3507
2022-05-31 05:42:24 -07:00
Kurt
5bcccc6d92
HOME 2.0.0: Handle conversion behavior & restrictions ( #3506 )
...
* Revises legality checks to account for traveling between the three game islands (PLA/BDSP/SWSH)
* Adds conversion mechanisms between the three formats, as well as flexible conversion options to backfill missing data (thanks GameFreak/ILCA for opting for lossy conversion instead of updating the games).
* Adds API abstractions for HOME data storage format (EKH/PKH format 1, aka EH1/PH1).
* Revises some APIs for better usage:
- `PKM` now exposes a `Context` to indicate the isolation context for legality purposes.
- Some method signatures have changed to accept `Context` or `GameVersion` instead of a vague `int` for Generation.
- Evolution History is now tracked in the Legality parse for specific contexts, rather than only per generation.
2022-05-30 21:43:52 -07:00
Kurt
af2ac169e1
Only disallow catchrate enc if !tradeback
...
Closes #3501
2022-05-30 00:50:35 -07:00
Kurt
ba19efb793
Fix gen8 mysterygift shiny xor check
...
lol oops
Closes #3500
2022-05-30 00:30:15 -07:00
Kurt
32e0bf95b0
Update LevelVerifier.cs
...
Closes #3499
ty @Ninjistix !
2022-05-19 22:07:09 -07:00
sora10pls
52082e0e9f
Add latest distribution raid data
2022-05-19 20:03:48 -04:00
Lusamine
0b50d6d4ac
Label SWSH Poke Job Storage Block
2022-05-18 00:03:59 -05:00
Kurt
8338c97719
Add PokeJob flag get/set
2022-05-17 21:32:31 -07:00
sora10pls
4847735a99
Only display Lord/Lady forms for Generation 8
...
Future-proofing. We know that Hisuian Zoroark is in SV, as well as Petilil, so if Hisuian Lilligant is also present, we need to not show Lady Lilligant in the form dropdown for those games.
Also only show Primal Kyogre/Groudon for Gens 6/7 (can be revised later if they come back in SV).
2022-05-16 09:25:45 -04:00
Kurt
50ce6a92db
Revise stadium detection if no teams set
...
Closes #3494
Thanks @keiyakins !
2022-05-15 14:05:10 -07:00
Kurt
a5b46d80f5
Minor tweaks
...
ShowdownSet: Lessen allocation
MoveTutor: Remove boxing by calling the generic method instead of object method
Xoro8b: Add more xmldoc, use positive constant instead of inverse negative for parity
StadiumUtil: Use built-in endianness reversal methods
2022-05-14 08:28:13 -07:00
Kurt
c113ded3b7
Reorder OT comparison check so string checked last
...
Less allocation.
2022-05-14 08:21:19 -07:00
Lusamine
4e703b7c9e
Correct ordering of SWSH rental team blocks
2022-05-13 20:02:41 -05:00
sora10pls
75f9f39cbf
Add BDSP Hall of Origin unlock cheat
2022-05-13 17:25:18 -04:00
Kurt
700236249f
Treat random gendered slots correctly
2022-05-10 21:52:01 -07:00
Kurt
53e99ee238
Allow parsing enum values if property is enum
...
Can now search `=Gender=Genderless` for filtering PLA encounter slots
2022-05-10 21:48:56 -07:00
Kurt
2a6026cc80
Load gender values for forced gender slots
2022-05-10 21:46:45 -07:00
Kurt
63784d748d
Update LegendsArceusVerifier.cs
2022-05-09 21:24:10 -07:00
Kurt
a21d6c8248
Fix static8a move population
2022-05-08 19:08:44 -07:00
Kurt
bc054c09ed
PK5: Clear party stats on import
...
Add property get/set for the undocumented fields
2022-05-08 18:36:18 -07:00
Kurt
69794e7328
PK4: Add Seals & Ball Capsule index
...
0xD4 + 0x18 = 0xEC = 236 bytes -- end of data!
2022-05-08 13:16:41 -07:00
Kurt
0206475ba4
Update LegendsArceusVerifier.cs
2022-05-08 12:33:30 -07:00
Kurt
8c4db878dd
Extract logic to set initial mastery move flags
...
Are we done yet
2022-05-08 10:28:22 -07:00
Kurt
178e5e8bc5
More mastery tweaks for db->pkm + alpha statics
...
in the RNG generator, defer alpha move mastery flag set for templates to set themselves
2022-05-08 10:06:38 -07:00
Kurt
3e8527f11a
Minor tweaks
...
Reduce allocation in a few places, delete unused stuff, more concise expressions.
2022-05-07 21:25:26 -07:00
Kurt
82fae7b350
Revise moveshop move suggest methods
2022-05-07 21:21:29 -07:00
Kurt
ccf87242c1
Eliminate boxing on encounter search (criteria)
...
struct implementing interface is boxed when passed to method that accepts interface (not generic method).
Removes IDexLevel (no other inheritors but EvoCriteria) and uses the primitive the data is stored (array, not IReadOnlyList) for slightly better perf.
2022-05-07 18:29:36 -07:00
Kurt
e4794efbfe
Split up csproj PropertyGroup for nuget metadata ( #3492 )
2022-05-07 17:30:42 -07:00
Kurt
e34d03d2e5
Update 22.05.08
2022-05-07 14:30:16 -07:00
Kurt
a9443be8fa
Add bypass for alpha move purchased
...
ty @Atrius97 for finally nailing the repro on this
Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-05-07 13:48:47 -07:00
Kurt
178069f889
Minor tweaks
2022-05-07 11:47:01 -07:00
Kurt
51a8dbaeac
Merge branch 'master' of https://github.com/kwsch/PKHeX
2022-05-07 10:56:56 -07:00
CanoeHope
fd3cce0005
Update const_gg_en.txt ( #3491 )
2022-05-07 10:56:24 -07:00
Kurt
baa0a8185d
Move to more appropriate folder
...
Pretty sure I've moved this back and forth before, but this is better not in the inner PKM group.
2022-05-07 09:26:49 -07:00
Kurt
8bf0469289
Remove allocations in SpeciesName helpers
...
Only allocations that remain are the runtime `new string(...)` that is required for the gen1-5 species name quirks.
Inlines some logic for language fetch, and requires slightly less memory.
2022-05-07 09:25:04 -07:00
Kurt
58caa37d58
Push alpha move for fixed statics
...
Oops
2022-05-07 08:52:00 -07:00
Kurt
a57f40ae7d
Break up PKX into separate classes
...
Many years ago, PKX used to be a >4,000 line bloated file, which spun off multiple classes like CommonEdits and most of the early non-GUI PKM related logic. Now, it's just a stub to source the latest generation & personal table.
Separate files = more concise info, and more room to grow to do more advanced things.
Makes the IsPresent methods public (no longer internal).
2022-05-06 20:38:55 -07:00
Kurt
124bbf98ad
Allow seed of mastery toggling mastered flag
...
oops
2022-05-06 16:11:52 -07:00
Kurt
59ceec3c65
Extract EffortValues class, add $rand + $suggest
...
Renames IV/EV verifier field objects for Legality Checks due to class name clashing.
2022-05-06 15:47:54 -07:00
Kurt
be9c947dd6
Use tuples and ComboItem, not anonymous class
...
Little more explicit
2022-05-06 15:43:51 -07:00
Kurt
9deafa851a
Create initial movesets for Alpha entities correctly, verify initial mastery ( #3489 )
...
* Draft checks for encounter slot mastery
* Check encounter mastery flags
* Add moves for LA static encounters that don't follow learnset
* Add moves on crossover LA static encounters
* add alpha moveset population method
Now generates and applies moves as the game does
Updates some handling of other methods to use Span
* Show better message for bad mastery init flags
* Insert descending if candidates have same level
Level 78 Yanmega:
- [01] [10] Quick Attack
- [06] [15] Gust
- [11] [20] Silver Wind
- [18] [28] Hypnosis
- [25] [35] Air Slash
- [34] [45] Ancient Power
- [43] [54] Crunch
- [43] [54] Bug Buzz
Yields:
AlphaMove
Crunch*
Bug Buzz*
Ancient Power
* Descending order due to iteration
Co-authored-by: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-05-06 15:43:23 -07:00
Kurt
232c65ed3a
Update EncounterServerDate.cs
...
Closes #3488
Co-Authored-By: CanoeHope <43196464+CanoeHope@users.noreply.github.com>
2022-05-06 10:49:05 -07:00
Kurt
6e94eaaaee
Add overload for ITrainerInfo blank fetch
2022-05-06 10:42:08 -07:00
Kurt
75874b6b81
Show lock capsule slot in mystery gift editor
...
Closes #3487
editor getting hacky, but it works
2022-05-05 21:21:03 -07:00
Kurt
4c73f1c592
More strict alpha move check for statics
2022-05-05 20:21:21 -07:00
Kurt
ea87140aea
Remove optional gameversion for enc generators
...
Simplifies some of the logic a little.
2022-05-04 22:28:39 -07:00
Kurt
824e868efe
Flag non-pokeball GO shedinja (evo'd from nincada)
2022-05-03 20:17:28 -07:00
Kurt
7c8f52cbbf
Minor clean
...
invert nesting, add missing if( space, group OT checks together
2022-05-02 23:48:25 -07:00
Kurt
d58aed109d
Add Current Box Changed flag for sav1/2
...
Flag not set causes the game to clear all boxes (except current box) to clear garbage sram if saves never cleared. Yay deferred execution?
2022-05-02 23:47:41 -07:00
Kurt
b51cdfe72f
Flag Marks on BDSP/PLA encounters
...
Note to self: Exclusion lists aren't futureproof; inclusion more resilient :)
2022-05-02 19:27:22 -07:00
Kurt
5132f961cc
Add server date checks for WA8 gifts
2022-05-02 18:52:43 -07:00
Kurt
41578132cf
Minor tweaks
...
Add Get/Set Relearn method to PKM.cs
Alpha Mastered move now indicates incomplete text entry (like moves/relearn)
Split up legal move indication helper class, use DI to allow other implementations of DataSource to be returned (pkhex mobile?).
Remove unused gender refresh method (see previous added UserControl commit)
Add helper method to center control within control
2022-05-02 18:11:31 -07:00
Kurt
fa76da56c9
Inline some Rand32 calls
...
No functional change
2022-04-26 20:21:26 -07:00
Kurt
b55d706785
Only encrypt pk4-based pgt data
...
Closes #3484
ty @DeadSkullzJr !
2022-04-26 19:50:02 -07:00
Kurt
af141581ee
Minor tweaks
...
Single underscore discards (one of the c# language revisions allowed reusing the single underscore discard).
Remove a temporary allocation in BDSP flag editor
2022-04-26 19:48:09 -07:00
Kurt
5be9863ef4
Sanitize gender on species/form change
...
clean up some if expressions
2022-04-25 17:30:16 -07:00
Kurt
ecee948107
Add gender sprites for main GUI
...
Might trickle this out to the other editors that have gender toggles.
2022-04-24 20:28:56 -07:00
Kurt
1f49574be1
Fix g6 hof len
2022-04-23 22:05:51 -07:00
Kurt
ef3cb34387
Refactor EvoCriteria to be a struct, reduce allocation ( #3483 )
...
* Make EvolutionCriteria struct
8 bytes per object instead of 26
Unify LevelMin/LevelMax to match EncounterTemplate
bubble up precise array type for better iteration
* Inline queue operations, less allocation
* Inline some logic
* Update EvolutionChain.cs
* Improve clarity on duplicate move check
* Search reverse
For a dual stage chain, finds it first iteration rather than second.
2022-04-23 21:33:17 -07:00
Kurt
959b9e998b
Only flag r45 roamer if tile is water
...
Grass Tile is okay.
2022-04-23 21:10:09 -07:00
Kurt
f5358e0e37
Update HoF6 entity editing
...
Reusable entity struct, no more overlapping fields
Adds OT Gender, fixes some flags.
Thanks L1nk2futr3 !
https://projectpokemon.org/home/forums/topic/60977-hall-of-fame-tid-resetting-gen-6/?do=findComment&comment=275575
2022-04-23 10:42:56 -07:00
Lusamine
9d3f61b708
Fix MMO roll count
2022-04-23 00:44:55 -05:00
Kurt
ff2e890e69
Revise Overworld8a application of PIDIV
...
Instantiating from template now follows group seed -> spawn 1 correlation, including alpha move.
Differentiates static encounters that don't follow the ow8a correlation, scrambles EC to disassociate.
Adds rand64 to get initial seeds
Set correct level range to match slotSeed; not respecting the slot roll being valid, but whatever.
2022-04-22 21:11:11 -07:00
Kurt
ad249dbb76
Differentiate MO + MMO slot types
2022-04-22 20:33:12 -07:00
Kurt
e90f19c962
Add setters for spawner objects
...
UnknownSeed->CountSeed
Seed_01 -> AlphaSeed
yay, no more unknown seed functionality, all documented.
2022-04-18 22:25:34 -07:00
Kurt
b297351d20
Fix clone deletion, add unique get func
2022-04-17 14:58:52 -07:00
Kurt
515a503ee4
Update spawner models, import from permutemmo
2022-04-17 14:54:54 -07:00
Kurt
a61d8d1efc
Extract IMultiplayerSprite from SaveFile
...
only used by gen6 saves
2022-04-15 14:58:40 -07:00
Kurt
a681783f1a
Extract interface for SaveBlock, allow strict
...
External users shouldn't be using SaveBlock
2022-04-15 11:45:04 -07:00
Kurt
ac7947fd66
Misc tweaks - static namespace using
2022-04-15 09:54:12 -07:00
hp3721
f740e1dd72
Fixed rebattling BDSP trainers ( #3481 )
2022-04-14 18:36:01 -07:00
Kurt
841fcde2b2
Enhance Pokerus api functions
...
Fixes #3480 ; (0,0) is a valid state regardless of format.
2022-04-14 14:05:32 -07:00
Kurt
5f4bbcf8de
Permit 0x1FF00 saves as stadium saves
...
Closes #3479
emulators are stupid
2022-04-13 10:42:35 -07:00
CanoeHope
adcbc0221f
Update LegalityCheckStrings_ja.txt ( #3478 )
2022-04-11 15:10:04 -07:00
CanoeHope
cf901861e7
Update Shortcuts and Legality texts ( #3477 )
...
* Update LegalityCheckStrings_en.txt
* Update LegalityCheckStrings_de.txt
* Update LegalityCheckStrings_es.txt
* Update LegalityCheckStrings_fr.txt
* Update LegalityCheckStrings_it.txt
* Update shortcuts.txt
2022-04-11 15:09:42 -07:00
Kurt
f753afaae8
Minor clean
2022-04-11 11:56:56 -07:00
Kurt
a5ee845c3b
Decouple event flag/work from SaveFile
2022-04-09 18:12:57 -07:00
Kurt
a601180821
Extract Pokerus util logic
...
Simplify some GUI interactions when changing strain. Changing the day selection will update the visibility, no need to manually do it again.
2022-04-09 12:27:16 -07:00
Kurt
2f9e05972f
slick switch expression
...
Might be a target for future refactoring if Format(int) is changed in the future...
2022-04-09 12:25:19 -07:00
Kurt
5260c5214e
Move files
2022-04-09 12:01:43 -07:00
Kurt
0389624508
Extract unnecessary stringbuilding from pkmconvert
2022-04-09 11:58:52 -07:00
Kurt
e6cf5d0baf
Split PKMConverter into multiple classes
...
EntityFormat -> detects byte[] -> ctor() PKM
EntityConverter -> converts between pkm formats
RecentTrainerCache -> used by other classes (not within EntityConverter!)
EntityBlank -> creates blank PKM objects indirectly
2022-04-09 01:39:34 -07:00
Kurt
d3749bd4b6
Minor tweaks
...
Move sociability
inline dictionaries
2022-04-09 00:08:24 -07:00
Kurt
cc1c3e8d42
Refactor stat loading to allow spans
...
Can load stats without allocating
2022-04-08 21:08:06 -07:00
Kurt
274b613487
Change signature to set stackalloc ivs
2022-04-08 20:43:31 -07:00
Kurt
d40bfa63c7
Refactor gen2 mail data structure
...
Now reads/writes correctly in the GUI.
Closes #3470
Not going to handle slot swaps not matching the data, as this becomes problematic when cloning slots. Previous commit added the ability to manually move mail slots.
2022-04-02 23:36:56 -07:00
Kurt
cec408e62a
Use different checksum algo (bytewise) if no impl
...
Closes #3471
2022-04-02 17:58:47 -07:00
Kurt
647b5a3f87
Remove duplicate home tracker flagging
2022-04-02 17:58:17 -07:00
Kurt
77473476da
Split savedata editing template
2022-04-02 17:58:05 -07:00
sora10pls
1a082ecf04
Unban Darkrai, associated Met Locations, Sketch Dark Void
...
Also reformat Encounters8b to be consistent with other games' static encounter defs
2022-04-01 06:18:11 -04:00
sora10pls
1b39222edf
Add April Fool's 2022 distribution raid data 🌲
2022-03-31 20:03:40 -04:00
Kurt
6deaf3cb74
More explicit type checks for Encounter class
...
A little more explicit on what it is actually checking for
2022-03-26 14:53:15 -07:00
Kurt
55083ee02c
Fill(0) -> Clear()
2022-03-26 13:33:58 -07:00
Kurt
977e977dbf
Rewrite GeniusCrypto (XD/Batrev)
...
More clear usage of span
slightly less allocation+copying
more comments for future readers
2022-03-26 13:28:29 -07:00
Kurt
8bf618008a
Remove structconverter
...
Won't work on bigendian architecture for non-byte fields, so just do it manually.
2022-03-25 19:47:23 -07:00
Kurt
6a96ad2278
Disallow loading invalid BDSP savefile versions
...
rom hacks smh
2022-03-25 19:24:37 -07:00
Kurt
b91031cb14
Remove temp method
...
*PLA method handles Legends: Arceus
*BDSP method handles BDSP
this one caused (NPC) (NPC) for location :)
2022-03-25 19:24:15 -07:00
Kurt
2cbdd5dbe6
Add gen4 pokedex extdata reader
2022-03-22 10:25:53 -07:00
Kurt
68e3a4430d
Handle japanese RSBOX memcards
...
First 5 blocks are reserved for file accessing info, but we should include them when checking length
Closes #3468
Capture the bool indicating Japanese for the save file, so box names are now read correctly (if changed from game's default).
2022-03-21 19:20:06 -07:00
Kurt
46c83faa0e
Refactor hall extradata to read as a separate block
2022-03-21 18:53:24 -07:00
Kurt
0dc641453b
Condense some expressions
...
Getting close to weeding out all the easy inefficiencies to make me finally tackle the "stop gathering all moves instead of checking individual moves" allocation issue.
2022-03-20 23:28:18 -07:00
Kurt
3d759e1491
Move location lists to separate classes
2022-03-20 21:26:56 -07:00
Kurt
a4533b62d8
Reduce size of display-able met location arrays
...
shaves 5KB off the core DLL
2022-03-20 19:07:33 -07:00
Kurt
fadcf92dc8
Faster pokecrypto
...
net6 was 4x faster than 461 with the old implementation; now it is faster for both but not as disparate.
New implementation performance is always at least 30% better than the old implementation; even better for smaller chunks of data (40% less time).
Pretty much mimics bare metal value writes
2022-03-20 02:44:36 -07:00
Kurt
54f1e341f9
Spanify spawner object get
2022-03-20 01:46:24 -07:00
Kurt
1a26ecbf40
Update 22.03.18
2022-03-18 15:59:07 -07:00
sora10pls
f94c16c40f
Add new distribution raids 🦴
2022-03-17 20:04:14 -04:00
sora10pls
5b9b5e4faa
Update Tables8bs.cs
...
Sweet Heart still unobtainable (why did they give it a sprite if it's not functional ingame?)
Azure Flute is now obtainable
Sacred Ash was never obtainable
2022-03-17 14:40:35 -04:00
sora10pls
df408ced45
Revise Shining Pearl Hall of Origin location string
2022-03-17 13:29:40 -04:00
Jonathan Herbert
9222bfa919
Fix BDSP V1.3.0 Suffix ( #3465 )
2022-03-16 08:01:25 -07:00
Kurt
9aa5bbea2d
BDSP v1.3
2022-03-15 19:24:17 -07:00
Kurt
434f89fa0f
Merge branch 'master' of https://github.com/kwsch/PKHeX
2022-03-15 19:23:20 -07:00
Kurt
9a0f9f5119
Minor tweak
2022-03-15 19:23:13 -07:00
Kurt
70ea1f7048
Move some files around
2022-03-15 19:23:03 -07:00
sora10pls
5c8d1ceeec
Unban BDSP Ver. 1.3.0 locations + Sketch Judgment
2022-03-15 21:36:26 -04:00
Kurt
d91d242719
Stackalloc EV/AV checks
2022-03-13 22:33:17 -07:00
Kurt
5942a74147
Expose SpeciesID3 for CK3/XK3
...
Closes #3463
Not going to add unobtainable species IDs to the GUI.
2022-03-13 19:53:46 -07:00
Kurt
d95ba482f3
Reduce allocation in methodfinder IV set
2022-03-13 19:39:38 -07:00
Kurt
d5ae6764aa
Stackalloc IVs for template->pkm fill
2022-03-13 19:24:08 -07:00
Kurt
8f8726ac5e
Disallow encstatic1 yield catchrate not tradeback
2022-03-13 18:29:47 -07:00
Kurt
8afc6814eb
Disallow matching BU statics for non-JP
2022-03-13 17:45:01 -07:00
Kurt
4841a01b4e
Update GO pickles, move Shiny.Never before Always
2022-03-12 17:39:01 -08:00
Kurt
801892b59e
potential revisions for gible ( #3462 )
...
ddc6f414df
caused it to be `<=` instead of `<`, but maybe the underlying issue was fixed a different way since all tests still pass with this reversion.
2022-03-12 17:39:01 -08:00
Kurt
69fafcab83
Performance: Slightly reduce allocations in moveset validation ( #3460 )
...
* Reuses move parse result objects for each encounter parsed in a LegalityCheck attempt, instead of creating a new object.
* Ensures the objects are never-null, and makes cleanup easier.
Slightly adjusts some other parts of the moveset validation to reduce allocations.
2022-03-12 17:39:00 -08:00
Kurt
93255efcb8
Disassociate Shiny enum from WC6 PIDType ( #3461 )
...
Have `Shiny.Random` be `0`, so we can skip init on this field for EncounterStatic. Plus makes it a little less brittle for future expansion if shiny qualities change.
2022-03-12 17:38:59 -08:00
Kurt
85b7541c9f
Update EncounterArea1.cs
2022-03-10 18:04:39 -08:00
Kurt
2e6364dceb
Fix pk2->pk1 nickname copy
...
nobody noticed until I did
2022-03-10 18:00:45 -08:00
Kurt
b45ce123da
Show rainbow bean index
...
14 -> 15
Clean up some API functions
2022-03-08 21:02:06 -08:00
Kurt
5359a140a6
Handle fixed ability for 8b RNG
2022-03-08 08:44:55 -08:00
Kurt
bb8dee1e6c
Return block value
...
oops, refactoring forgot to add return
Closes #3458
2022-03-08 08:36:17 -08:00
Kurt
f77b6fa405
Master moveshop moves on set import
2022-03-07 21:45:46 -08:00
Kurt
1185c63b15
Update MoveApplicator.cs
2022-03-07 21:42:51 -08:00
Kurt
33537465ca
Simplify batch editor loading method
...
Lazy init the all-any-byType sorted string list, static ctor unneeded for some nuget users
2022-03-07 19:42:08 -08:00
Kurt
4e1276a954
-8 bytes from each encounter template
...
saves about ~1MB RAM savings (>=179,142 objects)
2022-03-06 23:25:47 -08:00
Kurt
462ef70ffb
SlotNumber/MagnetStatic int->byte
...
more size reductions
2022-03-06 22:47:03 -08:00
Kurt
ba9d3c95af
Fix bean get/set
2022-03-06 15:33:33 -08:00
Kurt
8f9de86347
Span-ify BreedInfo, saves 10bytes heap alloc
...
the Actual result still needs to leave the stack, so that has to be heap allocated.
2022-03-06 13:04:56 -08:00
Kurt
9049ef99fd
Minor allocation reduction
2022-03-06 13:03:39 -08:00
Kurt
b869107c84
Randomize seed for multithreaded rand
...
ALM runs each legalization attempt in a separate thread, and if things are fast enough, we get multiple threads with the same Environment.TickCount seeding their Rand generator, resulting in the same PID/EC if similar templates are used.
2022-03-06 12:23:11 -08:00
Kurt
7911cd6d5c
Seal some classes
2022-03-06 12:16:36 -08:00
Kurt
e1414a0bea
Move some interfaces to different folder
...
No code changes
2022-03-06 12:06:50 -08:00
Kurt
c51d51d381
More specific primitives for Memories/others
2022-03-06 12:01:47 -08:00
Kurt
47f7efab2c
Update SCBlockAccessor.cs
2022-03-06 00:46:10 -08:00
Kurt
9632ad44fd
Span-ify HiddenPower methods
...
Zero heap allocation Hidden Power bruteforcing via Heap's algorithm
2022-03-06 00:43:49 -08:00
Kurt
41d2dd9294
Update EncounterTrade for Shiny metadata
...
Doesn't need to be stored in most cases
Now permits EncounterTrade1 to be shiny
2022-03-05 21:04:18 -08:00
Kurt
e17483fe46
some linq reduction
2022-03-05 20:03:52 -08:00
Kurt
1c0f842173
Remove unnecessary Clone method for Items
...
Remove linq using by doing things slightly more efficiently
2022-03-05 19:51:16 -08:00
Kurt
1b266c1e4b
Handle PLA MMO formarg deferral
...
Can capture formarg evolved stuff directly in wild
2022-03-05 18:54:50 -08:00
Kurt
3d9c7dc750
Reduce IAwakened from int->byte
2022-03-05 18:46:03 -08:00
Kurt
b20566eb59
Use actual primitive instead of int
...
Some interfaces aren't needed to be exposed as int
2022-03-05 18:30:35 -08:00
Kurt
9696da2eb3
Minor clean
...
Seal ComboItem
Reorder methods for easier reading
Fix BulkGenerator living dex setting CurrentLevel -- needs to be after species,form as EXPGrowth can vary for forms.
2022-03-05 18:13:31 -08:00
Kurt
3c567c0c97
Rearrange some scblock logic
...
No functional change. just increasing robustness
Decouples exportable state from get/set values
2022-03-05 17:46:03 -08:00
Kurt
1370d9ab0f
Merge SAV8 into SAV8SWSH
...
Was originally expected that gen8 was going to be a pair+revision generation, but with BDSP and PLA being totally different games, there's no need to have inheritance complicating a single SWSH class.
2022-03-05 17:34:09 -08:00
Kurt
90b075947d
Move some get/set operations into Accessor class
...
Adds exception-free get/set for revised saves.
2022-03-05 17:33:08 -08:00
Kurt
8f0035a577
Deduplicate savefile constructors
...
No longer necessary as we don't keep BAK reference anymore.
2022-03-05 17:15:38 -08:00
Kurt
8fdd96209c
Deduplicate some logic
...
No need to length check in the SwishCrypto hash check, as the methods pre-check length as well.
Extract checksum footer check for Gen5 saves
2022-03-05 17:14:25 -08:00
Kurt
1f07685921
Update MyStatus8b.cs
2022-03-05 15:17:13 -08:00
Kurt
f3b3f15035
Add exp > lvl100 check
...
stop directly writing EXP values lol
2022-03-05 09:12:43 -08:00
Kurt
3ebf5279cc
Add .X=*Y (property copy) feature
2022-03-04 22:35:04 -08:00
Kurt
d0f2b6eeb5
Add .CurrentLevel=$suggest for min legal level
2022-03-04 22:34:11 -08:00
Kurt
6ae59c509f
IGanbaru int->byte fields
2022-03-04 22:34:11 -08:00
Kurt
7443db3564
Update some xmldoc
2022-03-04 22:34:11 -08:00
Kurt
7cfdb8a466
Move hashing to SCBlockAccessor, fix #3455
...
Fixes #3455 by adding bool for insular sea, and adjusting overall progress values as listed.
Closes #3456 (supersedes)
Updates SCBlockAccessor to eliminate bounds check (integer overflow, which isn't possible with our array size), adds some overloads, and xmldoc.
Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
2022-03-02 18:05:13 -08:00
CanoeHope
e507d4ab91
Update SaveBlockAccessor8LA.cs ( #3453 )
2022-03-01 21:34:37 -08:00
Kurt
e5296fc51a
Add IoA diglett button in Trainer editor
...
Closes #3454
Use ahtb sourced (hash,string) correlation from pkNX to dynamically generate block keys.
Co-Authored-By: Jonathan Herbert <3344332+foohyfooh@users.noreply.github.com>
2022-03-01 21:34:16 -08:00
Kurt
415c5f5560
Update SCTypeCode.cs
2022-03-01 19:09:42 -08:00
Kurt
8c9c5e0198
Update 22.03.01
2022-02-28 23:16:17 -08:00
CanoeHope
e792c038b8
Label a new L:A update block ( #3452 )
2022-02-28 22:47:30 -08:00
Kurt
50828fa1bb
Change some field types, reduce memory usage
2022-02-28 22:46:59 -08:00
Kurt
2991f62052
Reduce allocation for eggmove loading
2022-02-28 18:24:11 -08:00
Kurt
b0f846ae35
Optimize bdsp eggmove bin
...
Strip out unused entries
Use form-less loader format (nothing has formed eggmoves), just let shellos-1 use shellos-0's table.
2022-02-28 18:24:11 -08:00
Kurt
21a77f2197
Guard against invalid egg move indexing
2022-02-28 16:57:51 -08:00
Kurt
d1e62fb6d1
Add dex solitude complete mark checkbox
2022-02-28 00:03:38 -08:00
Kurt
85e422c225
Compress PLA wild bin resource
...
Change the data structure so that different locations are tied to the table, rather than separate usages of the table.
This de-bloats from 344KB->85KB and has less runtime memory consumption.
2022-02-27 15:08:53 -08:00
Kurt
c2f7003f38
Update Encounters8a.cs
2022-02-27 14:13:35 -08:00
Kurt
c2e9401468
Add computed new huge outbreak slots
2022-02-27 13:51:33 -08:00
Kurt
e5e2a3427f
Rename Silver SV->SI
...
SV will likely be the lump for SCarlet and VIolet
2022-02-27 11:16:12 -08:00
Matt
0d96d801ac
Unban Sketch Seed Flare, Oak’s Letter hatch locs
2022-02-27 13:15:01 -05:00
Kurt
ff58d1bb68
BDSP Shaymin encounter uncomment
...
Now available via oak's letter
2022-02-27 09:00:11 -08:00
Kurt
b3cd4dea25
Initial support for PLA-v1.1
2022-02-27 07:56:47 -08:00
Kurt
044dfe46ae
Reduce allocation on encrypt/decrypt
...
Xor no longer allocates
Encrypt no longer allocates byte[0x60]
temp now allocated on stack instead of heap
Pre-size memorystream (prevents 0xF0 allocation)
2022-02-27 01:05:11 -08:00
Kurt
76afe91bbb
Allocation free besides ctor
2022-02-26 21:39:50 -08:00
Kurt
3bef0452d6
Update bdsp underground table for area6
...
819b90f931
Closes #3450
2022-02-26 11:54:24 -08:00
Kurt
dd4c2a349c
Fix moving 5th party slot between boxes
...
Thanks Burning Justice !
https://projectpokemon.org/home/forums/topic/60789-error-when-attempting-to-edit-pokemon-battle-revolution-save/
2022-02-25 16:32:15 -08:00
Kurt
fd07456ee1
Fix boolean value copy changes
...
a5710ee374
2022-02-25 16:10:49 -08:00
Kurt
ccca8abdad
Remove fixedball for go7, reset h/w/cp
...
Now that we have accurate calcs, let's just generate them with the values.
2022-02-25 13:52:50 -08:00
Kurt
a5710ee374
Fix PLA box flag setter
...
nice boo boo matt
2022-02-25 13:29:43 -08:00
Kurt
5a71ecc8bb
Minor clean
2022-02-24 23:17:16 -08:00
Kurt
cd043bce04
Extract egg met location
2022-02-24 23:14:40 -08:00
Kurt
ab62e76505
Handle alolan vulpix suggestion scenario
2022-02-24 22:47:48 -08:00
Kurt
a276975847
Don't throw exception in safe block search
...
Just duplicate the method to return fake default instead of trycatch overhead.
2022-02-24 21:02:08 -08:00
Kurt
32789d5609
Fix WB8 friendship check
...
Similar to WA8 friendship check. Previous personal table repoint didn't work because WB8 have .Version=BDSP.
7b05d0c056
Works fine now.
Closes #3448
2022-02-24 20:17:58 -08:00
Kurt
bdbd9fc899
Add error message if user moves file for backup
2022-02-23 21:53:01 -08:00
Kurt
65130a9ae1
temp fix for some fixed h/w statics
2022-02-22 23:18:10 -08:00
Kurt
fc3f142d16
Update 22.02.22
2022-02-22 21:40:01 -08:00
Kurt
2753927942
Ignore empty slots in pre-filter
...
Add Palma property to PK8 per bdsp disassembly
2022-02-22 07:34:43 -08:00
Kurt
75bd26d056
Add new Illegal (clone/glitch abuse) flag + check
2022-02-21 20:13:27 -08:00
Kurt
0404b94f86
Add support for BDSP 1.2.0 save files
2022-02-21 18:11:35 -08:00
Kurt
5b981f2832
Un-secret the bulk PKM validator
...
Now has its own button next to verify checksums.
2022-02-21 17:46:32 -08:00
Kurt
2870163fff
Don't check handler friendship if already invalid
...
prevents generating an unnecessary exception when gen == -1
2022-02-21 17:46:03 -08:00
Kurt
48742da4ae
Ignore BDSP backup paths
...
"Backup.bin"
2022-02-21 17:45:23 -08:00
Kurt
f1264a1a97
Handle struct default ctor 17.1 handling
...
Closes #3445
2022-02-21 16:11:58 -08:00
sora10pls
91d1a91142
Add Pokémon Day distribution raids
2022-02-21 19:05:34 -05:00
CanoeHope
61821c7986
Add L:A blocks and BDSP event constants ( #3444 )
...
* Update SaveBlockAccessor8LA.cs
* Update work_bdsp_en.txt
2022-02-20 22:46:20 -08:00
Kurt
d5be6254f3
Add logic for PLA wild RNG correlation ( #3443 )
...
Adds structures to read/write saved spawner data such as seeds, counts.
Adds generator and validator to emulate the FixInitSpec builder used by the game logic
Similar to SW/SH raids, validating these in-process is not feasible due to the number crunching required.
This does not handle the encounter slot call or the follow-up level range call. Just the inner FixInitSpec ctor & fill.
level is calc'd:
randFloat(sum) -> slot float
rand.Next() -> gen_seed (for all the details)
rand.NextInt(delta) +min -> level
Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2022-02-20 17:59:48 -08:00
Kurt
f2637168ab
Fix kor string writes
...
Was writing kor string, then writing en after (all terminators).
Make method signature match other SetString, with write buffer as first arg
Closes #3440
2022-02-17 23:11:13 -08:00
Kurt
51975e4bdd
Only push move if doesn't already have
...
Closes #3439
2022-02-17 20:53:21 -08:00
Kurt
dc3d8e7cec
Minor clean
2022-02-14 21:32:52 -08:00
Kurt
7b05d0c056
Fix base friendship check for PLA piplup WA8
2022-02-13 15:25:45 -08:00
Kurt
03b8ceb5ab
Allow TypeSuggestion to operate on interfaces
...
Add ganbaru clear/suggest, lgpe iawakened clear/suggest, hyperatrain/geolocation clear
2022-02-13 11:02:22 -08:00
Easy World
843e065fb4
Add batch command to suggest HeightAbsolute & WeightAbsolute ( #3435 )
...
Already available for PB7, this adds it for PA8.
2022-02-13 07:10:26 -08:00
Kurt
013fe95c8d
Update 22.02.14
2022-02-13 01:18:19 -08:00
Kurt
2267e1a879
Minor tweaks for api consumers
...
Indicate Shiny.Random on home shiny-possible gifts
More detailed exception message for GetLearnset/GetPersonal
2022-02-12 23:40:28 -08:00
Kurt
0eece2711a
Set the calc h/w float regardless of epsilon
...
epsilon no longer required per #3417
closes #3434
2022-02-12 18:48:33 -08:00
Kurt
cedf13c343
PK4: Fix DP met location write
...
Closes #3431
2022-02-11 16:28:51 -08:00
Kurt
574a7f43a0
BDSP: Handle uninitialized box names
...
span refactoring didn't catch this
also apply same change for gen4 battle revolution string reads
2022-02-11 10:43:27 -08:00
Kurt
bb2b8e74c3
Update SCBlock xmldoc
2022-02-10 11:08:30 -08:00
Kurt
a5d1bf7900
Fix cxd pouch write, bk4 pid reads
...
Closes #3429
2022-02-10 10:57:59 -08:00
Kurt
a287efe3a1
Inline pk2/pk3 form setter, only SetGender if different
...
Helps out ALM generate unown
2022-02-09 20:20:32 -08:00
Kurt
6da235f0e8
Set 3 flawless IVs if randomizing alpha IVs
...
Closes #3428
2022-02-09 19:26:18 -08:00
Kurt
d17639f956
Add alpha move for encounter slots
...
oops
Closes #3427
2022-02-09 19:21:45 -08:00
Kurt
bc2549b24e
Minimize BAK file allocations ( #3426 )
...
Stop allocating an entire shadow copy of the save file whenever we create a new savefile object from file.
Prior commits added the clear SaveFileMetadata class to cleanly track the file path. Backups are copied from the original path.
2022-02-09 16:48:55 -08:00
Kurt
04856122b7
Simplify landmark alpha move match check
2022-02-09 16:17:44 -08:00
Kurt
16da1deadc
Revise battle subway flag handling
...
Retain all flag bits; expose the other 5 flag bits as some saves do have them.
Undocumented.
Closes #3422
2022-02-09 15:41:00 -08:00
Kurt
39e47dbb82
Flag SWSH tutor moves
2022-02-09 15:06:14 -08:00
Kurt
f5344452cf
Fix last funfest mission record r/w
...
Closes #3423
2022-02-09 10:36:46 -08:00
Kurt
988385e450
Add accurate Colo EReader PID generating
...
Closes #3421
Needed to force the locks, since they themselves are nature/gender locked.
2022-02-09 09:26:10 -08:00
Kurt
80eac48a49
Fix no alpha move bypass for alphas
...
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=273294
2022-02-08 23:16:00 -08:00
Kurt
9c5955c104
Emulate Height & Weight float calculations matching the game ( #3417 )
...
* Accurately implement height/weight calc
* Handle GUI reads
Having Auto off will read and write the values correctly
F6 will handle all the decimal points possible
* Remove no longer needed tolerance check
2022-02-08 18:56:11 -08:00
CanoeHope
08f8b6e3d4
Add Legends: Arceus blocks ( #3403 )
...
* Update SaveBlockAccessor8LA.cs
2022-02-08 18:50:52 -08:00
Kurt
5cdfe18b8e
Add 7b Starter choice
...
Closes #3420
Co-Authored-By: GiftedK <99304781+GiftedK@users.noreply.github.com>
2022-02-08 18:49:44 -08:00
Kurt
556f711728
Remove random EC set for Trade8b
...
EC is fixed, in the template
2022-02-08 17:37:33 -08:00
Kurt
2f5635613e
Update TechnicalRecordApplicator.cs
2022-02-08 08:55:56 -08:00
Kurt
c7f24eecd0
Parse shiny/gmax Yes with any case/culture
2022-02-08 00:00:52 -08:00
Kurt
59144ddb0d
Check level for new evo methods
...
Can't learn move below this level
2022-02-07 21:46:05 -08:00
Kurt
b06f889cdd
Update 22.02.08
2022-02-07 20:13:19 -08:00
Kurt
e12f3004ad
Post-check defer if catchrate disallows tradeback
...
Closes #3412
2022-02-07 18:44:29 -08:00
Kurt
a7051107ea
Conditionally set PP Ups and Purchase/Mastery flags on set import
2022-02-07 15:40:02 -08:00
Kurt
b20fb39d77
Don't set dex on slot swap within save
...
Closes #3411
2022-02-07 15:03:26 -08:00
Kurt
105e6a31f8
Fix Colo checksum refresh
...
https://projectpokemon.org/home/forums/topic/60614-error-when-opening-a-clean-pok%C3%A9mon-colosseum-save-and-exporting-it-as-is-using-220204/
2022-02-06 19:17:46 -08:00
Kurt
c7ed55ab54
Simplify match rating return value choice
...
Ensure it is ordered Partial->DeferredErrors->Deferred->Match
2022-02-06 16:14:46 -08:00
Kurt
b8394516d2
Flag insufficient flawless IVs for eslot8a
2022-02-06 16:08:03 -08:00
sora10pls
43b0c340c1
Update Korean research task localization
...
oops
2022-02-06 10:47:26 -05:00
Kurt
420dd32aea
Allow lower sheen threshold for beauty
...
Not really worth checking if it is all in beauty; this is just a simple error checker.
Closes #3401
2022-02-06 00:30:38 -08:00
Kurt
1297dd45e0
Fix missing event flag rows for Platinum-spanish event flags
...
https://projectpokemon.org/home/forums/topic/60601-pokemon-platinum-error/
2022-02-05 22:11:20 -08:00
Kurt
9137a03b50
Hide unavailable species for PLA saves (similar to LGPE)
2022-02-05 22:02:26 -08:00
Kurt
e8903505df
Min move count: ignore purchased moves
2022-02-05 16:47:19 -08:00