Commit graph

465 commits

Author SHA1 Message Date
Kurt
c531f9ae5f Update 17.09.05
Update event binaries with latest from the Event Gallery
this time, ignore any in the "Unreleased" folder!
2017-09-04 22:54:16 -07:00
Kurt
c98b0ab0b3 Refactoring
Split some large methods into smaller pieces
2017-09-04 18:55:15 -07:00
Kurt
6fe926d1f6 Refactoring
readability++
2017-09-04 13:48:10 -07:00
Kurt
0b4e6a0733 Refactoring
relocate ribbon checks/class to more focused location
reduce amount of GenNumber checks (use stored Generation value instead)
2017-09-03 19:51:29 -07:00
Kurt
cf61333b40 Add gym team history
thanks vg anon (187997971/188004360)
2017-09-03 17:23:20 -07:00
Kurt
9f8cbf3e46 Add more usum prep
Closes #1438 ; SM evo table wasn't being loaded as the gameversion was
changed to USUM.
Will see if there's any evo changes soon!
2017-09-02 08:41:36 -07:00
Kurt
229d752d7a Update showdown form parsing
Closes #1437 (should have been handled in PKHeX.Core not winforms);
extracted the two sanitization methods and sprinkled in some c#7
2017-09-02 08:26:51 -07:00
Kurt
6589869b35 More refactoring
simplify some expressions, reduce repeat operations
2017-09-01 23:45:47 -07:00
Kurt
d1aa02fb31 Refactoring
split up current move parsing a little
2017-09-01 23:15:57 -07:00
Kurt
84c90e973e usum prep
Copied binaries from sm, references set up for saving time later

I assume not much will change in terms of structures, so it should just
be a file replacement & filling in static encounter table => 'working'
legality checks
2017-08-31 22:37:28 -07:00
Kurt
578ab137e2 Refactoring
Flag Korean Ranger Manaphy (never distributed)
extract pk1 catch rate verification
2017-08-30 21:30:07 -07:00
Kurt
4c0a2602eb Simplify greninja gift check
form is already checked in the encounter generator, so the only case
where it has not been thoroughly checked is if it is not a mystery gift.
it will always be the default form (in that case).
2017-08-30 08:14:42 -07:00
Kurt
d5e5a463dc Refactor order of pidiv checks
collision between mgshiny and cutecharm shinies
Closes #1435
2017-08-29 08:32:22 -07:00
Kurt
a314ebfbd3 Add pokewalker early return check
check the middle bits for signs of pokewalker origins
can either be regular or adjusted underflow style

saves a little bit of computation time by not computing compatibility
for obvious non-matches
2017-08-28 23:40:04 -07:00
Kurt
072f1ba83d Refactor level-evolution checks slightly
Allows evolution met level check to be skipped
Adds minimum level constraint for evolution chain generating

Closes #1430

also adds deferral to the gen3 encounter generator as encounterstatic
gifts can collide with wild encounters when transferred
2017-08-28 18:12:57 -07:00
Kurt
86608f886d Fix incorrect comparison
don't write for gen5, do write for gen1-4.
Closes #1429
2017-08-27 20:39:11 -07:00
Kurt
93f81d554f Misc simplifications
#1417

