Commit graph

7801 commits

Author SHA1 Message Date
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