Commit graph

1802 commits

Author SHA1 Message Date
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
Kurt
37e5c9fc69 Add record details for gen6
pulled from exefs data
2018-08-06 16:52:43 -07:00
Kurt
48a61a00a2 Relocate record stat id's to core
can potentially add localization by changing the method of fetching
2018-08-06 16:17:32 -07:00
Kurt
0296f98777 Add offset table for sav1
calling Japanese ? X : Y on every single access is too excessive, just
compute one layout for each type whenever the first sav1 requires it.

could probably reduce the amount of properties by reusing others + shift
value; offsets are different due to string lengths being different
2018-08-05 20:27:25 -07:00
Kurt
fc73eee570 Extract PokemonList* to inherited class
Logic is essentially identical; implement a base class and have the
generation specific structures implment the differences.

Reduce the verbosity a little
2018-08-05 17:28:54 -07:00
Kurt
84185dc6c9 misc improvements
add records class for managing info for trainer records
add more b2w2 block docs
2018-08-05 12:39:06 -07:00
Kurt
ca39843046 Length check relearn suggestion
CLsoes #2086
2018-08-04 17:06:51 -07:00
Kurt
279c9d4665 Fix tradeback detect for gen2->1->2 evolve case
https://projectpokemon.org/home/forums/topic/46909-certain-gen-i-moves-are-showing-invalid/

Thanks Raptor385!
2018-08-04 13:36:05 -07:00
Kurt
53857df647 Copy addmoves special case to individual fetch
see prior commits
2018-08-04 10:05:47 -07:00
Kurt
0f63b0a0ee Allow bw movepool except for kyurem
workaround provided for kyurem movepool (which is same bw-b2w2) but the
AddMoves logic with form != 0 points to the form == 0 data
Closes #2085
2018-08-03 07:46:53 -07:00
Kurt
30a614484e Update STADIUM ot checks again
jp: 1999 if stadium1, 2000 if stadium2
en: 2000

jp: always same OT
en: lowercase if stadium2, uppercase if stadium1

https://projectpokemon.org/home/forums/topic/46893-pkhex-bug-stadium-ot-issue/
2018-08-03 07:38:29 -07:00
Kurt
4103b4d4b0 Update 18.08.03
Update event binaries with latest from the Event Gallery
2018-08-02 21:01:17 -07:00
Kurt
1486b7f14a Misc style & minor tweaks
Remove move combobox flicker hack (no longer necessary)
Add more Array.Empty usages
cache mysterygift sizes
seal some classes

no functionality changes
2018-08-02 20:11:42 -07:00
Kurt
19a897923d Reference original encounter for sensitive checks
https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=234360
thanks paf!
2018-08-01 20:39:20 -07:00
Kurt
f4bfdb8311 Remove unnecessary empty array allocations
yay net 4.6
read more: http://justinvp.com/2015/07/20/array-empty/
2018-08-01 18:30:51 -07:00
Kurt
fe6c071d72 Be more generous on nick parse
benefits manual-edit users who forget to put a space between
nick(species)
2018-08-01 18:28:05 -07:00
Kurt
007ec93d85 Update trade nick check for non-nicknamed
Closes #2084
2018-07-31 17:27:28 -07:00
Kurt
4c96efb9b7 Update pk2->pk1 party stat transfer logic
pk1 boxdata stores current level & current hp, which is only present in
pk2 party data.
if the user drops in pk2(boxdata), the transfer leaves 0 for both
values, which isn't correct.
detect stat_level to determine if values should be regenerated or not.

