Commit graph

1945 commits

Author SHA1 Message Date
Kurt
0cc82edc48 Reset CP on import 2018-11-20 23:57:38 -08:00
Kurt
0ebfb38717 Add Route 20 to sky encounter rarespawn list
Thanks @ReignOfComputer !
2018-11-20 23:00:16 -08:00
Kurt
eb6e3fbbe9 Don't reset friendship, only for this format
Friendship affects stats, keep current friendship when updating the
trainer.
2018-11-20 19:15:38 -08:00
Kurt
7bd3bfc52e Update rarespawn restrictions for birds 2018-11-20 13:38:49 -08:00
Kurt
3e711acd05 Disallow egg moves in suggestions for cxd/gg encs
https://projectpokemon.org/home/forums/topic/48547-remove-eggmoves-from-green-learnables-move-in-lets-go/
2018-11-20 13:38:05 -08:00
Kurt
916ac84a98 Force clear EVs on showdown import pb7
Closes #2173
2018-11-19 18:26:46 -08:00
Kurt
ec7fc8e2f0 Fix maxgameID for pkm reference
threw a snag in pkm generator since it doesn't reference savefile max
2018-11-19 16:15:09 -08:00
Kurt
ba1a7c2bcf Fix broken tests
rework getblank for version specific
2018-11-19 16:14:49 -08:00
Kurt
4022d7fea9 Add check for invalid pgo shiny transfer
Thanks @sora10pls !
2018-11-19 13:07:21 -08:00
Kurt
3841df1234 Temp workaround for cp calc precision
float -> decimal

https://projectpokemon.org/home/forums/topic/48524-cp-height-weight-calculations/
2018-11-18 23:14:08 -08:00
Kurt
70fe7f58ee Remove eevee, revert porygon 2018-11-18 20:39:15 -08:00
Kurt
34f8a71ad0 Always writeback pointer data
User sort isn't tracked, and reorganizes pointers. Set it back always,
no harm as values should always be sensical.

Closes #2171
2018-11-18 20:32:55 -08:00
Kurt
67cc6bdead Account for wild catch combo/lure level boost
Route 4 sandshrew captured at level 13 (12 is max)
+1 for now, not sure if it can go higher
2018-11-18 16:17:39 -08:00
Matt
04de361792 Update GG flag names (#2169)
* Update GG flag names
2018-11-18 16:07:44 -08:00
Kurt
65febae125 Clamp max CP at 10k
ingame max is 10k
2018-11-18 15:32:47 -08:00
Kurt
b818aff48a Remove evo tree sanitization
Evo data doesn't provide evolution values for these, fortunately.
2018-11-18 15:25:03 -08:00
Kurt
a1cc1a95c2 Fix species fetch, add altform
Thanks theSLAYER!
2018-11-18 13:54:47 -08:00
Kurt
17348c1808 Add bird rare spawns 2018-11-18 10:36:28 -08:00
Kurt
1c0b2488ef Update lapras/porygon gift locationIDs
Thanks Asia81!
2018-11-18 09:41:52 -08:00
Kurt
c268d5ad05 Set party format values always 2018-11-17 19:42:48 -08:00
Kurt
edce01a857 More strict egg nickname length check
only fishy if it was traded & within bounds
2018-11-17 18:29:05 -08:00
Kurt
029e0e0a08 Manually add rare slot locations
placeholder; hopefully this isn't permanent
2018-11-17 15:12:32 -08:00
Kurt
cff1ec68fd Update filter
savedata.bin, not extensionless
cosmetic fix for the dialog window
Closes #2166
2018-11-16 22:17:18 -08:00
Kurt
d3534781db Allow premier ball for captures 2018-11-16 18:59:18 -08:00
Kurt
1c26c7713f Fix starter bypass
lol oops, hotfix inc
2018-11-16 18:17:01 -08:00
Kurt
e619ba41fe Update 18.11.16
Update event binaries with latest from the Event Gallery
2018-11-16 17:53:44 -08:00
Kurt
013bc70ed9 Add more pb7 legality checks
can give nicknames to chinese mons now! Encoding looks the same
@wwwwwwzx :)
2018-11-16 17:42:50 -08:00
Kurt
a2eef9deae Misc fixes
it is version exclusive; fix magikarp speed IV
2018-11-16 16:44:25 -08:00
Kurt
43ffde0918 Differentiate past gen moves with same names
Not sure if there'll be ones for other languages, hopefully not.

dupe checker:

var langs = new string[] {"en", "ja", "ko", "es", "it", "de", "fr",
"zh"};
foreach (var l in langs)
{
var names = new GameStrings(l).itemlist;
var dupe = names
.Select((z, i) => new {Index = i, Value = z})
.GroupBy(z => z.Value)
.Where(z => z.Key != "???")
.Where(z => z.Key != "???")
.Where(z => z.Key != "(?)")
.Where(z => z.Count() >= 2)
.ToArray();
if (dupe.Length == 0)
continue;

l.Dump();
dupe.Dump();
}
2018-11-16 15:15:42 -08:00
Kurt
ea4d9861c8 Disallow starter friendship move in learnset
Joycon shake only, never actually in moveset
2018-11-16 14:56:20 -08:00
Kurt
720e04ff91 Allow 7b trades to be shiny
remove the todo, thanks twittersphere

