Commit graph

4614 commits

Author SHA1 Message Date
Kurt
815705bc5e Fix gender handling
Closes #1933

if not allowed to be genderless, flag as invalid gender
only permit valid genders after genderless is ruled out
(both done by checking the low bit)
2018-05-10 18:53:23 -07:00
Kurt
9fb7056837 Add test living dex generator
doesn't generate everything due to the evo chain not being 'full'
(instead is unevolved singular pkm), nor does it evolve pkm
2018-05-09 21:02:35 -07:00
Kurt
79b2576c31 add overloads for GetPossible
Remove edge case handling for level 2 blissey; updates over the past 2
(yay 2 years of legality checking) can now handle that case without
special handling.
2018-05-09 20:37:11 -07:00
Kurt
9f8e86b2b5 Finish rough generator
* handle gen6+ egg case where egg move count < 4 (cannot displace
Levelup lvl1 moves)
* handle minior altform case

generates all species/encounters possible, yielding 144,094 pkm files
(all detected as legal!)
2018-05-09 19:21:44 -07:00
Kurt
16ed4353b2 More generator updates
Store 4g giratina held item for enc->pkm legality
revise usages of GetSaneGender
Rearrange some logic
Better handle impossible version encounters (gen4)

gen 1-5 done, stuck on 659 - bunnelby egg...?
2018-05-09 17:50:56 -07:00
Kurt
4913ef9647 More generator updates
* B2 has an error in the encounter table for Route 3 Corphish Special
water encounter; GF edited from Basculin-1 to Corphish-1 and forgot to
update the form to 0.
* Ranch Trade egg locations
* Trade gender-PID set correctly
* static roamer glitch does not apply for emerald
* Mirage Island wild Wynaut case now allowed (collision with Gift Wynaut
egg hatched on Mirage Island?)

gen1-3 done; now at 413 (Wormadam) which currently yields an
EncounterEgg AS wormadam, which isn't right...
2018-05-08 21:17:31 -07:00
Kurt
c21f8bf45f More generator updates
Blazing past 251, now stopped at 280 (trade ralts, gender mismatch??)
2018-05-08 20:13:55 -07:00
Kurt
4d60a5a64e More generator updates
* first case of EncounterLink, now works (version, ability, OT memory)
* handle gen2 gb events (not even sure if they pop up, just in case)
* handle gen3 ereader shadow mons
* handle gen4 spiky pichu PID type
* handle gen2 crystal egg met level
2018-05-07 22:53:36 -07:00
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
6e3f66ef25 Fix unsettable slots allowing bad drop-swap 2018-05-05 18:19:49 -07:00
Kurt
b572620dac Remove if not activated
Closes #1926
2018-05-05 17:29:38 -07:00
Kurt
16e2fc3344 Tack on shift to the showdownset view
hold ctrl+shift for the set preview; I forgot that ctrl was already used
for quick loading to tabs (makes it impossible with just ctrl)
2018-05-05 08:50:15 -07:00
Kurt
c8cdff8abc Add showdownset preview bubble for slot views
Hold control when you move your mouse to enter the slot's control area
(ie put your mouse on the sprite while holding control); the program
will display a ShowdownSet summary of the contents so you don't have to
load to tabs.

Holding Control is required for now (can always recompile to have it
always on); can be a nuisance for those not wanting to view details
since it overlays a big window (obscuring).

Closes #1925
2018-05-05 08:25:36 -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
02dc49641c Rearrange version changing logic
set the new version, then update the controls
#1923 ; exist logic overrode rby/gsc to gen7 locations, which didn't
trigger the TID view update.
2018-05-04 17:59:04 -07:00
Kurt
676b5905bf Show other TID/SID in hover tooltip 2018-05-03 22:44:39 -07:00
Kurt
d15b0b439c Show SID for vc->7+
#1923
sometimes (hacked data) can have SID values; don't exclusively follow
the GB era TID only rule.
2018-05-02 22:28:41 -07:00
Kurt
21cb931123 Repoint old delete/sort shortcuts
Closes #1923 , actual controls are nested 1 deeper.
2018-05-02 17:57:40 -07:00
Matt
77276302a5 Add Past Generation deleter (#1922)
4b6ee3fbf5 (commitcomment-28822553) ;)
2018-05-02 10:07:09 -07:00
Kurt
7303ace32a Add simple shiny sort
again, hold ctrl to revese sort
add inverse clear for eggs (clears all but eggs if ctrl held)
2018-05-01 22:35:37 -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
9fd0432c41 Reference check translatable object string
Closes #1921 by only setting the string if it is updated.
2018-05-01 18:42:56 -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
8dcee4e0ee Add 3 more advanced sorters
Primary->Secondary typing
Generation->Version
Base Stat Total
2018-04-30 21:20:28 -07:00
Kurt
116f600cb7 Apply default language if none
Closes #1920
2018-04-30 18:48:21 -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
df4fc96f4d Add legality sorter
Closes #1919
2018-04-29 09:55:26 -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