Commit graph

603 commits

Author SHA1 Message Date
Kurt
2c5a7cd5de Add linoone strong loc 2019-11-19 19:41:30 -08:00
Kurt
feef1c1122 Add 2 more strong locations 2019-11-19 19:27:57 -08:00
Chris
7ef4fce89e Add Eevveelutions Spawns for Lake of Outrage (#2471)
All Eeveelutions spawns at the Lake of Outrage, based on the weather?
2019-11-19 19:21:41 -08:00
Kurt
18b20e09d2 Add leafeon location 2019-11-19 19:03:39 -08:00
Kurt
e6476e943b Change Gender to OT Gender
ty @sora10pls for confirmation
2019-11-19 18:55:03 -08:00
Kurt
0f4598ff66 Update some comparisons 2019-11-19 18:02:57 -08:00
Kurt
85fa6e0273 Add more strong encounter locations 2019-11-19 17:07:11 -08:00
Kurt
fa344208b2 Add crossover location handling
Closes #2461 by implementing slightly differently

Dictionary instead of new[] every area
Checks original met location first before attempting the dictionary
lookup (missing in pull request)
Easy path forward if LGPE crossover is needed

Potential issues: Since encounter types aren't marked, shaking trees and
fishing encounters are allowed to cross over. Maybe need to have some
marking for encounter slots or something...
2019-11-19 08:38:18 -08:00
ReignOfComputer
0230dafe2b Wild Area Updates from RoC's PC (#2460) 2019-11-19 08:13:53 -08:00
Kurt
a368b81519 Minor clean 2019-11-18 22:48:03 -08:00
ReignOfComputer
0ef6f024d6 Wild Area Updates from #2416 (#2459)
https://github.com/kwsch/PKHeX/issues/2416
2019-11-18 22:21:13 -08:00
Kurt
f88388cb70 Add Form (AltForm) to IEncounterable interface
All of the encounterable templates have Form anyway; funny that I was
consistent naming them all differently than pkm.AltForm :)

Closes #2452
2019-11-18 22:20:55 -08:00
ReignOfComputer
6d95fa5884 Wild Area Updates from RoC's PC (#2456) 2019-11-18 20:26:38 -08:00
Kurt
1df90199e3 Rework GetBaseSpecies to return EvoCriteria
#2452
2019-11-18 20:26:11 -08:00
Kurt
5a4c026dc7 Restrict egg related species fetch to EvoCriteria
#2452
2019-11-18 20:10:39 -08:00
Kurt
535397cf5e Consolidate egg ctor with args
Form is an absolute requirement for the encounter data.

#2452
2019-11-18 20:01:48 -08:00
Kurt
1ea3976805 Split up Encounters8
Nests in their own file
Encounter types in their own files
2019-11-18 19:23:01 -08:00
Kurt
e9fdc721df Add chewtle 2019-11-18 18:42:10 -08:00
Kurt
3aa3a29264 Add 3 more static enc locations 2019-11-17 22:04:52 -08:00
Kurt
47be249331 Rework evo tree chaining to track form
Now recognizes & reverses form-changing evolution chains like Sirfetch'd

basically the whole process is to build the tree but point in the
opposite direction (for de-evolution paths)
2019-11-17 21:45:53 -08:00
Kurt
4bcf60746b Add egg move sharing checks
Was referencing wild caught mons that are given a single egg move; this
logic handles shared egg moves too via daycare.

Probably need to rework SplitBreed into a dictionary; this might not
catch Mime/etc split breeds if they have different tables.
2019-11-17 17:14:21 -08:00
Kurt
c2dce518c2 Invert sign of fake met locations
Suggested encounters check < 0
2019-11-17 16:03:53 -08:00
Kurt
d4c5919e5e Revisions for some static encounters
Identified a few more
2019-11-17 15:50:41 -08:00
Kurt
ea822e9fcd Add raid flawless IV check (speculation) 2019-11-17 09:55:27 -08:00
Kurt
86a20afe8e Minor style fix 2019-11-17 09:47:10 -08:00
Kurt
524ceb7bf9 Fix dracozolt species ID
heh dunno how that happened
2019-11-16 15:02:32 -08:00
Kurt
dbda5e6934 Update comments
align all, add location text for motostoke 3(4) encounters
2019-11-16 14:37:00 -08:00
Kurt
e5bd026eec Add static crustle location
ty @ReignOfComputer
2019-11-16 12:46:24 -08:00
Kurt
29d52e065f Don't generate invalid sister-pair eggs 2019-11-16 09:00:05 -08:00
Kurt
848737b2a0 Remove giga gender lock
can be female
2019-11-15 21:05:19 -08:00
Kurt
ab7e920410 Update toxel static encounter def
flawless attack IVs, yay
2019-11-15 19:43:09 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
1c418e8394 Add advanced format output
groups together by encounter slottype (grass, water, etc) for a little
more detail
2019-10-25 19:53:32 -07:00
Kurt
02420d3e93
PKHeX.Core Nullable cleanup (#2401)
* Handle some nullable cases

Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data)
Make some classes have explicit constructors instead of { } initialization

* Handle bits more obviously without null

* Make SaveFile.BAK explicitly readonly again

* merge constructor methods to have readonly fields

* Inline some properties

* More nullable handling

* Rearrange box actions

define straightforward classes to not have any null properties

* Make extrabyte reference array immutable

* Move tooltip creation to designer

* Rearrange some logic to reduce nesting

* Cache generated fonts
* Split mystery gift album purpose
* Handle more tooltips
* Disallow null setters
* Don't capture RNG object, only type enum