remove version exclusivity for puppycat (can be done on either ver)
2018-11-16 14:20:06 -08:00
Kurt
dae4a0a0ae Add EV/AV verification for pb7 2018-11-16 14:19:24 -08:00
Kurt
7da46623b8 Ignore ball check for invalid encounters
Defaulting to pokeball isn't entirely appropriate
2018-11-15 18:40:08 -08:00
Kurt
ed5abbd686 Add puppycat NPC location
Thanks (twitter) thelostdogg!
2018-11-15 18:39:30 -08:00
Kurt
95c5ce08d5 Fix movepool suggestion for go transfers
needed dict references
2018-11-15 17:37:25 -08:00
Kurt
5652e76728 Split go entities and go storage, rename classes 2018-11-15 17:36:29 -08:00
Kurt
94b924fdfc Add ingame trade IVs and random AV notes
exclusive maximum, not inclusive
2018-11-15 17:35:34 -08:00
Kurt
93ff395875 Add more succinct go park IV check string 2018-11-15 17:35:11 -08:00
Kurt
43a9d4eb99 Add gg evolution tree
turns out it was totally needed; am glad I didn't do the silly stuff of
past gen evo tables (gen6/7 is just raw evo data)
2018-11-15 17:34:54 -08:00
Kurt
22063d3907 Add ingame trade met locations 2018-11-14 23:04:40 -08:00
Kurt
6a0a6aa82a Add methods for 7b quirks
nidoran m/f when sanitized with the old way show the gender symbols as
'?'
2018-11-14 22:51:53 -08:00
Kurt
bf9344087e Update slot storage compression algo
now iterates for all boxes, and restores to the correct offset at the
end
update direct offset pointers to box specific (so that it can work on
gen3 rsefrlg saves if ever used on them).
2018-11-14 22:33:30 -08:00
Kurt
644fa4e929 Call slot compression
Doesn't work correctly (data shifted down still persists)
2018-11-14 22:20:59 -08:00
Kurt
1feecef874 Add go park summarizer 2018-11-14 22:02:01 -08:00
Kurt
fc44022836 Add gopkm block/abstraction 2018-11-14 19:34:21 -08:00
Kurt
a64d08e7e9 Add GO transfer IV verification 2018-11-14 18:25:43 -08:00
Kurt
830c2cbb29 Add GO encounter area/slots
Level ranges per species TBD
2018-11-14 17:40:41 -08:00
Kurt
adb6b345be Treat GameVersion.GO like other GG vers 2018-11-14 17:40:11 -08:00
Kurt
0b9b0d5317 Add bulbasaur candy to valid candies
oops
2018-11-14 17:06:13 -08:00
Kurt
7abe0c8a9e Add candy pouch type
reusing free space icon hides the give all button; just add another
sprite.
2018-11-13 20:46:48 -08:00
Kurt
1f985d8112 Remove unnecessary/incorrect flags
copypaste from sm lol uops
2018-11-13 20:46:03 -08:00
Kurt
2fb698805d Use latest personal table as master 2018-11-13 19:20:37 -08:00
Kurt
181e75818c Use agreed upon lgpe starter forme name
Thanks @Marty-D !
2018-11-13 19:20:21 -08:00
Kurt
24c541eeef Get savefile-context sensitive pkm
Generating a IEncounterable -> SAV for pb7 can't start with pk7
2018-11-13 19:19:20 -08:00
Kurt
13e1debe3e Add sav7b object & detection util 2018-11-13 19:18:29 -08:00
Kurt
f62e3f43b3 Add eventwork editing abstractions 2018-11-13 19:18:04 -08:00
Kurt
5f456d705c Add misc setup objects 2018-11-13 19:16:14 -08:00
Kurt
025a290bc9 Update saveblock template for stored offset fetch 2018-11-13 19:15:27 -08:00
Kurt
486445897e Add 7b inventory r/w object 2018-11-13 19:15:11 -08:00
Kurt
707f7b5893 Fix displayed dex index for g7
off by 1 starting with formes
2018-11-13 19:14:42 -08:00
Kurt
49c4043e19 Update dex abstractions, add gg dex 2018-11-13 19:14:23 -08:00
Kurt
5f9afe83d6 Add pb7 sorting methods 2018-11-13 19:10:43 -08:00
Kurt
28fec9882b Add pkm variant for beluga 2018-11-13 19:10:31 -08:00
Kurt
f11fa8752c Use pkm format specific evolutions, gg deviations
GG has slightly different evos from usum, don't bother adding a new
binary.
2018-11-13 19:04:58 -08:00
Kurt
1adbc270ce Scrub unused data
empty movesets, empty tmhm

bool IsInvalid(int x)
{
int[] banned = {918, 933, 959, 960, 961,962,963,964,965};
if (banned.Contains(x))
return true;

var index = baseForms[x];
if ((x > 151 && x < 808))
return true;
if ((index > 151 && index < 808))
return true;
return false;
}
2018-11-12 18:58:02 -08:00
Kurt
6495dc41af Add move/enc/loc references 2018-11-11 22:49:17 -08:00
Kurt
ac314fe0d7 add dumped encounters/levelup moves
waza_oboe was lz4 compressed (gfpak), encounters were in a flatbuffer
2018-11-11 22:46:56 -08:00
Kurt
5abbe6dceb Add fetching for lgpe encounters (legality checks) 2018-11-11 22:46:03 -08:00
Kurt
101149eb2e Skip eggs for gg (like cxd) 2018-11-11 14:19:02 -08:00
Kurt
9d2be1da9f Add beginnings for 7b encounter asset fetch 2018-11-11 13:12:24 -08:00
Kurt
00af735afd Add personal table for gg 2018-11-11 13:11:07 -08:00
Kurt
1827b32d8f Add init function for wc7 gg files
pretty sure these will pop up soon as the pball plus doesn't send the
mew itself
2018-11-11 13:09:04 -08:00
Kurt
5ddf6f62ce Add eventflag notes
there's some "AHTB" files which contain the internal enum names; dump
out a few that seem useful
note they come from different tables, will need to figure out spacing &
if their order is absolute or uses that weird hash in front???
2018-11-10 21:53:25 -08:00
Kurt
f38c46f5ec Misc updates 2018-11-10 21:07:31 -08:00
Kurt
010134f6ff Add references for GG tutoring
Only pikachu/eevee forms so far, probably none else
2018-11-10 21:04:48 -08:00
Kurt
98ebf4c5cb Add sort pointer repointing
LGPE uses a list of pkm for boxes, and has pointers indicating where
each party member is at
need some logic for handling the sorting. Had suspected this a while
back so this pre-work came in handy (untested tho)