Thanks HaxAras for finding this :)
2018-07-31 14:29:47 -07:00
Kurt
32b90fab13 Simplify some logic 2018-07-29 21:54:02 -07:00
Kurt
02a6d26e1b Break apart BAKName into smaller components
simplifies definition & makes it easier to update bakname usage later
2018-07-29 21:51:45 -07:00
Kurt
f35712fcf2 Extract experience logic to separate file
add exp bar logic, unused.
2018-07-29 17:43:30 -07:00
Kurt
3fd21db51e Style & function extracting 2018-07-29 16:39:15 -07:00
Kurt
0de335d52b Misc reorg 2018-07-29 14:04:16 -07:00
Kurt
b16015e8e5 Split InventoryPouch to inheriting classes 2018-07-29 13:55:07 -07:00
Kurt
d916be1020 Style updates 2018-07-29 13:27:48 -07:00
Kurt
41643a4c86 Use correct language ID for nickname check 2018-07-29 12:47:38 -07:00
Kurt
96484eceb5 Update version logic
Fixes broken tests (glaceon card can only be received by SM, was getting
set to UM).
2018-07-29 11:34:27 -07:00
Kurt
cfa3479a4b Add egg experience check
Closes #2083
2018-07-28 18:09:29 -07:00
Kurt
2092d55b23 Update e/fr/lg stats for deoxys formes
Closes #2082
2018-07-28 09:02:41 -07:00
Kurt
c46924d220 Use wcxfull version/language restriction data
some cards may permit being recieved on incorrect games

some wcxfulls permit games they shouldn't (tapu koko flags permit USUM
but games released after the distribution window)
lots of wcx lacking restrictions completely

tested flagging USUM rockruff & zeraora

might be worth discarding MysteryGiftVerifier and instead just using
unused fields for prior formats to supply the data.
2018-07-27 22:26:27 -07:00
Kurt
77bd91397a Update form sizing / es translations
use some close synonyms (Reiniciar -> Borrar)
omit some words (potential / training) to keep layout compact
capitalize Equipado to match main window

Closes #2080
2018-07-27 17:38:23 -07:00
ajtudela
11ab585368 Big spanish changes (#2081)
* Update spanish translations
2018-07-27 12:40:30 -07:00
Kurt
3d0a2946eb Allow only one movepool for BW-B2W2 source
they're both the same, but bw's pool does not have b2w2 formes
Closes #2078
2018-07-26 21:51:11 -07:00
Kurt
c8563a3737 Respacening
Style guidelines, handle a bunch of files
no functional change
2018-07-26 19:34:27 -07:00
Kurt
9551d4e707 Relocate logic to core
probable/possible lgpe uses similar dex stuff, so best I totally
understand it (assuming quirks will be present)
2018-07-26 18:01:16 -07:00
Kurt
d19705f5a9 Fix incorrectly ordered name<->bitindex
names have sinnoh second not first

https://projectpokemon.org/home/forums/topic/46377-invalid-invalid-ribbons-record/
2018-07-26 17:12:27 -07:00
Kurt
75801e22e0 Update egg location -> encounter generating checks
WasEgg only checks for EncounterEgg valid locations; check for any value
instead.
2018-07-26 14:55:49 -07:00
ajtudela
1c05001fb7 Update spanish translations (#2077)
* Update spanish translations
2018-07-26 07:06:14 -07:00
Kurt
711157f3ea Refactoring
Extract trainer pkm origin check to interface extension
2018-07-25 20:40:57 -07:00
Kurt
f0fc4b0693 remove alias'd properties 2018-07-25 19:43:02 -07:00
Kurt
e8644280a1 Update sav4 block detect logic
#2070
desmume inits a savefile to FFFFFF... others instead init to 00's.
check both init states, add IsRangeAll method

5f39118b8a

Thanks @Filo97 !
2018-07-25 16:00:52 -07:00
Kurt
609e6b4c43 Add jangmo-o/hakamo-o to dashedspecies group
importing little cup idk
2018-07-25 15:53:02 -07:00
Kurt
5fbf132615 Add handling for pgt ranger manaphy
skip out on load if pgt
extract pgt pid gen method
set gender & PID if rangeregg since PID == 0 not 1.
Closes #2075
yay 5k!
2018-07-25 07:34:48 -07:00
Kurt
f0090669bb Update catch rate related logic
#2071
2018-07-24 19:33:42 -07:00