* Unify learnset objects
Now have readonly properties which are never null
don't new() empty learnsets (>800 Learnset objects no longer created,
total of 2400 objects since we also new() a move & level array)
optimize g1/2 reader for early abort case

* Access rewrite
Initialize blocks in a separate object, and get via that object
removes a couple hundred "might be null" warnings since blocks are now readonly getters
some block references have been relocated, but interfaces should expose all that's needed
put HoF6 controls in a groupbox, and disable

* Readonly personal data
* IVs non nullable for mystery gift
* Explicitly initialize forced encounter moves
* Make shadow objects readonly & non-null
Put murkrow fix in binary data resource, instead of on startup
* Assign dex form fetch on constructor
Fixes legality parsing edge cases
also handle cxd parse for valid; exit before exception is thrown in FrameGenerator

* Remove unnecessary null checks
* Keep empty value until init
SetPouch sets the value to an actual one during load, but whatever

* Readonly team lock data
* Readonly locks
Put locked encounters at bottom (favor unlocked)

* Mail readonly data / offset
Rearrange some call flow and pass defaults
Add fake classes for SaveDataEditor mocking
Always party size, no need to check twice in stat editor
use a fake save file as initial data for savedata editor, and for
gamedata (wow i found a usage)
constrain eventwork editor to struct variable types (uint, int, etc),
thus preventing null assignment errors
2019-10-16 18:47:31 -07:00
Kurt
a70769dc76 Remove static encounter voltorb def
unused ingame; only electrodes are static

Closes #2399, ty @steph9009 !
2019-10-11 08:19:35 -07:00
Kurt
4baf745af8 Use some c#8 sugar
static local functions
switch expressions
using usings :)

nullable next?
2019-10-07 18:40:09 -07:00
Kurt
87f43a47d8 Bump lang version to 8
some lang upgrades
2019-10-04 20:10:50 -07:00
Kurt
255cdc6ae0 Seal r2
https://www.reddit.com/r/csharp/comments/dd5c1o/til_sealed_override_modifier/

only a few instances for now
2019-10-04 15:56:22 -07:00
Kurt
d3b0c392b2 Minor tweaks
no functional change
2019-10-03 22:21:33 -07:00
Kurt
8d8adde2b1 sealed
sealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealedsealed
2019-10-03 19:09:02 -07:00
Kurt
ab0b8979e9
Add swsh content placeholders (#2392)
placeholder content until real data is dumped
2019-09-23 16:56:47 -07:00
Kurt
3c50983afd Use less efficient IsLevelWithinRange, for clarity
See previous commit for discussion; it's easier to read and maintain
this rather than have the precomputed min/max comparisons.

LevelMin - minDecrease <= min && max <= LevelMax + maxIncrease;
See EncounterArea7b:
Since we know min and minDecrease (0) before doing the linq filter we
can precompute the lowbound, same for highbound; but this isn't
immediately obvious to the reader. The perf cost is pretty much
negligible in the big picture, so leave it in the more readable state.

Thanks @fattard & @ammako !

#2389
2019-09-19 22:54:53 -07:00
Kurt
a4a0e3ac6e Fix flute level amp direction
The inputs to "IsLevelWithinRange" are the highest value the
lowest-level can be, and the lowest value the highest level can be...
seems confusing (hence the original error).

If a slot is 6-7, with a wild encounter (flute), we can go +/-3 from
6-7, which is 3-10.
With an encounter of level 5, the inputs are: 5+3, and 5-3 (8, 2).
Since 8>lvlmin and 2<lvlhi, we can get a level 5 pkm from the slot
(using a negative flute yielding a -1 adjustment).

I could probably refactor it to be a 3-input signature (lvl, lvlneg,
lvlpos), and have it do LevelMin - lvlneg <= lvl && lvl <= LevelMax +
lvlpos

I should probably refactor these methods to do minLevel & maxLevel (so
baseSpecies.Level to CurrentLevel for pkm that lost their original met
data) but nothing needs the extra logic at this time.
2019-09-19 22:37:56 -07:00
Kurt
b41f2a3062 Extract logic from PKX
Extract Species Name logic to SpeciesName
Extract Language logic to Language
Remove FormConverter wrapper for string[] fetch
Rearrange some logic to more appropriate locations, update access
modifiers / types
Move some pkm array methods to arrayutil, make generic

PKX.GetVCLanguage was a dupe of _K12.GuessedLanguage() so just expose
the method

PKX is now back to pkm data manip only
2019-09-18 19:58:23 -07:00
Kurt
972e35a289 Minor reorganization
Move the ea32->array creation to the actual class
2019-09-13 09:08:12 -07:00
Kurt
aa6f803ba9 fix g7sm trade strings
borked in a prior commit, nice string reference
2019-09-13 08:36:21 -07:00
Kurt
734aa33898 Split encounter areas, relocate slot finding to obj
Now logic is reasonably split, and each format of area has its own way
of yielding slots

Too much junk with checking flute boosts or catch combo applicability;
just let the area dictate how slots match.
2019-09-12 23:20:52 -07:00
Kurt
477187a66c Split EncounterArea into game-specific classes
Generating encounters from an EncounterArea is getting a little stupid
without inheritance; each type can now have its own specific behavior
without checking for each individual type of generation pattern. Will
add the abstract method implementations in a future commit

Move some string[] array fetch (for all languages) to Util
2019-09-11 22:06:24 -07:00
Kurt
62d08d7c30 Misc clean
split some methods with optional parameters=null
add more xmldoc
replace some magic numbers -> enum/const references
consolidate common array operations (span soon maybe?)
2019-09-10 00:21:51 -07:00