Commit graph

130 commits

Author SHA1 Message Date
Kurt
c8897161b7 Fix gen6 evo tree resize miss
https://projectpokemon.org/home/forums/topic/46144-a-couple-of-new-problems-in-the-pkhex-version/

Thanks CreamatedReptile2018 !
2018-07-09 22:51:01 -07:00
Kurt
d45a8afef2 Remove erroneous chain trim logic
latter half of the method seems to do everything that is required

Closes #2048
2018-07-09 21:26:45 -07:00
Kurt
9a57469ec3 Update shedinja chain handling
Closes #2045

4ac92b9418
had added it; assuming to undo lvl-1 => lvl for gen3/4.

Level Up, Learn Nincada Move, Evolve to Ninjask & spawn Shedinja, then
learn any Ninjask Moves. Gen3 reverses the spawn&learnNinjask steps,
which is handled separately

Thanks @XxPhoenix1996xX !
2018-07-09 20:18:31 -07:00
Kurt
7f6f7a7bad Misc simplifications
reduce nesting (evo.RequiresLevelUp is checked twice, only check once
and handle path)
compact some methods
seal some classes
add a little xmldoc to exposed members
2018-07-01 19:55:23 -07:00
Kurt
d477e19cf0 Simplify ball/catchrate lineage checks
should speed up egg ball checking a bit since we've already computed the
original species
gen1 catch rate, just move the chain fetch there.
2018-07-01 10:15:10 -07:00
Kurt
77aed3ea14 Adjust levelmin on single evochain
Early return wasn't adjusting the minimum level; closes #2035
2018-06-27 17:41:53 -07:00
Kurt
09c96558ea Disable gen2 chain clamp
not sure of the implications, but fixes #2031
might have to rework this method to clean up the optional params if
things are misbehaving
2018-06-24 08:02:22 -07:00
Kurt
7a0b65e74f Add low bound range check for species not in chain
Closes #2028

Thanks @iiippppk !
2018-06-23 08:23:05 -07:00
Kurt
173c9f7904 Update evo chain trim for transfer
Now trims correctly for g3 sneasel -> weavile (gen4 having both) at
level = met level
2018-06-22 23:18:52 -07:00
Kurt
5dd58c7197 Update gen1 evo chain detect
Closes #2017
2018-06-22 22:48:10 -07:00
Kurt
76e52fa2cd Simplifications
Rearrange some logic, track decrement, remove unnecessary checks
2018-06-22 20:16:31 -07:00
Kurt
3000a8d007 Reduce linq usage
No longer recreates collections with ToArray/ToList by instead altering
the original chain
2018-06-22 19:40:17 -07:00
Kurt
346c401727 Rework initial evochain trim
push unsaved IVTotal/EVTotal stuff from prior commit
rework exposed types for evo chain
initial trim now uses much less linq

can probably redo the get initial chain to provide a species to break
on...
2018-06-22 17:59:02 -07:00
Kurt
1db41c8b21 Add vc2 evo chain check
queue should be checking against none left rather than any left.
Add test cases
2018-06-20 21:43:54 -07:00
Kurt
ce667729f3 More simplifications
Can't have species == 0 or invalid gameversion; check for
EncounterInvalid instead.
Egg chain is always valid (since it is not EncounterInvalid) thus always
provide the chain.
Since these 2 are the same, simplify the logic to be shared.

rearrange some parameters for easier flow
2018-06-20 21:38:56 -07:00
Kurt
47d8220915 Evo chain Simplifications
Rename "Flag" to "Method"; isn't used besides for indicating the evo
Method.
Remove some unnecessary duplicate checks
- always >=1 in chain at start
- mostEvolved already checked for > maxspeciesgen
2018-06-20 19:42:45 -07:00
Kurt
bfdd7247ba Rewrite most evolved species check loop
Use queue collection rather than rebuilding with .Skip(1).ToArray()
move size checks to dequeue location
2018-06-20 18:25:23 -07:00
Kurt
2ef12f635f Continued refactoring
move sylveon check to requireslevelup
need to make this generic for transfer species gaps
2018-06-20 15:59:57 -07:00
Kurt
c5ea35a1a1 Continued refactoring
Move chain prune from Analysis to evochain spawn
2018-06-19 17:50:10 -07:00
Kurt
f10cc183a7 Refactoring
Relocate Evolution Chain logic
minor reorg of check arguments for nesting / grouping
2018-06-19 17:14:22 -07:00
Kurt
2e1081086d Refactoring
Split evolution data specific DexLevel properties from DexLevel

use IReadOnlyList instead of IList for covariant collection
2018-06-18 19:10:21 -07:00
Kurt
e105f2b589 Refactoring
fix b2w2 egg base levelup reference (not bw, b2w2!), doesn't really
matter much except for better indication (possibly?)
remove some unnecessary linq ToArray() calls
continue relocating code out of Core
2018-06-10 17:55:03 -07:00
Kurt
d94fc65367 Refactoring
continued reduction in Core size, simplify/clean up usages
2018-06-10 14:45:25 -07:00
Kurt
ae3b6a7fa1 Simplify IContestStats usage
remove new[] creating for checking if any contest stats exist
(HasContestStats)
2018-06-02 21:19:03 -07:00
Kurt
b670f525fb Split up evolution classes
Too many classes in the same file, break up.

simplify things a little in EncounterArea (remove passing thru nulls,
should throw excpetion immediately if misconfigured).
2018-05-19 12:07:50 -07:00
Kurt
5a3c8f4147 Remove trailing whitespace 2018-05-12 08:41:29 -07:00
wwwwwwzx
997d41b6db Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6 (#1938)
* Fix minlevel of Pangoro/Tyrantrum/Aurorus in gen6

30: level + dark type in the party
32: level + day
33: level + night
34: level + female
Note Meowstic isn't affected due to another entry of level + male (23)

* Minor text usage fix

* Fix xorPID flipping in TransferEC check
2018-05-12 06:57:11 -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
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