Kurt
4daf225379
Add location for colo ereader shadows
2021-03-27 20:32:52 -07:00
Kurt
53d3dba74e
Reorder array for ordered search
2021-03-27 20:32:25 -07:00
Kurt
4bb95e0bd3
Spring raids
2021-03-25 18:28:17 -07:00
Kurt
3822981590
Rework EncounterCriteria to be ability indexed rather than direct ability ( #3179 )
...
* Exploration: rework ability criteria to ability numbers desired
* Sync remaining changes
* Update EncounterCriteria.cs
* Add xmldoc
* Improve speed of IsDualGender check
* More xmldoc updates
Should be doing this on main but meh, this branch is gonna get merged later
* Fix typo
* Update WC7.cs
* Update PersonalInfo.cs
2021-03-23 17:05:15 -07:00
Kurt
f86291cc1c
Split gen3 encounter listing to have CXD separate
2021-03-21 19:52:48 -07:00
Kurt
8020a44961
Minor simplification
...
All slots are now initialized via constructor, property can now be init!
Optimize some value fetching for gen7b, as the input data has features that can be abused
2021-03-17 22:40:37 -07:00
Kurt
71d355804a
Move enc7b sky encounter fudging to reformatter project
...
50c53d6b33
2021-03-17 21:59:00 -07:00
Kurt
b4f763f7ef
Move bridge-stony copy logic to pkNX
...
Also trims out empty slots (species=0), less size!
49efb96db9
2021-03-17 18:11:07 -07:00
Kurt
535f464b61
Update EncounterSlot7.cs
...
Closes #3176
2021-03-16 23:49:04 -07:00
Kurt
6bce4eea14
Minor clean
...
Annotations (nullable), some switch cases for readability
2021-03-14 16:16:55 -07:00
Kurt
2e10e0757a
Check gen5 egg met location rather than gen6
...
Override the base impl in encstatic, swap const refs
2021-03-03 18:35:26 -08:00
sora10pls
08ecac8cb3
Update upcoming Dynamax Crystal encounters
2021-03-02 11:21:56 -05:00
Kurt
eba704a46b
Add March raid data
...
Wonder if they'll fix the gmax Hattrem ;)
2021-02-28 17:19:17 -08:00
Kurt
7afd2ec351
Add Pika 2/25 raids
2021-02-25 16:27:05 -08:00
Kurt
0ba029226c
Add more xmldoc
2021-02-24 18:08:03 -08:00
Kurt
89cc722cd2
Add missing met location bypass for pokewalker xfr's
2021-02-21 18:41:42 -08:00
Kurt
c8b12a9ddc
Add safari slots for floette 2/3
...
Move the array into the constructor; let it get garbage collected rather than leaving it as static
2021-02-21 15:18:58 -08:00
Kurt
d61e646ca9
Minor tweaks
2021-02-18 17:26:06 -08:00
Kurt
83c61a2515
Update EncounterGenerator6.cs
2021-02-17 08:49:32 -08:00
Kurt
165a0f3956
Update EncounterSlot8.cs
2021-02-16 09:54:47 -08:00
Kurt
f5b47f9116
Update EncounterGenerator6.cs
...
Closes #3153
wc6 is the only one with deferred cards that matter
2021-02-16 07:35:55 -08:00
Kurt
f63654d5ae
Force curry mark for generated galar mine hidden slots
2021-02-15 15:21:10 -08:00
Kurt
6088a95421
Location specific restrictions
2021-02-15 10:31:07 -08:00
Kurt
bfe411d503
Update EncounterSlot8.cs
2021-02-15 10:19:52 -08:00
Kurt
74a5c03cd2
Clean check for overworld IVs
...
Closes #3150
Still need to remove some symbol encounter tables that are unused
2021-02-15 09:04:47 -08:00
Kurt
b82b0da7d9
Add checks for fishing mark
2021-02-14 22:25:59 -08:00
Kurt
ebb4e2a56a
Defer curry mark static encounters, flag as invalid
...
Closes #3001 as all marks that can be checked are checked.
Promote trades above static encounters, as it's just met location.
2021-02-14 21:24:31 -08:00
Kurt
927c83d660
Show seed in output, flag correlations that shouldn't
2021-02-14 16:00:43 -08:00
Kurt
5949c3b57e
Minor clean
2021-02-14 15:14:45 -08:00
Kurt
267613270e
Generate slots/static per correlation if appropriate
...
Relocate the SetRandomEC at the tail end of the generator into the specific classes that set EC, so that our correlation generators don't have their EC overwritten at the end.
2021-02-14 12:27:14 -08:00
Kurt
884cd70d43
Minor clean
2021-02-14 10:23:53 -08:00
Kurt
1af27516e6
pid encounter type mismatch: returns
...
Keeping the cryptic message for now :)
2021-02-14 10:20:35 -08:00
Lusamine
205cf481b0
Add Gyarados/Milotic crossover & disallow marks in Motostoke Gym ( #3149 )
...
* Add a Gyarados crossover & disallow marks in Motostoke Gym
* Milotic can be lured across boundary too
2021-02-14 10:13:45 -08:00
Kurt
a65ab2accc
Flag wild slots that don't match 32bit correlation
2021-02-13 22:45:07 -08:00
Kurt
f583cdd385
Add valentines milcery def
...
nonshiny is dupe with prior enc
2021-02-12 20:21:13 -08:00
Lusamine
c0b73575e6
Moltres-1 can be caught at Honeycalm Sea ( #3147 )
2021-02-10 21:02:29 -08:00
Kurt
3876b3b1fa
Allow traded egg while still egg
...
Closes #3144
2021-02-08 08:29:18 -08:00
sora10pls
eab75b7cba
Update HOME date legality
...
Update dictionary to use proper format (yyyy-mm-dd), as well as verifier to properly check met year.
Also updated IsValidDateWC8 to clamp latest met date based on UTC, like with GO encounters.
2021-02-04 09:12:47 -05:00
Kurt
f6f81ec782
Add initial date checks for HOME gifts
2021-02-03 22:57:59 -08:00
Kurt
51bc48a6a8
Add Cramorant raids
2021-02-03 22:44:15 -08:00
Kurt
230073876f
Add catch rate for staticencounter1
2021-02-03 15:22:48 -08:00
Kurt
5350cb4ab6
Update EncounterTradeGenerator.cs
2021-02-03 14:50:15 -08:00
Kurt
ac464e0c57
Update EncounterStatic2E.cs
2021-02-03 13:49:14 -08:00
Kurt
862403858b
Refactoring
...
no functional change
2021-02-03 11:33:09 -08:00
Kurt
9d9eb935b1
Improve partial match bleed through
...
Checks partial matches in the loop rather than outside; it'll only settle on the partial match if there's nothing else to settle on.
Gen1/2 generators can have partial matches bubble up before actual matches (gen1 fighting gen2).
2021-02-02 22:40:06 -08:00
Kurt
2b00e310ae
Handle some gen1/2 static generating easier
...
I should probably have slot1/2 and static1/2 and trade1/2 implement GetBlank so that they can flexibly return a japanese/int/(kor) from template rather than default int, but eh
2021-02-02 22:14:33 -08:00
Kurt
e33468db96
Mark (JP-BU)/(JP-GN)(EN-BU) as RB
...
BU is only Japanese
2021-02-02 22:13:24 -08:00
Kurt
cd286d6923
Yield specific static encounters for rby/gsc for moveset gen
2021-02-02 20:25:59 -08:00
Kurt
630d84c8b6
Check encounter moves for gen1/2 (no relearner)
2021-02-02 15:39:56 -08:00
Kurt
78cc0098b3
Update EncounterStatic2.cs
2021-02-02 10:41:28 -08:00
Kurt
f7f8597281
Handle game-specific slot fetch for gen1/2 more explicitly
2021-02-02 10:20:30 -08:00
Kurt
8705c26adc
Bake cosplay moves into the encounter template
...
yay records `with` syntax
don't bother specifying form6's moves, they're all levelup moves.
2021-02-02 09:40:58 -08:00
Kurt
48c2c43293
Re-dump slots with revised SlotType definitions
2021-02-01 23:43:52 -08:00
Kurt
e55dae8f7b
Remove headbutt available check; already pruned
...
The Encounter dumper project already excluded all headbutt tree areas that can't be accessed. Every slot that is present in this project can be accessed.
Move the tree check to the eslot2 object
Check all gen2 slots regardless of crystal origin, since we now tag all of them with location IDs.
2021-02-01 21:22:58 -08:00
Kurt
a7afa58156
Rework partialmatch hidden check
...
Want to check if it has been evolved from the original species, and the current species is a non-changeable hidden ability
2021-02-01 20:45:48 -08:00
Kurt
4e9908a53d
Remove unnecessary logic
2021-02-01 20:17:17 -08:00
Kurt
8a2d115df3
Sanity check nature for Criteria parameter
2021-02-01 10:45:53 -08:00
Kurt
afbf1d997b
Try to detect vc transferred species, don't assume most evolved
2021-02-01 09:52:25 -08:00
Kurt
7833d12f95
Simplify shared egg move array get
2021-01-31 23:07:14 -08:00
Kurt
a43f6aa71a
Add february dist raids
2021-01-31 22:40:47 -08:00
Kurt
f3ef88a5e9
Respect ability from criteria
2021-01-31 21:53:11 -08:00
Kurt
34ac8167f2
Update EncounterSlot.cs
2021-01-31 21:42:24 -08:00
Kurt
1ece844f78
Partial match HA species without a HA possible
...
A captured metapod cannot have hidden ability via ability patch, but a captured caterpie evolved into metapod can, assuming it existed as caterpie.
2021-01-31 13:05:36 -08:00
Kurt
d8e75ee85a
Force Japanese language for JP-BU safe language fetch
2021-01-31 10:19:12 -08:00
Kurt
4d25214c8d
Update EncounterEgg.cs
2021-01-31 01:20:35 -08:00
Kurt
332449f53d
Fix erroneous yield counter increments
...
https://projectpokemon.org/home/forums/topic/58492-possible-legality-error-for-the-mon-from-pokemon-bank-using-ability-patch-with-the-new-update/
2021-01-31 01:12:20 -08:00
Kurt
a7f6c212f9
Permit gen2 moves on a vc1 transfer
...
feels dirty
2021-01-30 22:03:41 -08:00
Kurt
a524032f61
Add TR flags to emoveset generator
2021-01-30 21:49:45 -08:00
Kurt
6089268b53
Set valid nature for generated toxtricity
2021-01-30 19:58:05 -08:00
Kurt
09bfe5bd95
Enforce shadow locks when generating a ck3/xk3 from criteria
2021-01-30 19:42:58 -08:00
Kurt
3bb4553b24
Disallow encounter edge case moves when battleversion reset
2021-01-30 13:15:21 -08:00
Kurt
4f7faf9c85
Moveset generator tweaks, dexnav move logic
2021-01-30 10:15:38 -08:00
Kurt
1e86fdcea8
Fracture the encounter matching checks to allow progressive validation ( #3137 )
...
## Issue
We want to discard-but-remember any slots that aren't a perfect fit, on the off chance that a better one exists later in the search space. If there's no better match, then we gotta go with what we got.
## Example:
Wurmple exists in area `X`, and also has a more rare slot for Silcoon, with the same level for both slots.
* We have a Silcoon that we've leveled up a few times.
Was our Silcoon originally a Wurmple, or was it caught as a Silcoon?
* To be sure, we have to check the EC/PID if the Wurmple wouldn't evolve into Cascoon instead.
* We don't want to wholly reject that Wurmple slot, as maybe the Met Level isn't within Silcoon's slot range.
---
Existing implementation would store "deferred" matches in a list; we only need to keep 1 of these matches around (less allocation!). We also want to differentiate between a "good" deferral and a "bad" deferral; I don't think this is necessary but it's currently used by Mystery Gift matching (implemented for the Eeveelution mystery gifts which matter for evolution moves).
The existing logic didn't use inheritance, and instead had static methods being reused across generations. Quite kludgy. Also, the existing logic was a pain to modify the master encounter yield methods, as one generation's quirks had to not impact all other generations that used the method.
---
The new implementation splits out the encounter yielding methods to be separate for each generation / subset. Now, things don't have to check `WasLink` for Gen7 origin, because Pokémon Link wasn't a thing in Gen7.
---
## Future
Maybe refactoring yielders into "GameCores" that expose yielding behaviors / properties, rather than the static logic. As more generations and side-gamegroups get added (thanks LGPE/GO/GameCube), all this switch stuff gets annoying to maintain instead of just overriding/inheritance.
## Conclusion
This shouldn't impact any legality results negatively; if you notice any regressions, report them! This should reduce false flags where we didn't defer-discard an encounter when we should have (wild area mons being confused with raids).
2021-01-29 17:55:27 -08:00
Kurt
f7b703626c
Only import gbera statics for Generation >0
...
GO requests would have Generation=-1 (no met location to differentiate 7/8).
2021-01-29 11:32:51 -08:00
Kurt
6c1b6a269d
Pass gender when creating static entry
2021-01-27 12:29:49 -08:00
Kurt
511797c1f9
Fix gen4 hm indexing
2021-01-25 20:58:56 -08:00
Kurt
acfbef6cfa
Disallow raids matching if has mark
...
Closes #3133
not an ideal solution, but the encounter matching API is kinda limited in deferred-invalid vs deferred-notIdeal.
probably need to unify the match logic and generators so they can cache one secondary-check invalid
2021-01-22 20:28:54 -08:00
Kurt
5f8e2b13c5
Simplify headbutt tree pivot check
...
See the EncounterSlotDumper with the memoization logic & json tree listing.
Simplifies things a lot, and improves checking speed. Unreachable trees are now treated the same as no-trees maps.
ez 1.5KB reduction in file size :P
2021-01-22 19:20:18 -08:00
Kurt
944ff107b0
Add new distribution raids
2021-01-21 16:30:07 -08:00
Kurt
fbc089e7eb
Minor tweaks
...
Remove gen3 egg location hashset; only paths that reach it are for hatched eggs or current breed-eggs. Check breed eggs with the singular met location.
Simplify some logic flow
2021-01-20 12:37:51 -08:00
Kurt
9964c91dc6
Remove static init of yancy/curtis names
...
static constructor ran after the initializer; flip it and remove the unnecessary all-set
2021-01-20 12:36:46 -08:00
Kurt
bfd948ee2b
Update pget binaries, check gender
...
yay single gender availability! (frillish/jellicent being male only)
2021-01-16 18:29:27 -08:00
Kurt
bb1d23e112
Minor clean
...
Use some enums, save a few virtual/static fetches
2021-01-16 12:01:40 -08:00
Lusamine
15da92f9bc
Document weather for static encounters ( #3127 )
...
This only matches the weather table with the Pokemon and does not fully
account for whether a location can spawn a particular weather.
Additional minor changes:
- Adds ScriptedNoMarks to Regis and Glimwood Tangle static encounters
- Corrects a few version-specific Pokemon such as Ludicolo/Shiftry
- Removes erroneous encounters such as Milotic in East/West Lake Axewell
- Removes an unused Motostoke Stadium encounter
2021-01-16 09:31:21 -08:00
Kurt
8eb499c4d0
Update EncounterStatic5.cs
...
Use base deferral method which only checks fateful flag.
2021-01-14 22:51:01 -08:00
Kurt
c32b38a53c
Minor annotation tweaks
...
no functional change
2021-01-12 22:26:08 -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
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
118e1266a6
Swap lgpe sandshrew/vulpix version restrictions
...
Closes #3122 ty @FeralFalcon !
2021-01-05 17:30:14 -08:00
Kurt
9d7c9929b4
Minor tweaks
...
should be it :( :(
2021-01-05 09:58:33 -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
cc43550357
Simplify more expressions
2021-01-04 17:31:43 -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
1f3d3112d3
Move some future-evolution tables to separate class
2021-01-02 19:11:46 -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
7a4d8925f2
Update EncounterStaticGenerator.cs
2021-01-02 13:53:25 -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
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
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
8bf250ff5a
Update EncounterEggGenerator.cs
2020-12-31 17:16:28 -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
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
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
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
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
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
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
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
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
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
Kurt
8a0e7d90e0
Move Shiny override set to constructor
2020-12-21 14:40:34 -08:00