Commit graph

2676 commits

Author SHA1 Message Date
Kurt
f5307c142b Use format sensitive move knowable check
Closes #2534
2019-11-27 23:07:41 -08:00
Kurt
5a1bffb2ba Split wild encounters for crossover & weather
Certain Mark values (ribbon) are only obtainable if the encounter was
obtained in some weather (I really hope there's no crossover cases for
this), and non-symbol encounters can't wander to another zone.

I wonder if you can wander from one zone with one exclusive weather, to
another zone, and get an 'unobtainable' mark (with the new zone's
weather) on the crossover mon's weather. yikes lmao
2019-11-27 22:46:14 -08:00
Kurt
a0ee7a3e51 Add route 2 lapras location
ty Waves (discord)
https://www.serebii.net/pokearth/galar/route2.shtml#xy-lake
2019-11-27 19:44:14 -08:00
Kurt
5761f03f94 Add OT memory details for gen6 ingame trades 2019-11-27 19:30:28 -08:00
Kurt
c81edac9e5 Fix CGB import
Trainer1 now unused for this class
Closes #2533
2019-11-27 18:33:30 -08:00
Kurt
907f036956 Disregard OT memory values on gen7 origin 2019-11-27 16:01:12 -08:00
Kurt
c4951f1650 Add strong piloswine location
ty wowjinxy
2019-11-27 11:34:20 -08:00
Kurt
d3bd37a950 tweak last saved string format
ty @sora10pls for testing
2019-11-26 23:10:28 -08:00
Kurt
bac6032152 Update last saved parsing
year is years-since-1900
month is months-since-jan (jan=0)
2019-11-26 19:15:05 -08:00
Kurt
4cd358833a Add corvisquire static enc location
https://projectpokemon.org/home/forums/topic/55611-corvisquire-route-3/
thanks ThePunish3D!
2019-11-26 18:20:52 -08:00
Kurt
b95ab53e92 Finalize unreleased item banlist 2019-11-26 17:16:57 -08:00
Kurt
5b932c961f Merge branch 'master' of https://github.com/kwsch/PKHeX 2019-11-26 16:58:44 -08:00
Kurt
08e293dadc Add SimpleTrainerInfo constructor
zeroes out console region data if not present in game
2019-11-26 16:55:28 -08:00
Chris
f23874b1ae
Safari/Sports Ball is also not released 2019-11-27 01:55:15 +01:00
Kurt
4182b22686
Update Unreleased Items(SwSh) (#2529)
https://www.serebii.net/swordshield/items.shtml

only Pixie Plate & Normal Gem are in the Game yet.
2019-11-26 16:13:30 -08:00
Kurt
5883acd5b9 Fix florges/floette evo tree
No personal stats for those evos different from main species
2019-11-26 16:12:35 -08:00
Chris
ba43631d40
Update Unreleased Items(SwSh)
https://www.serebii.net/swordshield/items.shtml

only Pixie Plate & Normal Gem are in the Game yet.
2019-11-27 01:08:31 +01:00
Kurt
9cb56be3dd Add bronzong/galvantula strong loc
previous Bronzong location is likely a crossover case

ty wowjinxy
2019-11-26 11:39:17 -08:00
Kurt
b58ff25741 Use stat nature for showdown set export
thanks @sora10pls
2019-11-26 11:36:20 -08:00
Kurt
15ef6555a8 Add WC8 memory & fix fallthrough
ty @sora10pls
2019-11-26 11:22:01 -08:00
Kurt
ef425af835 Add memory / console region checks for pb7/pk8
yeah your initial hacks were hacks

It appears there's a bug (in the game) for link trade memories --
applied to the OT memory instead of HT memory?? Fun!
2019-11-26 11:01:09 -08:00
Kurt
7960f2d748 Don't set console region data for pb7/pk8+ 2019-11-26 10:46:32 -08:00
Kurt
445fdee2ba Add shared memory interface (encounter) 2019-11-26 10:46:16 -08:00
Kurt
6627d7e2f4 Minor clean 2019-11-26 10:45:36 -08:00
Kurt
0f96b3c4d5 Add Species specific arg memories 2019-11-26 10:44:36 -08:00
Kurt
6987edd7a3 Simplify expression
no allocations
2019-11-25 23:34:49 -08:00
Kurt
c0270b18e4 Add trainer card number editing 2019-11-25 23:26:01 -08:00
Kurt
e8f5ac8a00 Minor clean 2019-11-25 22:51:07 -08:00
Kurt
87a498ac05 Add flag api 2019-11-25 22:50:53 -08:00
Kurt
7a10311207 Unban scrafty/scraggy HA
new EncounterStatic8N(Nest87,3,4,4) { Species = 560, Ability = A4 }, //
Scrafty
2019-11-25 20:31:42 -08:00
Kurt
24ac0d9d4b Fix WasLink comparison
Closes #2525
G4Celebi & G6Link met location match; Pokémon Link was only available
for Gen6 so just check for that origin.

Ty @Ammako

tbh I shouldn't even have this property ha
2019-11-25 19:29:12 -08:00
Kurt
c416fc5fa1 Update handling for invalid genNumber
all edge case movepool stuff is IGeneration; we're fine just using
IGeneration.Generation
2019-11-25 18:33:38 -08:00
Kurt
5dde0f5c43 Merge Error flag into Parsed
Simplify some logic with ??=
2019-11-25 18:32:50 -08:00
Kurt
c5593470df Add 2 more static enc locations, swap yield order
Private report with 3 specimens, 2 undocumented met locations
The other was a Gigantamax which matched another static encounter,
resulting in a partial match being accepted (the real match came after,
but was never iterated to).

Rather than adding deferrals for Enc8, do nest stuff first since it's
the most restrictive

In the past we didn't really have duplicate static encounters with
slightly different permissions.

Thanks @ReignOfComputer & {reporting user}!
2019-11-25 17:57:25 -08:00
Kurt
5435a5d93e Minor updates
Fix mark (ribbon) read for index > 64
Heal party stats on set detail import
Wipe HT Language for eggs/untraded
Extract BST total color logic
2019-11-25 17:32:10 -08:00
Kurt
22a5df5181 Only set permitted record flags for Move[]
Closes #2523
2019-11-25 12:02:30 -08:00
Archit Date
a05bed8f18 updated shiny indicator for xor0 (#2522) 2019-11-25 09:27:42 -08:00
Kurt
b37a0c5bfe Add downleveled regular raid movepool verification
#2416
Not having enough badges pulls the level of the captured mon down

need more info if the other raid types behave similarly
2019-11-25 08:52:03 -08:00
Kurt
5dec94d456 Handle banned form eggs with more flexibility
Closes #2519
better to not generate the encounter as opposed to flagging it after
generation
2019-11-25 00:16:16 -08:00
Kurt
6ca8571759 Add stomp min level for Steenee
Closes #2520
2019-11-24 23:50:10 -08:00
Kurt
b588af8300 Ban meowstic-1 hidden ability
Closes #2521
2019-11-24 23:14:42 -08:00
Kurt
0dcd9b744a Include swsh held items to valid items list
Closes #2518
2019-11-24 22:34:51 -08:00
Kurt
c446ff5b51 Fix non-galar egg moves passing
Closes #2516
2019-11-24 18:18:26 -08:00
Kurt
e1e7bf321b Add South Lake Miloch for den 42
#2416
2019-11-24 11:07:31 -08:00
Kurt
aeb3ee6cec Fix shedinja evo chain logic
#2416
2019-11-24 09:49:54 -08:00
Kurt
9d02a2c2b1 Simplify comparison
never null
2019-11-24 09:48:22 -08:00
Kurt
cf12f7f4bc Fix type comparison
works fine without this, but this is the correct type comparison
2019-11-24 06:43:42 -08:00
Kurt
32d8225023 Fix drag slot equality check
prevents deleting party slots if a slot is dragged into its original
slot (X->X); Equals check only checked reference
2019-11-24 06:42:41 -08:00
Kurt
64d94903ff Change fixed ability
0=abil1
1=abil2
2=abil4
3=abil1/2
4=any

probably same as WC8 etc

doesn't have any impact as there's other encounters that allow Hidden
2019-11-24 06:26:33 -08:00
Kurt
dd51ed707f Update record flags on default showdown import
Closes #2511
2019-11-24 06:06:08 -08:00
Kurt
113d16fa5d Fix darumaka->darmanitan blizzard move
#2416

Looks like the only issues left are:
Shedinja
Crossover/Bleed locations
Static Encounter locations
2019-11-23 22:48:02 -08:00
Kurt
96f6db0e38 Add recognition for distribution raids
Closes #2457
2019-11-23 22:23:43 -08:00
Kurt
52cd8ae855 Revise HA banlist
https://www.smogon.com/forums/threads/sword-shield-battle-mechanics-research.3655528/post-8291236
2019-11-23 20:50:56 -08:00
Kurt
09d1d0e799 Add darumaka to galar origin
lol oops
Closes #2508 thanks @iiippppk !
2019-11-23 19:45:18 -08:00
Kurt
5df6565597 Add fast ball
Closes #2507
2019-11-23 19:12:53 -08:00
Kurt
cccf2a1939 Fix flawless IV count check
#2506 trapinch
2019-11-23 14:46:09 -08:00
Kurt
66ebf7cb60 Add $suggest for techrecord & (stat)nature 2019-11-23 12:02:58 -08:00
Archit Date
f96eafa682 grab correct evo stage 1 from evocriteria list (#2503)
EncounterMovesetGenerator was using the de-evolution order in the passed evocriteria list
2019-11-23 09:01:09 -08:00
Kurt
e70a2f40b8 Add den crossover via online share
fix ability deferral for non-HA (eg. A4 mr rime encounter)
2019-11-23 08:27:50 -08:00
Kurt
b29fc5216e Add shared moveset transfer
Closes #2501 for now
2019-11-23 07:27:06 -08:00
Kurt
c27b1d0bb8 Revise hidden ability banlist
Might need to remove entries once the Distribution raid data is added.
2019-11-23 07:12:50 -08:00
Kurt
67565aa71d Update structure note comment 2019-11-23 07:12:20 -08:00
Kurt
4a6fa684e6 Fix IsUntraded check
used the pk6 offsets lol
2019-11-22 23:00:36 -08:00
Chris
03ee264d0c Add Vanilluxe Multiple Encounters (#2499)
* Add Vanilluxe Multiple Encounters

Vanilluxe spawns also on any Lake if its snowing
2019-11-22 21:32:39 -08:00
Kurt
9e4c408ac7 Fix galar form egg move fetch
Closes #2500
2019-11-22 21:32:05 -08:00
Kurt
26b21d8603 Rewrite reverse evo lineage rectifier
Closes #2479
Fixes Silvally in swsh not having evo reversal content for each form
2019-11-22 21:04:34 -08:00
Kurt
d25f388bf5 Fix dexnav relearn checks
Closes #2491
Thanks @NinFanBoyFTW !
2019-11-22 19:59:40 -08:00
Chris
97f156364d Update Multiple Encounters for Lakes (#2498)
happens also for:

Drifloon, Wingull, Goldeen, Frillish, Magikarp

but theese aren't listed, feel free to add new encounters.
2019-11-22 18:26:47 -08:00
Archit Date
915f6a5e42 fix toxtricity parsing (#2496)
Full amped form has no form string, so does not need fixing. Exporting low key form also adds a hyphen, so that does not need fixing either!
2019-11-22 14:17:52 -08:00
Chris
e90d2fbc29 Also Seaking have multiple Locations (#2495)
^
2019-11-22 08:05:46 -08:00
Chris
4c9815c17e Add Multiple Gyarados Spawns (#2493)
Gyarados Spawns in Area 1:
North/East/South/West Lake Miloch, 

Area 2:
the Lake of Outrage (in a Wild Area)
2019-11-22 08:04:17 -08:00
Chris
8bdc110e2b Added Multiple Lapras Spawns (#2492)
Lapras Spawns in Area 1:
North/East/South/West Lake Miloch, 

Area 2:
the Lake of Outrage (in a Wild Area)
2019-11-22 08:03:16 -08:00
Kurt
5a38e118e8 Add raid spawn initial docs
linq dump code I used for ez vis:
var sav = new SAV8SWSH(File.ReadAllBytes(@"D:\Kurt\Downloads\main
(7)"));
var blocks = sav.Blocks;
var raid = blocks.Raid;
raid.GetAllRaids().Dump();
2019-11-21 22:55:21 -08:00
Kurt
1ffee3de02 Add raid/fashion block accessors
set breakpoint at end of ctor... immediate window dump:
System.IO.File.WriteAllBytes(@"E:\raid.bin", Raid.Data);
2019-11-21 22:26:24 -08:00
Kurt
4b3d85d5e6 Add multi-location strong encounter handling
#2484
OH BOY REUSED INDEXES
smart to save space, but a small pain for legality

feels pretty bad breaking up abstractions for every minor difference in
verification...
2019-11-21 21:44:41 -08:00
Kurt
5235c9b252 Revert "Add lapras encounter location?"
This reverts commit e4e516d1c2.
2019-11-21 21:14:45 -08:00
Kurt
e4e516d1c2 Add lapras encounter location?
#2484
The other lapras encounter was found by @sora10pls and was lv56; we're
assuming this other lapras is the encounter (for now).
2019-11-21 20:59:24 -08:00
Kurt
4c8dd0cb3a Defer rather than reject
#2490
2019-11-21 20:05:20 -08:00
Archit Date
e93bc5e67c Misc Nest Fixes (#2490)
* fix A3 and A4 ability values

private > internal so it can be used in Encounter Nest matching

* reject ability number 4 if ability is from A3
2019-11-21 20:03:02 -08:00
Kurt
b9e32c67a0 Add encounter static deferral oop
We've already been doing something similar for the deferral check; just
merge the logic into the base object
Closes #2489
2019-11-21 20:02:08 -08:00
Archit Date
93028b3439 modify nest locations based on serebii (#2483)
https://serebii.net/swordshield/maxraidbattles.shtml
2019-11-20 23:02:54 -08:00
Kurt
f6c6639078 Add online den location
There's still the down-leveled issue with high level moves. fun.
2019-11-20 23:02:31 -08:00
Kurt
a50169d3d2 Add shift-set shinyxor0 pid
Display xor value on hover, not gonna do alternate stars/square display
Closes #2482
2019-11-20 20:38:05 -08:00
Kurt
1be9a6f70d Fix sav4 load for daycare / gts slots
Closes #2481
2019-11-20 19:16:25 -08:00
Kurt
2aaa3763ee Fix record setting logic
Thanks @AnalogMan151 ! #2416
Fix method reference lol
2019-11-20 18:18:33 -08:00
Kurt
f30a14ebf0 Disallow dynamax level on story legends
ty @sora10pls
2019-11-20 18:15:21 -08:00
Kurt
473afb8377 Initial rough draft of nest location matching
nest data doesn't match what's expected, but recognition is ready for
tweaks
2019-11-20 17:07:55 -08:00
Kurt
c6f515c755 Use more performat array join 2019-11-20 17:07:55 -08:00
Ammako
ee9c91e893 Add G4 Box Flags (#2478) 2019-11-20 11:39:31 -08:00
ReignOfComputer
f19193c66f Static Locations Update (#2475)
* Static Locations Update

- Removed version lock on Motostoke Stadium Vulpix (may want to investigate Growlithe)
- Wild Area Updates
- Other Static Updates

* Squeeze in 2 more Statics

* Rhydon Static Location

Last one I promise.
2019-11-20 11:38:25 -08:00
Kurt
8294d77464 Add Carkol static loc 2019-11-19 20:24:12 -08:00
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
Archit Date
686f69484d set gigantamax flag from showdown set (#2469) 2019-11-19 15:57:08 -08:00
Matt
ea80718919 Unban GO Shiny Tentacool (#2468)
* Unban GO Shiny Tentacool

* Also unban GO Shiny Meowth
2019-11-19 13:54:29 -08:00
Kurt
9734010fcd Add unsorted combolist method
#2465
2019-11-19 08:48:44 -08:00
Kurt
256de0380f Swap order of vc1/vc2 in version dropdown
Closes #2464
2019-11-19 08:42:31 -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
Kurt
1538f04dce Remove unnecessary logic
rip return frustration, don't need to consider this
2019-11-19 08:15:58 -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
iiippppk
4a82b424ce Use simplified Chinese characters (#2458) 2019-11-18 21:35:21 -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
2b76fe148d Fix property reference for Darmanitan-G
lul
Closes #2453
2019-11-18 19:29:05 -08:00
Kurt
5e1937d8b4 Fix fossil8 to unbreedable
Not needed in the HA banlist table since it can't breed.

Closes #2451 thanks @iiippppk !
(undiscovered egg group)
2019-11-18 19:26:01 -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
86796cd67a Add accessor for TrainerCard block 2019-11-18 17:57:33 -08:00
Kurt
adf33404b3 Add Trainer Card block 2019-11-18 17:57:18 -08:00
Kurt
21c3b4e1b1 Add Ribbon interfaces to WC8
pretty silly but gets the job done
Closes #2446 by fully implementing all ribbon checks possible
2019-11-18 17:37:38 -08:00
Kurt
d7d2db8764 Add ribbon index enumeration and extension methods 2019-11-18 17:00:57 -08:00
Kurt
674152aa25 Add Mark interface 2019-11-18 17:00:16 -08:00
Kurt
fac5182d4b Add a ChangeAllCount to current value dropdown 2019-11-18 16:25:27 -08:00
Kurt
5cf58dbb5f Fix dex clearing on setting altform/gender 2019-11-18 16:21:11 -08:00
Ammako
acf5df07be Box Layout fixes (#2449)
* Enforce box name length in Box Layout

* Fix G4 box renaming

* Fix G7 box renaming
2019-11-18 16:01:36 -08:00
Kurt
3aa3a29264 Add 3 more static enc locations 2019-11-17 22:04:52 -08:00
Kurt
38abafab99 Catch some evolution edge cases 2019-11-17 22:04:41 -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
2c11632a3c gen6 Un-truncate box names
Closes #2445 ty @Ammako
2019-11-17 20:41:40 -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
fa169ff61c Fix box binary / pcbin export
19784aaa41 (diff-37bd5b548e2b340e5c38fd0961a3eb04L880)

Was just exporting blank data, lol

https://projectpokemon.org/home/forums/topic/55436-issue-with-box-data-binary/
2019-11-17 14:04:04 -08:00
Kurt
13adc38ee8 Add elemental tutors
Closes #2443
Capture some array references to avoid re-fetching array -- array
reference is readonly so it probably won't matter
2019-11-17 11:13:57 -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
d077d8549e Add alcremie form display for dex edit
Nothing for the PKM Editor; not sure how I want to handle the reused
FormDuration work value.

For the meantime, just use the Batch Editor for a targeted write.

Closes #2441
2019-11-17 09:34:04 -08:00
Kurt
23c04cf809 Add beast ball to wild balls 2019-11-16 22:22:21 -08:00
Michael Scire
4227343a62 WC8: Add SWSH Pokeball Plus Mew 2019-11-16 22:13:44 -08:00
Kurt
f20f6cd4bb Only check east asian script chars on gen7&below
Closes #2437 thanks @iiippppk !
2019-11-16 17:47:26 -08:00
Kurt
31c09c52e8 Add initial nieve check for ball inheritance
Closes #2438
2019-11-16 17:45:51 -08:00
Kurt
915c2d52b1 Update handling for non-competitive set import
Gen3 item paste -> Gen3 item import => take item ID as is
once parsing moves starts, break if any following lines are not move
lines
Closes #2412 , thanks @The-Fireplace  !
2019-11-16 16:34:28 -08:00
Kurt
d981dc57e1 Handle ’ ' edge case
#2412
2019-11-16 16:21:17 -08:00
Kurt
31f9a5f4d8 Correctly locate pk8 foreign transfer checks 2019-11-16 16:05:45 -08:00
Kurt
08c1534cee Lock sha256 for multithreaded use
Opening the database can result in multiple threads trying to hash at
the same time with the same sha256 object, so just gate it behind a lock
2019-11-16 15:46:45 -08:00
Kurt
524ceb7bf9 Fix dracozolt species ID
heh dunno how that happened
2019-11-16 15:02:32 -08:00
Kurt
3e4127b9e1 Track Gigantamax flag for set data
Closes #2436
2019-11-16 14:37:33 -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
025cf69eeb Switch pkm export formats to party format
Now dumps party format bytes
Cons: more space
Pros: stats are retained, especially when users drag-drop.

Closes #2419
2019-11-16 14:03:25 -08:00
Kurt
22fb1c8e8f Fix - show daycare tab on sav5/7
Closes #2434 thanks @Ammako !
2019-11-16 13:19:41 -08:00
Ammako
6d61a97247 Fix Gen. 2 key items and balls (#2432) 2019-11-16 13:15:09 -08:00
Kurt
0716e50fd6 Add Gigantamax owned flag logic
Closes #2430 ty @igniscitrinus !
2019-11-16 13:10:46 -08:00
Kurt
e5bd026eec Add static crustle location
ty @ReignOfComputer
2019-11-16 12:46:24 -08:00
Kurt
ce4cd2c60f Add non-levelup evo methods to validator 2019-11-16 11:52:40 -08:00
Kurt
83388cc6fe Add missing memecrypto clear
See the SAV7SM.cs constructor... yeah oops!

A hotfix has been posted (committing after I upload!)

Closes #2415 thanks @Ammako !
2019-11-16 11:44:48 -08:00
Kurt
d65e3369c9 Add toxtricity evo check
refer to sub_71007805B0 for algo
2019-11-16 11:01:00 -08:00
Kurt
3be4fde2d5 Prevent non-galar forms for wild match
uses the same logic as the wild area boost lines above
2019-11-16 10:35:08 -08:00
Kurt
53cec64e5e Add recognition for dropped wc8 files 2019-11-16 09:35:14 -08:00
Kurt
b172008981 Fix Check All behavior
- Gender specific forms now set the correct flags
- Regular click on Check All doesn't set shiny flags
- Shift click on Check All sets shiny flags too.

Closes #2425 thanks @igniscitrinus !
2019-11-16 09:28:32 -08:00
Kurt
29d52e065f Don't generate invalid sister-pair eggs 2019-11-16 09:00:05 -08:00
Kurt
dfcd93bfff Fix alcremie form list, use toxtricity0 amped
https://projectpokemon.org/home/forums/topic/55410-alcreamie-mismatches/
2019-11-16 08:46:59 -08:00
Kurt
ab25038b58 Update max gen, add pk8/wc8 to dropdowns 2019-11-16 08:25:05 -08:00
Kurt
502adc6d74 Don't throw exception on setting giftused
needed in mystery gift db to clear flags (why idk)
2019-11-16 08:24:46 -08:00
Kurt
d7657f948d Update documentation for techrecord flag methods
Allow an ienumerable of moves rather than a readonly list
2019-11-16 08:18:57 -08:00
Kurt
d1e9bc3877 Update evo dictionary and unreleased list
#2416 thanks @AnalogMan151
2019-11-16 08:18:12 -08:00
Kurt
d3b2a798fa Fix evo via move check (tsareena)
Closes #2427
2019-11-16 08:01:49 -08:00
Kurt
87bb8f3b3f Fix record clear 2019-11-16 08:00:58 -08:00
Kurt
981ed9a253 Add technical record flag editor & api 2019-11-15 23:12:28 -08:00
Kurt
848737b2a0 Remove giga gender lock
can be female
2019-11-15 21:05:19 -08:00
Kurt
19784aaa41 Update box format size get
fixes importing and exporting concatenated binaries
2019-11-15 21:01:22 -08:00
Kurt
025e36c5fc Add treasure items to valid held item table 2019-11-15 19:50:22 -08:00
Kurt
ab7e920410 Update toxel static encounter def
flawless attack IVs, yay
2019-11-15 19:43:09 -08:00
Kurt
451694da28 Flag past gen transfers
not valid yet
2019-11-15 19:37:04 -08:00
Kurt
522d219b3c Re-cap berries at 999
Closes #2414 , thanks @SatoMew !
2019-11-15 18:06:31 -08:00
Kurt
199570b12d Update 19.11.15
Introducing Sword/Shield support!

Legality is still a work in progress, and documentation of encounters
and game features with respect to save data is ready for community
effort!

-Kurt
2019-11-15 17:52:08 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
d59764f25f
Fix keyitem reference
Closes #2410 ty @PKMWM1
2019-11-01 23:12:31 -07:00
Kurt
a6b6383538 Handle more messages
un-nest some classes, tooltip/menu disposing
2019-10-27 20:39:15 -07:00
Kurt
b8835facd5 Rename public "pkm" properties to non-lowercase
lowercase = local variable or private member
2019-10-27 12:57:04 -07:00
Kurt
ba593800d8 Keep text/value as get properties
Needed for binding in winforms, oops
2019-10-27 12:47:09 -07:00
Kurt
9401b7a790 More readonly struct tweaks
help dat compiler
minor clean elsewhere
2019-10-26 23:18:25 -07:00
Kurt
46640d48a3 Misc clean
un-nest classes,
move some logic to core,
update some get-only properties that return arrays to methods
2019-10-26 12:58:55 -07:00
Kurt
fcc993784b Rename abstract pkm inherited class names
leading underscore for a class name = pls no
2019-10-26 12:42:33 -07:00
Kurt
e3efa65160 Cleanup
handle messages for dirty cleaning :)
2019-10-26 12:33:58 -07:00
Kurt
64a5c30356 Add 4th uint of fashion data
struct is really 16 bytes, and female uses 8 bits of the final uint
Closes #2407
2019-10-25 19:54:50 -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
5dcee4fb9a Set random moves if GetMoveSet yields invalid set
Closes #2406
No clean way to check for these edge scenarios, so just double check the
moveset and return random moves if we fail
2019-10-24 18:11:25 -07:00
Kurt
4be35890e7 Make some usages generic 2019-10-24 18:10:23 -07:00
Kurt
f0b320eb28 Remove [Relic Gold] from g7 item banlist
Closes #2404 ty @CaptainBarnaklez (aka Glitch Guide Gabe on Discord)
2019-10-20 15:55:13 -07:00
Kurt
bb84ec4e89 Handle some vs message suggestions 2019-10-19 20:33:17 -07:00
Kurt
12a8dc66b6 Fix displayed bit set for gen6
Zukan5/6 was pushing 0 for the formBit, which was an incorrect value. I
probably should have abstracted things since gen5/6 don't behave the
same as gen7

rewrite the SetDisplayedFlag for more clarity, and to early-return
without checking displayed state if the flag is being cleared.
2019-10-19 18:24:37 -07:00
Kurt
923b581fed Fix language flag set
looks like it was unfinished
2019-10-19 18:18:44 -07:00
Kurt
f77f0e8a4b Keep gen6 dex form flags
oops, forgot to include ...(+ i)

ty @Ammako

https://projectpokemon.org/home/forums/topic/55244-pokedex-displays-shiny-version-of-transfered-pokemon/?do=findComment&comment=249665

no need to set editing flag as I'm not changing anything

have sav6xy use the sav6xy accessor interface instead of the main one
2019-10-19 17:38:01 -07:00
Kurt
3b0fd81aae Rework & fix party slot deletion
Two birds with one stone:
- sav4 doesn't use Data (instead uses General/Storage), so we need to
use the abstracted method calls instead of trying to do things manually.
- setting a blank pkm at a party slot will decrease the party count!
don't decrease things twice.
2019-10-18 21:10:39 -07:00
Kurt
c3a6fd2a64 Handle bad gennumber indexes
Maybe returning 0 for "bad gen" will prevent bad array indexing...
2019-10-18 20:50:38 -07:00
Kurt
d4ce0644c8 Simplify block property names
[...]Block -> [...]  since it's kinda redundant, we already know by its
type.
Rename offset ints that collide
2019-10-18 20:42:03 -07:00
Kurt
4302347366 Show missing editors
yay useless integer stores instead of checking if an interface is
implemented
2019-10-18 20:26:41 -07:00
Kurt
abe87eb369 Relocate maison stats to block access 2019-10-18 20:13:21 -07:00
Kurt
e05d75eeb7 More training bags
giff swsh
2019-10-17 23:02:01 -07:00
Kurt
c24851129f Add super training block details & to block access
Use some properties in the super training editor, not gonna rewrite that
even though it really needs it :)
2019-10-17 20:13:17 -07:00
Kurt
fee92e4f32 Handle past gen transfer evochain for new evos
basically Math.Max(2, format);
we always want permissible evo chains when fetching encounters
Closes #2403 ty @Rayqo !
2019-10-17 18:23:50 -07:00
Kurt
cf955e9fc7 Fix sav7 init
guess I never launched this format the entire week
2019-10-16 19:08:13 -07:00
Kurt
2367fbd69a Add docs for super training block 2019-10-16 18:49:01 -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
a792e58d49 Fix poketch logic
ushort poketch_def
{
enabled:1
unk1:1
unk2:1
color:3
unk40:1
unk80:1
unk:8
}
byte currentapp;
u825] unlockedflags
...app-specific data follows
2019-10-06 20:27:34 -07:00
Kurt
d249975895 Make current box reads s8 instead of s32
https://projectpokemon.org/home/forums/topic/55168-bug-report-pkhex-unable-to-load-pokemon-platinum-save/

saves with un-initialized boxes (FF'd) have 00 FF FF FF in the first 4
bytes
2019-10-05 14:32:40 -07:00
Kurt
40db929166 Re-add resources for inventory editor
Closes #2398
2019-10-04 21:23:54 -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
ffe3a4ba15 Relocate resource naming for sprite fetch to draw 2019-10-03 18:23:40 -07:00
Kurt
39eedb1db2 Make PCBinary a method instead of get prop 2019-10-03 17:45:19 -07:00
Kurt
c0cdf81ca5 Default LGPE backgrounds to clean
Could iterate up and use the xy special backgrounds; just keep em simple
ty @sora10pls for pointing out this unintended behavior
2019-10-02 20:11:21 -07:00
Matt
72a751b9ce Update GO Shiny Banlist (#2397)
oddish family
2019-10-02 20:04:49 -07:00
Kurt
94baab1c45
Split off image generation to separate project (#2395)
With the approaching games, PKM sprites are a different size from the 3DS era (as already hinted by LGPE, which has 56x68). It'll be a little easier to manage with this portion of the library walled off from the rest of the codebase.

Eventually the net46 target will use fody or something to merge in these extra dependency dll's automatically to not disturb the usual exe/dll experience.
2019-09-29 09:47:06 -07:00
Kurt
03c3610eb5 Handle level20 transferred feebas edge case
Closes #2394 thanks @iiippppk !
2019-09-27 20:22:54 -07:00
Kurt
930f4a2062 Use format specific item IDs 2019-09-25 22:40:16 -07:00
Kurt
7013d4f0c8 add 7->8 transfer legality check
currently flags anything transferred as illegal, which is the right
thing to do until home is released.
2019-09-24 23:28:05 -07:00
Kurt
33649d4e02 Fix bitflag clearing for g6/7 gifts
https://projectpokemon.org/home/forums/topic/55092-recevied-list-in-mystery-gift/?tab=comments#comment-249220
ty tsubasa830 !
2019-09-23 19:01:37 -07:00
Kurt
825e06130e Add nullable reftype compiler checks to test proj
New in c# 8
Assert.True(check for null) doesn't give a hint that the obj isnt null
afterwards.
Assert.NotNull does have the compiler hint attribute
could probably use fluentexpression syntax, but resharper doesn't pick
up on the nonnullable hint like vs does.
GeneratorTests: swap FirstOrDefault to First, can keep the fluent style
and resharper gets the hint.

tl;dr : resharper doesn't look at external lib for hints, gotta use
Assert.NotNull or something that doesn't return null
2019-09-23 18:13:51 -07:00
Kurt
980a9874a3 Remove unused wrappers
I think I left these in so AutoLegality could function, but we already
have a couple breaking changes / build pause notice, so lets keep
cleaning our API 👍
2019-09-23 17:28:40 -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
7819c16792 Use slice operation instead of linq chain
Reuse IsRangeAll for smdemo detect
reset dragdrop on dropping folder (early returned)
2019-09-23 15:13:22 -07:00
Kurt
78b7409e77 Use start index for writing box binary
Closes #2390 ty @PKMWM1 !
2019-09-23 15:12:03 -07:00
Kurt
a60a73e9d5 Fix unintentional overflow
oops
2019-09-22 13:56:13 -07:00
Kurt
ea5b498f8f Fix sav4 stored slot redirect
all Get*Slot fetches are now used like the Set*Slot methods.

https://projectpokemon.org/home/forums/topic/55067-box-2-bug/?do=findComment&comment=249136
2019-09-21 10:42:54 -07:00
Kurt
02014273b8 Remove unused abstractions (slotview) 2019-09-21 10:31:59 -07:00
Kurt
8912f76726 Clean up super training medal checks
Futureproof with transfer considerations
This is just a guess; gen7 didn't update the medal count and if we
assume pk8 overhauls the structure for a new console, they'll drop old
data.

With c#8 later next week, will move SuperTrainingMedalCount() to a
default interface method ez.
2019-09-20 20:55:36 -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
7e70d83664 Add missing filter overrides
Were using default filter behavior, which needs to be tweaked to account
for the original met location/level not being present (ie skip the
minLevel bounds check).

Hardcode logic for HasOriginalMetLocation for simplicity

Closes #2389 , thanks @Ammako !
2019-09-19 16:19:07 -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
712a9cf4a0 Update 19.09.19
Update event binaries with latest from the Event Gallery
2019-09-18 15:29:07 -07:00
Matt
84f72ed2b9 Unban GO Shiny Mewtwo (#2387)
Ultra Bonus Unlock (Week 3)
2019-09-16 15:04:52 -07:00
Kurt
b9246ece37 Extract y2k datetime logic, also wardrobe tweak
swsh gonna have wardrobe, so rename class and relocate some logic in for
better docs
2019-09-15 22:12:32 -07:00
Kurt
0fe42a1db3 Minor tweaks
no functional change
2019-09-14 11:48:07 -07:00
Kurt
229bb0d05d Merge dualbuffer into sav4
SAV3 has two general save chunks and storage

SAV4 also has the hall of fame block, which is a third block; no mo
silly names !
2019-09-14 11:39:48 -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
dc10c057a0 Use correct boxdata buffer when doing box manip
Closes #2386 ; guess I forgot to finish this.
2019-09-12 19:01:06 -07:00
Kurt
0d9c18e1c6 Minor clean
dual bounds check -> single check via uint cast
pkx: keep array reference for reuse in next check
format return to second line to stick out more; lines of code are cheap
:)
2019-09-11 22:17:16 -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
40cbbaa695 Relocate to more appropriate util class 2019-09-11 18:39:49 -07:00
Kurt
c5ebbbbe15 Minor clean
Magic number -> const usage
default(T) -> default (c#7.x feature)
remove some unused stuff
fix indentation in some spots
2019-09-10 22:07:50 -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
Kurt
74f8e312ca Merge branch 'master' of https://github.com/kwsch/PKHeX 2019-09-09 21:30:05 -07:00