Commit graph

762 commits

Author SHA1 Message Date
Kurt
f35d8b2d4b Remove unnecessary logic
return/frustration not present in these games; no need to check this
2020-08-18 14:45:36 -07:00
Kurt
e012b42c9c Update SAV7b.cs 2020-08-18 10:35:59 -07:00
Kurt
c7eda4f901 Update SAV7b.cs 2020-08-18 09:15:29 -07:00
CanoeHope
1e6858c349
Add misc Restricted Sparring related Block Data (#2971)
The game also stores the Gender ID, Form ID, Encryption Constant, and Alcremie Sweet ID per block for each PKM's slot.

As for Sweet ID it is stored for all Types. However, since you obviously can't use Alcremie in non-Fairy Sparring they go unused. (They are the Int32 blocks you'll notice with a -1 value.)
2020-08-15 12:10:52 -07:00
Kurt
541c9761df Minor clean
Make flag indexes immutable
Rename some properties for clarity
2020-08-14 20:23:54 -07:00
Kurt
1df2bd444a Remove unused using 2020-08-09 20:02:06 -07:00
Kurt
32f2703339 Fix entire-box swaps by using correct lengths
Add SIZE_BOXSLOT and update usages
Make SIZE_STORED protected like SIZE_PARTY

probably need to redesign how slot metadata is presented within the savefile...
Closes #2961 ty @Kermalis !
2020-08-07 16:16:10 -07:00
Kurt
ad6728fb5c Minor tweaks
Check egg encounter for state rather than re-deriving some properties on the fly
Only check memories if memories are exposed
Remove debug assert (not always true?)
2020-08-04 22:56:55 -07:00
Kurt
02b4343827 Update SAV3XD.cs 2020-08-02 08:25:04 -07:00
Kurt
ff95c734a2 Don't set strategymemo back
Closes #2956
if someone wants to tidy up XD support later, feel free to uncomment and get it working reliably :P
2020-08-01 09:28:35 -07:00
Regnum
9e40fa132f
Improved Pokewalker Editing (#2958)
* Added PokeWalker Courses, Watts, and Steps editing

* Use util method for getting bitflags

* Keep old cheat method

Change signature so that the default value passed is to unlock all; can pass 0 instead to lock all

* Pass reference to derived sav4-type object

Wev'e already type-tested once, capture the reference and pass it into the appropriate load/save methods.

* Add control anchoring for window resizing

Also widen the labels for localization (longer strings possibly)
2020-08-01 09:20:13 -07:00
Kurt
b7211000b0 Split Country/Region/ConsoleRegion from ITrainerInfo
Only present in mainline gen6/7 game pairs, so it's not wise to have it for all games
2020-07-31 13:53:42 -07:00
Kurt
8a51bd7f28 Don't modify strategy memo
Can't correlate the structure to the data it's reading, so don't modify the values until someone figures out how the data is stored & how it should be manipulated.
Closes #2941
2020-07-29 13:37:17 -07:00
Kurt
4909256414 Split shadow info entry to separate files
#2941
add IV fields
2020-07-29 13:36:33 -07:00
Kurt
15996f2a52 Fix indexof call when short
int within short[] = no
short within short[] = yes
Closes #2955
2020-07-28 19:47:11 -07:00
Kurt
a6a3c6eaaa Refactoring
change some expressions for better perf/readability
2020-07-19 17:48:45 -05:00
Kurt
e4092e64df Relocate gen3 ereader berry logic 2020-07-18 22:51:55 -05:00
Kurt
a21bb09c37 Perserve & Display Favorite flag for items
Also clamp give all for TMs to 1 instead of whatever the giveall value is, like for prior games' HMs

reuse the "free space" bool; no real benefit in increasing the amount of abstraction (even though that's my current urge for legality)
2020-07-18 20:15:41 -05:00
CanoeHope
455a787ee4
Add MomSkin to League Card (#2936) 2020-07-11 09:22:19 -05:00
CanoeHope
8027fe30b9
Add ArmorDex complete League Card marker (#2935)
Should work even if you don't have the Expansion Pass. Of course you need the latest update.
2020-07-10 07:42:44 -05:00
CanoeHope
0dc4166e67
Add new SWSH blocks (#2918)
For anybody interested in this League Card block structure: https://pastebin.com/1gkyHe9Q

Also correct the game version record block location.
2020-07-02 21:28:04 -05:00
Kurt
afdd40bcee Check counter rollover the opposite way
FFFF and 0000 -> prefer 0000
FFFF and 0001 -> prefer 0001
...
FFFF and FFFE -> prefer FFFF

they shouldn't be desync'd (incremental); only the uninitialized case is important to handle.
2020-07-02 17:44:03 -05:00
Kurt
9da5263a52 Handle DLC1 records
Accessible in block editor, not as the usual trainer records.

Closes #2913 , ty @CanoeHope!

Co-Authored-By: canoehope <canoehope@users.noreply.github.com>
2020-06-30 23:00:48 -05:00
Kurt
0198179133 Add fixed raid news content
no change in species/form from the crownite ore one afaik; common for both games???

fix type of rigel encount so it shows up in block editor, with correct name (ty matt)
2020-06-29 21:10:12 -05:00
Kurt
fec91e4878 Revert "Show new trainer records"
This reverts commit 19ff1f584a.
2020-06-28 13:44:26 -05:00
Kurt
993673f0de Minor clean
no functional change
2020-06-27 23:36:53 -05:00
Kurt
a7ba178005 Remove unreachable/const logic
Earlier compares result in some logic being unnecessary

The Gen7 level up move compare was actually an oversight, so it's a worthwhile fix :)
2020-06-27 22:44:14 -05:00
Kurt
19ff1f584a Show new trainer records
#2913
2020-06-27 13:48:45 -05:00
Kurt
105d8f415d Remove unnecessary abstraction/leftovers
SCBlock doesn't have an absolute index; it was only used for tagging in dumps. Offset and Length weren't used.

Removing these 2 ints from the SCBlock object reduces alloc req by 8 bytes each; if we have 2,500 blocks in a save file, this reduces the memory footprint of a sav by 20KB. Nice side effect :D

Remove block dump comment from accessor; new logic in Meta8 for dumping DLC sizes does the same logic with less hassle.
2020-06-27 13:38:21 -05:00
Kurt
93f4bf1977 Add normal_encount_rigel block label
Closes #2899
2020-06-27 13:27:35 -05:00
CanoeHope
5b8d1cb681
Added IoA Restricted Sparring Blocks (#2900)
If you edit in a number of 5 or greater as one of your streaks you'll get a crown mark next to that type in-game, and doing it for all should allow for you to get Mustard's uniform when you talk to the receptionist.
2020-06-23 12:02:33 -05:00
Kurt
a2d9f06350 Differentiate AbilityType from AbilityNumber
invert ability index favoring so that the first ability index is most favored

ability num:
-1=>0/1/2
0=>0/1,
1=>0
2 =>1
4=>2

Ability Type:
0,1,2=>0,1,2
3=>0/1
4=>0/1/2

Should probably get rid of AbilityNumber definition usage but it's so entwined in the trade/static definitions...
2020-06-22 22:01:42 -05:00
Kurt
4a5abab51f Fix raid dump syntax
Closes #2896
2020-06-22 21:28:02 -05:00
Matt
ed7d32f9bb
Fix Gigantamax1 get/set in Zukan8 (#2897)
Bit 0, not bit 1.
2020-06-22 13:06:25 -05:00
CanoeHope
3dcf24dade
New SWSH Block Data (#2890)
* New SWSH Block Data

Found these pretty useful blocks for IoA. I'll maybe look into Restricted Sparring data in the next week or so if no one else does by then.
2020-06-20 21:50:50 -05:00
Kurt
b53a29a0af Add flag for urshifu-1 gmax pokedex
ty @sora10pls
2020-06-20 20:00:35 -05:00
Kurt
1ab7c916ce Clear mega slowbro seen 2020-06-20 14:31:47 -05:00
Kurt
3e21924adc Document some save sizes 2020-06-20 12:08:51 -05:00
NPC-C83H
64be77f46c
Update legal raid counts (#2878) 2020-06-20 08:16:36 -05:00
Kurt
808ca8f307 Add a temp size that isn't 100% dlc sized
dunno what RoC did but it exists?
2020-06-19 19:58:56 -05:00
Kurt
36dd5ece21 Initial Isle of Armor support
Co-Authored-By: sciresm <sciresm@users.noreply.github.com>
Co-Authored-By: Matt <sora10pls@users.noreply.github.com>
Co-Authored-By: Archit Date <architdate@gmail.com>
2020-06-19 18:51:15 -05:00
Kurt
2cdb5d26db Clean up some method signatures
rename things to be a little more consistent in naming conventions
2020-06-16 21:46:22 -05:00
Kurt
97d8bcebfe Only check Korean if game isn't recognized as Crystal
https://projectpokemon.org/home/forums/topic/57203-pkhex-error-crystal-save-dont-load/
2020-05-31 09:18:45 -07:00
Kurt
51a4001ce6
Update RaidSpawnList8.cs 2020-05-29 11:20:28 -07:00
Kurt
7f1039d155
Update RaidSpawnList8.cs 2020-05-29 11:19:49 -07:00
Matt
4d47e4ab83
Pretty up GP1 summary/filename (#2846) 2020-05-29 11:13:49 -07:00
Kurt
afa368823e Minor clean
handle some compiler messages
2020-05-26 16:59:47 -07:00
Kurt
043ba3b6f0 Add ability to sideload key names 2020-05-26 15:58:48 -07:00
Kurt
46b443903d Fix SM dex form fetch for spewpa
Closes #2826

It doesn't find it in the SM table, but didn't return -1
rework logic flow to return when found, rather than after loop finishes.

Also fix display off-by-1 since we're not using zero indexing for our entry numbers.

Thanks @Ammako !
2020-05-24 20:42:45 -07:00
Kurt
9619306a8f Update BattleTree7.cs 2020-05-24 18:42:08 -07:00