Commit graph

218 commits

Author SHA1 Message Date
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
c40a284174 Misc simplifications / xmldoc 2018-07-01 19:17:37 -07:00
Kurt
3674a11cfe Misc simplifications
absorb verifier calls into the parsing methods
2018-07-01 17:07:29 -07:00
Kurt
e29cf2a903 Rework secondary check flow
Checks.cs initially started out small, but over the years it has grown
to handle multiple types of checks. With all these checks next to
eachother, it's hard to see the overall groups. Splitting them up
(potentially further?) allows for more focused maintenance &
understanding.

Not sure if I'm happy with the overall bandaids used (checks no longer
done within LegalityAnalysis so variable repointing is excessively
used), but I'm happier the way it is now compared to the huge Checks.cs
2018-06-23 22:00:01 -07:00
Kurt
ea6842e5eb Refactoring
improve readability
2018-06-23 12:37:01 -07:00
Kurt
0d3c6eef74 Refactoring
Relocate fixed OTs to core (iencounterable & checks now reference same
values)
2018-06-23 09:49:04 -07:00
Kurt
346c401727 Rework initial evochain trim
push unsaved IVTotal/EVTotal stuff from prior commit
rework exposed types for evo chain
initial trim now uses much less linq

can probably redo the get initial chain to provide a species to break
on...
2018-06-22 17:59:02 -07:00
Kurt
7591f54de3 Misc updates
Add safari min flawless IVs to reroll (can expand if #2025 is required
for egg group15)
Use EV/IVTotal (faster, not linq array based)
Fix missing pumpkaboo form regression, Closes #2026
Relocate swapbits to appropriate class, unneeded in PKM.cs
2018-06-22 06:24:33 -07:00
Kurt
eb35d71fcc Flag East Gastrodon from Friend Safari... correctly
Closes #2023
2018-06-21 20:26:21 -07:00
Kurt
c1f4e2a9ff Refactoring
Relocate & simplify some logic
2018-06-21 20:13:41 -07:00
Kurt
f10cc183a7 Refactoring
Relocate Evolution Chain logic
minor reorg of check arguments for nesting / grouping
2018-06-19 17:14:22 -07:00
Kurt
f8a1d26694 Fill empty ability values with ability1
update handling that checked for this case to instead check for
equivalence to ability1 instead of 0

was generating a PGF with ability[1] = 0, which is not correct. Just fix
the binaries to behave and get rid of all the workarounds since future
tables don't have missing values.
2018-06-15 23:41:07 -07:00
Kurt
49c36e2173 Misc legality gen tweaks
bypass savefile language checks if no language set
fix gen2 static gift egg that is really a wild encounter -- egg flag was
set & not cleared -> no wild pkm, bad! Adds test case for this.
(probably isn't a better place to clear, enforces only once per
generation rather than on every yield/end of every static yield)
2018-06-15 18:47:17 -07:00
Kurt
f54f90bd4b Add egg Rotom/Furfrou form check
Closes #2002
Thanks @iiippppk !
2018-06-13 22:10:01 -07:00
Kurt
32a83c16f1 Add egg relearn/move sequence match check
#1994
2018-06-11 08:13:50 -07:00
Kurt
d94fc65367 Refactoring
continued reduction in Core size, simplify/clean up usages
2018-06-10 14:45:25 -07:00
Kurt
3b84f33776 Misc changes
Revert linq chain
Closes #1987

change encountermatch comparison (never null), add comparison for vc
output
remove unused strings (will get removed from translation files in later
update)
2018-06-10 00:26:33 -07:00
Kurt
f351e9550f Add contest stat check for VC
https://projectpokemon.org/home/forums/topic/45681-virtual-console-pkm-with-beauty-stats-marked-as-legal/

Thanks yologgebolo!
2018-06-09 08:39:16 -07:00
Kurt
1202474cd5 Defer & flag VC korean unobtainable encounters
Closes #1985
2018-06-06 21:49:30 -07:00
Kurt
dcdeb361f0 Handle meowstic formes
Closes #1984
2018-06-06 16:22:14 -07:00
Kurt
450d40535d Relocate hypertraining properties to interface
lessen temp array creation, speed++
2018-06-05 21:31:42 -07:00
Kurt
ae3b6a7fa1 Simplify IContestStats usage
remove new[] creating for checking if any contest stats exist
(HasContestStats)
2018-06-02 21:19:03 -07:00
Kurt
ab393e1f99 Rework set PID-ability checks
Closes #1979, adds test cases.
2018-06-02 13:22:52 -07:00
Kurt
15b5de11c0 Handle hatched wc3 metlevel oddballs
Closes #1978

Met Level at 5, when hatched ingame is reset to 0.
2018-06-02 07:50:48 -07:00
Kurt
f237476ccc Add nickname reset modify
nickname reset clears except for encountertrades (some have fixed
nicknames).

remove untraded check for HT memory verification, has to be traded if it
has a HT memory.
2018-05-31 19:49:47 -07:00
Kurt
e82dcdb124 update memory captured check
gen5 landorus witnessing another species should use gen6

