Commit graph

204 commits

Author SHA1 Message Date
Kurt
bfdf1c5b37 Check stadium OT/ID based on pkm language
not really necessary (character table not shared, assuming no transfer)
but easier to understand
2017-08-16 16:57:17 -07:00
Kurt
3743c1d3d4 Add normal box to gsc held item table
https://projectpokemon.org/forums/forums/topic/41438-gsc-normal-box-stadium-pk1-bugs/
2017-08-16 16:28:38 -07:00
Kurt
7fb9ce4131 Misc updates
Add global link mission stats (thanks Holla!)
remove some ToArray() linq in favor of direct copies
Relocate encounter suggestion logic to separate class
Closes #1396, addresses other edge cases like entree-non HA & happiny
egg.
2017-08-15 21:16:47 -07:00
Kurt
9864d84704 Misc fixes/improvements
Reduce memory usage for evo method banlist (static banlist references)
Fix gen6 mega evo flag truncation
simplify QR encode/decode logic a little
Don't apply transparency if transparency is already 100% (skip the loop)
Add gen5 wild pid/tid-sid correlation check
Fix validation value reset (loading gen3-4 pkm without looking at met
tab causes the met location to get reset); fixed by prematurely
validating before setting the value
Fix gen3 pkm with gen4 contest ribbons in gen4/5 getting flagged
incorrectly
2017-08-13 00:21:42 -07:00
Kurt
f3382bbd60 Fix shedinja egg relearn edge case
genderless species from gendered caused returning empty arrays
2017-08-12 14:11:30 -07:00
Kurt
fb326500c1 Misc lc fixes
inheritable apricorn balls for baby-tree pkm
japanese N ot
g5 traded event egg location
2017-08-12 01:30:19 -07:00
Kurt
2340c829ad Defer gen1/2 trades to end
like prior commit, OT checks
Closes #1391
2017-08-10 23:23:02 -07:00
Kurt
de11b8e375 Defer gen2 fixed OT / special events
Toss them to the end of the enumerable as OT checks aren't done in the
generator/finder
Closes #1392
2017-08-10 23:20:03 -07:00
Kurt
47dcb56090 Misc fixes
static-wild encounter g4 collision (abra gift), closes #1390
off by one pokepuff strings
unshuffle bk4 ribbons
pgt bad sanity events now auto-sanitized
2017-08-10 20:51:27 -07:00
sora10pls
1cea2e1c53 Unban Diancite 2017-08-10 02:01:23 -04:00
ReignOfComputer
83ec86424f August Mega Stones 2017-08-10 09:45:13 +08:00
Kurt
340a71a47e Update 17.08.07
Update event binaries with latest from the Event Gallery
2017-08-06 21:50:11 -07:00
Kurt
bbb9e140e6 Add gen2 japanese eggs
Closes #1348
2017-08-05 20:25:20 -07:00
Kurt
deb7ec417e Add feebas slot clone for mt coronet
both mt coronet fish slots are the same, first one is at index 10 of the
slot arrays.
Closes #1318
2017-08-05 14:32:12 -07:00
Kurt
b078064e08 Improve xdrng seed search speed
refer to stackexchange links, makes XDRNG PID/IV search so quick (2^3
instead of 2^8 or 2^16; as fast as a gen3 shiny pokemon (2^13=8192 times
as fast as last release)

throw in some auto-inlining to eliminate some overhead in repetitive
search calls
2017-08-05 01:51:29 -07:00
Kurt
3621105e85 Change spiky pichu to pokewalker pid method
#1381
now that pokewalker pid method is finished, pichu is noted to be
generated with it.
2017-08-04 09:21:38 -07:00
Kurt
fe06309134 Add IV framegap search
Only usable for searching Method 4 IV spreads -> seeds;
1,3's search uses the same approach as the 1,2 search
I took the 1,2 search derivation to iterate for the next step, which
allows us to not know anything about the middle rand bits.

optimize a little bit more, move the pre-loop add to the initialization
stage; moving to the precomputed section pays off after 256 calls to the
method
2017-08-03 21:35:41 -07:00
Kurt
fa44b91511 revise comment
clarity achieved during sleep :)
2017-08-03 09:49:03 -07:00
Kurt
d667fd04ba sync final comments
yeah I inverted the val decrement to increment temporarily to fix my
comment, oops
2017-08-03 01:13:12 -07:00
Kurt
3123f0df2f Drastically speed up rand() pairs -> seed search
Meet in the middle attack trades some RAM (2^16 flag/byte array) to
reduce future searches by a factor of 1:2^8