I'm pretty sure these are trainer stats, so there may be a better way of
presenting these (ie all stats) in the future (if anyone cared). Refer
to gen6/7 trainer stats as reference.
2017-08-27 12:49:05 -07:00
Kurt
b26c670985 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	PKHeX.Core/Saves/SAV4.cs
2017-08-27 12:36:56 -07:00
Kurt
8aa5d9daf0 Add pokewalker initial flags 2017-08-27 12:33:04 -07:00
Egzon Qukovci Jusufi
d0b5ceb8ff Underground Score Editor (help needed) (#1416)
* Underground Score Editor first commit

* not needed space

* changed anchor points

* added dp offsets, ug scores to underground, underground button click code
2017-08-27 12:32:43 -07:00
Kurt
c627a86f8c Fix g4 move tutor lookup
personalinfo setup wasn't populating info for form indexes
remove erroneous pid-type mismatch message on gen3/4 non-matching if
there are no deferred encounters
2017-08-27 11:04:31 -07:00
Kurt
c74a519539 Remove (item) from None strings
for fr/de langs
2017-08-26 08:43:00 -07:00
Kurt
b9a9b6db32 Add gen2 iv reroll for shiny
#1419
2017-08-25 18:57:17 -07:00
Kurt
183164a197 Add batch edit pk1/2 .PID=$shiny
Closes #1419
2017-08-25 17:44:15 -07:00
Kurt
a62e2a95ad Invert PCD return value on match
Result of refactoring and manually flipping all the returns
Closes #1421
2017-08-25 17:29:14 -07:00
javierhimura
f889a6ce7f Fix generation 1/2 encounters for pokemon with different initial moves in yellow/crystal than r/b/g/s
The encounter generator was returning always RBY and GSC and that make the ParseMovesGenGB to check only for rb and gs learnset for initial moves, the game returned should be the game for the encounter to make ParseMovesGenGB use the correct learnset table for the initial moves
Closes #1417
2017-08-25 16:25:59 +02:00
Kurt
ccc6357294 Misc updates
Re-enable PKM (abstract class) property searching via Database/MGDB
search
Closes #1412 (can now search or exclude certain formats)

Add auto-detection for all supported saves (rather than gen3+ except
GC/PBR)
2017-08-24 18:49:09 -07:00
Kurt
4f7c19d0cd Refactoring
Extract mystery gift matching criteria into separate method
2017-08-24 10:09:34 -07:00
Kurt
c2124a4bbd Disable catch rate updating on pk1->pk2 xfr
Closes #1414
2017-08-24 10:08:01 -07:00
Kurt
261349c90f Add xk3 fateful check
Closes #1410
2017-08-21 08:59:26 -07:00
Kurt
996a219a13 Gen5 international language bits dex fix
Closes #1395
Gen5 save files do not store multilang dex entries for gen5 species

https://bulbapedia.bulbagarden.net/wiki/Foreign_Pok%C3%A9dex_entries#In_Generation_V
2017-08-20 17:52:10 -07:00
Kurt
8e1105e781 Misc fixes
Closes #1409, fr entries weren't tab separated
Closes #1408, editor interface was correct (refer to checkbox order
comment in Pokedex4.cs)
Closes #1407, XY species were copypasted to AO's
2017-08-19 18:43:36 -07:00
Kurt
309ef8bc34 Fix location suggestion
some games don't have location set to the slot, just copy from area
closes #1402
2017-08-18 19:36:16 -07:00
tnatiuk17piano
e17455b6dd Update flags_oras.txt
Add Eon Ticket flag
2017-08-17 21:13:26 -07:00
Kurt
c8a99ce79a Misc tweaks
split up large Sanitize method into smaller pieces
2017-08-16 22:13:26 -07:00
Kurt
cadf3134d9 Misc fixes
fix early-verification (introduced in 9864d84), just invert the
fieldsLoaded check. No longer interrupts the pkm loading routine when
changing game locations
fix stadium check (accidentally inverted in bfdf1c5)
Closes #1398
Closes #1397
2017-08-16 22:12:28 -07:00
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
d042994d5a Fix kor ingame char table
remove 1024 (invalid char), insert 1039 (connect two sequences)
Closes #1357
2017-08-06 17:29:04 -07:00
Kurt
ebecb21b2e Fix cxd strategymemo/shadowinfo export
Closes #1347
Closes #1296
2017-08-06 17:20:04 -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
4edba19a19 Add platinum wallpaper mapping
dp wallpapers .. pt wallpapers .. hgss wallpapers
contiguous series
24 .. 8 .. 8

Closes #1381
2017-08-05 10:16:55 -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
64919cb8c1 Fix argument order forms fetch
Closes #1378
2017-08-02 10:00:24 -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
Kurt
8e4d236c98 Merge branch 'master' of https://github.com/kwsch/PKHeX 2017-08-01 13:37:46 -07:00
Kurt
75ac795d92 Add missing cast for g7 string conversion
Closes #1374
2017-08-01 13:37:42 -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
wwwwwwzx
5c34e37006 Update Chinese Translation
Replace with in-game texts, mainly ribbon names.
Update legality strings.
Fix Chinese hgss location text (Mt. Silver => Mt. Silver Cave)
2017-07-29 20:49:57 -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
defb05fed4 Add gen5 nidoran name handling
sanitizes to the gen5 case and back,  no half/fullwidth is considered
closes #1370
2017-07-28 18:04:27 -07:00
Kurt
f6df831d1a fix korean set nickname
closes #1369
2017-07-28 09:02:01 -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
9b31202345 Restore bk4 properties
necessary for reflection property transferral (ie language)
indirectly fixes mixed-bit properties (ie altform/gender) as they are
reversed bits relative to pk4.
2017-07-26 18:26:54 -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
85d4c0b4d7 Improve wc3->pk3 creation
Closes #1337
2017-07-15 23:35:32 -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
Kurt
ee57bc49f0 Add gen3 event flag/variable editing
Template files added for e/frlg, no guarantees.
http://i.imgur.com/ER5rRBn.png
(left+select+b when on groudon/kyogre menu screen)