make eventflags offset ptr virtual, I might end up doing things
differently for event flags
2018-11-10 21:04:24 -08:00
Kurt
73ee5e5afd Add personal info structure update changes
One field added to indicate the GO species or whatever; the 891/892
meltan values match here. Might not be only for GO species translation,
might be for fetching models idk
2018-11-10 20:59:55 -08:00
Kurt
94c8b348c8 Add legal tables for gg
field_pocket.dat ez pouch indexes
2018-11-10 20:58:41 -08:00
Kurt
e6a9014243 Add text dumps from GG 2018-11-10 20:25:26 -08:00
Kurt
113eb550d4 Add IAwakened interface for future PB7 format 2018-11-10 20:21:36 -08:00
Kurt
453f43edd8 Allow shiny xd duking gifts
https://projectpokemon.org/home/forums/topic/48279-issue-with-ribbon-legality-shiny-dukings-and-japanese-text/
2018-11-08 18:58:52 -08:00
Evan Dixon
9c87ad2977 Port tests to .Net Core (#2156)
* Rewrite tests with XUnit and .Net Core
* Add better "because" message
* Skipping test that was not ready & convert the fact to a theory
* Tweak casing
* Convert select date tests to theories
* Make the GetStringList load lock safer
2018-11-06 15:25:35 -08:00
Kurt
d5c22b1e51 Add gen3 wc3 fixed OT egg length case
unhatched egg:
https://projectpokemon.org/home/forums/topic/48226-pichu-event-ilegal/
2018-11-03 12:44:03 -07:00
Kurt
daf41da91b Add more pokewalker moves
Thanks theSlayer!
2018-11-03 12:42:11 -07:00
Admiral-Fish
69b6ea57a3 More nature lock data (#2154)
* Fix lock data

Don't have data on Speal phenac, Spheal post, and Ursaring from colo so can't verify that.

* Fix e-reader data
2018-11-01 22:38:33 -07:00
Kurt
fe989d48fe Misc prep updates
Update comments / xmldoc
Add a savefile storage compressor (ie array[] with empty interstitials
-> list); return true if the compression moved anything (repopulate
views), and the count of occupied slots in the list.
Add saveblock base class; I haven't really liked how SAV6/7 do all the
logic; I'll still expose properties that will then point to a saveblock.
Cuts down clutter.
Add template Dex manipulator, with gen6/7 implementations
Speculate sequential gp/ge gameversion IDs
2018-11-01 15:38:09 -07:00
Kurt
b53cc1b7f8 Merge branch 'master' of https://github.com/kwsch/PKHeX 2018-11-01 15:20:45 -07:00
Kurt
43d20581e4 Update some string resources
In anticipation of 2wks from now, might as well get some easy tedious
stuff out of the way
2018-11-01 15:18:33 -07:00
Admiral-Fish
6a5ee7bf6d Fix Electabuzz data (#2151) 2018-10-31 23:16:13 -07:00
Kurt
f709448220 Update 18.11.01
Update event binaries with latest from the Event Gallery
2018-10-31 14:08:58 -07:00
Kurt
8f9cc6cd7e Fix xmldoc ampersands 2018-10-31 13:52:09 -07:00
Kurt
7a021781e0 Add xmldoc, misc fixes
Fix compile error (lol github editing)
Add XD check CPU-PSV for nonshiny.
rename l->current for clearer intent
2018-10-30 17:45:21 -07:00
Kurt
bc788beef0
Fix spelling mistake in var name
Unused after assignment, but if I rework the validation check to return the teamlock result instead of a bool I can spit out the Species-PID generated list as extra info. Helps identify the as-generated conditions if there are multiple teamlocks possible for an encounter (multiple shadow mons, seen vs unseen).
2018-10-30 09:21:32 -07:00
Kurt
908c98b876 Switch lock checks to newer more complete check obj
Now accounts for the shiny locks & associated restrictions, abusing the
recursion by setting & unsetting the required CPU Trainer's shiny value.

Repoint all test methods to use the new obj methods
2018-10-29 22:49:04 -07:00
Kurt
ef16e7037a Add lock check result object
A lot of internal information is nice to have saved; create a copy of
the static class's logic and pepper in some state variables (Required
CPU Shiny Value) to account for the weird edge cases.

Code is essentially the same as the static methods, except for more
fleshed out logic in the AllLock interrupt checking and the eventual
Trainer checks.
2018-10-29 21:28:22 -07:00
Kurt
b124a6e70d Extract seedframe to separate file
soon tm
2018-10-29 21:03:29 -07:00
Kurt
afffaaa43c Enable full shadow lock checks
If you find any edge cases (the code does not account for shiny locks
yet) pls lmk, would be nice to have confirmed tests :) :)
2018-10-29 19:44:30 -07:00
Kurt
35143630a0 Add ereader locks 2018-10-29 19:43:32 -07:00
Kurt
1b57acc6a7 Check all locks for legality checking
Single->All
2018-10-28 20:28:56 -07:00
Kurt
a728e97d40 Fix Butterfree lock
Ninetales is female
2018-10-28 20:28:02 -07:00
Kurt
7c0a74337e Update shadow lock checks
Passes all 3 lock3 cases in addition to some bulk checks
(VerifyPIDResults).
Lock4 has an issue on one; will have to investigate why.
2018-10-28 20:10:35 -07:00
Kurt
4268239c12 Continue work on shadow lock checks
Now gets count=2 tests working

yield return new SeedFrame { FrameID = ctr + (l.Seen ? 5 : 7), PID = pid
};
used to be ctr + 6, needs to alternate even-odd
all 2 lock cases pass, but didn't make lock3's pass. Something else is
still amiss :)

