Commit graph

948 commits

Author SHA1 Message Date
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
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
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
6495dc41af Add move/enc/loc references 2018-11-11 22:49:17 -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
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
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
94c8b348c8 Add legal tables for gg
field_pocket.dat ez pouch indexes
2018-11-10 20:58:41 -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
Admiral-Fish
6a5ee7bf6d Fix Electabuzz data (#2151) 2018-10-31 23:16:13 -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
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