Closes #1328, thanks @rboninsegna !

Added the ability to prefix flag numbers with 0x, and prefix variable
numbers with 0x40__; will be parsed as hex.
2017-07-13 23:05:59 -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
c12eba2186 Add Gen6 mega evolution early-unlock edit
TrainerCard offset is 0x14000
http://i.imgur.com/XtsZLmL.png

via:
33011937 ekx
182491428 hbg
tyvm anon
2017-07-12 20:38:24 -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
4a2dbe4ad2 Add gen4 ribbon names
Closes #1297
fix off by 1 language checking
2017-07-09 14:31:08 -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
04a11ae030 Update gen4 dex seen bitflag setting
now matches general format of SAV_Pokedex4, bit regions were off-by-one.
2017-07-08 19:33:20 -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
267de164f4 Set pkm Stat Level when transferred to CK3/XK3
Closes #1302
Box structure in CK3/XK3 stores stats AND level, as battle stats are a
part of the box structure. There's no party/box differentiation!
2017-07-06 17:47:38 -07:00
Kurt
33dff69fb2 Add dp current poketch offset
Closes #1311
2017-07-06 17:32:26 -07:00
Kurt
45c891e64f Add inventory sorting by index number
Closes #1312
2017-07-06 17:24:40 -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
3b3d31f70b Allow WC3 Egg Met_Level to be overriden from 0
#1309
2017-07-05 23:22:06 -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
sora10pls
951bd6fac4 Fix D/P Mail Item offset 2017-07-05 12:33:04 -04: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
993767f05a Update 17.07.02
Update event binaries with latest from the Event Gallery
2017-07-02 00:14:27 -07: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
e373db99c1 Fix honeytree group get
byte 6 sets 0/1/2/3, which is used for the editor
byte 5 says which sub-table to use (0/1/2) if there is something on the
tree.
Closes #1283
2017-06-29 09:09:59 -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
Kurt
5ebfd10a0a Unban gen6 berries held items
Closes #1278
2017-06-27 08:45:46 -07:00
Kurt
6a054fa7f5 Fix r2 ribbon checks
Closes #1276
if there's any stragglers just report back in that thread
2017-06-26 22:18:42 -07:00
Kurt
dfb7e144b2 Invert language check for VC origin pkm
There's more languages than English/Japanese :)
Closes #1274
2017-06-26 20:32:05 -07:00
Kurt
86d39f2c81 Tweak level/origin check for moves
Valid species/movepools are already determined via the dexlevel and
prior methods, no need to check again with current species.

edge case: sing froslass from CXD won't check gen3 moves (ie, sing)
2017-06-26 20:30:44 -07:00
Kurt
e635755dfd Add SID bypass for cxd random SID gifts
For XD Trade Gifts, the SID matches player's SID (not 0).
2017-06-26 20:29:22 -07:00
Kurt
19bf8de17c Add gen1/2 EV checks 2017-06-26 20:12:49 -07:00
ReignOfComputer
c83a311fd4 Unban Banettite and Cameruptite (#1275) 2017-06-25 20:30:31 -07:00
Kurt
bf6ef284b1 Move contest stat to separate usercontrol
#1272
Smart label now appears for gen 3-5
2017-06-25 10:57:35 -07:00
Kurt
4b1e91677e Fix misc legality issues
Closes #1273
not noted anywhere was encounterstatic pikachu on gen6 (pokewalker->6)
would get flagged.
2017-06-24 17:24:37 -07:00
Kurt
ac16492daa update abilityflip g5mgshiny checks
Closes #1269
Also adds pokewalker PID check (don't think it works correctly but close
enough for now)
2017-06-24 17:24:36 -07:00
Evan Dixon
560f4eab0b Target netstanard1.3 and net46
I recently learned about targetting multiple frameworks in .Net Standard libraries. The main benefit here si taht PKHeX.WinForms and PKHeX.Tests no longer need to carry around the .Net Core DLLs. While it's now an option, I encourage PKHeX.Core to avoid framework-specific compiler directives.
2017-06-24 08:12:35 -05:00
sora10pls
9cd85bf1db Misc4 updates 2017-06-23 15:47:52 -04:00
Kurt
5b5c9d0017 Move ribbon name resources to string dictionary
multilang support now possible, other language translation files added
from existing form translation file

feel free to submit a pull request to change anything for your native
language :)