break out some classes for the solidified lock objects
2018-10-28 11:15:40 -07:00
Kurt
39f98a4a94 Misc qol updates
Check max case for level first, then iterate upwards (eliminates inner
if)
change wc* nature to sbyte (update comparisons, 0xFF too magic-y)
use Rand.Next(x) instead of (0, x)
2018-10-27 21:59:31 -07:00
Kurt
ed3699fbb4 Update Ho-Oh mattle check
More languages than Italian have a rule-breaking name. Rework checks a
bit
Flag eggs more accurately
Update force hatch to move Link Trade met location to Egg Location

fix Ho-oh -> Ho-Oh text strings (correctness is key!)
2018-10-27 16:06:06 -07:00
Kurt
a3e7c4837e Rewrite trade OT/Nick verification, g4 shuckie
Shuckie in HG is not the same as Shuckie in SS.
Use the relatively-recent Nick/OT properties instead of digging through
the encounter table & strings. Ends up being slightly faster.

Thanks theSlayer!

https://projectpokemon.org/home/files/file/3048-kirks-shuckie/?tab=comments#comment-1424
2018-10-27 13:37:03 -07:00
Kurt
ed180f1b5f Allow traded eggs when checking g6+ receivability
As noted in the EncounterEgg generator, Gen6+ update the origin game to
the OT's when hatched.
Thanks Zaskarel!
2018-10-27 09:44:47 -07:00
Kurt
f91a1c1d31 Add gg species / maximum placeholder
Will eventually have to fill these in during gg update
pretty sure they've revealed all the new species; total move/item count
still unknown
2018-10-27 09:08:39 -07:00
Kurt
359a529870 Misc updates
Move some logic around, fix style warnings
2018-10-27 08:53:09 -07:00
Kurt
e8ad1e227f Update shadow lock table
Thanks @ijuintekka ! Closes #2148
Will check later for commented out tests that should pass.

May end up turning on the first-shadow-lock check feature prior to
release.
2018-10-26 11:14:42 -05:00
Kurt
3d0d8fa649 Add first shadow lock check
Currently toggled off, can be optionally toggled on (I'm not sure that
it's perfect? Random save files have stuff flagged since they don't
match the lock; will have to investigate later)
2018-10-21 21:07:33 -05:00
Kurt
8c4a17335f Add first shadow lock test method
Everything should always pass the first lock check; will add shortly to
any cxd encounter checks
2018-10-21 20:55:02 -05:00
Ntonio36
ee3889b184 French translation update (#2147) 2018-10-21 08:27:33 -05:00
Kurt
66f082e4a0 Add shadow lugia sprite
Closes #2145
2018-10-20 23:05:15 -05:00
Kurt
c0aae6ab78 Add cxd lock check info & begin troubleshooting
commented out test calls = not working
will have to debug in more detail later; the first lock is always
working at least.

data sourced from
https://github.com/ijuintekka/Eligor/blob/master/Eligor/Spread.cs , not
sure if it's perfect.

can't cleanly condense deviating team appearances as double-shadow leads
can't be selectively encountered. didn't feel like modding lockfinder's
recursive algo to be smarter.
2018-10-20 21:03:04 -05:00
Kurt
06cca185e4 Add edge case for pidiv kor g4 pichu
Closes #2144
미케나 pichu 12179/20300
2018-10-19 22:27:18 -05:00
Kurt
93af3e61b7 Add handling for Mt Battle Ho-Oh (italian) edgecase
https://projectpokemon.org/home/forums/topic/47917-colosseum-italian-ho-oh/

there's no shadow ID, so it can have both the short (transferred back)
or full name (never transferred) as CK3 without side effects.

allow 10chars in pkmeditor
2018-10-13 08:07:15 -07:00
Kurt
f7f5d78beb Misc perf tweaks
hopefully resolves the image corruption issue (dont use unsafe?)
remove some linq
2018-10-13 08:02:55 -07:00
Kurt
b7acb7fa1d Add memory rarity table 2018-10-12 17:45:52 -07:00
Kurt
e8552affca More gb restriction relocations 2018-10-10 16:32:02 -07:00
Kurt
2db8daa07b Add specified ability no-hidden check
ability=0 allowed abil1/2 but not 4; catch that scenario
2018-10-10 16:31:40 -07:00
Kurt
2ad103dd46 Extract gb specific core logic to separate class 2018-10-09 21:07:13 -07:00
Kurt
0a62506e11 Micro optimization
wow such use
length eq to max will always pass
2018-10-09 19:28:18 -07:00
Kurt
b481358e92 Add number count check for OT/nick
https://projectpokemon.org/home/forums/topic/47850-legality-issue-names-with-multiple-numbers/
let me know if there's any implications for transferred content (name
reset on 1-3=>n?)
2018-10-08 17:57:34 -07:00
Kurt
47f20b8c0e Update fixed ability comparison for 6+
4aa44c90c1 only updated it for gens 3-5
Closes #2136
2018-10-08 15:26:43 -07:00
Kurt
f65bc2e984 Reduce allocations for gen1 move parse
use shared interfaces
2018-10-07 15:36:32 -07:00
Kurt
4aa44c90c1 Update fixed ability comparison
ignores <= 0 now
2018-10-07 15:36:04 -07:00
Kurt
fd1009476e Minor logic simplifications
reduce size of encountermoves, split into separate object
only execute gb movedata adjustments for gb
2018-10-06 19:44:50 -07:00
Kurt
4deb5080d1 Misc tweaks
rearrange getmove with respect to tutors; verifycurrentmoves was getting
tutor moves in levelup
extract not-found hint fetch
Expose gen5 block objects (so I can play with saves in linqpad)
2018-10-06 18:45:15 -07:00
Kurt
dc839333b7 Add more parse settings
allows consumers to tweak debatable settings
2018-10-06 13:43:05 -07:00
Kurt
66faa43e03 Add gen6+ fixed ability hot path
Closes #2135
2018-10-06 11:24:46 -07:00
Kurt
f507ab7081 Misc parse settings reorg
makes it more centralized for defining parsing settings, maybe can have
flags to change severity of certain preferential checks
2018-10-05 19:58:30 -07:00
Kurt
59af7fef35 Remove unnecessary properties 2018-10-05 19:57:45 -07:00
Kurt
ce9d3abbe4 Misc reorganization
Move logical checks using encounter data out of Core.cs

