Commit graph

165 commits

Author SHA1 Message Date
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
Kurt
f84cab6272 Block bred Ash Greninja
Closes #1329
2017-07-13 21:12:16 -07:00
Kurt
ee29b4a31f Reorder mysterygift 5+ egg generating logic
Closes #1331 where IsEgg was checked before it was set
handle legality cases (set nickname & flag)
2017-07-13 21:05:20 -07:00
Kurt
08ca4dd147 Fix gen3 static encounter eggs
add exclusions for egg data, fixes wynaut and togepi ingame gift eggs.
Closes #1322
2017-07-12 09:02:54 -07:00
Kurt
23c4e81dea Add invalid match alternatives to verbose output
Indicates why another type of encounter to match to was rejected, mostly
useful for diagnosing past gen specimens to figure out what changes need
to be made for that encounter to persist.
2017-07-12 09:02:03 -07:00
Kurt
1d93c5836e Tweak egg detection
Remove hot springs from general egg list, add bypass to static encounter
check
a91764b283
2017-07-10 21:45:37 -07:00
Kurt
a91764b283 Add hot springs as valid egg location for gen6
split table references, remove per-format calculations as they all
behaved the same as the main method
2017-07-10 18:56:13 -07:00
Kurt
851809c585 Add gen2 roamers
Closes #1268
(take 2 skips the suicune encounter for Crystal)

Thanks @greenDarkness !
2017-07-09 09:17:43 -07:00
Kurt
cb76d51e38 Simplify vc transfer checks
supply met level so the static encounter has a level to work with
instead of 0
Closes #1316

in other areas:
level 48 charizard VC1 transfer changed to mewtwo causes minlvl >
maxlevel, handle instead of throwing exception.
2017-07-09 08:47:17 -07:00
Kurt
29914c431e Misc capitalizations 2017-07-07 17:40:27 -07:00
Kamron Batman
152d8e102f Fixes WC3 eggs. 2017-07-07 08:27:16 -07:00
javierhimura
8219bb6716 Fix ChainShiny method, allow outside safari zones instead inside 2017-07-07 14:00:06 +02:00
javierhimura
7b1812f184 Added check for pokeradar shiny grass patch
Not allow cutecharm pid iv method for swarm pokemon
Fix loading time encounter for generation 2 and mark crystal location slots in any gen 2 tables
Typos in tree areas comments
2017-07-07 13:53:21 +02:00
Kurt
60becb6e37 Fix typo
461fb70f90 (commitcomment-22965638)
2017-07-06 22:05:54 -07:00
Kurt
a653363a16 Simplify wc3 checking
all branches did similar checks, so I pulled them out

