Commit graph

90 commits

Author SHA1 Message Date
Kurt
e08ecb21c1 Bypass tradeevo check for gen1 if sav gen >= 3
Closes #2237
2019-01-09 08:52:56 -08:00
Kurt
744646e30d Add gold bottle cap bypass for LGPE
All IVs are flagged in LGPE even if they're perfect :(
Might have to revisit this for future games and if LGPE transfer out and
maintain these bad flags (this is bad for inspecting parents before
breeding).

Closes #2229 , thanks @SteelPhase (report) and @sora10pls (verified)!
2019-01-06 16:21:34 -08:00
Kurt
0c9b760470 Move GetIV to pkm, misc simplifications
remove linq for characteristic calc (get max IV) and others
remove some reliance on new[] for iv/ev
pk5 replace bitmagic with property get->set copy for cleanliness
2019-01-05 10:51:41 -08:00
Kurt
5fcd8541ba Add pokestar studio fame / star stat pk5[0x87]
how did this get forgotten so easily lol
added legality check; eggs can't participate in pokestar studio.

not editable from GUI, use ExtraBytes editor.
Re-add 0x86 (array was copied from pk4?) and reorder/comment
2018-12-31 21:01:58 -08:00
Kurt
950d0a8525 Add nature bounds check & legality
expand string array check to cast and check against length; batch editor
Nature>=25 causes problems in hover tooltips. Previous commit fixed for
pb7 stat calcs for invalid natures, pretty sure the actual game is
exploitable for stat calcs and invalid natures (bad access), but isn't
exploitable as it's only used to retrieve an enum to switch against.
2018-12-25 22:59:52 -08:00
Kurt
5d5259ddd2 edge case for egg OT name length
https://projectpokemon.org/home/forums/topic/48802-bugemerald-eggs-crystal-learnsets/
2018-12-14 23:30:21 -08:00
Kurt
20e3da7e5f Add pb7 evo check continuation
oops
Closes #2202
2018-12-05 20:55:57 -08:00
Kurt
06d8b6609b Add outsider evo check for beluga
Closes #2200
2018-12-05 18:38:05 -08:00
Kurt
2c2e5f60b3 Fix AV message for go transfers
formatted now
2018-12-02 09:08:42 -08:00
Kurt
76a2e4f527 Add AltForm parameter to exp/level fetch
Starter Pikachu & Eevee have different growth rates than their base
forms (seriously WHY?)

remove old api surface in PKX as a breaking change as adding the
parameter is necessary.
2018-11-26 16:55:16 -08:00
Kurt
4022d7fea9 Add check for invalid pgo shiny transfer
Thanks @sora10pls !
2018-11-19 13:07:21 -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
1c26c7713f Fix starter bypass
lol oops, hotfix inc
2018-11-16 18:17:01 -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
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
93ff395875 Add more succinct go park IV check string 2018-11-15 17:35:11 -08:00
Kurt
a64d08e7e9 Add GO transfer IV verification 2018-11-14 18:25:43 -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
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
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
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
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
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
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
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
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
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
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
5fe9226c62 Ignore fixed language trades for gen4 korean check
Closes #2103
Thanks @Narithegreat !
2018-08-22 22:36:56 -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