profiling yielded >100x speed improvements, even a 2x would have been
impressive ;)
knocks the biggest cpu hog (when searching db) out of the race!
2017-08-03 00:59:39 -07:00
Kurt
4945744599 Update Pokewalker PID checks
wildeep to the rescue 7y ago

http://www.smogon.com/forums/threads/past-gen-rng-research.61090/page-12#post-2661504

test cases need gender specified as gender is stored in a field (not
directly grabbed from PID)

addresses pokewalker pkms provided in #1377, RoC's PC has a bunch of
hacks ;)
2017-08-01 23:48:35 -07:00
Kurt
fe6aef3776 Flag relearn moves not possible on current game
Noticed the egg moves were concatted between games; can only have egg
moves from the origin game
Same for levelup moves in the relearn list; example being Plusle with
Charm (was added to egg moves / learnset in OR/AS for parity with minun

this is such a remote edge case, but may pop up in usum for a different
species ( ͡° ͜ʖ ͡°)
2017-08-01 17:55:23 -07:00
Kurt
2a4aa0b79d Refactoring fixes
Fix misc refactoring errors

Don't early abort gen4->5+ encounter generation (need to check ingame
trades for abra/gengar). Can avoid by PID dictionary to check for trades
first, but unimplemented.

Closes #1377 , not fixing Pokewalker PID mismatch as algorithm needs to
be ironed out separately.
2017-08-01 14:55:10 -07:00
sora10pls
31781dd7d7 Fix D/P static encounter fetch 2017-08-01 13:26:11 -04:00
Kurt
80196f75ef Refactoring
split Core.PKX into smaller classes, only StringConverter is exposed for
outside namespaces
2017-07-31 23:03:51 -07:00
Kurt
2344098745 Refactoring
Add more docs, clearer code
Fixes gen2 national park / route 14 swapped strings in EncounterVerifier
2017-07-31 17:09:16 -07:00
Kurt
c15cfdc52d Fix b2w2 reference
yay copypaste
Closes #1373
2017-07-30 15:13:45 -07:00
Kurt
d3a30ebf35 Refactoring +docs
Add some documentation for the high-level encounter finding
Fix encounterstatics not being filtered for the associated game version
(closes #1372)
was a side effect of refactoring this week
2017-07-30 12:31:17 -07:00
wwwwwwzx
5b05330ce8 Add XY Snorlax shiny lock and legends ability lock
From gen6 RNG
2017-07-29 20:54:44 -07:00
Kurt
cb8777f767 Refactoring
now that the logic has become more stable, polish away some complexity
2017-07-29 11:54:52 -07:00
Kurt
ac3d6a296a Add gen4 forme move handling
Shaymin case reported, deoxys defense at level 100 with zap cannon was
not recognized as legal.

Closes #1355 via provided fix
Closes #1367, did not address Deoxys case
2017-07-27 02:24:23 -07:00
Kurt
711661c1ea Switch air cutter for roost (oras tutors)
crowdsourced error, confirmed with pk3DS
314 (air cutter) ->355 (roost)

pad with leading zeroes for cleanliness
closes #1364
2017-07-25 23:30:10 -07:00
Kurt
5f088813a5 Ignore secret sword mismatch in gen5
Closes #1361
2017-07-25 20:39:54 -07:00
Kurt
9b0603df96 Add emerald swarm special move detection
I don't think SlotType.Grass->Swarm changes anything, best to use it for
differentiating vs the default 1% slot.

Closes #1362
2017-07-25 17:35:07 -07:00
Kurt
68aa9aeec9 Relocate encounter data loading to separate files
shifts encounter data from Legal's split tables to individual files for
easier maintenance and initialization. Legal Core's init is so much
simpler now.

fix resource name typo
2017-07-25 00:28:43 -07:00
Kurt
fb9dd6103d Unban daily ribbons for OR/AS
Ribbon Belle at Mauville Hills gives the daily ribbons
Closes #1343
2017-07-21 08:48:35 -07:00
Kurt
dea3fcfab6 Merge pull request #1354 from sora10pls/master
Unban Aggronite
2017-07-21 08:28:44 -07:00
architdate
9a9553f8c0 Fixed Zygarde Legalities from Gen 6 origin (#1353)
* Fixed Zygarde Legalities from Gen 6 origin

* Same functionality, Lesser Lines
2017-07-21 08:28:25 -07:00
sora10pls
ed7cb02dd1 Unban Aggronite 2017-07-21 01:49:56 -04:00
Kurt
30f7345218 Fix goodra gen6 evo check
Remove 31 from argevos, was wiping goodra's evo for whatever reason. No
idea why it isn't 4 sliggoo, but oh well, now works as intended.

Apply a little bit of performance increases for the loading of
evotables.
data length checks unnecessary as the the following iterator will throw
an exception
2017-07-20 19:34:41 -07:00
Kurt
3b8643bc77 Fix gen1 VC legality checking error
GetGenMovesCheckOrder doesn't respect generation restrictions, while
EncounterMoves does; filter afterwards.

Add compiler flags in the Analysis file to toggle try/catch off for
easier debugging. Just uncomment the #define SUPPRESS line.

Closes #1345
2017-07-18 16:21:31 -07:00
Kurt
2d18440445 Fix wurmple evo gen3/4
yeah it was never the lowest 16 bits as every-internet-source claims.

1D9C9130 silcoon => 3716[8] = cascoon (nope)
#1330 was correct!
2017-07-17 15:58:15 -07:00
Kamron Batman
3168a2ae40 Fixes shiny check and adds negai boshi. Adds force-shiny 5th anniv. 2017-07-16 16:07:28 -07:00
Kurt
2b0cfab31a Disallow shiny dream radar/forest shinies
Closes #1340
2017-07-16 10:15:12 -07:00
Kurt
c61c572f35 update channel generation
Thanks @admiral-fish !
2017-07-15 19:59:38 -07:00
Kurt
2a2f5669e4 Add wc3->pk3 conversion
fixes 10ANIV pikachu having Thunderbolt twice
un-duplicates CHANNEL event data
adds seed->PIDIV generator template for M1/2/4, CXD, Channel, and BACD

improve pkm converter to update nickname of hatched eggs. isn't perfect
(farfetch'd) but works better than before
2017-07-15 18:36:55 -07:00
Kurt
2f3c56e7c5 Update gen4/5 mg generators
PGF for movie victini has OTgender=3; only eggs are supposed to set OT
details from the SAV.

update pattern matchers to abuse this fact.

Thanks @odaxis !
2017-07-14 22:50:12 -07:00
Kurt
dc0a43ae8f Handle link gifts without ribbons
Link gifts had the possibility of having all those ribbons (even
Event3), but none were used.
2017-07-14 20:42:51 -07:00
Kurt
dce42195e5 Add static encounter deferrals
Rarely ever used, the only case where an unfavorable match is returned
first is Emerald Lati@s transferred to a future generation, as there are
2 encounters (one with and one without Fateful).

Closes #1326
Thanks @sora10pls !
2017-07-13 23:12:30 -07:00
Kamron Batman
51ae267cc8 Adds aura mew. Rearranges wondercard events to the right block. Fixes mews. Adds Negaiboshi. 2017-07-13 21:42:55 -07:00