Commit graph

1289 commits

Author SHA1 Message Date
Kurt
8902e9662c Add exclusive encounter handling
Handle Faraway Island Mew, handle DP Darkrai/Shaymin & Arceus, handle
not-distributed WC3s.

Now stopping at dex 154 -- one full generation of PKM species IDs can be
completely spawned directly from IEncounterable data!
2018-05-07 22:12:12 -07:00
Kurt
3c31d5798f Continued pkmgen updates
* adds g4 forced shiny seed->pid (Chain Shiny Lake of Rage Gyarados)
* adds cxd starter pid generating handling
* adds g5 forced shiny seed->pid (MG5Shiny Shiny gift Dratini)
* excludes gen4 route45 surf impossible encounters
* actually use ingame trade edge case handler

Up to dragonair (147) yay; yellow dragonair is likely the catch rate
edge case.
2018-05-07 21:16:54 -07:00
Kurt
86bf4201e2 Remove encounterstatic-encounterslot collision case
Exeggutor Island has wild & one static with a fixed ability; the fixed
ability is returned first which causes wild lv40 exeggutors with
ability2 (1/2/H) to be flagged as illegal.
2018-05-07 21:12:42 -07:00
Kurt
3e885a8440 Update forme parse
Closes #1931
2018-05-07 18:24:30 -07:00
Kurt
734edfae20 Remove cutecharm swarm restriction
only affects species (can't force gender on a fixed gender swarm slot)
https://github.com/kwsch/PKHeX/pull/1314

https://projectpokemon.org/home/forums/topic/45153-bug-cute-charm-swarming-illegal/

Add swarm cutecharm test cases from thread, thanks @PP-theSLAYER !
2018-05-07 16:14:31 -07:00
Kurt
19a0560474 Misc cleanup
extend byte[]->pkm iterator for specifying start/stop
clean up some in main window
2018-05-06 22:24:25 -07:00
Kurt
7e9b5362d0 Simplify showdownset form handling
replace all dashes with spaces, and vice versa
Closes #1930
2018-05-06 18:46:51 -07:00
Kurt
5cb232d474 Sanity check some showdownset import values 2018-05-06 18:40:51 -07:00
Kurt
232427d002 Rework slot interactivity a little
decentralize some logic, individual view providers now provide the
details rather than detecting from a huge array.

#1925
2018-05-05 08:07:22 -07:00
Kurt
71970b3332 Add gen1/3 speciesID direct get/set
https://projectpokemon.org/home/forums/topic/45108-pkhex-suggestion/
2018-05-04 18:05:41 -07:00
Kurt
4b6ee3fbf5 Update 'sorter'
Adds IV count sorting
Adds Itemless & Illegal deleting
Adds Max level modding, item clearing. Handle egg cases sensitively.

remove final sortby for reversal case as the incremental integer
prevents further ordering.

Any suggestions? Keep in mind that some modifications can be done by the
Batch Editor scripts; smart deletions & sorts are highest value
additions ;)
2018-05-01 19:24:47 -07:00
Kurt
4c9177fcb3 Add sort force-reverse
hold control when triggering the sort
sneaky linq to reverse a sort by:
* re-doing the initial sort, then
* reversing the sorted pkm data by using a throwaway increment
* re-doing the final sort
2018-04-30 21:39:12 -07:00
Kurt
bbcbdd80a1 Update 'sorter' with more functionality
Nest item choices into separated groups (based on their overall
function).

Adds 3 more deletion options: eggs, untrained, or not-matching-savefile.
Adds 1 more modification option: Max Friendship of current handler
2018-04-30 17:32:23 -07:00
Kurt
57c625d089 Add delete criteria method providing for box clear
Can opt to not delete a slot
2018-04-30 17:29:13 -07:00
Kurt
ea2c6260fa Prevent providing beta safari zone encounters
Fixes Krabby / etc.
Fix genderless encounterstatic gender set (Voltorb)

Now at 103, Exeggutor
pretty cool that over 100 species can have every single encounter
generate a legal pkm ;)
might be useful to add metrics to count how many encounters are
generated in a session
2018-04-29 21:56:12 -07:00
Kurt
ab71ea2d8b More generator updates
Graveler (SM Trade) -> Force applying handling trainer details for
ingame trades
Ponyta (Ranch Trade) Apply correct ability for encountertradePID

Up to 98 : Wild Gen2 Krabby (safari zone impossible location needs to
get filtered from possible encounters)
2018-04-29 21:29:34 -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
Kurt
1c3a330ab2 Remove clefable from non-obtainable encounters
Can be obtained via game corner
update possible games of origin
clear wasegg flag for next iteration

now at species 64: Kadabra.
2018-04-29 20:04:13 -07:00
Kurt
50d390bd4e Fix gen1 trade version overwrite
only noticable when generating from