https://projectpokemon.org/home/forums/topic/45424-landorus-memory-flagged-as-illegal/
2018-05-30 21:50:11 -07:00
Kurt
ae27c10dc2 Misc cxd fixes
#1970
2018-05-27 12:18:27 -07:00
Kurt
98895bd365 Ignore fateful as xk3 if not a shadow
Duking etc trades
Closes #1970
2018-05-27 07:00:07 -07:00
Kurt
e6765d3691 Flag langid=0 when appropriate
only jpn bw ingame trades can lack a languageID.

skip language checks for pk1/pk2 as they have no language stored.
2018-05-26 14:40:02 -07:00
Kurt
05e10860ed Flag gen5 origin footprint ribbon if Δlvl<30
Closes #1965

Also fix vc transfers ignoring some restrictions (ie footprint ribbon on
lvl 16 magneton, was incorrectly allowed as gen < 6).
2018-05-26 09:58:01 -07:00
Kurt
a7f9f69b02 Remove Type property
verbose summary uses the encountermatch's current type; the "x is y"
check is more than sufficient.
2018-05-19 12:21:16 -07:00
Kurt
ca14b43b62 Relocate memory specific data to own file
allows easier handling for memory interactions
2018-05-19 10:04:07 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
e2f11edc43 Refactoring
discards, Array.Find over FirstOrDefault
2018-05-12 08:41:29 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
wwwwwwzx
997d41b6db Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6 (#1938)
* Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6

30: level + dark type in the party
32: level + day
33: level + night
34: level + female
Note Meowstic isn't affected due to another entry of level + male (23)

* Minor text usage fix

* Fix xorPID flipping in TransferEC check
2018-05-12 06:57:11 -07:00
Kurt
c2644cc9f0 Flag gendered pkm without gender
for lack of a better message
#1936

add some docs & trycatch bad wavs
2018-05-11 21:05:15 -07:00
Kurt
997ca29fe6 More generator updates
Checks.cs : fix duplicate analysis result (encountertrade machoke is
legal & illegal), nope, legal.
Core.cs : Add version bypass if none assigned.
EncounterSlot.cs: Handle yellow kadabra
EncounterTrade: Handle must-evolves.

now at 75: graveler (SM trade)
2018-04-29 21:08:49 -07:00
wwwwwwzx
fc72323c2e Add general memory intensity/feeling check (#1916)
* Add general memory intensity/feeling check

Memory setting subroutines: Y: sub_43C1E4 AS: sub_469A94
Memory table RAM address: Y:0x54A4F0 AS: 0x58A134
https://pastebin.com/h1RHL7nR

* Check if egg's OT memory is blank

All empty memory should be checked before common check.
Don't allow eggs to fall through.
2018-04-28 06:26:04 -07:00
Kurt
3f6b1acc93 Add fixed gender checks for non-GBA/NDS games
Closes #1912 , genderless ~= fixed gender I guess; shouldn't get these
gender-errors unless it's manually tampered data/ShowdownSet

remove unnecessary code in:
* PKMEditor (>=255 is already covered by == 255 and the fact that gt is
always <= 255)
* VerifyGender (3 <= x <= 5) check is already early-returned via
PIDGender check above

Update IsGenderValid knowing that VC mons have a gennumber <= 2
2018-04-23 19:58:29 -07:00
Kurt
353978df59 Add fixed ability pcd valid bypass
https://projectpokemon.org/home/forums/topic/44834-bugabout-event-evolution/
2018-04-17 20:48:14 -07:00
Kurt
86333c6db6 Flag VC transfer affection
contest check only applies for 3->7 not 1/2->7

https://projectpokemon.org/home/forums/topic/44674-bug-about-contests-ribbon/?do=findComment&comment=229785

Thanks Davil!
2018-04-14 21:36:11 -07:00
Kurt
6db0b673db Handle ??? type gen4 arceus form check
interstitial between steel & fire, shift the form value up by 1 if
applicable

https://projectpokemon.org/home/forums/topic/44806-arceus-not-legal/?tab=comments#comment-229774
2018-04-14 18:20:58 -07:00
Kurt
8cfd64df63 Add affection contest check for pre gen6 events
https://projectpokemon.org/home/forums/topic/44674-bug-about-contests-ribbon/?do=findComment&comment=229739
2018-04-13 18:52:38 -07:00
Kurt
6b387f9037 Handle alolan species transfer form check
https://projectpokemon.org/home/forums/topic/44718-bugabout-xd-alola-form/?do=findComment&comment=229735
2018-04-13 18:44:16 -07:00
Kurt
78f533605c Handle untranslated Italian LeafGreen Jynx trade
lul nice translating team u got there, would be a shame if they forget
to translate something ;) /s

Thanks cicciochiave!
2018-04-12 21:22:04 -07:00
Kurt
be285917b9 Update ingame trade data
https://projectpokemon.org/home/forums/topic/44726-bug-in-game-trader-pokemon-flagged-illegal/

Thanks Jimmy Cerno!
2018-04-07 12:34:06 -07:00
Kurt
caa32c1516 Add alolan evo species check
can't change to a local variant form if it was originally obtained as a
non-variant form (no evolutions!)
2018-04-06 21:46:27 -07:00
Kurt
d794e71175 Extend contest-affection check to pre-gen6 transfer
Closes #1881
Thanks @ijuintekka !
Thanks @sora10pls !
2018-03-28 16:07:03 -07:00
Kurt
5b4b6e4158 fix ability comparison
a==a obviously, need to check against the current ability
2018-03-27 09:02:56 -07:00