Commit graph

3391 commits

Author SHA1 Message Date
Kurt
2db061d15d Fix blank error message
Closes #1251

Thanks @ReignOfComputer for finding the source :)
2017-06-20 18:16:29 -07: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
13d3e515f0 Flag save as edited when unlocking friend safari
Closes #1241
2017-06-17 19:27:35 -07:00
Kurt
258f660a90 Misc fixes
Immediately hide legality indication if hax
invert blank sav check (refactoring oops)
Closes #1238
2017-06-17 19:20:37 -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
5d50f58d86 Add pk1 catchrate refresher to current species
Label_Species already has a click event for showdown sets with a
modifierkey; add a default behavior which checks for pk1 and if so, sets
the catch rate to the current species.

Users shouldn't have to look up catch rate values or be responsible for
editing them; they are currently handled by the pk1 object. Setting a
species ID checks if the catch rate is within the species lineage, and
only updates it to the current species if the rate doesn't match any.
With this change, the user can force the catchrate to match the current
species (then change back to the evo form) instead of having to change
the species to a separate lineage that does not have the current (not
displayed) catch rate value.

Closes #1235
2017-06-16 18:56:17 -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
Kurt
364fbd99fe Merge pull request #1232 from sora10pls/master
Add Spiky-Eared Pichu nature check
2017-06-15 21:41:54 -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
86720b547b Add <=gen3 pouch giveall
Closes #1225
Resizes array if too long, allows random set or standard (sequential)
set.
2017-06-14 08:42:49 -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
Kurt
cf8f6573f2 Use savefile for personalinfo form count
BW has forms that aren't present in b2w2; expect the same for usum<->sm

splash screen opacity change for fanciness
2017-06-11 18:23:18 -07:00
Kurt
64cf63a04f Merge pull request #1217 from pokecal/master
convert Crystal locations
2017-06-11 17:14:02 -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
ffa7529e0f Misc database tweaks
delete now interacts with the box manager, now clears from any box
viewer that is open
filtering to just boxes now filters out the external sav pkm
filtering sources now is done prior to any field filtering
2017-06-11 11:08:03 -07:00
Kurt
5117f3a5c9 cap entry of Yellow pikachu friendship
gen1 trainer editor, 0-255

https://projectpokemon.org/forums/forums/topic/40817-request-autoset-yellow-pikachu-friendship-to-255-if-user-inserts-number-higher-than-255/
2017-06-11 00:25:21 -07: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
Kurt
86fafcff9f Merge pull request #1215 from pokecal/master
fix Gen4 Misc Resources
2017-06-10 11:47:47 -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