might be possible to excise legality checking objects from
Legal/PKHeX.Core so that a 'slimmer' core can be made
2018-10-04 18:52:00 -07:00
Kurt
03a05364ab Update colo suicune ++
location ID was originally added by:

afde4514e2 (diff-83a32d69355a64376bc77bd07e338a33R446)

I
have another save file that uses met location 110 (like this one) so I
assume it was originally a copypaste error from Sudowoodo.

Change Trade strings to not allocate separate empty arrays.
2018-10-04 08:14:53 -07:00
Kurt
4bbb1f54b9 Change burned tower suicune encounter type
was initially set by this commit

0e3815b048

field test resulted in Cave/HoO type
https://projectpokemon.org/home/files/file/2953-burned-tower-suicune/
2018-10-03 16:46:55 -07:00
Kurt
4fe1a5b4e0 Add more frlg flags
https://www.pokecommunity.com/showthread.php?t=302347
2018-09-30 21:53:06 -07:00
Kurt
2a2361220d Add more accurate daycare egg detection
uses eventflag, different index for each game

frlg:
https://www.pokecommunity.com/showthread.php?t=302347
"Flag 0x266 is set by the game engine if an Egg is in the Daycare."

emerald:
https://www.pokecommunity.com/showthread.php?t=330008
"0x86 : Daycare Centre has egg"

rs:
https://gist.github.com/rboninsegna/a4a63c2b66c42e371a94f860eae55361
" 0x86  Egg ready at Daycare"
2018-09-30 21:27:36 -07:00
Kurt
30851a0059 Add a bunch of useful emerald event flag names
will show up in editor
can toggle overworlds back to visible to rebattle
2018-09-30 21:23:15 -07:00
Kurt
5d6c932353 Spit out move learn generation on verbose
helps indicate any restrictions on learn source outside of the current
format
2018-09-30 11:50:08 -07:00
Kurt
78c7535dea Fix pk1->pk2 conversion 2018-09-29 21:03:34 -07:00
Kurt
827d7f8fb3 Misc tweaks
repoint to contains
2018-09-29 13:08:53 -07:00
Kurt
90f1d0cb09 Misc cleanup 2018-09-29 12:22:13 -07:00
Kurt
a3421a881d bounds check record set
closes #2129
2018-09-27 21:30:20 -07:00
Kurt
ca0a533779 Add frlg flag toggles from thread 2018-09-27 20:01:34 -07:00
Kurt
10d73d1bf3 Redirect eventflag r/w for frlg
can't just re-call base.SetEventFlag with an adjusted flag ID since the
exception checks max.
just override the geteventflag method with a silly adjustment -- we
can't be sure if Block2 is immediately after Block2, so just adjust the
flag r/w to a different offset&flag when appropriate.

fixes r/s badgeflag get/set, oops, meant to modify FRLG's value in the
last commit.
2018-09-26 21:05:06 -07:00
Kurt
a38a0fed60 Update event flag index for frlg
was block2+0x64
8*((0xF80-0xEE0)+0x64) = 0x820

this highlights a critical flaw in event flag reading; it expects the
region to be contiguous in the savedata. it's not. that's super bad, and
event flag r/w for flags >1280 won't work until I work something out
2018-09-26 20:32:38 -07:00
Kurt
62d8abb69c Update frlg flag/var offset
https://www.pokecommunity.com/showthread.php?t=349936

https://projectpokemon.org/home/forums/topic/47715-help-frlg-flags-research/
2018-09-26 20:08:25 -07:00
Kurt
4a81f326eb Update trade/egg/capture record set
#2128
it's still an imprecise thing, as ingame gifts aren't counted by either
release count isn't tracked, so the number should be roughly >= total
box+party count.
2018-09-26 19:06:05 -07:00
Kurt
55de21afc4 Add records when setting to slot
Closes #2128
2018-09-26 19:00:52 -07:00
Kurt
40a0206a5d Misc style updates
whitespace / brackets
2018-09-26 18:56:29 -07:00
Kurt
5760860c8e Add check for uninitialized save data
a 512KB NDS save can be 'picked up' as a memory card if it's not
initialized; this also rejects the binary in that scenario
2018-09-26 12:42:39 -07:00
Kurt
13bcc4bdc7 Add more enum values
pr video stuff is meh, anyone can contribute that
2018-09-25 16:33:11 -07:00
Kurt
a7f02bf27b Enumerate some trainer appearance values
thanks @sora10pls for gathering resources
2018-09-24 21:20:55 -07:00
Kurt
4ac1cccaa1 Move fashion to another folder
incoming enums
2018-09-24 19:44:12 -07:00
Kurt
e0e628844f Update copyto protection
skip over write protected slots (locked/team), may eventually weaken the
GUI to allow modding boxdata with locked slots (which will be skipped).
2018-09-24 19:43:59 -07:00
Kurt
164a26e757 Misc reorg + skeleton for slot editor
SlotChangeManager is pretty glue-y, might eventually shift to this
implementation
2018-09-21 21:20:28 -07:00
Kurt
7715d7e14f Add boolean OrderByCustom overload
Closes #2125 ; final sorting is skipped as bool only yields two groups
instead of many, resulting in a preferentially poor sort result
2018-09-20 17:29:55 -07:00
Kurt
db30fea38c Remove gsc dodrio trade OT trailing space
Closes #2126
Rewrite trade OT validation by using the trade's OTs property
2018-09-19 19:09:29 -07:00
Kurt
d5816795bf Remove split gsc trade levels for tradeevo species
#2126
Receiving a lower leveled species from GSC will evolve it away from the
required species, ruling it unavailable.
Receiving a Machoke will evolve it, so can't reuse for Haunter trade
2018-09-19 19:08:10 -07:00
Kurt
39c3a0eea7 Rework sav3 version detect
Might still be flaky for FRLG, but can now (99.99999999%) determine RS
vs E...
2018-09-16 13:57:09 -07:00
Kurt
668b8611d5 Fix sav3 active partition detect logic
change < to >
the lower updated count is the backup partition, not the one to load
from