up to dex 35, clefairy now. I expect things to ramp up soon...
2018-04-29 19:03:55 -07:00
Kurt
daf093879b More generator updates
all the way up to nidorina

extract some reusable methods
exclude invalid headbutt encounters
use built in randomgender
2018-04-29 18:26:36 -07:00
Kurt
b1549837b1 Update gen2 ingame-trade met location handling 2018-04-29 11:46:49 -07:00
Kurt
b353701d3e More generator updates
adds pokewalker handling

now stuck on GSC Trade Spearow (likely not setting OT details as needed)
2018-04-29 11:33:35 -07:00
Kurt
4214b1be7b More generator fixes/improvements
Fix/add missing gameversion references (BU instead of BW,
pokewalker=HGSS)
increase reuse of pidgenerator & add more generating methods.

seems like it's generating pkm fine besides the PID edge cases, which is
nice
2018-04-29 09:31:13 -07:00
Kurt
08603c5664 Fix xd miror b encounters not receiving versionID
version was set to Encounter_XD, which did not contain the miror b
encounters.

simplify XD check to be O(1) now that version is stored in the encounter
obj
2018-04-29 08:31:57 -07:00
Kurt
120f5380c9 Rework some more pkm generating logic
can get all the way to caterpie
- gen3/4 needs an antishiny,
- gen5 needs shiny&antishiny mech
- else case needs both as well.
2018-04-28 22:56:10 -07:00
Kurt
70992138e2 Misc encounter->pkm generating fixes
eggs for Gen1 must be generated in Gen2
gen1 wild encounter initial moves
gen4 abilities have 0 for single ability mons
2018-04-28 16:30:56 -07:00
Kurt
55f0143400 Handle generating gb2 events & eggs
restrict the simple encounter provider to not spit out cart era only
gifts.
2018-04-28 15:59:33 -07:00
Kurt
b2c54b7a43 Apply trade memory when changing handlers for pk6 2018-04-28 15:58:53 -07:00
Kurt
a11a44dde0 Add property set instead of discarding value
lul oops
2018-04-28 15:58:38 -07:00
Kurt
ea357cd57a Add GetRandomFeeling
fixes tests & transfers where an explicit range is not legal
2018-04-28 12:59:11 -07:00
Kurt
71faaee31c Refactor savefile tid/sid to int
can now use TrainerID editor control on a savefile... soon?
2018-04-28 11:06:58 -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
af8084fd34 Rework cosplay pikachu static encounter population
Now IV3, thanks @wwwwwwzx for finding the hard-coded case (Lati@s is
already IV3).

https://projectpokemon.org/home/forums/topic/45011-illegal-cosplay-pikachu/?tab=comments#comment-230318

