Commit graph

504 commits

Author SHA1 Message Date
Kurt
43cb0e8d7d Provide more accurate met level for eggs
Gen6 egg with met level != 1 (ie 98) will use the gen3-4 metlevel
branch.
fuzzed input from #1728 to be hacked (met level = 98)
2017-12-28 10:01:48 -08:00
Kurt
a1f2f8708a Refactoring
pass identifier on cloning pkm
remove unnecessary ref for passing Data (not modifying array reference)
const some magic numbers
2017-12-27 16:36:24 -08:00
sora10pls
c3d5266b89 Add XY gift Lapras ability check 2017-12-23 18:28:00 -05:00
Kurt
ea76d6a899 Misc tweaks
minor perf improvements (don't ToList for encounter slots, store all
slots incrementally); has better performance for legal pkm checks
2017-12-23 11:49:20 -08:00
Kurt
7f21728e84 Add area->location references to remaining slots 2017-12-23 11:48:10 -08:00
Kurt
5e59e20ea1 Store matched encounter generation
previously was only defined for gen1/2, why not all gens
can now query encounters in Core for encounters per generation via
reflection; can help group encounters for data vis or be faster than
getting individual gen numbers
2017-12-18 16:17:21 -08:00
Kurt
80baaea3b7 add b2w2 n's pokemon PIDs
add b2w2 fixed PID encounters (N's Pokemon), move nsparkle to this class
redo static encounter cloning
2017-12-18 15:25:40 -08:00
Kurt
24b5cc48ed Fix gb encounter move comparison
don't calc NoMoveReminder for non-gen2 formats, also fix comparisons
(gen1 || gen2&&noRemind)
Closes #1707
2017-12-17 21:26:31 -08:00
Kurt
47eee3aa98 Add roto powers as held items
not gonna add sprites because these are useless, anyone can submit via
pr (image might need downscaling to <15x15)
Closes #1703

remove useless null checks (throws the exact same exception it would if
it were not there, except without detail)
2017-12-16 19:52:06 -08:00
Kurt
21c1dde3a7 Fix static encounter gift / egg edge case
extract EncounterStatic match determination; in doing so fixes "lvl" by
passing byval.

Pichu encounters (2) come before the Gift level 25 pikachu, causing lvl
to be dropped to 5. When pikachu comes around, it compares 5==25 -> bad;
pulling out the method and passing byval allows it to be 25 at the start
of every new encounterstatic checked.
2017-12-16 18:24:03 -08:00
Kurt
0b58d4ffe9 Add form/nature checks for gen5 trades
altform wasn't checked for EncounterTrade
nature wasn't checked for gen5 origin (decoupled from PID, but forced)
#1702
2017-12-16 14:09:03 -08:00
Kurt
e5aa39a6bb Refactoring
get language list now doesn't return new objects (or re-enumerate)
update rand usage to be inclusive for top bound, extend shuffle to
collections
remove unnecessary location overrides (already overriden in legal fetch)
2017-12-14 20:58:55 -08:00
Kurt
b5640de538 Misc tweaks
reorder some args, reuse some standard methods;
add spanish for gen1/2 egg name case
2017-12-14 16:16:47 -08:00
Kurt
9a39f818f9 Misc fixes
#1700
dp personal: add wormadam/deoxys manual forme count values
generator: bcc handling for pkm present in & out of bcc, and static/wild
duplicates
util: fix incorrect variable reference
2017-12-13 16:17:02 -08:00
Kurt
a9ff74059a Misc perf tweaks
checking untraded should just check for the first character (rather than
creating string object)
hashset for wild6 balls
2017-12-13 16:12:53 -08:00
Kurt
816ebf6b0e Refactoring
no functional change
2017-12-11 16:01:24 -08:00
Kurt
dd21f9375f Misc updates
Disallow sandygast on US
Add 2 more records
thanks @feralfalcon
Closes #1698
2017-12-08 08:54:00 -08:00
Kurt
a43880184a Fix artist ribbon gen6+
having 4 ribbons is sufficient (normal/super/hyper/master = 4, etc)

https://projectpokemon.org/home/forums/topic/42933-2-issues-invalid-ribbons-artist-encounter-level-in-origin-game/
2017-12-07 07:57:07 -08:00
Kurt
f9946368a0 Remove usage of LegalityAnalysis from PK*
CK3<->XK3 transfers to PK3 first now (no direct transfer legally)
2017-12-06 21:28:34 -08:00
Kurt
bd9f7fc7e2 Remove fossils from usum capture list 2017-12-06 21:05:36 -08:00
Kurt
4550f656d0 Update gs vc check female
will be revised when/if vc-c is released
2017-12-05 15:08:02 -08:00
Kurt
88f67ebd36 fix crystal gender flagging
C->GS->Gen7 keeps female OT but gives GS version
also fixes wrong logic path for format2
thanks randomdice101
2017-12-05 14:43:02 -08:00
Kurt
5bc2e6da88 Refactoring
de-linq some areas where direct accessing is possible (list/array)
2017-12-04 20:16:54 -08:00
Kurt
4a63769351 Add voltorb to beast ball permissible table
closes #1694
2017-12-04 16:54:09 -08:00
Kurt
3d7b2a2b29 Misc tweaks
RNG frame mismatch -> fishy (for now)
fix xmldoc copypaste
clean up some resharper warnings
2017-12-04 16:26:26 -08:00
Kurt
1007c5ddb8 don't flag pokespot for frame not matching
#1693
2017-12-04 16:05:21 -08:00
Kurt
a5dbdf91bd Misc tweaks
detect antishiny cxd
remove unused using
don't set caught for seenAll (gen7 dex)
2017-12-04 13:18:28 -08:00
Kurt
6773a2801d update static/magnet slot permutations
using certain slot modifiers (swarm/game pak) causes different
arrangements of slots for different static/magnet pull groups to pull
from

store a list of permuted/different slots and add them to the table at
the end with the rest

move static/magnet pull marking into gen4 methods (only leave for gen3)
move trophy slot generation into gen4dppt area fetch (necessary for
static/magnet permuting)
fix electric off-by-one (yay for curse ??? type shifting everything)
2017-12-03 12:20:53 -08:00
Kurt
f21906ee9a store gen3 origin seed for default frames 2017-12-03 07:13:28 -08:00
Kurt
d301cb5469 Remove ESV rollback for varied level encounters
ESV rand is stored uniquely now via generated frames from FrameFinder,
no need to roll back.
2017-12-02 22:34:54 -08:00
Kurt
133cc22f50 Add bypass for gen4 unown
meh
2017-12-02 19:54:50 -08:00
Kurt
9c32b36709 Don't reuse friend safari message
use the string format variant that has less hints.

https://projectpokemon.org/home/forums/topic/42869-bugg7-ditto/?tab=comments#comment-224365
2017-12-02 18:54:41 -08:00
Kurt
e06b7945ad
Merge pull request #1682 from wwwwwwzx/master
Breeding ball legality fixes
2017-12-02 16:40:42 -08:00
Kurt
15489b8a7c Use dppt specific rand calls 2017-12-02 15:44:44 -08:00
wwwwwwzx
21a31c9fce Breeding ball legality fixes
Unban safari ball Slakoth, Pichu and Igglybuff, beast ball Helioptile.
2017-12-02 15:44:04 -08:00
Kurt
87748e18c9 Continued updates for frame generating
fixes broken test, provide encounter proc call
2017-12-01 22:49:38 -08:00
Kurt
40ec87fc9d Add gen4 lead frame finding variants
can use level call or not at all (fixed slot)
still untested, assumed same call order as gen3.
2017-12-01 21:23:37 -08:00
Kurt
48242109fd Rework lead required to flags 2017-12-01 17:27:09 -08:00
Kurt
15ab0d5aff Add origin seed for frame output
looks like for gen4 I have to yield twice as many frames (for FixedLevel
and non) as level call usage is dependent on encounter
2017-12-01 16:33:03 -08:00
Matt
1fcac7c06b
Fix level check compare 2017-12-01 15:13:03 -05:00
Kurt
4b954cd102 Add static/magnet fail enum value
can fail leading to regular ESV calc
2017-11-30 23:07:11 -08:00
Kurt
5d74096243 Apply static/magnet groups by slot type
only apply for emerald (only game in gen3 that supports it)
2017-11-30 22:34:57 -08:00
Kurt
de25056275 Check SOS hidden ability minimum IVs
Closes #1675
2017-11-30 21:06:11 -08:00
Kurt
2ab805ba98 Add method h safari analogues for ESV->slot 2017-11-30 19:31:38 -08:00
Kurt
8c675793ba Fix gen4 trade nickname/ot check
Closes #1672 by changing length check to check the correct dimension
add handling for DP english trades (localization error).
2017-11-30 18:13:30 -08:00
Kurt
9930e8765a Add frame level checking
still WIP but should be working fairly well
2017-11-29 23:20:49 -08:00
Kurt
d3d7d7d50d Add slot level / IsEncounterable beginnings
dynamic level -> calc level
no sweet scent -> proc available (rock smash/fish)

change frame checking in encountergenerator to save which frame it was
found on (unused but possibly later can capture this for output)
2017-11-29 21:31:52 -08:00
Kurt
36894a588d Add FRLG unown frame matching
Turns out there was no documentation anywhere on encounterslot numbers
for the individual forms; some sites had overall rates.
Assuming a human filled out the encounter slots, forms would repeat left
to right until a new form takes over. Below slot numbers match the rates
when summed up.

https://pastebin.com/raw/bQt3ZMbq
2017-11-29 18:28:20 -08:00
Kurt
8f8cf5bc9a Fix tradepair calculation (link trade eggs)
returned invalid pair values for gen7 due to 2 unused game IDs between
the gen6&gen7 pairs
2017-11-29 09:21:17 -08:00
Kurt
dc2ef24fcd Handle fixed lang trade name detection explicitly
edge cases suck
2017-11-28 22:26:31 -08:00