Commit graph

1699 commits

Author SHA1 Message Date
ReignOfComputer
3324ad8e33 Unban Abomasite, Tyranitarite, and Manectite 2017-06-07 00:38:27 +08:00
Kurt
c87b2f10b7 Fix amoonguss static encounter level route11
bulbapedia is wrong, confirmed myself that both encounters are level 43.
fan guide is correct:
http://www.gamerguides.com/pokemon-black-white-2/other-areas/waterfall-required-areas/route-11
2017-06-04 10:58:48 -07:00
Kurt
d730f60dec Fix dexnav relearnmove1 check
species=0 was passed, pass the base species instead
Closes #1192
2017-06-04 09:20:58 -07:00
Kurt
14225bbc2e misc fixes
encounterinvalid isegg no longer throws exceptions when parsing moves
dropping invalid file paths to main window are now ignored (downloads
from chrome can be manually deleted but still dragged from the downloads
bar)
add pidiv case for manaphy gift
2017-06-04 00:12:37 -07:00
Kurt
99fd2dc72d Add PGF forced shiny check
Moved ability forcing to be above shininess forcing as ability bits
shouldn't be set back after a PID has been forced.
2017-06-03 18:40:44 -07:00
Kurt
7c4092e1c5 Misc updates
More elegant handling for PKM without nicknames that have another
language species name; use that language ID instead of the pkm's
language ID. Since ToLower is not called, Ho-Oh from 3/4->6 now
transfers correctly.

fix gen3 encounterstatic eggs while still on gen3 games; only check the
egg location if still an egg

tighten up gen3 PIDIV compatibility checks, roamer glitch is fixed on
Emerald, and static encounters can't get method 2, and can only have
method 4 if under software emulation (RS Box) since the emu speed is
faaaaast 🚤 /s
2017-06-03 17:49:37 -07:00
Kurt
a959e31063 Fix roamer PIDIV method detection
http://bulbapedia.bulbagarden.net/wiki/List_of_glitches_in_Generation_III#Roaming_Pok.C3.A9mon_IV_bug
only 8 bits are transferred, not the top 2 IVs (10bits). Add appropriate
constraints
2017-06-03 15:43:41 -07:00
Kurt
4201e10a0e Misc cleanup
Add PCD fixed PID check
improve PID matching for CXD pkm
hide no-pidiv match seed (00000000)
fix matching fateful for wild pokespot pkm
don't generate eggs for c/xd
2017-06-03 15:16:27 -07:00
javierhimura
814e63aa1c Add Control key modifier to set shiny button to change the pokemon SID instead of the PID, that allow the change shiny of gen 3/4 pokemon without turn the pokemon in illegal because PID/IV mistmatch
Added Cherrygrove City to surf headbutt encounter locations, the upper right trees on the map can be reach from the water in route 30
2017-06-03 12:02:22 +02:00
Kurt
5823425f42 Add PIDIV checking for encounters
Fixes HGSS egg moves, and improves encounter detail detection.
example: togepi from FRLG transferred up, old detection couldn't
differentiate the gift egg from a regular egg; however, PIDIVs can lend
a hand -- eggs don't have a PIDIV!

fixed shiny BACD spread detection (in regards to antishiny rerolls).
Shiny WISHMKR now detected correctly.
2017-06-03 00:12:05 -07:00
Kurt
03f42ee19c Split gen3/4 encounter generators from default
Add exclusion for gen3/4 balls since met location requires a less
precise match; static encounters will never be in safari/sport balls.