Closes #2122 , thanks @FaronBracy !
2018-09-16 12:49:00 -07:00
Kurt
3cd45cf5c4 Continue extracting logic 2018-09-16 12:44:00 -07:00
Kurt
41408a235c Add filename without extension property
for encrypting the pkm -> 'ekx'
2018-09-16 10:48:04 -07:00
Kurt
65272d460a stricter mysterygift references
results in:
- precomputed GetTable() reference
- no casting when iterating for matches
- no db null checks, as they are initally Array.Empty<T>();

reduces noise a little & slightly faster
2018-09-15 16:22:07 -07:00
Kurt
df321d14b5 Reorder checks
most common path is now first
2018-09-15 16:13:17 -07:00
Kurt
b280ffcfef style updates
should be pretty much it
2018-09-14 22:37:47 -07:00
Kurt
87b270dd17 add more gen7 record labels 2018-09-13 22:06:44 -07:00
Matt
165757d590 Fix Meteorite/Mega Cuff mixup (#2120)
Meteorite (2) is legal, Mega Cuff is not.
2018-09-12 22:10:13 -07:00
Kurt
ff25e3cbd0 Remove illegal items from legal key items 2018-09-12 21:52:09 -07:00
Kurt
d511fccdb4 Move basement key item ID to illegal group
no functional change, item is unobtainable but still can be 'give all'
and in permitted list
2018-09-12 21:30:24 -07:00
Kurt
9ded3333d0 Correctly identify Basement Key
welcome back, "Red Scale (HG/SS) (OR/AS)"
thanks @sora10pls for finding this
2018-09-12 21:27:25 -07:00
Kurt
9a04109e01 Localize zygarde complete
form string already there, just repoint
2018-09-12 21:16:14 -07:00
Kurt
930d07c080 Misc simplifications
reference shared base class
reorder arguments to match pk1, remove extra space
2018-09-12 20:55:30 -07:00
Matt
fc91819410 Add XY Magikarp trade IVs (#2117)
* Add XY Magikarp trade IVs

* Add Cosplay Pikachu IVs
2018-09-12 11:02:11 -07:00
Kurt
e77247e652 Fix call order
new empty party list with empty slots now fills correctly

https://projectpokemon.org/home/forums/topic/47453-bug-with-generation-2-party-slot/
Thanks AcroBlade!
2018-09-11 20:33:26 -07:00
Kurt
dad3e59263 update for poipole event
release has been updated too
2018-09-10 20:04:47 -07:00
Kurt
b20020fbe6 Update 18.09.11
Update event binaries with latest from the Event Gallery
2018-09-10 19:10:28 -07:00
Kurt
0c02a0cbbc Add splitbreed mantine to pastgen alolanoffspring
thanks kr, beast ball now recognized as legal
2018-09-09 17:19:50 -07:00
Kurt
f444c41ee3 Remove nick req on g5 gigalith trade
Closes #2114
2018-09-08 10:45:30 -07:00
Kurt
d8c355cf64 use sprite resource name instead of species-form
Closes #2113
2018-09-07 19:11:22 -07:00
Kurt
316341e140 Misc updates
Remove unused sav properties
Add translatable strings for autodetect SAV error suggestion

add speculated gg dex formtable
- no eevee forms
- increments 1 for pikachu since it already exists in table
- stops at mewtwo (no other formed-species available)

im currently setting up skeleton stuff for lgpe since we're <70 days
from release; by doing some pre-work like prior games I can get a good
idea of what needs to be adjusted prior to crunchtime!
2018-09-06 20:35:55 -07:00
Kurt
d02b87a7b2 Expose checkresult properties
can now check individual strings / identifiers in a LegalityAnalysis
object by:

var la = new LegalityAnalysis(pkm);
var parse = la.Info.Parse;
if (parse.Any(z => ReferenceEquals(z.Comment, LegalityCheckStrings.X))
...
should be faster than doing string.Contains
2018-09-05 21:27:52 -07:00
Kurt
1750c69b01 Update pcd version distro check
some events have fixed version IDs in the gift data

https://projectpokemon.org/home/forums/topic/47365-vgc-shiny-milotic-usa-pkhex/
2018-09-05 16:09:30 -07:00
Kurt
189fa5f7b3 Add button to give all seals + illegal ones
#2112
2018-09-04 15:26:16 -07:00
Kurt
cf3aba4f84 Add gen4 seal data get/set
closes #2112
adds methods to give/remove all, and get/set to retrieve array or
individual.
2018-09-04 15:12:35 -07:00
Kurt
81f6988d3e Prevent sort/clear reverse on shortcut use
Closes #2111 by preventing the user error
2018-09-04 15:01:14 -07:00
Kurt
42deb0ad12 Add extra backup locations for savedetect
Closes #2109
Program boots -> load extra locations rather than constantly fetching.
These files won't change location or presence (not an external drive).

just store the locations instead of constantly fetching, we already call
detect once when loading the form anyway.
2018-09-03 10:40:40 -07:00
Kurt
53216333e6 Misc updates
extract final pkm manipulation logic from pkm editor
add xmldoc to boxmanipulator, add utility class for enum->manip fetching
fix xmldoc referencing removed enum member
relocate boxmanip overview logic to utility class
move SAVPaths file pointer to Main for reuse #2109 , will add to
autodetect in a later commit
open/save dialog with extra extensions: ignore ones already present
2018-09-03 10:30:35 -07:00
Kurt
493bef75eb Misc updates
condense repeated logic
extract properties
extract reusable methods
2018-09-02 18:02:25 -07:00
Kurt
f57e7bf686 Separate box manipulator to ui-less class
clear separation of functionality
2018-09-02 11:31:34 -07:00
Kurt
cc20bb38d7 misc updates
use arrays instead of list when capacity known
use enums for const decoration
remove unnecessary aliases
2018-09-01 19:55:08 -07:00
Kurt
106a02eedd Fix infinite loop pk1/2 -> pk<7 2018-09-01 15:09:04 -07:00
Kurt
7e03d1203d Remove unused legality strings 2018-09-01 14:37:58 -07:00
Kurt
bfc9d99286 Remap legality string files
need to update exporter to not undo my changes
2018-09-01 14:33:26 -07:00
Kurt
91c37ab573 Update legality check message string style
V### names weren't enjoyable to work with; use similar verbose style as
the program message strings.

updating the translation files with the remapped variable names shortly

remap list: https://pastebin.com/jybkVDAK
2018-09-01 14:11:12 -07:00
Kurt
45ab331805 Don't remap gen2 item
https://projectpokemon.org/home/forums/topic/47300-two-more-showdown-importing-errors/
showdown already has format sensitive ID due to pkmconverter format
being applied on set load
2018-08-31 15:31:56 -07:00
Kurt
1fe304e78f Rework mg nick/lang checks
add common interface

https://projectpokemon.org/home/forums/topic/47295-bug-event-golduck-name-not-matching-species/
2018-08-30 18:09:52 -07:00
Kurt
c6e4c39bc5 Fix gen1 single chain for gen2 tradeback scenario
invalid mon -> make sure array is big enough for later move parsing

https://projectpokemon.org/home/forums/topic/47283-unhandled-exception-when-importing-set-from-clipboard-after-opening-gen-i-save-file/
2018-08-29 21:58:44 -07:00
Kurt
ebae14e6ad Add unnicknamed forced languageID wc7 handling
https://projectpokemon.org/home/forums/topic/47295-bug-event-golduck-name-not-matching-species/
another edge case
2018-08-29 20:36:32 -07:00
Kurt
6abd60cc5c Add ball auto suggestion
click ball sprite/label to cycle through legal balls
hold alt to use old behavior (set to pokeball)
hold shift to cycle through legal balls randomly (default behavior goes
poke->color->poke)

want to randomize setting balls? use the ApplyBallLegalRandom method at
the end :)

can't really get too fancy as only one color is stored in the personal
data, pkm aren't one single color.
2018-08-28 21:13:45 -07:00
Kurt
f89d9ca323 Split apart headbutt tree logic
precompute Index & make readonly when initializing as we use Index at
least once when initializing the treesarea
2018-08-28 15:10:08 -07:00
ajtudela
b5089658f7 Update spanish translations (#2106) 2018-08-28 08:04:55 -07:00
Kurt
f74c1e321a no mo go to yo
pull goto default into 'when' so other cases continue to default

this is a goto free codebase ( ͡° ͜ʖ ͡°)
2018-08-27 20:48:57 -07:00
Kurt
4dc04cb4b9 Add pelago status value check + etc
0, [9,19] are set (didn't see 15), but there's also a switch case which
references all values 0-19.

these values are used by a 80 sbyte array (4*20) in the Resort.cro

remove usages of "goto case"
2018-08-27 20:44:26 -07:00
Kurt
102430ebf5 Update trade nickname check
reorder for simplicity, add test
Thanks ThePunish3D!
2018-08-26 18:32:39 -07:00
Kurt
6e41b44047 Add telekensis flag & sprite flags
next bit on ev yield is for telekenesis immunity
6 bits for color, 2 bits for flags
2018-08-26 17:20:00 -07:00
Kurt
4656909d98 Misc reorg
use shared class for pk1/2 setnotnicknamed
fix extendedeurope values (copypaste from extendedAmericas)
move ball out of verifiers, move nature/movetype with ball
2018-08-26 16:29:52 -07:00
Kurt
f7b5a5579d sync missing content
yay rename
2018-08-26 11:29:47 -07:00
Kurt
7f87d43c41 Add enum for ball; use in checks
Increases readability instead of using hex IDs
2018-08-26 11:15:32 -07:00
Kurt
6a225ad091 Add mr mime to usum additions for egg balls 2018-08-26 09:43:11 -07:00
Kurt
9dae7dad67 Misc updates
move encountertype datasource providing to core
fix rerolling EC not updating characteristic
remove some repeat logic calls
relocate geolocation name fetch to separate class, add tests to ensure
functionality, add languageID->country/region fetch method
2018-08-25 17:04:01 -07:00
Kurt
a9f65a4617 add lock for cross thread dictionary manip
could use concurrentdictionary but after reading some perf drawbacks vs
manual locks, just do it manually. regex checking is the real slow part,
whatever
add some comments to describe
2018-08-25 10:48:37 -07:00
Kurt
5fe9226c62 Ignore fixed language trades for gen4 korean check
Closes #2103
Thanks @Narithegreat !
2018-08-22 22:36:56 -07:00
Kurt
d40b10f4a4 Remove unused method
SaveFile already has ModifyBoxes which has better built in checks for
locked slots.
2018-08-22 22:35:50 -07:00
Kurt
ab0a792968 Move valid item override to pk1, pk2 uses base
Closes #2101
2018-08-21 07:47:23 -07:00
Kurt
ebb1e8a704 Update 'cant hold item' message
#2101
2018-08-21 07:46:55 -07:00
Kurt
19f9765752 Add missing species setter
Closes #2100
2018-08-21 07:37:15 -07:00
Kurt
29f73993b1 Misc reorg
simplify gameinfo comments/return
move item1->item2 conversion to itemconverter

just general upkeep
2018-08-20 22:09:35 -07:00
Kurt
7ccaf8783b Unban bred HA sableye
yeah totally genderless

https://projectpokemon.org/home/forums/topic/47101-gen-v-hidden-ability-sableye/
2018-08-20 20:08:42 -07:00
Kurt
daf9364fb2 Alphebetize settings
probably want to switch to a propertygrid later.
2018-08-19 21:25:21 -07:00
Kurt
c7aea9cad2 add option to hide pid/ec
hides pid & ec in pkmeditor, gamesync & securevalue in saveditor
easier to share screenshots/stream without leaking identifying
information

fix auto-centering of pkmeditor subwindows when a savefile is detected
on program load(tab_otmisc isn't initialized and reads an incorrect
width)
2018-08-19 18:22:07 -07:00
Kurt
af0b8b2a37 Add egg sprite alternate display + setting
egg sprites can be a little difficult to see what's underneath (glance
value)
make the new egg sprite method the new default; adds setting to revert
to old behavior

adds translation text for the mega rayq control from #2098
2018-08-19 16:45:20 -07:00
Kurt
d307a30cad misc optimization
list initial size is 4; oftentimes it's greater, and always padded
2018-08-19 16:26:08 -07:00
Kurt
c0b5d3eef7 Abstract away pk1/pk2 properties to shared class
some inefficiencies with pk1 altform/iskorean but is much easier to
manage
2018-08-19 15:50:15 -07:00
Kurt
7ef5d9e547 Add pk1 current level property party->box setter
https://projectpokemon.org/home/forums/topic/47086-bug-trades-between-two-saves-1g/?do=findComment&comment=235241

fresh encounters have yet to be boxed and don't have the value; set it
whenever setting a Stored slot.
2018-08-19 13:35:20 -07:00
Matt
8c64f378c1 Add Mega Rayquaza unlock to GUI (#2098)
* Add Mega Rayquaza unlock to GUI
2018-08-19 08:24:59 -07:00
Kurt
a200dc85c7 Add bvid util 2018-08-18 20:10:34 -07:00
Alberto Tudela
58eddd0225 Update spanish translations with new hide savdetail setting 2018-08-18 16:45:39 +02:00
Kurt
633f0e1da9 Extract filetype detection, add xmldoc 2018-08-17 23:23:44 -07:00
Kurt
b526d4657b rework tile flip check flow, remove goto 2018-08-17 16:22:54 -07:00
Kurt
d7f39ea343 Extract pkm searching to separate classes
search logic can now be reused by core projects

adds option to provide extra filters run at the end (prior to clone
check)
2018-08-16 20:06:40 -07:00
Kurt
e366f9a93d Misc tweaks
only have one empty forme array object
rename method for clarity
show version ID for hidden savefile program window titles
2018-08-15 21:15:06 -07:00
Kurt
eec14645ef Lessen string length severity on egg encounters
Hatched eggs can have mismatched languages<->OT/Nick restrictions
2018-08-15 15:26:42 -07:00
Kurt
5514530dfb update OT name edge case
traded ENG->KOR egg was getting flagged
#2094
2018-08-15 15:19:54 -07:00
Kurt
b6de41bfa7 Add OT name max length checks
Closes #2094
2018-08-15 14:58:55 -07:00
Kurt
bc262a7cdf Remove Plasma Fists from unsketchable
Closes #2095
split out unsketchable moves (struggle/chatter) to separate array
remove trailing spaces (auto fixed by my visual studio plugin), add
space before comment //
2018-08-15 14:52:25 -07:00
Kurt
57c6de2825 Add nickname length check for gen>2
Closes #2091
2018-08-14 20:13:15 -07:00
Kurt
75d700c171 Fix sav1 jp load order
oops
2018-08-14 20:12:10 -07:00
Kurt
f079f62956 Remove fullness/enjoyment check
Although bank 6->7 deletes the values for these fields, Pokémon Refresh
can still reintroduce new values.

Closes #2090 , thanks @Lusamine !
2018-08-14 16:45:51 -07:00
Kurt
10f050eb18 Update translations with new hide savdetail setting 2018-08-13 19:40:00 -07:00
Kurt
70a6cd9421 Remove untranslatable content
sav6 recently added trainer appearance editor, prior commits removed pt
translation (only official ingame translations)
2018-08-13 19:24:49 -07:00
Kurt
6edc828cc3 misc style updates 2018-08-12 19:27:11 -07:00
Kurt
d3ec969187 Style updates
split pcd/pgt
add more xmldoc
2018-08-09 21:53:39 -07:00
Kurt
8187606a89 Clarify sav6 boxflag in src
7 wallpaper flags (not all used), top bit unlocks box 31

https://projectpokemon.org/home/forums/topic/34466-box-31-is-unlocked-but-not-showing-on-bank-any-ideas/

PCFlags + 2 is just CurrentBox, don't include it anymore.
2018-08-08 22:02:06 -07:00
Kurt
6b62dd29ee Update xy fashion edits
different for each gender
2018-08-08 21:27:14 -07:00
Kurt
7403c0f91a Add more pokewalker moves
igglybuff wish, happiny heal bell, and the elemental punches to round
things out even though they can be tutored

https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=234991
2018-08-08 17:35:06 -07:00
Kurt
975759e53c Update str<->val base32 encoder
simpler
2018-08-07 16:32:31 -07:00
Kurt
259feae038 re-allow event flag editing on gen1
closes #2088
2018-08-07 07:54:14 -07:00
Kurt
421c522eb4 Fix gen1 sav load
Starter fetches via Offsets, which was null, reorder the init
Thanks @Ninjistix !
Closes #2087
2018-08-06 21:29:47 -07:00
Kurt
98f21a12dd Relocate gen6 trainer stat records to core
use trainerstat editor control in gen6 editor

fill in some details from the disassembly via setrecord usages
still slightly fuzzy on some:
fureai (based on usum idb name, similar logic)
soaring sky counts

looks like there's some other usages of the fields which were outside
the stat range, throwing an exception when loading to NumericUpDown,
added bypass logic

Thanks Holla!
2018-08-06 21:27:31 -07:00