Closes #1250
not gonna add the alt sprites/names for pk3's
2017-06-22 21:56:41 -07:00
Kurt
86e0374efc Update poketch dropdown/set
#1263
2017-06-22 19:18:14 -07:00
Kurt
5d6ccdedd2 Fix ribbonset comparison check
Closes #1265
2017-06-22 19:01:31 -07:00
Kurt
427eb268e1 Add ribbonresult class to separate invalid/missing
convert non-egg check to ienumerable iteration too

eventually ribbons will have a separate txt file
(PropertyName\tDisplayName), which will be used for both Legality and
Ribbon Editor.

#1250
2017-06-21 23:12:06 -07:00
Kurt
7a8ce986fa Update ribbonset4 iteration
only enforce none from the only 4/5 set; there's 4 ribbons checked by
any which can be received later on.
#1250
2017-06-21 21:46:20 -07:00
Kurt
8e8d43d52f Update ribbon editor language translation
english ribbon strings mappings weren't added for the new gen7 ribbons

should probably separate out ribbon internal <-> ribbon display names
for use with legality checking

#1250
2017-06-21 21:14:31 -07:00
Kurt
1815a7f273 Add current poketch app selection
Closes #1260
2017-06-21 21:07:07 -07:00
Kurt
25b3f2a65a Downgrade g1 required move count check to Fishy
Closes #1258
2017-06-21 21:00:25 -07:00
Kurt
a1b66ab11d Tighten met level check with hasoriginal
#1261
2017-06-21 20:47:07 -07:00
Kurt
3c07f1d0e2 Check if encounter is within level range
Can't rely on met level (or minimum) for a precise met level in most
cases.
#1261
#1259
2017-06-21 20:40:22 -07:00
Kurt
e697a9edc7 Block parties without battleable pkms
#1257
not perfect but less restrictive, probably more obvious.
2017-06-21 20:24:42 -07:00
Kurt
9efd49b0bc More egg related check changes
Properly check for actual held item
move unhittable check (verifyMisc isnt called when parsing pk1/pk2;
verifyMiscG1 is)
add egg PP check, add common method to be shared between gen1 checks and
GBA+
#1257
2017-06-21 09:18:33 -07:00
Kurt
1904700c1e Fetch jp egg name on gen3 species0
#1257
causes a pkm flagged as egg to return the japanese egg name for gen3
only
2017-06-20 22:55:58 -07:00
Kurt
966792713c Add egg held item check
no hold pls
#1257
2017-06-20 22:55:05 -07:00
Kurt
f15333ea6c Update speciesname fetch usages to be gen sensitive 2017-06-20 22:53:39 -07:00
Kurt
ea473ae74f Fix gen3 format evolved ability edge case
closes #1254
2017-06-20 22:33:02 -07:00
Kurt
8cc3a36708 Add manaphy egg sprite
Closes #1256
2017-06-20 22:19:04 -07:00
Kurt
9b76d9b214 Next round of ribbon checking
Returned messages are slightly misleading since missing/invalid are
mixed together with the static method.

#1250
~322 lines to check ribbons, on top of the interface abstraction... so
much required... kinda understandable as there's over 100 ribbons to
check.
2017-06-20 21:57:03 -07:00
Evan Dixon
2636e7ded8 Fixed another potential blank error message
I also added comments where appropriate, because it took far too long to understand what was going on when reviewing the commit that fixed the original bug.
2017-06-20 20:38:33 -05:00
Kurt
1a9da12404 Misc updates
fields->properties, capitalize
fix pkm fields toggle referencing old pkm file, simplify that process
instead of constantly referencing Format
2017-06-20 17:57:23 -07:00
Kurt
6921a2ebee Initial ribbon refactor
remove legality check's use of reflection which checked individual
properties; add interfaces to interact with the ribbons of each PKM
type. With this, every ribbon attribute is accessible via its
corresponding interface (cast)