Fix wurmple species ref, isn't smeargle
2017-06-02 16:56:38 -07:00
Kurt
f70bd02d69 Fix wurmple evo lockup
while loop wasn't checking the modified EC value, thus looping forever
standardize usage across core
2017-06-01 18:41:22 -07:00
ReignOfComputer
8f951211b4 Fix Link Gift Check if not Gen 6 (#1184)
* Skip Link Gift Check if not Gen 6

Prevents NullReferenceException if location is set in other Gen.
Reference:
https://projectpokemon.org/forums/forums/topic/40749-beautifly-and-dustox-re-roll-pidencryption-pkhex-becomes-unresponsive/

* Change Additional Pokemon Link Check

Based on @evandixon's direction :)
2017-06-01 18:10:19 -07:00
Kurt
92ca1e2263 Fix eevee static encounter collision scenario
eevee gen7 egg has no moves; always generate eggs first for gen4+

Closes #1179
Closes #1176 (prior commit)

there's probably a better way to optimize this (don't check wild
encounters if 100% sure it's an egg); best left for future optimization
since it's working fine atm.
2017-05-30 18:42:50 -07:00
Kurt
f60f36081a Fix relearnmove suggestion for set relearn moves 2017-05-30 18:28:06 -07:00
Kurt
2e30878e8b Update 170530
Update event binaries
unban gen3 mega evo stones
fix a lil bit of behaviors
2017-05-29 22:34:45 -07:00
Kurt
c666183e6c Misc fixes
enhance evolution checking
add gen2 game corner static encounters
simplify relearn checking methods that did the same thing
2017-05-29 15:21:39 -07:00
Kurt
82750de1b8 Add initial gen3 event detection
egg events supported, only some gen3 event distros supported
will eventually flag for PIDIV type mismatching

@kamronbatman
2017-05-29 00:48:25 -07:00
Kurt
9a7dc9998c Misc fixes
Track gen1/2 origin game as well  as generation
fix pk2 gender setting (incorrect bitmask & wasn't set from tabs)
extend female gender check for gen2 to apply to GS encounters -- if met
location is missing, was traded to gen1 which clears gender.
2017-05-28 16:56:51 -07:00
Kurt
e01c8a5786 Misc gen3 related legal check fixes 2017-05-28 15:49:20 -07:00
Kurt
cbfa38b131 Rework encounter slot generating
Closes #1171

Calculate rejection scenarios, store rejected slots to spit out at the
end rather than returning them early.
2017-05-28 11:10:01 -07:00
Kurt
178017b104 Relocate female gender checks
Per discussion in #1170

Revise message descriptions
Gen1 err message now used
2017-05-28 10:35:41 -07:00
javierhimura
5cf870d73f Mark OT Female trainer from Gamecube and VC pokemon as invalid.
Gamecube games and generation 1 games do not have female player character.
Generation 2 is not checked because if the pokemon is in format 2 and have met location data stored that means it was caught in crystal where female player is allowed, checks are not included for generation VC2 pokemon
2017-05-28 16:02:57 +02:00
Kurt
61eaa7774d allow insta-hatch eggs
pelago can drain to 0, will hatch immediately on current gen
im sure there's some ways to force-walk to trip to 0 on prior gens, but
this is such a minor check and has no impact for online play

Thanks @Kirzi !
2017-05-27 22:50:10 -07:00
Kurt
74dbeb5cf6 Cleanup
throw in more c#7 lang sugar to checks

flag invalid hatch cycles (over species max || 0); existing wouldn't
flag for non-static encounters.
2017-05-27 22:40:21 -07:00
Kurt
db2d043199 unroll cxd seed completely
re-letter for clearer order of RNG results, don't unroll 3x to roll
forward 2x (just unroll 1,1 then 1).

Put origin seed in RNG Reporter => frame 1 result
Closes #1169
2017-05-27 22:18:04 -07:00
Kurt
2cd1a29b76 Fix platinum turnback giratina
if ko'd in the distortion world, it'll return to turnback cave; uses the
same encountertype as DP.

Closes #1156, Thanks @iKamus !
2017-05-27 21:20:13 -07:00
Kurt
858aa50689 Refactor encounter matching
exercise in deferred execution/state machine, only calculate possible
matches until a sufficiently valid match is obtained. Previous setup
would try to calculate the 'best match' and had band-aid workarounds in
cases where a subsequent check may determine it to be a false match.

There's still more ways to improve speed:
- precalculate relationships for Encounter Slots rather than iterating
over every area
- yielding individual slots instead of an entire area
- group non-egg wondercards by ID in a dict/hashtable for faster
retrieval

reworked some internals:
- EncounterMatch is always an IEncounterable instead of an object, for
easy pattern matching.
- Splitbreed checking is done per encounter and is stored in the
EncounterEgg result
- Encounter validation uses Encounter/Move/RelearnMove/Evolution to
whittle to the final encounter.

As a part of the encounter matching, a lazy peek is used to check if an
invalid encounter should be retained instead of discarded; if another
encounter has not been checked, it'll stop the invalid checks and move
on. If it is the last encounter, no other valid encounters exist so it
will keep the parse for the invalid encounter.

If no encounters are yielded, then there is no encountermatch. An
EncounterInvalid is created to store basic details, and the parse is
carried out.

Breaks some legality checking features for flagging invalid moves in
more detail, but those can be re-added in a separate check (if
splitbreed & any move invalid -> check for other split moves).

Should now be easier to follow the flow & maintain 😄
2017-05-27 21:17:57 -07:00
Kurt
113001f280 Temp gen2 met location filter bypass
#978
crystal location data => no location values to compare to
2017-05-23 22:38:21 -07:00
Kurt
5f94a2e0f4 Update encountertrade ability legality check
check for encountertrade edge case first, then ability capsule

Closes #1163
2017-05-23 20:10:57 -07:00
Kurt
7e30d863b0 Revert dexlevel evotree fetch + re-implement fix
check requireslevelup during evolution validity check, not during tree
generation as movepool fetch treats the 'level' as the max possible
level it was at (not the level it was encountered).

fix dropping pkm from external source causing exception (final return
false caused it to proceed with regular dragdrop operation from source
slot).

#1163
2017-05-23 18:35:32 -07:00
wwwwwwzx
13be5201b1 Several minor fixes and update Chinese translation 2017-05-19 22:05:08 -07:00
Kurt
933bee7778 Ignore memory restriction for past gen same OT xfrs
Closes #1145
2017-05-18 17:38:26 -07:00
Kurt
72865bbfe9 Add recursive shadow lock check template
nowhere near complete/functional, just getting out of src control until
more effort is exerted on this topic
2017-05-18 17:36:43 -07:00
Kurt
845d64cbc6 Add mystery gift species preference
insert to front of list if the species matches
eevee gift in gen7 has all species at 50 including eevee; not sure if
this strategy is needed for the other formats but just in case.
2017-05-17 22:10:19 -07:00
Kurt
fc676ec648 Flag unparsed pkms
With every format now supported, can flag GameVersion=0 pkm
2017-05-17 21:50:52 -07:00
Kurt
58f9e808d7 Invert evo level check comparison
I knew something was odd with this logic...
2017-05-16 22:03:00 -07:00
Kurt
4e1a520b0a Evolution check fixes
Evolution info was not checked for non-eggs; for mystery gifts check
that the level of the evolution is not less than the level of the
matched encounter
fix spacing (cosmetic)
add temp flagging for magnetpull/static slots (will eventually refactor
into something functional that considers a set of slots including
swarm/etc)
2017-05-16 21:09:53 -07:00
Kurt
d29acfb171 Add encounter slot checking
Frame list now can be queried for encounter slot matches
2017-05-14 23:21:34 -07:00
Kurt
6c6b3ae4b6 Refactoring
Add in frametype, rename classes for more coherent structure
2017-05-14 14:42:18 -07:00
Kurt
9380ca25d9 Update current RNG frame detection methods
Still not hooked in or handling every case, but is enough progress for
now.
2017-05-14 12:42:27 -07:00
Kurt
5ec3521d48 More c#7 shorthand
outs & pattern matching, other simplifications
2017-05-13 10:20:25 -07:00
Kurt
a3e1ec2a82 Flag any cxd origin with bad pidiv 2017-05-13 00:04:04 -07:00
Matt
2b0e7ceb5c Unban Heracronite and Houndoominite 2017-05-12 12:59:51 -04:00
Kurt
d94a1c5efb Add beginnings of encounter slot legality
currently unused code
2017-05-12 09:41:21 -07:00
Kurt
aeb90d262c Cleanup 2017-05-12 09:33:12 -07:00
Kurt
6af17352c9 Update HGSS valid hatch location list
Closes #1119
2017-05-12 08:55:24 -07:00
Evan Dixon
96e315c035 Fixed missing resource references 2017-05-11 23:40:57 -05:00
Evan Dixon
52c4fbbe97 Converted PKHeX.Core to .Net Standard
Refactored and rearranged things as needed to allow the change
2017-05-11 23:34:18 -05:00