Commit graph

2015 commits

Author SHA1 Message Date
Kurt
890ce9ea4e Simplify some expressions
Search array for index rather than loop and check; gives early-break too -- was O(n) now is O(<~n)
2021-01-12 22:25:30 -08:00
Kurt
2d3d6b49da Force bad vc1 (should be vc2) to be vc2 templates 2021-01-11 17:47:25 -08:00
Kurt
621e708d23 Minor clean 2021-01-10 18:15:33 -08:00
Kurt
76ae6b2b3d Minor tweaks
Disallow OT handling when originated gen is 1/2
Cast the input not the const
Hide HighestGameID (Use the method instead)
2021-01-09 21:25:28 -08:00
Kurt
c83208c915 Rename CheckIdentifier.Move to CheckIdentifier.CurrentMove 2021-01-09 13:05:56 -08:00
Kurt
3e0b52195a Minor clean 2021-01-08 13:17:59 -08:00
Kurt
4a3a8dd090 Add japanese blue encounter tables (unique to jp_blue)
When creating a new pk1 for the slot->pkm, get it as a pk1-japanese.
Export the gameversion when in pk1/2 format (same as VC).
2021-01-08 11:29:00 -08:00
Kurt
d2d2be899b Critical typo fix
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2021-01-07 21:30:39 -08:00
Kurt
92c9e9897a Add latest dist raid changes
Same as 11/20, with one swap. Only the swap is kept (because duplicate encounters don't matter).
2021-01-07 21:27:57 -08:00
Kurt
c9f222bf38 Set valid mystry mew seed on creation
Uses a Method specific seed regardless of template.
2021-01-07 21:27:19 -08:00
Kurt
f615814548 Add xmldoc, increase swish util flexibility 2021-01-07 15:34:26 -08:00
Kurt
5554651951 Mark scxorshift32 and xoro128p as ref structs
Prevents passing them as args, as intended. These are self mutating structs
2021-01-07 15:33:42 -08:00
Kurt
118e1266a6 Swap lgpe sandshrew/vulpix version restrictions
Closes #3122 ty @FeralFalcon !
2021-01-05 17:30:14 -08:00
Kurt
1bd60ba6f9 Check original species in the event of VC transfers 2021-01-05 16:36:16 -08:00
Kurt
9d7c9929b4 Minor tweaks
should be it :( :(
2021-01-05 09:58:33 -08:00
Kurt
23b5aebe05 Update IndividualValueVerifier.cs 2021-01-05 09:56:19 -08:00
Kurt
70fe1847ac sync missing changes 2021-01-05 09:51:32 -08:00
Kurt
373aecdf7c Merge GO IV checks, behavior is now correct
Rename IV1/2/3 to HP/ATK/DEF in gp1 structure
2021-01-05 09:39:50 -08:00
Kurt
6fc8779aaa Revert "Add vc shiny female gender ratio check"
This reverts commit d5a1283585.
2021-01-04 17:31:56 -08:00
Kurt
cc43550357 Simplify more expressions 2021-01-04 17:31:43 -08:00
Kurt
acf811f5c1 Permit all generations prior to requested generation for know move check 2021-01-04 15:38:30 -08:00
Kurt
99fe3b59b4 Fix contains indexing incorrectly
blame apr 17 2017 !
a5b1d72f06 (diff-53c2e8acc19c5af65034cf0460ba82ebc7dc00ba61eb142ef4aa2c0cbc1f7cffR2918)
2021-01-04 15:06:52 -08:00
Kurt
d5a1283585 Add vc shiny female gender ratio check 2021-01-03 18:08:31 -08:00
Kurt
730640decc Minor clean 2021-01-03 16:53:13 -08:00
Kurt
33ad654be6 Mark encstatic version on init rather than post-init 2021-01-03 16:49:49 -08:00
Kurt
e663ffdd35 Fix comparison 2021-01-02 20:52:39 -08:00
Kurt
1f3d3112d3 Move some future-evolution tables to separate class 2021-01-02 19:11:46 -08:00
Kurt
4a52b349ff Minor clean 2021-01-02 19:11:34 -08:00
Kurt
77a784a881 Move Stadium static encounter junk to event list
Charmander has Leer at level 5, which makes it a special move (can't learn it normally that low).
2021-01-02 14:48:11 -08:00
Kurt
97be69bca1 Use EncounterMatch when EncounterOriginal doesn't matter 2021-01-02 14:47:39 -08:00
Kurt
7a4d8925f2 Update EncounterStaticGenerator.cs 2021-01-02 13:53:25 -08:00
Kurt
699a598227 Update NicknameVerifier.cs
Nickname AND Trainer Name are verified in that method; we still want to execute it. If it has a fixed nickname, we can skip the wordfilter since it's already been checked.
2021-01-02 01:02:59 -08:00
Kurt
401add520a Check nickname of non-nicknamed in-game trades 2021-01-02 00:48:58 -08:00
Kurt
c432a15a20 Relocate some tables to a location closer to where they're used 2021-01-02 00:46:09 -08:00
Kurt
a7b9fafb69 Remove unnecessary logic
Encounters are thoroughly checked for their origins; don't need to check again if it's possible to have it in an egg.
2021-01-01 19:45:40 -08:00
Kurt
2648560684 Invert breeding method result returns
clean:
if (!logical) return;

Existing logic had methods named to return true if fail, now method checks for passing, thus the logic now follows the above pattern.
2021-01-01 19:36:54 -08:00
Kurt
09089da14e Use more expression return style
Reduces indentation & bracketing, a bit more concise
2021-01-01 17:08:49 -08:00
Kurt
11a2a7a318 Condense expression to use bitflags
from 2 cmp to just 1
2021-01-01 16:25:48 -08:00
Kurt
04f8efec4f Move more breeding logic to Breeding
Simplify some method signatures, reduce checks for MoveEgg.GetEggMoves

ran legality checks for 100,000 pkm, no more exceptions (Internal Error) -- added a "CanGameGenerateEggs" which filters out unused gameIDs
2021-01-01 15:01:22 -08:00
Kurt
7523e0e200 Make ContestStat fields byte (from int) 2021-01-01 13:39:08 -08:00
Kurt
f6d4d93613 Inline some logic for contest stats 2021-01-01 12:21:46 -08:00
Kurt
e2c1a3045a Extract gen2 egg generator, simplify can be egg checks
Optional parameters were never passed; force Min Level to 5 to match egg level.

Tried removing it completely but it still allowed Charizard eggs (no)
2021-01-01 11:27:45 -08:00
Kurt
a4c4a2b231 Make EncounterArea record type
immutable reference types is the goal; the array for the data isn't copied, but both records refer to the same data.
2021-01-01 10:55:33 -08:00
Kurt
4e01e78734 Make Species/Form/Min/Max readonly, not init
Pass them to the abstract class's constructor
2021-01-01 10:53:05 -08:00
Kurt
fb008be6a6 Condense some more expressions 2020-12-31 23:13:27 -08:00
Kurt
080f6f827d Replace pkm.GG references with direct version checks
No longer tied to met location
2020-12-31 17:45:11 -08:00
Kurt
8bf250ff5a Update EncounterEggGenerator.cs 2020-12-31 17:16:28 -08:00
Kurt
2689e72252 Hide field that shouldnt be used by external users
Not to be confused with LegalityAnalysis.Parse
2020-12-31 17:14:39 -08:00
Kurt
b9f0427ccd Add Year of the Dragon distribution raids 2020-12-31 16:07:52 -08:00
Kurt
f631cbbecd Generate gen2 eggs via gen2 method, ignore gen1 versions
For searching, only return versions compatible with the save file
Don't bother filtering out BU for Japanese-only.
2020-12-31 15:51:06 -08:00
Kurt
4058d44229 Fix inverted check 2020-12-31 12:14:24 -08:00
Kurt
f4bf9dd208 Minor clean
add download count to changelog
move 2019 changelog to uncompiled resource (for record)
2020-12-31 10:36:09 -08:00
Kurt
28ec0e91f0 Use specific type when storing reference 2020-12-31 10:33:30 -08:00
Kurt
6a9aa891f1 Validate VC transfer consoleregion-language relationship 2020-12-30 15:30:50 -08:00
Kurt
ef51f53e9a Flag battle-only minior forms 2020-12-30 15:03:55 -08:00
Kurt
24332b6979 Minor tweaks 2020-12-30 13:08:15 -08:00
Kurt
206a05082b Update HistoryVerifier.cs 2020-12-30 09:55:41 -08:00
Kurt
6040faed10 Yield gb events in generator
Were recently split off so that the events could be generated last rather than with the rest of static encounters (first)
2020-12-29 21:45:37 -08:00
Kurt
6071834d4f Fix gender ratio comparison for Colo starters
LockFinder:
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=263736

CXDVerifier:
Use a switch expression for a more concise representation of logic
2020-12-29 20:25:05 -08:00
Kurt
b19688b13d Defer go slots with IV sets as there might be other encs
Move the logic to the class
Update go binaries
2020-12-29 16:07:29 -08:00
Kurt
de840f40d4 Invert some "!is" to "is not" 2020-12-29 00:58:08 -08:00
Kurt
e8c23f6644 Simplify some repeated comparisons with expressions
Less prone for bugs since it uses the same value for all comparisons without re-specifying
2020-12-29 00:37:59 -08:00
Kurt
c119f18af3 spec->species 2020-12-28 22:22:52 -08:00
Kurt
bb68dcc3cb Move trade->pkm edge case handling to derived classes 2020-12-28 14:42:48 -08:00
Kurt
c14f2a1dd1 Minor initialization tweaks
GameStrings: 10% of strings are unique; just mark everything. Stop a little early so we don't process the empty & (trade) string.
LearnsetReader: All empty entries are length==0; malformed should throw an exception (never).
EggMoves: Compute ptr inside the array fetch loop; don't use linq.

EggMoves & string shaves off 80ms of startup time according to profiling; some could be attributed to warm-up but yay more efficient.
2020-12-28 10:22:13 -08:00
Lusamine
c46c55f304
Add missing static encounters (#3113) 2020-12-27 11:47:01 -08:00
Kurt
b84e2283a7 Add missing snorlax nest encounter (Zeraora event)
The event had copies of the current month's raids, but snuck in Snorlax at level 17 (wrong, should have been munchlax?).

ty atrius

fix indentation
2020-12-27 11:32:05 -08:00
Kurt
e4c391dc01 Move nest downlevel checks into specific encounter type
Distribution nests are checked for 1/3 badge restrictions similar to regular nests; crystal nests are not. Thanks @Lusamine!
2020-12-26 09:31:21 -08:00
Kurt
a4ccca7980 Add battle-only known move memory bypass 2020-12-26 09:27:41 -08:00
Kurt
ee5349ff98 moar is or 2020-12-25 12:30:26 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
1d501366cb Add holiday raids 2020-12-24 17:15:32 -08:00
Kurt
95e3337f2c More switch expressions 2020-12-24 17:12:08 -08:00
Kurt
4d0108331a Move LegalityAnalysis derived movesets out of class
LegalityAnalysis just does the analysis; no need to do unnecessary suggestion logic inside the object.
2020-12-24 16:36:50 -08:00
Kurt
749fef0ac6 Minor clean 2020-12-24 15:23:38 -08:00
Kurt
ba7ccaf5e6 Make EncounterTrade's version init-only 2020-12-24 15:23:26 -08:00
Kurt
43dd390f21 Split IContestStats, mark trades as records 2020-12-24 00:06:40 -08:00
Kurt
afdd2bd57e Mark EncounterSlot/Static types as immutable record types 2020-12-23 20:40:59 -08:00
Kurt
0a3f45218f Add OT gender check for N's Pokemon
Closes #3110 ty @FeralFalcon !
2020-12-23 18:03:05 -08:00
Kurt
93910df2c6 Use new switch statements 2020-12-23 17:14:38 -08:00
Kurt
736564be8c Merge EncounterStatic4 back together 2020-12-23 12:15:49 -08:00
Kurt
324ce9d6ac Minor clean 2020-12-23 09:34:29 -08:00
Kurt
e34c8df044 Revise some method signatures 2020-12-22 20:50:33 -08:00
Kurt
105e8b3818 Move version forcing for unavailable encounters to es4 2020-12-22 20:15:56 -08:00
sora10pls
dcd20a3649 Update PogoTypes and their respective requirements
For more context, see 62e84309d7
2020-12-22 15:20:15 -05:00
Kurt
d288a32ef5 Permit TR flags for "Can Relearn", split branching for TR checks 2020-12-22 09:10:10 -08:00
Kurt
53e0046a48 SWSH has some form entries with different base friendship (stunfisk) 2020-12-22 09:09:49 -08:00
Kurt
2bc7110884 Remove unnecessary overrides 2020-12-21 23:40:58 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
514b60b447 Merge type check with usage in if statements
if x is y with z property true, then :D
2020-12-21 22:33:48 -08:00
Kurt
4890e0e952 Change move source requests from a bunch of bools to bitflag enum
little more sane & clear
2020-12-21 21:24:16 -08:00
Kurt
cd76e49388 Strengthen know move check 2020-12-21 19:50:56 -08:00
Kurt
351637900f Downgrade swsh move memory verification severity
Some special encounters don't set the Relearn Moves, so we can't really check the memory-moves unless we somehow late-reject a matching encounter. Not really worth the effort to try and verify cosmetic mismatches; just tag them as Fishy.
2020-12-21 19:20:11 -08:00
Kurt
594db92ad0 Minor clean
Handle some stragglers
2020-12-21 17:48:08 -08:00
Kurt
98be0f6739 Target type'd new 2020-12-21 17:17:56 -08:00
Kurt
0303eada32 this is not that
clearer than before, yay
2020-12-21 17:12:39 -08:00
Kurt
1854d172bd Add missing property set
lol oops
2020-12-21 17:12:21 -08:00
Kurt
68ee8cfcc4 Change setters to init only 2020-12-21 17:05:05 -08:00
Kurt
c6b702ae54 Create cosplay pikachu rather than clone 2020-12-21 17:04:37 -08:00
Kurt
133b8e6ba0 Rework Pokewalker/Dream Radar static encounters to own class 2020-12-21 17:04:09 -08:00