Commit graph

105 commits

Author SHA1 Message Date
Kurt
f358c0e4cf Handle all deviating met location string versions 2018-11-22 10:11:51 -08:00
Kurt
6495dc41af Add move/enc/loc references 2018-11-11 22:49:17 -08:00
Kurt
f38c46f5ec Misc updates 2018-11-10 21:07:31 -08:00
Kurt
8f9cc6cd7e Fix xmldoc ampersands 2018-10-31 13:52:09 -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
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
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
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
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
711157f3ea Refactoring
Extract trainer pkm origin check to interface extension
2018-07-25 20:40:57 -07:00
Kurt
625a77589b Extract geolocation logic to interface
mixins would be nice but I guess extensions cover this
2018-07-14 10:34:34 -07:00
Kurt
d11a89d52d Move relearn required flag to checkmoveresult
reduce usage for non gen6+ relearn move cases
save contains result for later usage instead of recomputing the inverse
2018-07-01 21:34:17 -07:00
Kurt
021ac7c54f Refactoring
where!contains -> except
relocate special tutor
2018-06-09 16:04:06 -07:00
Kurt
99005d8fc0 Refactoring
more discards & simplifications
2018-05-12 12:28:48 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -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
b2c54b7a43 Apply trade memory when changing handlers for pk6 2018-04-28 15:58:53 -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
Kurt
0b62ab85a1 Nature -> byte instead of int 2018-04-21 09:18:53 -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
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
2ea1fea5f5 Refactoring
add GameVersion to generation
fix generating pk2 eggs
relocate some logic
2018-03-29 21:00:38 -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
e026a8ab49 Add default trainer info
use in pkmeditor and utilize
2018-03-28 18:52:50 -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
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
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
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
Kurt
999427f484 Update gen2 egg generator
Level = Level is equivalent to Level = 0

update EggInfoSource to use Level instead of LevelMin (LevelMin returns
Level, just be clear on usage)
update VerifyCurrentMoves so that only gen1/2 do the gen1/2 move update
methods. Recently extended all encounters to have a generation property;
we only care about gen1/2 here.

https://projectpokemon.org/home/forums/topic/43655-pokemon-crystal-egg-mark-as-not-legit/
2018-01-30 20:36:22 -08:00
Kurt
836566004f Use CXD met location string on verbose output
was previously using RSEFRLG locations for CXD encounters
2018-01-30 20:24:45 -08:00
Kurt
735ff26486 Rework GetEncounterMoves to match games
Closes #1787

Noticed that the search-backwards approach for GetMoves yields Sludge
for muk even though it shouldn't be allowed
im fine with this for now because gen2 never had online checks and any
current-gen checks allow relearning.
2018-01-28 00:09:11 -08:00
Kurt
fb6738f18b Add unown 2->7+ shiny check
closes #1755

also:
fix vc transfer checks not being called (EncounterOriginalGB is no
longer GBEncounterData).
remove usages of GBEncounterData -- class is (as of a ~~month ago) now
never leaked out of the EncounterGenerator -- always returns the actual
encounter data as the wrapper is not needed.
simplify logic flow / references
2018-01-10 16:16:35 -08:00
Kurt
0f21fc2217 add location interface for verbose analysis output
indicates met location for transferred mons
most gen1/2 encounters won't show values due to the location not being
stored respective to the string tables (anyone wanna do a location remap
after initial load?)
2018-01-02 12:00:41 -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
816ebf6b0e Refactoring
no functional change
2017-12-11 16:01:24 -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
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
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
Kurt
9930e8765a Add frame level checking
still WIP but should be working fairly well
2017-11-29 23:20:49 -08:00
Kurt
187726b4af Use static/magnet pull values
reorganize a little for lead use cases
2017-11-26 16:09:24 -08:00
Kurt
0f3529e764 Add gen3 swarm encounter slot call
via pret/pokeemerald (and pokeruby); rate is set at 50%
swarm pokemon have the ability to have 4 fixed moves, so derive from
EncounterSlot to have moves, and remove special handling from
VerifyCurrentMoves (now picked up by IMoveset pattern
2017-11-26 11:00:54 -08:00
Kurt
2be84b6005 Rework encounterslot location fetch
store ref to area instead of location, useful for fetching sibling slots
from the parent.
2017-11-25 18:16:50 -08:00
Kurt
b8a5657d5a misc tweaks
pull out transfer locations to const references
add vc2 & crown beast/celebi met location suggesting
add vc2 crystal sensitive detection
add 2 more usum trainer stats (thanks holla!)
2017-11-22 21:45:30 -08:00
Kurt
d5411f1453 Add nickname flag override for encountertrade
closes #1649
2017-11-22 08:11:53 -08:00
Kurt
8958646ae6 Fix game specific pair evolution comparison
US table with SN result in false; just check the even/odd for these (as
they are pair specific).
Closes #1611 , thanks @Ammako !
2017-11-16 14:20:13 -08:00
Kurt
139e130b82 evo table / check update
prune froslass/gallade evolution tree pruning by editing the binary like
prior commit for sm

fe66a65464 (diff-e0f20441fd5149efa4e829994c94f683)

revise banlist interaction for usum evos (need to trade to USUM to be
able to undergo these evolutions).

Closes #1570 (evolution table issues), other open issues can catch any
other/unrelated fallout.
2017-11-09 19:47:01 -08:00
Kurt
5e2e4fd6f1 Add usum evo table
repacked garc as mini uu
2017-11-09 19:27:16 -08:00