Commit graph

243 commits

Author SHA1 Message Date
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
Kurt
9e3ee6eacb Update gen4 gift PIDIV checks
fix method1 PIDIV creation, check for antishiny manaphy gift
2017-06-15 18:34:03 -07:00
Kurt
0cb17ccb42 Add c/xd ingame trades
as wc3 as it's the closest structure without creating a new
encountertrade subtype
2017-06-14 21:57:23 -07:00
Kurt
81534c4645 Update gen3 fateful encounter checks
Closes #1230
Colosseum pokemon do not get fateful encounter, all pkm from XD (except
the starters) are fateful.
Add requirement for National ribbon if shadow CK3 is transferred to XK3
and vice versa; actually check for national ribbon during CK3/XK3
(RibbonSet1 interface)
2017-06-14 21:07:42 -07:00
Kurt
f5a91182b8 Improve milotic evolution check for gen3/4
Closes #1229
2017-06-14 19:04:19 -07:00
Kurt
8f833d8171 Simplify max item count give/modify
999 is true max, set suggested give count to -4 from max (or 1).
Apply giveAll's max value restriction to modifyAll
Prevent giveall/modifyall for PCItems/FreeSpace due to mixed item types.

Closes #1228
Closes #1227
2017-06-14 18:43:28 -07:00
Kurt
b8069184a2 Fix partycount setting for gen5
only update the party count when appropriate
species present=>only update if below
no species present=>only update if above

Closes #1224
2017-06-13 22:14:17 -07:00
Kurt
2979c4f7ec Misc gen2 fixes
still a few problems left:
surf encounters
roamer met locations
national park encounters
lake of rage all-gyarados encounters (?)

#1221
2017-06-12 22:16:20 -07:00
Kurt
7b874757f7 Change gen1/2 encounter preference
Previous approach was 'most likely to find valid', this approach is a
little greedier to try to find a more fitting match. Will result in a
small increase in computation time, but trying out EncounterTrades and
static encounters first is preferred.

Fix Rhydon ingame trade gender. Bulbapedia is wrong, that's a Male
Rhydon with those IVs.
2017-06-12 21:05:04 -07:00
Kurt
8a4c40908b Enforce met location matching for crystal data
Only while format == 2
improve detection for gen1/2 ingame trades
2017-06-12 18:15:26 -07:00
Kurt
3d641ada38 Fix gen2 fishing slots
Correlate mapID to table, thanks @pokecal !
#1217
instead of duplicating quilfish tables, just shift remoraid down one.
2017-06-12 16:54:39 -07:00
Kurt
bb6c5e3dbb Add static encounter egg edge case handling
Closes #1219
reject the eevee case if any relearn moves are present

allow traded eggs to be matched
2017-06-11 18:39:19 -07:00
pokecal
cf4c74ddba convert Crystal locations
I don't know what pkl byte means, I applied a function that convert
mapID to pkm.metlocationID.
This function is used when caught mons.
e.g. route29(18,03): (18-1)<<1=2E, rom[9402E]=4C79, 9*(03-1)=12,
4C79+5+12=4C90, rom[94C90]=02.
2017-06-12 07:38:56 +09:00
Kurt
21ab0296f3 small optimizations
Add ccitt method to checksum an existing array
reduce linq usage (faster save retrieval)

misc4 line endings?
2017-06-11 00:23:04 -07:00
Kurt
43838a5f24 Fix gen7 evo table floette reference
Closes #1216
2017-06-10 17:36:33 -07:00
Kurt
45ff41ca48 Add more gen2 hypothetical handling
won't be active until VC2 release
2017-06-10 15:48:18 -07:00
pokecal
753964c138 fix Gen4 Misc Resources
add missing FlyDst and use MetLocation string.
add TrainerCard flags to FlagEditor.
add Pt resources.

fix HoneyTree, the BlockOffset needed.
2017-06-11 03:20:55 +09:00
Kurt
f054f035c9 Update pokepelago level ranges
Thanks @SciresM !
2017-06-10 11:18:59 -07:00
Kurt
991978dab6 Ensure cleared move pkms have at least 1 move
#1214
user may not be checking legality (bulk transfer)
2017-06-10 08:39:04 -07:00
Kurt
d19b83000d Clear gen2 exclusive moves on pk2->pk1
Closes #1214
2017-06-10 08:31:31 -07:00
Kurt
8a1691eb91 Let pkmdb fetch from save backups
Only if compiled in debug; bumps my searchables to 6 figures lol

bulk legality scan yielded one exception (bad CXD pidiv for starters)
bullk sav fetch yielded one exception (unknown type didn't define
SeenFlagOffsets)
2017-06-09 23:13:41 -07:00
Kurt
1e9f5261b7 Misc pika line fixes
Closes #1213
add default cosplay form at end, add range checks
prevent cosplay/spiky eared pichu from transferring up generations
set pkm to legal info on error (checking legality no longer continues
exceptions).
2017-06-09 21:43:46 -07:00
Kurt
6ca2cb16dc Skip spiky eared pichu pidiv verification
Closes #1199
2017-06-09 21:30:17 -07:00