will have to add checks for individual interfaces as per #1250

I didn't feel like adding much documentation, is pretty straightforward.
Cast a pkm object to the desired ribbon set; if not null, can access
ribbons regardless of pkm format.
2017-06-19 21:43:44 -07:00
Kurt
b4222c756a Refactoring
reduce cross-class chatter, simplifly large methods to smaller pieces
some speed improvements
2017-06-18 22:27:40 -07:00
Kurt
82c8bc01bd Add gen1-4 EV check for untrained pkm
Rework some checks for eggs, closes #1248

GetEggHatchLevel uses Format instead of Generation; should only be used
on IsEgg=true pkm
2017-06-18 21:13:53 -07:00
Kurt
caa46455a8 Add suspicious OT check
Closes #1246
2017-06-18 16:47:23 -07:00
Kurt
b6d266824e Filter crystal statics in matching, not table fetch
Eggs from crystal traded to GS can hatch with no met location; skip
crystal-only encounters unless they are non-eggs

Closes #1245
2017-06-18 16:40:23 -07:00
Kurt
c01aae3156 sav3 Pad OT name with 0xFF
cap length to current language constraint
Closes #1244
2017-06-18 16:19:05 -07:00
Kurt
5b4cedf14b Refactoring
Rewrote showdown set exporting to be much clearer, added auto-fixing of
relearn moves when importing showdown set (applies suggested relearn
moves)
Simplified main form loading routine (from ~160 to ~25 by extracting
methods)
2017-06-18 13:02:02 -07:00
Kurt
a16aa827e4 Add mysterygift version receivability check for PCD
Closes #1242
2017-06-17 23:09:00 -07:00
Kurt
7b2e3c59bf Add gsc goldenrod / fix mania shuckie 2017-06-17 22:44:05 -07:00
Kurt
b5d2db6610 Add shinyleaf/pokeathlon stat legality check
#1236
2017-06-17 22:16:24 -07:00
Kurt
da6f880c16 Add Shiny Leaf editing
Closes #1236
pk4/bk4 only, obviously

side note, using static events is no-no, designer auto-removed them.
just manually reapply (as well to others that used it)
2017-06-17 21:49:14 -07:00
Kurt
3faecaf6d5 Prevent eggs from generating nonstatic encounters
Closes #1239 indirectly; anything gen5+ which was an egg can only be
Daycare or EncounterStatic
2017-06-17 19:08:40 -07:00
Kurt
3f38b123a3 Refactoring
mostly renaming things, includes a little bit of added sugar and
splitting methods to simplify the codebase.

all methods are now PascalCase
2017-06-17 18:37:19 -07:00
Kurt
84d3247b75 Add "Can't Tell" recognition for gen2 ingame trades
Fix xatu's IVs, dodrio's gender
why bulba, yes serebii
2017-06-16 23:14:22 -07:00
Kurt
7f318433ed Update gen3 fateful checks
met location FE doesn't propagate to future games, only obedience flag
2017-06-16 21:45:03 -07:00
Kurt
0fd334c999 Fix two evolution edge cases
Evo table was not mutated correctly

clear florges evo table except for base form (for some reason it was
returning spewpa as base species)
gen<6 exeggcute evolves via item:8 (not via levelup:4)

Closes #1234
2017-06-16 18:45:26 -07:00
Kurt
aae6b56422 Show encounter species in EncounterName
Shows up in verbose report
#1234
2017-06-16 18:23:46 -07:00
Kurt
dc8639a31f Reinstate met location constraint for gen2 G/S
via discussion on
2979c4f7ec (comments)

edge case is for shiny egg gifts
2017-06-15 22:48:15 -07:00
Kurt
feaa298263 Add surf maxlevel +4 for gen1/2
Closes #1221 via cumulative changes
2017-06-15 22:42:43 -07:00
Kurt
2064779d91 Add gsc bug catching contest slots
surfing still looks a little wonky, fixed fishing slots
2017-06-15 22:21:02 -07:00
sora10pls
316e50d425 Add Spiky-Eared Pichu nature check 2017-06-15 23:54:47 -04:00