remove SkipFormCheck, and just have all 6 populated (so that Form0
pikachu doesn't slip through).
2018-04-27 21:53:00 -07:00
Kurt
5ad31ad0c9 Generate pkm qr better
Don't include nature/ability for pre-gen3, export held item string with
correct version context
(whatever for cxd)

Closes #1915
2018-04-27 18:24:07 -07:00
Kurt
f5c9873348 Update showdownset handling for gen2/3
Closes #1913 by detecting any required pkm format related to the item.
2018-04-25 18:45:31 -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
15ce1acfdb update box manipulation
closes #1911 , changes end to be inclusive rather than exclusive. abuse
the optional to let it fill in the end caps.
2018-04-23 19:11:55 -07:00
Kurt
1b4ec11335 Add rebattleable Miror B locations to xd shadows
https://projectpokemon.org/home/forums/topic/44957-bug-pokemon-xd-post-game-shadows-flagged-illegal/

if shadow lock sets are ever implemented, would need to update this as
well to 'clone' with the different shadow teams available.
2018-04-23 17:14:52 -07:00
Kurt
505877763b Update ownership sort
gen4 and below saves don't provide an accurate Version/Game; ignore the
version check if it is not a valid game ID.

secondary sort to current OT name so that same-named OT (ignoring case)
are immediately after the current save's pkms.
2018-04-23 08:25:32 -07:00
Kurt
9e874a0784 Add modify handling to 'sorter' dropdown
adds hatch all eggs in box(es, with shift)
2018-04-22 12:43:18 -07:00
Kurt
19e73a5f85 Generalize meowstic edge case
lang sensitive, account for no nickname as well
#1905
2018-04-22 09:53:52 -07:00
Archit Date
4dfcafc720 Fix Meowstic edge case (#1906)
Edge cases with `-F` as forms are already handled in the code
2018-04-22 09:11:09 -07:00
Kurt
ea227a8113 Extract OrderByTrainer
logic to order-group may be useful for later
2018-04-21 23:03:51 -07:00
Kurt
e2405346a4 Update usage sorting
sort friendship delta with high values to front
reference correct method for usage sort
2018-04-21 21:15:19 -07:00
Kurt
8135820e73 Fix gen3 showdownset import
applying details modifies pkm data, pk3 checks for validity when
determining if it is decrypted or not
#1904
2018-04-21 17:47:32 -07:00
Kurt
2ed003d668 Check legality parse before checking relearn result
closes #1904
2018-04-21 16:42:45 -07:00
Kurt
79f1c780f9 Update ownership sort for better not-mine grouping
After the current save's originated pkms, sort by OT name/gender/ID to
group them together rather than leaving them unsorted.
2018-04-21 16:32:47 -07:00
Kurt
488b5215a7 add optional sort param 2018-04-21 15:07:58 -07:00
Kurt
e91cb806e5 Extract extension->prefer format method
fails for 'pkx' (returned 8 instead of 6); establish standard behavior
2018-04-21 14:38:18 -07:00
Kurt
7a245278ea Relocate mg description parse to core 2018-04-21 09:55:27 -07:00
Kurt
0b62ab85a1 Nature -> byte instead of int 2018-04-21 09:18:53 -07:00
Chromaryu
ecf191e0e6 Improve ja translation (#1903) 2018-04-21 08:37:32 -07:00
smileynation
d0e60b44e0 Update LegalityCheckStrings_ja.txt (#1902)
Minor fixes.
2018-04-20 09:20:30 -07:00
smileynation
5b524188cd Update LegalityCheckStrings_ja.txt (#1901)
I translated the main error message.
2018-04-19 05:58:28 -07:00
smileynation
6d2153a39c Update lang_ja.txt (#1900) 2018-04-19 05:57:51 -07:00
Kurt
159928b09b Remove soaring as valid egg hatch loc
hatch ctr doesn't update (steps don't count while soaring)

https://projectpokemon.org/home/forums/topic/44854-is-it-possible-to-hatch-an-egg-while-soaring-in-the-sky/?tab=comments#comment-229931

could probably rename the hashset to indicate that it's only used for
egg hatch locations...
2018-04-18 16:01:12 -07:00
Kurt
c3494c61c1 Fix encountertime comparison for surf mons
surf does not have another slot set; so they were all being set to
Morning.
Could have set all 3 time flags, but kept as 'any'.

will update release binaries with this one
2018-04-18 15:58:21 -07:00
Kurt
7cbd0e5d10 Update 18.04.18
Update event binaries with latest from the Event Gallery
2018-04-17 20:53:13 -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
a48c70ccf2 Add evolution minbound check
https://projectpokemon.org/home/forums/topic/44834-bugabout-event-evolution/?do=findComment&comment=229887

(espeon at level 50 originating from a level 50 eevee gift is not valid)
2018-04-17 20:06:23 -07:00
Kurt
fef1d6e0dd de-linq some evolution dexlevel fetch
use shared IList interface instead of IEnumerable
2018-04-17 19:56:43 -07:00
Kurt
a34be35d9f Add commit contents for previous commit
removal of some linq, reorders as described by previous commit
2018-04-17 19:50:25 -07:00
Kurt
8250bc58cd Fix levelup->evo fetching of next levelup move
Correctly fixes #1163 (test cases added), eg wooper->quagsire would
learn yawn at 31 before evolving; the getmoves wouldn't provide yawn
(stopped at 30) with the old code; the lvl decrement was removed in the
incorrect commit, providing a legal verdict which was obtained
incorrectly (dexlevels were inaccurate)
2018-04-17 19:49:33 -07:00
Kurt
f767b2db0f Differentiate WasEgg (any egg location) from bred
https://projectpokemon.org/home/forums/topic/44838-buggen5-egg/

WasEgg is used for other encounter based checks, so can't reduce the
logic usage
2018-04-17 18:54:38 -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
7a77b4524f Add b2w2 route 23 amoonguss
https://projectpokemon.org/home/forums/topic/44798-bug-report-amoonguss-encount-error-b2w2/
Thanks smileynation!
2018-04-14 08:47:02 -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
6a93a7e435 Fix kor2 string truncation
Closes #1896 , thanks @Narithegreat !
2018-04-11 17:06:13 -07:00
Kurt
7c1f163140 Fix gen4 (and 3 by usage) ’ ' apostrophe -> data
’ is aliased to ' for cleaner display to user; there's no usages of this
method beside gen3/4 strings.

fix early truncation of gen3 strings (don't put terminator on prior
valid char)

https://projectpokemon.org/home/forums/topic/44777-some-little-bug-in-emerald-leafgreen-and-blue-vc/
Thanks cicciochiave!
2018-04-11 16:51:33 -07:00
Kurt
b1cb5226f7 Fix b2w2 tutor reads
yikes what a typo
Closes #1895
2018-04-10 17:36:54 -07:00
Kurt
b8a5ccdf7d Simplify shedinja evo move check
Closes #1895 , re-verified with pkm provided in #1805
there's no shedinja gift, always is an evolution

seal some forms to remove virt call in constructor warning
2018-04-10 17:00:28 -07:00
Kurt
335379bd2e Remove unneeded string
#1893
2018-04-08 17:54:09 -07:00
wwwwwwzx
27f33a6719 Update Chinese translations (#1893)
* Update Chinese translations

* Sync missing change
2018-04-08 17:51:06 -07:00
Egzon Qukovci Jusufi
e39269484c Translated to spanish some of the lines (from 1 to 160) of MessageStrings (#1892) 2018-04-08 11:21:04 -07:00
Kurt
6ac8ed0098 Update translations
all supported langs now have all 3 translatable resources; translate
away!
2018-04-08 09:19:19 -07:00
smileynation
e7721f10ef Update lang_ja.txt (#1890) 2018-04-07 22:29:19 -07:00
smileynation
bd78a9a3e4 Update text_Forms_ja.txt (#1891) 2018-04-07 22:29:10 -07:00
Kurt
7ef8a88678 Add 2 spaces to jynx OT trade name
lol nice error, translators
2018-04-07 16:25:52 -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
420efb72bb Misc refactoring
use common edits to set pp
2018-04-07 11:40:01 -07:00
Kurt
9d3f7250a5 Clamp language values
pk3->pk4 threw errors

https://projectpokemon.org/home/forums/topic/44719-about-channel-jirachi/

should probably work that logic into a more generic getsafelanguage
2018-04-06 23:37:24 -07:00
Kurt
1f9f8c97f1 length check language & trash byte source
https://projectpokemon.org/home/forums/topic/44719-about-channel-jirachi/
future/invalid language values are out of range
fixes the symptom but not the root cause (permitting out of range
languages when generating a wc3->pk3).
2018-04-06 23:36:13 -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
51612b8977 Add custom sort via passed func params 2018-04-06 21:33:25 -07:00
Kurt
1d4e815689 Extract more mesage strings
all common strings in forms used by multiple generations

would rather rework the individual generation strings to be unnecessary
with better interaction instead (if possible), as translating hundreds
of limited exposure strings is a drag.
2018-04-06 21:23:09 -07:00
Kurt
5d8ccf12d4 Fix kor playtime read
Closes #1888
Thanks @Bl4ckSh4rk !
2018-04-06 17:15:34 -07:00
Kurt
5e96c6e035 Extract main window strings to translatable class
Similar to LegalityCheckStrings
no resource files yet, will generate those tomorrow(?)

some strings are not translatable (useless gen6 passerby export text),
not really worth
2018-04-05 21:25:18 -07:00
Kurt
1122a3f21e Shift kor gs pokedex bitflag region
-0x20 yields a match for seen/caught

https://projectpokemon.org/home/forums/topic/44692-i-have-a-question-about-gen2-of-pkhex/

Thanks BLACKBIRD!
2018-04-05 17:00:55 -07:00
wwwwwwzx
8710c7a517 Translations update (#1887)
* Update Chinese translation file - 2

* Fix up base stats label translations
2018-04-04 22:45:14 -07:00
Kurt
2f57630b4a Clamp abilitynumber value
keep to 3 bitflags
1/2/H
2018-04-04 21:42:02 -07:00
Kurt
f56696bf5c expand sorting capability
can replace the sorting function in SaveFile with any of the other
behaviors (or can just get->sort->set BoxData)
2018-04-04 20:30:49 -07:00
Archit Date
d65652a34e Fix Showdown Imports for Nidoran (#1886)
Showdown Set isn't recognized because of the format `Nidoran-G (G)` where G is M/F
2018-04-04 18:30:54 -07:00
Kurt
bdb6b7a2f1 Add shiny indication for wc3 in mgdb search
https://projectpokemon.org/home/forums/topic/44675-about-event-database/

also fix some xml comments
2018-04-04 09:53:48 -07:00
Kurt
48cf658abd Update translations
#1885
removes content not present, moves dev code to separate debug-only class
2018-04-03 18:46:32 -07:00
wwwwwwzx
159f1594e9 Update Chinese translation file (#1885) 2018-04-03 09:09:03 -07:00
Kurt
ad19496d94 Fix multiline translation val 2018-04-02 23:09:33 -07:00
Kurt
1777a09bde Update translation files with all translatables
Closes #1883

Some controls could be manually pruned (like Gender labels), but nah
2018-04-02 20:55:10 -07:00
Kurt
58a84e3770 Merge branch 'master' of https://github.com/kwsch/PKHeX 2018-04-02 17:51:40 -07:00
Kurt
547c799eeb Handle gen1/2 static encounters
levelup starts after initial moves
2018-04-02 17:51:37 -07:00
smileynation
15874798e6 Update lang_ja.txt (#1882)
Japanese transration.
2018-04-02 07:58:10 -07:00
Kurt
39f1805940 Fix gen2 met data setting 2018-04-01 20:25:40 -07:00
Kurt
d4e38dded0 Refactor time of day check/validate
Fixes time of day flitering property reference (met_day is always 0, so
it never reached)
2018-04-01 20:22:10 -07:00
Kurt
867c705597 Fix broken gen2 tests
add oddish to the mix
2018-04-01 15:51:55 -07:00
Kurt
d42eb4372f Fix 4 egg move gen2 oddish
egg moves also can be taught in gen1, which causes the learn source to
be locked to a tradeback (removing egg moves that have IDs greater than
RBY's moves). Simplify gen<=2 parse preference ordering with this
addition to force egg moves to be acknowledged.
2018-04-01 15:04:53 -07:00
Kurt
07b2568b1f Fix g2 caterpie generating
has no egg moves -> no moves generated!
2018-04-01 15:02:27 -07:00
Kurt
5e55b916fa Handle fixed gender statics
Seems like a PID/Nature/Gender/Ability smart-setter is necessary for
other encounters
2018-03-31 21:55:59 -07:00
Kurt
ba4c911566 Refactoring & finish eevee test case
generates a legal pk* for every possible encounter; there's likely other
scenarios and more roughness to smooth out, but seems legit for now
2018-03-31 20:37:36 -07:00
Kurt
32f9f806db Add other iencounterable->pkm generators
not tested
2018-03-31 00:43:41 -07:00
Kurt
0b4adf9763 Sync missing content
fixes tests
2018-03-30 22:11:24 -07:00
Kurt
0597833899 Track version of slots/static/trades
I think I set the version at the appropriate times to get all encounter
objects
2018-03-30 21:38:57 -07:00
Kurt
a89c0c3312 Rename egg game->version
add more gameversions (soon)
2018-03-30 21:37:01 -07:00
Kurt
b38abc22e2 Refactoring
add IVersion interface with common interactions
2018-03-30 16:31:40 -07:00
Kurt
2f30eb7c78 Fix rsbox checksum calc/write in blockinfo
F004-chk returned 32bits instead of 16
writing was writing to the head of the save file (lol)
2018-03-30 15:56:59 -07:00
Kurt
537ad33229 Add encounterlink gen
not tested
2018-03-30 01:02:37 -07:00
Kurt
214e684ff8 Add GetEncounterMoves method
dictionary mapping common gameversions to their associated obj
2018-03-30 01:02:22 -07:00
Kurt
d03ff147d4 Add template -> pkm method
fix signature if no versions are provided (empty params is [0], not
null)
2018-03-29 21:04:05 -07:00
Kurt
2ea1fea5f5 Refactoring
add GameVersion to generation
fix generating pk2 eggs
relocate some logic
2018-03-29 21:00:38 -07:00
Kurt
e74e7878cd Lower dragonair encounter level req for trade
https://projectpokemon.org/home/forums/topic/44555-gen2-legality-issue-with-in-game-trade/
Thanks Bumidek !
2018-03-29 08:50:23 -07:00
Kurt
e5ccae906a misc quality of life improvements
set egg friendship
allow SetRandomIVs to use a minimum fixed IV count
2018-03-28 20:56:58 -07:00
Kurt
76b4db1477 Add egg converter & test
only tested for gen7 egg->pkm (not to eventual set)

pretty sure a good chunk of the egg generation logic can be pulled out
for reuse in other IEncounterable generators (IEncounterable
extensions?)
2018-03-28 20:40:07 -07:00
Kurt
6333c42cf1 Add more suggestions for eggs 2018-03-28 20:38:21 -07:00
Kurt
1e13220e6e Add IEncounterable -> pkm interface method
egg,slot,static,link,trade need to be implemented later

remove IEncounterable from PL6
2018-03-28 20:38:07 -07:00
Kurt
314a92b67b Extend core api
add copy/fetch new
2018-03-28 20:34:58 -07:00
Kurt
4cc31ea5e2 Standardize move setter
no longer allow passing null, if array is too small, set zero instead.
2018-03-28 20:34:12 -07:00
Kurt
e026a8ab49 Add default trainer info
use in pkmeditor and utilize
2018-03-28 18:52:50 -07:00
Kurt
35e699cffa Misc mg updates
pgf/wc6/wc7 received on future game -> random version
could eventually be replaced with a get-sane-version which checks if
OriginGame == 0.

fix wc3 random RS giving E (R+1=E)
2018-03-28 17:46:37 -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
a0eb658ef2 Extract minimum trainer information requirements
If one wanted to extend ConvertToPKM to other IEncounterables, this
would be the provided obj containing the receiver's info

allows pkm gen without a savefile, which is nice?
2018-03-28 15:55:19 -07:00
Kurt
78616e1ad5 Add showdownset -> pkm encounter fetch test case
Test parsing glaceon, input must equal output
Test generating encounters for a specific version (exists only on Moon)
Test generating encounters for the same version (add handling trainer
data to permit Tutors)

fixes error in VC generations-present fetch which allowed movesets from
generations 3-6 lul
exclude negative/invalid gameversions
2018-03-27 19:45:22 -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
Kurt
a25425a277 Add pcd ability mismatch edge case
yay set PID but nah lets force an ability that doesn't agree with the
PID

https://projectpokemon.org/home/forums/topic/43724-gen-4-events-flagged-as-illegal/
2018-03-26 23:23:27 -07:00
Kurt
93ca091eb8 Fix gen4 event location string name output
legalityanalysis spat out the unshifted value or none at all (bank 3000
was not returned)
2018-03-26 23:22:11 -07:00
Kurt
1ca69965bf store encountertrade nick/ot within object
allows for ot/nick fetch for a given language
2018-03-26 22:23:11 -07:00
Kurt
6abd2a22a4 Add oras contest master ribbon affection check
Each contest victory requires a contest participation; each
participation gives 20 OT affection (not current trainer!)
Thanks @WyrXIII , @JusLi, @Cresceda !
2018-03-26 16:42:18 -07:00
Matt
ff675ed6e5 Detect event contest affection boost (#1880)
* Detect event contest affection boost

* Re-order check
2018-03-26 10:43:42 -07:00
Kurt
4d3877bf7f Add EncounterMovesetGenerator
lack of a better name; generates IEncounterable list.
2018-03-25 22:50:32 -07:00
Kurt
99a4c55579 Relocate some logic to core
party stats set when setting a slot to a save file
simplify set/delete slotchange duplicate logic
suggest better met locations beyond VC transfers
hatching a gen6 egg applies memories automatically
2018-03-25 19:05:49 -07:00
Kurt
a24e5aa742 Update personalinfo usages
less temp array usages, add methods for cleaner understanding
2018-03-25 13:54:30 -07:00
Archit Date
5bf4fde15c Fix Showdown Import issues (#1878) 2018-03-24 21:47:57 -07:00
Kurt
828636856c Change coin cap to fixed 50000
#1746

https://projectpokemon.org/home/forums/topic/44503-bug-report-gen-4-coin-counts/
max is 50000
https://bulbapedia.bulbagarden.net/wiki/Coin_Case

The Coin Case can hold up to 9,999 coins in Generations I, II, and III,
and up to 50,000 coins in Generation IV.
2018-03-24 17:29:48 -07:00
Kurt
1e708a2102 Simplify default met location fetch
now that IGeneration is available, don't call pkm.GenNumber (slower)
2018-03-24 17:28:56 -07:00
Kurt
a6977af19a Pull out Contest Stat logic to interface 2018-03-24 10:36:48 -07:00
Kurt
c229d5cef4 Add RS & FRLG mail offsets
was only emerald prior
Thansk @Bl4ckSh4rk !

https://projectpokemon.org/home/forums/topic/44433-bug-rubysapphire-mailbox/?do=findComment&comment=228885
2018-03-23 23:06:51 -07:00
Kurt
17b771632e Add settings editor to main navigation
shortcut ctrl-n (CoNfig)
Closes #1864
add debug lines for triggering translations to update
2018-03-23 22:54:26 -07:00
Kurt
d58278d170 Pull out stat modification logic 2018-03-22 22:43:56 -07:00
Kurt
0d69e803e1 Add gen4/5 synthetic trade logic
was previously present for gen6 and gen7 only, resulting in eggs in
gen4/5 not getting link trade values applied. that's really all.

https://projectpokemon.org/home/forums/topic/44437-bug-eggs-transfer-for-gen-4-dppt-and-hgss/
2018-03-21 21:10:23 -07:00
Kurt
d1cfdd782e Rework ball / frame check passing
Two checks are performed for Gen 3 & 4:
A: Encounterability (wurmple, ball, ability)
B: RNG Compatibility (frame)

Original code only checked 'A'
Recent code ordered by 'A', but returned anything that matched 'B'. If
'B was not satisfied, an 'A' match would get deferred, allowing for an
eventual B & !A to be returned before a A & !B being returned.

yay bool logic

we want to prefer a RNGFrameMatch as well as a SlotCompatible match
original code (no RNG checks) retrieves with SlotCompatible just fine
recent adding in framematch resulted in deferring compatible if not RNG
frame, yielding !A matches before A & !B

maintain 3 queues (A & B get yielded immediately) to track A!B, !AB, and
!A!B
not necessary to check unown case anymore as it'll fall into the A!B
group. better performant to skip that check in favor of only adding for
fail.

thanks theSlayer!
2018-03-21 20:19:54 -07:00
Kurt
636736c3fa Add g3 safari ball wild deferrals
Pineco is valid but also can be sourced to altering cave
similar for sandslash
Thanks theSlayer!
2018-03-21 17:30:19 -07:00
Kurt
f103a84fbd add duc reading
i dont really want to add more than this, header/footer conversion can
be done separately.
2018-03-21 17:01:07 -07:00
Kurt
aedc0092b4 Rework translations
instead of:
controls on form->dict of names, look up line to find control
now:
dict of names->look up control to find name

faster overall, simpler, and updates the dictionary with new control
entries. browse thru forms that call translateinterface with one
language (english), then updateall(en) and dump to get the updated
translation files.

#1864
2018-03-20 22:34:44 -07:00
ReignOfComputer
bf1b685705 Translate Showdown Markings & Fix PT Selection (#1872)
Added translation strings for Apply Showdown Markings in CHS, French,
and Korean. International schools ftw.

Additionally, Portuguese was not accessible as it is Index 9 ("zh2",
which I assume is CHT, is at 8), so I've just hardcoded this bit since I
don't know if anything else relies on lang_val.
2018-03-20 08:36:15 -07:00
Kurt
42f5f9b051 Add smart move[] setter
Closes #1871 (smart-move setting is also done by batch editor)
2018-03-20 08:35:41 -07:00
Kurt
426ef1403c Change pp call
was supposed to be with prior commit
2018-03-19 17:32:45 -07:00
Kurt
e4c2b5d77a Split PPMax & PPCurrent edit methods
As noted in #1866
2018-03-19 16:21:29 -07:00
Kurt
9bb4120ff9 add faster pkm slot presence check
instead of checking if the array is empty, only check PID and species
2018-03-18 16:22:21 -07:00
Kurt
2c4e3358e4 Fix ninjask evo move comparison
https://projectpokemon.org/home/forums/topic/44413-bug-information-about-bug-found-on-the-new-version-180319/
2018-03-18 15:30:19 -07:00
Kurt
b0dcdf0948 Update 18.03.19
Update event binaries with latest from the Event Gallery
2018-03-18 13:42:29 -07:00
Kurt
26cc266dd1 Move type sprite fetch remapping to pkmutil
I still don't like it 100%
2018-03-18 11:25:57 -07:00
Kurt
f55028c1a0 Fix KChart errors
gen1 & gen2 types aren't laid out contiguously (yay bird type and extra
types)
fix gen2 type accessors looking at the wrong byte

type sprites now load correctly, and 3rd ability no longer throws an
error (forced to None).
2018-03-18 11:22:20 -07:00
Kurt
88ce27f26b Add R/S roamer data offset
is different from emerald

Thanks TetsuyaGR!

https://projectpokemon.org/home/forums/topic/44407-bug-rubysapphire-roamer-bug/

(use concatall in encounters4)
2018-03-18 08:37:40 -07:00
Kurt
75dbec6038 Remove unnecessary switch entries
null return is only really useful for implementing; can remove the
chance for null when using the api
2018-03-17 20:05:35 -07:00
Kurt
49d92758c5 xd ribbon fix
lol
2018-03-17 10:36:37 -07:00
Kurt
e9a3b4acf1 Merge PIDType and bool? shiny property
Gen5 does not follow the same convention, 0 = non, 1 = rnd, 2 = always;
not gonna bother updating for just that one

bool? occupies 2 bytes; enum:byte is 1 byte.

should probably move validity checking logic into the IEncounterable
objects instead...
2018-03-16 19:35:55 -07:00
Kurt
d1a789eeab Fix some pokedex4 behavior
https://projectpokemon.org/home/forums/topic/44347-gen-4-pokédex-forms-incorrectly-readwritten/
2018-03-16 17:54:47 -07:00
Kurt
274d2200a3 Correctly flag hidden7apricorn
[0] -> Last()

Thanks Davil!

https://projectpokemon.org/home/forums/topic/44374-bug-about-hidden-apricorn-voltorb-bronzor/
2018-03-15 19:04:14 -07:00
Kurt
3e9dabf46d Set forced hatch egg friendship
use base friendship, obviously (previously used current egg ctr)
fix force hatch on gen2->gen1 handling with nickname
2018-03-14 22:34:15 -07:00
Kurt
2685fe29c2 Ban hidden-apricorn voltorb bronzor
Thanks @wwwwwwzx !
2018-03-14 08:10:12 -07:00
Kurt
46e1d8a4eb Add ability to replace IV marking method
set the MarkingMethod to a desired func provider (out int markval, int
IVvalue, int IVindex)
#1862
2018-03-12 20:44:16 -07:00
Kurt
1cdbe6f4f8 Fix ditto5 IV order
closes #1863
2018-03-12 19:34:54 -07:00
Kurt
b41095bb28 ShowdownSet gender/markings
Closes #1862
2018-03-12 17:40:09 -07:00
Kurt
102550174e Simplification
invalid/unknown usages were incorrectly interchangable; dex-sets were
looking at Unknown which was impossible for some cases.

only use GameVersion.Unknown as a temp placeholder for later resolution
by the user.
2018-03-11 18:07:48 -07:00
Kurt
22bde0af52 Fix incorrect variable reference
new SAV3() throws exception, no more!
2018-03-11 14:42:56 -07:00
Kurt
59c01396ab Add string[] -> showdownset & showdownset[]
remove some unnecessary pre-processing / allocation (ToArray)

pls lmk if there's any sets that break (should really have parsing test
cases)
2018-03-11 11:39:58 -07:00
Kurt
aa65d88d3d Cache pressure slot instead of saving all to list
faster to do:
null check & comparison for each
vs
collection add (especially if growing collection)

don't evaluate all slots (faster), capturing the dexlevel[] object is
fine until the enumerable is discarded
2018-03-11 11:02:02 -07:00
Kurt
5148fd2c4e Add minimally filtered encounter generators
Filters by species at most, resulting in something that can be scanned
for a preferred encounter.
2018-03-11 00:29:31 -08:00
Kurt
94811d9052 Split up IEncounterable generators
Can break the filtering out into smaller methods such that the generator
can return results with less strict filtering
2018-03-10 19:51:09 -08:00
Kurt
84c5decfc0 Comment out unused
temp = temp permanent lul
2018-03-10 19:40:57 -08:00
Kurt
2bd9d99d9e Refactoring
WinForms->Core logic absorbing (CommonEdits)
loading ShowdownSet now applies properties to PKM instead of PKMEditor
Contest/IVs for Static/Trades are no longer set by default (less object
allocations), and are now checked by the encounter generator
2018-03-10 18:03:09 -08:00
Kurt
9da1913f1b Only check static IVs if original IVs still exist
https://projectpokemon.org/home/forums/topic/44319-bug-vc-mew/
Thanks Davil!
2018-03-09 20:00:13 -08:00
Kurt
cda2cfcefd Clean up EncounterLink
no new gen6 pkm link gifts, simplify usages
2018-03-09 18:58:00 -08:00
Kurt
452ffe2369 Refactoring
relocate location of stuff
2018-03-08 21:18:32 -08:00
ReignOfComputer
8147258e9e Unban Gen 7 Starters HA (#1860)
HA Starters Event via Pokemon Bank
2018-03-08 05:55:47 -08:00
Kurt
cbf4038a95 Refactoring
relocate gift data storage out of legal.cs
2018-03-05 22:19:56 -08:00
Kurt
21cdf4f642 Reorganization
wonder if it's possible to provide a more lightweight core by pulling
out legality stuff to a separate project?
2018-03-05 20:49:45 -08:00
wwwwwwzx
c9a54307c4 Fix WC6/7 IV generation (#1857)
https://pastebin.com/bbpS6svw
IV lock doesn't work for IV3 case
2018-03-02 16:17:14 -08:00
Kurt
e4210e2b3e Misc api improvements
extract common nature amp logic
generic ienumerable copyto which now returns count of elements copied
(maybe useful later). prior usages never tried to copy an enumerable
larger than the dest array (now length checked).
2018-02-28 21:50:50 -08:00
Kurt
24982fe8c5 Misc simplifications 2018-02-28 21:05:50 -08:00
Kurt
1411933e27 Relocate pkm stat controls to separate usercontrol
splits the logic up
change hypertrain from ctrl (prevents 30/31 setting) to shift (allows)
2018-02-26 21:22:35 -08:00
Kurt
89d3437d0b prevent blue flabebe apricorn/beast
closes #1850
impossible SOS's were already removed from the SOS list (e.g. no slots
in the SOS table with w.Species == 669 && w.Form == 3)
2018-02-24 17:28:07 -08:00
Kurt
934757eac1 Add Bank7 r/w 2018-02-24 13:03:32 -08:00
Kurt
f9002c6cc9 Add trashbyte copy for OT import on gen1/2
Closes #1849
NAME_LENGTH is 11 for both gens and the offsets don't vary between
languages, so it's a simple fetch.
2018-02-22 22:42:50 -08:00
Kurt
016b75fe83 Fix necrozma showdown->short names
closes #1848 , had deleted short->showdown conversion

Thanks @architdate !
2018-02-21 20:40:06 -08:00
Kurt
ee1196a57d Set playedtime accurately
closes #1847
override playtimestring if max time... better than nothing
2018-02-21 15:22:43 -08:00
Kurt
d20f14504e Refactoring
pull out BlockInfo logic, standardize common block checking
reduces array allocations
2018-02-19 11:33:37 -08:00
Kurt
26ca111630 Fix SetHPIVs order
speed IV last -> speed IV first
closes #1844
2018-02-18 09:54:17 -08:00
Kurt
e6a74b0145 Only skip nickname set if currently same
Closes #1842
2018-02-17 17:42:00 -08:00
Kurt
47643f49b6 remove linq personalinfo bit fetch
reads the bits out of the original array (saves a few ms by not
allocating/gc)
2018-02-16 19:34:42 -08:00