Kurt
e33468db96
Mark (JP-BU)/(JP-GN)(EN-BU) as RB
...
BU is only Japanese
2021-02-02 22:13:24 -08:00
Kurt
33fc33a165
Add more nickname logic checks
...
Variant nicklang OT can nickname if it's the handler
2021-02-02 22:12:36 -08:00
Kurt
cd286d6923
Yield specific static encounters for rby/gsc for moveset gen
2021-02-02 20:25:59 -08:00
Kurt
fa09c6bc25
Update NicknameVerifier.cs
2021-02-02 19:21:17 -08:00
Kurt
3d99902023
Add HOME nickname verification rules
2021-02-02 19:14:38 -08:00
Kurt
107d9a71d5
Fix transfer for Gen1 in-game trades
2021-02-02 16:27:31 -08:00
Kurt
630d84c8b6
Check encounter moves for gen1/2 (no relearner)
2021-02-02 15:39:56 -08:00
Kurt
21e1e6def5
Check format 3/4 for setpidnature
2021-02-02 15:39:41 -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
f85ee7615d
Replace dashes with spaces for cosplay pikachu (rock star)
...
Can't replace all dashes with spaces, because Pom-Pom Oricorio exists.
2021-02-02 09:19:29 -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
5ef1850e46
Disallow marks on GO encounters
2021-02-01 20:34:04 -08:00
Kurt
4e9908a53d
Remove unnecessary logic
2021-02-01 20:17:17 -08:00
Kurt
03940b54a5
Update WB7.cs
2021-02-01 18:39:34 -08:00
Kurt
9124a3c62b
Improve handling of multi-nicknamed mystery gifts
2021-02-01 18:35:37 -08:00
Kurt
6d41d6a17c
Fix casting issue for mystry seed fetch
...
rand32 -> int32 can yield negative, when modulo'd can be negative (bad index)
2021-02-01 10:53:40 -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
2dbdd83952
Update NicknameVerifier.cs
2021-01-31 21:43:33 -08:00
Kurt
34ac8167f2
Update EncounterSlot.cs
2021-01-31 21:42:24 -08:00
Kurt
d2d20c13e0
Don't emit JP-BU as a random gameversion
2021-01-31 21:28:33 -08:00
Kurt
fa3fe0a380
Invert check, fix xmldoc descriptions
2021-01-31 20:12:46 -08:00
Kurt
7d6249853d
Add gen8 case
...
This method is only used by BulkStorage, which is unused. Just keeping this up to date.
2021-01-31 13:10:03 -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
4456a9dc7a
Update nickname rules for gen8/=>gen8
...
Add a setting so that can flag deceptive species nicknames (even though it may be possible).
2021-01-31 12:37:03 -08:00
Kurt
09e5dde609
Add gen6 key item arg logic
2021-01-31 10:53:41 -08:00
Kurt
fd4034272b
Update WC8.cs
2021-01-31 10:36:33 -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
62bf1c2755
Add stubs for verifying memories regarding items
...
Not implementing these, but at least setting up a clean area for anyone else to implement the logic
2021-01-30 19:15:39 -08:00
Kurt
33b671c636
Allow home gifts with T7SID > 0
2021-01-30 18:39:40 -08:00
Kurt
8dacc2f63e
Clean up memcard handling a little
2021-01-30 16:45:08 -08:00
Kurt
3bb4553b24
Disallow encounter edge case moves when battleversion reset
2021-01-30 13:15:21 -08:00
Kurt
8db21c2bd0
Update 21.01.30
...
Latest cumulative update release with mgdb/pget binaries updated.
2021-01-30 10:46:05 -08:00
Kurt
bdbbe5194e
Update MoveSetApplicator.cs
2021-01-30 10:34:24 -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
CanoeHope
70b13fc28b
Added Spiritomb and Hallowed Tower DPPt Event Constants ( #3136 )
...
* Update const_dp_en.txt
* Update const_pt_en.txt
* Update const_dp_es.txt
* Update const_pt_es.txt
* Update const_dp_ko.txt
* Update const_pt_ko.txt
* Update const_dp_zh.txt
* Update const_pt_zh.txt
2021-01-29 16:17:33 -08:00
Kurt
ff21d63d16
Update MemoryVerifier.cs
2021-01-29 14:34:45 -08:00
Kurt
697a9fc668
Permit 80-89 memories on eggs
...
nice logic ya got there, GameFreak
2021-01-29 13:47:31 -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
e5943e3c92
Clamp generation fetch for battleversion
2021-01-29 09:56:31 -08:00
Kurt
3a6bff11c9
Fix relearn move check for gen6+
...
Probably should rewrite some sections of the current move verifier; lots of old code with illogical paths
2021-01-28 18:08:13 -08:00
Kurt
e8fa28794c
Make PIDIV lighter weight, readonly
2021-01-27 16:52:04 -08:00
Kurt
6c1b6a269d
Pass gender when creating static entry
2021-01-27 12:29:49 -08:00
Kurt
7497e08f9b
Template fields with species for save file
...
Fix PP since gen8 has pound at 35 rather than 40
2021-01-27 08:40:37 -08:00
CanoeHope
8144a5add2
Add HGSS Blue Card Points Event Constant ( #3135 )
...
* Update const_hgss_en.txt
* Update const_hgss_es.txt
* Update const_hgss_ko.txt
* Update const_hgss_zh.txt
2021-01-26 22:13:30 -08:00
Kurt
4bbe9dec96
Update FormVerifier.cs
2021-01-26 16:23:26 -08:00
sora10pls
1be20be877
Fix GO Shiny permissions
2021-01-26 13:35:57 -05:00
Kurt
511797c1f9
Fix gen4 hm indexing
2021-01-25 20:58:56 -08:00
CanoeHope
94d6ce42bd
Add and update some Gen III and IV Event Flags ( #3134 )
...
* Update const_frlg_en.txt
* Update const_frlg_es.txt
* Update flags_dp_en.txt
* Update flags_dp_es.txt
* Update flags_dp_ja.txt
* Update flags_dp_ko.txt
* Update flags_dp_zh.txt
* Update flags_pt_en.txt
* Update flags_pt_es.txt
* Update flags_pt_ja.txt
* Update flags_pt_ko.txt
* Update flags_pt_zh.txt
* Update flags_hgss_en.txt
* Update flags_hgss_es.txt
* Update flags_hgss_ja.txt
* Update flags_hgss_ko.txt
* Update flags_hgss_zh.txt
* Update const_hgss_en.txt
* Update const_hgss_es.txt
* Update const_hgss_ko.txt
2021-01-23 16:52:55 -08:00
Kurt
b1c3526618
Update WC8.cs
2021-01-23 11:43:56 -08:00
Kurt
f8c8a1b0e0
Trim out inaccessible headbutt tables
...
57.1KB => 53.6KB (-3.5KB)
Refer to dumper project for filtering logic
3642bfaf9d
2021-01-23 11:33:43 -08:00
Kurt
edfb8fc2ff
Add TID/SID fetch for Battle Revolution
...
Can unlock boxes by setting a nonzero TID/SID
https://projectpokemon.org/home/forums/topic/36582-pok%C3%A9mon-battle-revolution-save-research-thread/?do=findComment&comment=221812
ty Akunoko
2021-01-22 22:55:55 -08:00
Kurt
68673cf671
Flag all marks, unlike prior commit
...
oops, unnecessary simplification
2021-01-22 21:17:41 -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
5abd61816f
Add gamesync interface for gen7
...
oops; gamesync ID now shows up as intended
2021-01-22 19:04:54 -08:00
Kurt
6d0da504d5
Fix Tree Area list from Whirl Islands (0x1F) to Route 42 (0x22)
...
https://projectpokemon.org/home/forums/topic/57375-pkhex-new-update-legality-errors-contribution-page/?do=findComment&comment=264118
Thanks Tlili !
2021-01-21 22:21:13 -08:00
Kurt
944ff107b0
Add new distribution raids
2021-01-21 16:30:07 -08:00
Kurt
8546ecaf46
Fix suggested moveset
2021-01-21 09:27:33 -08:00
Kurt
06e6242944
Update SAV4BR.cs
...
Uses Big Endian unicode for savefile strings, but pkm strings are big-endian-g4
2021-01-20 22:13:59 -08:00
Kurt
803b8675fe
Rework batrev current slot handling
...
Show all slots even if they're uninitialized. Empty first slots but present second slots caused errors on init.
2021-01-20 20:29:26 -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
CanoeHope
121ae9b611
Rename SWSH blocks and update Chinese HGSS Event Constant ( #3131 )
...
* Update TrainerCard8.cs
* Update SaveBlockAccessor8SWSH.cs
* Update const_hgss_zh.txt
2021-01-19 12:46:54 -08:00
CanoeHope
b117c269fe
Add some HGSS Event Flags and update existing ones ( #3129 )
...
* Update const_hgss_en.txt
* Update const_hgss_ko.txt
* Update const_hgss_es.txt
* Update const_hgss_zh.txt
* Update flags_hgss_en.txt
* Update flags_hgss_es.txt
* Update flags_hgss_ja.txt
* Update flags_hgss_ko.txt
* Update flags_hgss_zh.txt
* Update const_hgss_ko.txt
2021-01-18 09:04:03 -08:00
Kurt
680e8b711d
Add some code analysis for try-return with nullable out
2021-01-17 00:05:07 -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
b5c30193fa
Set initial capacity for stringbuilder to reduce reallocation
...
Default capacity is 16 so it's rarely an issue, but sometimes we don't need that much.
Update xmldoc for more clarity
2021-01-16 17:31:05 -08:00
Kurt
03ae3d470c
Simplify value passing
...
buffers are fixed size matching the StringLength anyways; don't bother with confusing max length passing when the buffer is obvious
2021-01-16 13:56:37 -08:00
Kurt
3c42978afa
Use IndexOf instead of FindIndex when possible
2021-01-16 12:47:02 -08:00
Kurt
de418e8db2
Simplify string termination handling
...
If 0x50,00.. terminated, treat differently than 0x50.. terminated buffer
2021-01-16 12:43:17 -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
613e6db744
Use StringConverter api consistently; use stringbuilder when possible
...
Retain a stringbuilder to mutate the string rather than finalizing temporary strings
yields some speed improvements (less gen0 string objects allocated)
2021-01-14 22:50:13 -08:00
Kurt
3816d25f7b
Condense some expressions
...
Simplify legal held item array creation, reduce linq usage in startup
Discard unreleased item array references; no need to retain after startup
2021-01-12 22:38:18 -08:00
Kurt
c32b38a53c
Minor annotation tweaks
...
no functional change
2021-01-12 22:26:08 -08:00
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
e62ea685c3
Make SpeciesConverter methods visible (class)
...
4 public methods; shouldn't need these except for fringe scenarios.
2021-01-11 17:52:02 -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
CanoeHope
291ec5b073
Added 4 FRLG flags ( #3124 )
...
* Update flags_frlg_en.txt
* Update flags_frlg_es.txt
* Update flags_frlg_zh.txt
2021-01-10 17:17:21 -08:00
Kurt
6566b0ed1f
Add Pokedex flag properties
...
Closes #2954 ; can set directly from propertygrid already, but might as well clean things up a little bit to match the disassembly logic.
Open the simple editor center parent rather than next-form-position
2021-01-09 23:27:22 -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
a235cae9e0
Add Move enum, similar to Species/Ability
...
dash,apostrophe,space => empty
Z Moves have P/S suffixed
10mil volt thunderbolt "TenM"
2021-01-09 13:07:29 -08:00
Kurt
c83208c915
Rename CheckIdentifier.Move to CheckIdentifier.CurrentMove
2021-01-09 13:05:56 -08:00