Added TID bypass for PCNY incremental TID pkm
#1313
2017-07-06 20:22:54 -07:00
Kurt
224544c322 Add missing change 2017-07-06 17:01:53 -07:00
Kurt
ca04abfca6 Refactoring
misc cleanup/breaking up large methods from recent PR
2017-07-06 17:01:29 -07:00
javierhimura
461fb70f90 Generation 1/2 Legal improvements (#1310)
* Added location to encounter slot to make verification againts the location of the encounter when the pokemon has lost met location, like generation 2 heabutt tree, jhoto surfing in route 45 and in the future generation 4 munchlax tree

Added version to generation 1 and 2 encounter locations to filter by catch rate based of the version of the encounter and check initial moves of the encounter only for the game that match the encounter

Filter generation 2 pokemon for crystal who have met location based of the time of day when it was captured

Completed version to static and traded encounters for gen 1 pokemon, to avoid check a red encounter with yellow initial moves, if an encounter is possible in both games with diferent moves it is duplicated (like eevee), if it is possible in both games with the same moves is left as RBY, the encounter will only use red/blue moveset

Verify some invalid gen 2 encounters. Crystall heabutt encounters based on the TID, using the tree selection algorithm of the game to determine if the encounter is possible for the TID (implemented base on https://bulbapedia.bulbagarden.net/wiki/Headbutt_tree#Mechanics). Coordinates of Crystal trees obtained with the programa G2Map

Added checks for fishing encounters for unreacheable water tiles in gen 2, route 14, national park and the beta safari zone.

* Fix gen 1 static encounters and trade encounters filter by version

* Missing strings
2017-07-06 16:03:41 -07:00
Kamron Batman
0a2245b55c Fixes various gen 3 event templates. (#1309)
* Fixes various gen 3 event templates.

* Adds more checks to PokePark 2005 eggs for DS Download Play.

* Fixes various gen 3 event checks. Still missing japanese events, but will add those another time.

* Adds 10 ANIV Celebi.

* Fixes PCJP 2003 eggs. Still doesn't use the exact formula though, but BACD-R is something to start with.
2017-07-06 09:45:41 -07:00
Kurt
e6d9f49fce Handle e-reader PIDIV type
no pidiv type since IVs are frozen at 0
2017-07-05 23:38:28 -07:00
Kurt
502093b8b2 Misc tweaks
fix pcd detection (yield brewk needed to be inside brackets
remove brackets from single line lambda expressions
2017-07-05 23:05:49 -07:00
Kurt
43be0c6e99 Add missing gen4-5 artist ribbon check
allow artist ribbon if any of the gen3 contest ribbons have master rank
2017-07-05 18:42:06 -07:00
Kurt
2ef5b81b15 Add gen4 cutecharm for valid gen4 wild pidivs
encounter is screened for charm validity prior to this type check, so no
further checks are required
2017-07-05 18:40:47 -07:00
Kurt
0c23881f65 Add manaphy egg PIDIV check
slightly different from hatched in that it can't be shiny as an egg as
the ID/SID doesn't change until hatched.

move Ranger check to utility
2017-07-05 17:47:48 -07:00
sora10pls
cad24744ef Manaphy Egg fixes 2017-07-05 15:31:41 -04:00
Matt
2e0f3a9305 Actually fix Old Chateau Encouner Type (#1306) 2017-07-05 10:04:34 -07:00
Kurt
420a07ba54 Fix off-by-one colo/xd met locations
add empty line as first line
shift ingame trade (254) down one to compensate for the offset
closes #1303

fix larvitar encounter speciesnum
2017-07-05 08:34:25 -07:00
sora10pls
fa6f3a745f Unban various Held Items 2017-07-05 00:42:26 -04:00
Kurt
fd1c7419b1 Set fateful for xd pkm transferred away
Only way to know if it originated in XD is to check the matched
encounter data

Closes #1290
2017-07-04 13:24:18 -07:00
Kurt
88731e22ac Merge pull request #1299 from sora10pls/master
Fix Old Chateau encounter type
2017-07-04 11:40:48 -07:00
javierhimura
7f788e4167 Added Froslass to FutureEvolutionsGen3, a gen 3 Froslass will now return true when executing function InhabitedGeneration for generation 3 2017-07-04 20:37:55 +02:00
sora10pls
37d5be14f7 Fix Old Chateau encounter type 2017-07-04 14:33:06 -04:00
Kurt
4e9b6be8e5 Convert console output to debug output
output messages are now no longer in release builds, as they are only
visible when debugging in an IDE.
2017-07-01 19:43:51 -07:00
Kurt
b760509fcb Misc gen3 event updates
Add special ribbon detection (for wc3),
speed up seeds from IVs calc (flip top bit of seed to get the result for
other iteration)
Add a bunch of gen3 event data
2017-07-01 16:50:45 -07:00
Kurt
5476b86a11 Misc performance tweaks
Switch encounter slot generator to yield style to not require the entire
method to finish iterating
Although the pressure slot may be best-matching, it isn't the typical
match. Defer pressure slot clone to the end (defers the orderby
calculation)

There's probably a better way to do the pre-work (gen 5+ only operate
off one encounterarea... usually. Past Gens end up repeating the same
work for each area tested

slot matching runs slightly faster now due to the deferred execution
2017-06-30 00:37:17 -07:00
Kurt
b71485c0a3 Misc tweaks for encounter generation
reduce 'as' usages for pk1 (cast & check once)
reorder some slot generation checks (early return prior to slot
filtering; not crucial as the linq wasn't evaluated yet).
2017-06-29 23:50:24 -07:00
Kurt
90693a2a76 Don't generate egg encounters if species cant exist
Closes #1286
2017-06-29 20:12:40 -07:00
Kurt
1c4a1af633 Misc updates
Detect channel, only detect Channel PIDIV for RS origin (only really
care about method1/2/4 being used when it shouldn't)
Channel does this weird thing called not setting the met level.

Refactor set suggested met location to a method that can suppress
popups.
2017-06-29 19:32:29 -07:00
Kurt
2546ddfd8e Misc gen3 related updates
detect gen3 event eggs better
2017-06-28 22:09:26 -07:00
Kurt
e1d0867a51 Misc egg related additions
Closes #1257
Disallow static encounters that aren't eggs or are for eggs (mismatch)
Check egg encounter level for IsWithinRange
Check egg met level while still is egg
2017-06-27 22:08:16 -07:00