Commit graph

2640 commits

Author SHA1 Message Date
Kurt
cc8cbeb749 Revise gen3 contest stat max sheen disparity
Closes #3517

Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
2022-06-11 09:36:50 -07:00
Kurt
c3117994cc Allow GO7 handler 0
New current handler verifier settings flag GO => LGPE transfers. Unlike GO => HOME, these transfers use your LGPE OT info, so it's legal to have no HT and have the current handler be OT

Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2022-06-08 00:27:24 -07:00
Kurt
c75f543f8b Minor tweaks 2022-06-07 23:32:57 -07:00
Kurt
5ccb678931 Permit Gen7b for GO even if location doesn't match
Feeling like the Move fetching needs to shift away from Generation too.
2022-06-07 20:15:32 -07:00
Kurt
54cb4dc8c8 Minor comment fixes 2022-06-07 03:21:04 -07:00
Kurt
428ce52c27 Add Current Handler checks & toggles
Default settings do not flag, as Database view does not track the savefile (LegalityAnalysis only indirectly references the latest loaded save file, not the true source).

Bulk Analysis will flag them correctly if run. Can be turned off.
2022-06-05 13:18:31 -07:00
Kurt
39a09fbbbe Defer BDSP->PK8 marsh ball mismatches 2022-06-05 11:28:17 -07:00
Kurt
bd5cc538c4 Check met date of WA8/WB8 less than current moment 2022-06-05 10:56:17 -07:00
Kurt
893b5d5293 Revise more PB7/PK8->Interface type checks 2022-06-04 21:03:25 -07:00
Kurt
9c5dc6e6e7 Add MarkValue verifier 2022-06-04 14:30:52 -07:00
Kurt
382ea5cd61 Extract move info api 2022-06-04 13:14:50 -07:00
Kurt
ab723af640 Expose Context for SaveFile/ITrainerInfo 2022-06-03 19:08:46 -07:00
Kurt
dde70f4962 Permit shared egg moves based on current type 2022-06-03 16:54:05 -07:00
Kurt
df02532697 Misc fixes
Simplify HM memory check (bit permission superset, just check directly)
Disallow BestFriends & Effort on PA8 exclusives
PA8 techrecord permits none.
2022-06-02 20:05:27 -07:00
Kurt
ead7c2d973 Update contest stat restrictions for BDSP visitors
Closes #3513
2022-06-02 19:11:37 -07:00
Kurt
e571a0b95f Check catchrate tradeback separately
Closes #3510
Thanks @CodeWithMa !
2022-06-02 18:32:22 -07:00
sora10pls
7d20363d6b Update プロポチャ Piplup end date 2022-05-31 20:21:55 -04: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
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
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
700236249f Treat random gendered slots correctly 2022-05-10 21:52:01 -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
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
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
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
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
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
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
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
fa76da56c9 Inline some Rand32 calls
No functional change
2022-04-26 20:21:26 -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
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
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