Commit graph

554 commits

Author SHA1 Message Date
Kurt
609db23dc5 Consolidate pouch load/set 2019-03-30 16:10:14 -07:00
Kurt
e1a3c8edb3 Add RTC reset, allows game to define on continue
Closes #2273 , thanks @SatoMew !
2019-03-30 12:34:51 -07:00
Kurt
bb8cf5d3d8 Simplify get/decrypt pkm access 2019-03-29 19:43:33 -07:00
Kurt
5dcf2f4dc8 Use enum instead of nullable bool tristate 2019-03-29 17:52:26 -07:00
Kurt
4f2b9baede
Add missing stamp
Closes #2274
2019-03-29 09:40:31 -07:00
Kurt
4650a6f5b5 Reduce sizes 2019-03-22 21:19:47 -07:00
Kurt
cce362b98a Relocate FFFF trim (and 0000) to same location 2019-03-20 22:13:09 -07:00
Kurt
b1ead9e630 Split StringConverter into smaller pieces
reduces loading time (don't have to allocate conversion arrays when
launching a gen7 game), and separates things to easier to manage
locations

reworks gen3 string encode/decode, no longer does 3->4->5 and 5->4->3;
instead goes straight to the end result without an intermediary format.

String sanitization should probably be broken up rather than reused, oh
well.
2019-03-20 21:50:44 -07:00
Kurt
8a08d32dff Simplify pkm constructors
remove Identifier param. 99% of the time, identifier is not provided,
resulting in a useless call

end result:
provide 'create new' and 'create from' constructors
2019-03-16 18:41:56 -07:00
Kurt
5765ce8229 Extract gc version IDs to separate logic 2019-03-16 16:48:38 -07:00
Kurt
ebc7c6ae29 Remove PKX.LCRNG method
Duplicate with RNG.LCRNG
reuse cryptarray for gen5 mysterygift r/w
2019-03-16 16:25:25 -07:00
Kurt
13a6d16cb9 Relocate checksum/dexform logic 2019-03-16 12:01:21 -07:00
Benjamin Sinkula
e4d59b8b98 Add PlayerNames and MatchDate to BV7 2019-03-15 14:35:55 -05:00
Kurt
41bc3f6182
Fix header'ed file export
For xd, getfinaldata returned a standard 344KB save, but then slapped it together with the inner savedata (0x28000 bytes) rather than using the GCI header. Don't use 'Data'
2019-03-15 10:26:16 -07:00
Kurt
e8a5a55323 Add union/berry crush stat ids 2019-03-09 10:26:43 -08:00
Kurt
0d5ee9489b Fix memcard sav cloning
Closes #2267 , Thanks @PMArkive && @Subject21J !
2019-03-07 18:05:55 -08:00
Kurt
bd00680545 Fix incorrect block index ref
https://github.com/kwsch/PKHeX/issues/2267
Still doesn't fix the underlying issue
2019-03-07 17:30:50 -08:00
Kurt
ee787a0f71 Fix HoF size check
now matches the code in ChecksumsValid (< instead of <=)
2019-03-07 15:45:51 -08:00
Kurt
61bf82e2bd Add gs event flags
https://projectpokemon.org/home/forums/topic/49717-pkhex-flag-editing/?tab=comments#comment-240804

via pret repo; looks like 2000 event flags, and 0x100 event
consts/work-vals (byte)
add more rebattle toggles
2019-03-05 23:06:05 -08:00
Kurt
8d49400b07 Change SecondsTo* from int to uint
having a year > 2050 can result in a 32bit seconds value (top bit set);
instead of being negative, keep it as a 32bit number.
2019-03-05 15:55:26 -08:00
Kurt
bb2c7e22cb Add HoF checksum verification and saving
Thanks @av🥑cado#0315 (discord)
2019-03-02 09:16:03 -08:00
Kurt
30e36579be Misc updates
add more xmldoc
revise some comments for clarity
redo a little bit of logic for perf
rename some methods for better description
2019-02-24 13:57:10 -08:00
Kurt
993bb00a61 Remove powersave unused logic
unused & deprecated in favor of using cfw (powersaves price >>>
ntrboot-b9s flashcart)
2019-02-23 18:02:50 -08:00
Kurt
7ba21c5d8c Use subsection fetch 2019-02-23 17:59:46 -08:00
Kurt
d792c0d3a0 use u/L
use 'u' to denote uint values, so that less IL ops are required
~(21->17) in the case of IVs
no functional change, just a fun exercise looking at generated IL and
finding ways to use less ops
2019-02-23 15:36:26 -08:00
Kurt
5b29e71954 Misc tweaks
no functional change, just rewrite some logic for better flow
fix subform popup count restriction (OwnedForms requires forms to be
added/removed manually; it doesn't automatically update)

sanitize box names when dumping boxes with separate folders (and bad box
names)
2019-02-23 14:58:48 -08:00
Kurt
17f954b4e8 Xmldoc
Reorder to match parameter order
add more xmldoc
2019-02-23 14:57:35 -08:00
Kurt
ca51edbdcf Change sav.LoadBoxes to return int
make MysteryGift specific method flexible so that any IEncounterable
enumerable can be passed.
2019-02-23 14:37:06 -08:00
Kurt
a339cc9289 Extract pouch manipulation logic
add overloads for API syntactic sugar
make ItemConverter internal again
2019-02-22 22:48:34 -08:00
Kurt
df94afa711 Misc updates
extract some enums to core, use Enum.GetNames to do string fetch
make stamp listbox taller
clean up Display*ID setters
2019-02-21 21:54:41 -08:00
Kurt
cffa6e681d Add OT name setter 2019-02-20 21:52:22 -08:00
Kurt
ba6a958a1d Add xmldoc, make manip not fetch all BoxData 2019-02-20 19:39:49 -08:00
Kurt
d3dd4fb2a5 Track slot modified count on sort/delete/mod
Sorting will always show multiples of boxcount since it repositions
empty slots
2019-02-20 17:59:54 -08:00
Kurt
40963c012a Add sav3 BP Earned editing
misc editor, first tab (main)
2019-02-19 20:59:47 -08:00
Kurt
fa4318ae2f Add gen3 record editing
in misc edits window
2019-02-19 20:46:58 -08:00
Kurt
fb8aa3bba0 Lowercase parameter 2019-02-19 20:26:20 -08:00
Kurt
a385a8481d Misc tweak to savefile export
Use flags to request header/footer in the output
gets rid of the DSV/GCI bool arguments
2019-02-18 21:59:57 -08:00
Kurt
7c3e5aa83c Make RandomGender a method instead of property
See pkNX for similar change; the functionality is really *method*
2019-02-17 22:13:40 -08:00
Kurt
258f0f0ad4 Minor refactoring
clean up some gc logic, no functional changes
2019-02-17 10:42:43 -08:00
Kurt
d1f6a5a3ff Misc clean
no functional change
2019-02-15 11:46:46 -08:00
Kurt
858760fa28 Misc updates
relocate program language enum
test that test case is proper
move getcompatible & gettemplate to core
remove catch rate changing for pk1 (catchrate editor now used instead)
2019-02-15 00:50:23 -08:00
Kurt
3d01617c93 Fix safari unlock
dat 0 -> o
Closes #2262
2019-02-14 18:17:16 -08:00
Kurt
54ba9a0312 Update file->open for pb7 filtering
add pb7 to pkm extension list, ignore it in gen7 (sm/usum), update gg
filtering (allow pb7, not bk7)
add comments indicating format source game
2019-02-09 20:33:37 -08:00
Kurt
e96ef76dcd Add xmldoc
no code changes
2019-02-09 20:24:38 -08:00
Kurt
48e2bbcfed Refactor DumpBox to return 1 value
count < 0 implies an error; values >= 0 can be used to indicate actual
dumped count
2019-02-09 20:19:55 -08:00
Kurt
9a93b20515 Minor rework
use hashset instead of new[] every call
precompute empty arr
allow criteria input for better gen requests
2019-02-09 20:07:15 -08:00
Kurt
ec1d3069a5 Remove SaveFile dependency for wallpaper data fetch
reusability++
2019-02-09 20:05:32 -08:00
Kurt
cb98c83bd2 Remove references to Stat_HPMax
use computed value to check if Party Stats are present
maybe I want to use Span and stop resizing all pkm arrays to party
format years from now idk
2019-02-09 13:17:00 -08:00
Kurt
383d4b7700 "" -> string.Empty
be explicit that the string is empty rather than possibly missing
disallow encrypted export for BK4 (they're not encrypted), removes type
check
simplify replaceall in showdownset (don't call ReplaceAll 4x, just get
valid chars and rebuild)
simplify get ribbon sprite name (precompute ToLower and appended values
2019-02-07 21:40:20 -08:00
Kurt
59b41937e1 Misc variable name changes
readability++
2019-02-06 23:28:02 -08:00
Kurt
29253ed636 More cleaning 2019-02-03 20:28:03 -08:00
Kurt
264c7d1cbc Replace null return val
Closes #2255
2019-02-03 20:01:56 -08:00
Kurt
893f98d667 Misc clarity
no functional change
make batch editor prefix list readonly
2019-02-03 10:28:33 -08:00
Kurt
f481404503 Misc clean 2019-02-02 10:19:41 -08:00
Kurt
6ed9f979de Continued refactoring
removing null results as indicators of no data (c# 8 sooooon)
2019-02-01 23:26:43 -08:00
Kurt
aa022fad40 Misc refactoring
remove some null usages, return an empty array instead
reduce as arg
2019-02-01 23:08:03 -08:00
Kurt
8cfd6d5a63 Expose SetBoxData 2019-01-27 21:57:33 -08:00
PMArkive
5cb93be681 add legendary pokemon to wormhole slots (#2252)
changed slot numbering from 0-4 to 1-15
fixed drapion's pokedex number in wormhole slot table
2019-01-27 10:40:19 -08:00
Kurt
0b5429ebbc Relocate wormhole edit logic to separate class
#2250
make arrays static (only spin up one copy ever)
2019-01-25 19:58:00 -08:00
PMArkive
3f0a5b3ffa Add USUM Wormhole functions (#2250)
The current wormhole's shiny flag & pokemon can be changed with these functions.

The flags & offsets were found by @PP-theSLAYER https://projectpokemon.org/home/forums/topic/39433-gen-7-save-research-thread/?page=3&tab=comments#comment-239090
2019-01-25 19:52:46 -08:00
Kurt
a7323ef484 Misc updates
Reuse some code in netutil for fetching stream (provide useragent for
all uses)
make sav4ranch use dynamicly read offsets to handle both variants
(quicker) #2248
2019-01-25 16:51:58 -08:00
PMArkive
194ddb7c18 add offsets & save-size for ranch's platinum update (#2248)
I don't know yet if the OT offset is the same though
2019-01-25 15:24:01 -08:00
Kurt
7bb3f14e1f Add wishmkr flag fetch
rs only
thx @PMArkive !
2019-01-22 22:28:30 -08:00
Kurt
13c13d5f49 Update 1MB invalid savefile message
trickles down to memcard, which is still invalid. Use a more generic
message if a memcard is the same size as a regular savefile.
2019-01-22 19:32:22 -08:00
Kurt
13090c0ced misc gen1 updates
sav1: assign personal table based on (detected/provided) version
catchrate editor: allow to use savefile personal
remove gb era prompt whenever gb/blank loaded; have it as a setting (can
be overridden for VC now). keep allowgbera as autodetect
personaltable: track format for debugging purposes/info

update translations
2019-01-21 20:06:02 -08:00
Kurt
8652677a79 Misc tweaks
showdownset: contains char instead of string
gameinfo: static readonly array instead of redefining new on update
legality: order of operation / value reuse / simplification / comments
pkx: compare char instead of single character string
header/footer: move assignment into method as an out instead of ref
2019-01-20 21:55:28 -08:00
ShadowMario3
3f759058ce Update SAV3.cs (#2247)
Fix PC max item count in RSE
2019-01-16 12:13:58 -08:00
Kurt
53b2ca93b8 Update blank sav3 behavior
can now be selected & loaded without exception/hassle
2019-01-15 22:14:19 -08:00
Kurt
b6261e57a3 update structure docs 2019-01-15 16:47:54 -08:00
Kurt
ae6010f169 Add ranch r(/w?) support
not gonna edit the metadata

properly handle an irregular sized display box
2019-01-14 21:31:53 -08:00
Kurt
ca0e012c5c Add Heal, make status_condition a pkm property
also split out battle box slot offset fetch
if anyone finds where colo&xd store their status bits, lmk 👍
2019-01-11 22:25:48 -08:00
Kurt
c591d2a69d Misc updates
condense some logic
2019-01-11 17:44:51 -08:00
Kurt
fef80d5a05 Fix pb7 trade logic
Update handler after friendship update (CurrentHandler needs to update
afterwards)
Fix argument order (gender & nonpresent region data)
#2235 side effect
2019-01-08 18:32:42 -08:00
Kurt
bc8b48eb88 Fix sort writeback for locked slots
clear flag, update properties
#2235
2019-01-08 18:31:14 -08:00
Kurt
75202c7a89 Misc updates
reducing allocations, increasing clarity by removing some magic numbers
probably can rewrite some of the evo loading/checking for even less, but
good for now.
2019-01-06 16:22:45 -08:00
Kurt
154f122369 Allow changing of default savefile type
kinda have to restrict these to 'valid' choices; should be enough of a
selection->result to be adequate for changing version

restart the program after changing the setting; won't take effect until
rebooted.
2019-01-05 15:42:20 -08:00
Kurt
9a4f12c279 Misc updates
rearrange pkm version groups for clear break between
twins/siblings/family
clear pokelist for sav7b on non-exportable saves (prevents b1s1 from
showing markings)
rename horohoro (pgo) to non romaji lol, hide daycare/party tabs on
nonexportable save
remove some unnecessary operations
rewrite getallcontrolsoftype to remove ToList() and make generic
2019-01-05 15:40:25 -08:00
Kurt
435c429dfc Allow colo to be a blank savefile 2019-01-05 15:37:06 -08:00
Kurt
e028214eab Update dex form handling for dex4
still not sure if it's entirely right, but at least there's no more
exceptions
https://projectpokemon.org/home/forums/topic/48288-pokedex-error-gen-4/
2019-01-05 12:37:41 -08:00
Kurt
7ab42e7cc2 Misc improvements
remove alloc on gc key advancement; advance keys in place
make g6 sizes an explicit comparison instead of new[].Contains
replace Any/Count with Array.Find calls (removes linq dependency from
savetype detection!)
2019-01-04 00:07:37 -08:00
Kurt
bdcabfa573 Update gen4 save detection
footer is different for Korean saves; checked JP/EN and they use the
2006 date. Probably the same for everyone-but-KO.

Simplify check further, only check the 0x4.... sav as it's the first
region saved to. No point wasting time checking the other!

a previous commit alluded to general/storage being initialized in
different slots
e8644280a1
, gonna ignore what was stated as I can't find any proof with the few
tests I did today (all init on second, and found no backups from that
time)
2019-01-03 23:37:49 -08:00
Kurt
e99c9a0999 Add pokestock gst/stk (3 & 4) bulk r/w
ezpz @kamronbatman
2019-01-02 21:56:33 -08:00
Kurt
8c05b9f391 add g3 hall of fame r/w
no GUI

var sav3 = new SAV3(File.ReadAllBytes(path));
var hof = HallFame3Entry.GetEntries(sav3);
hof.Dump();
2019-01-02 18:15:29 -08:00
Kurt
6929b637cc Misc clean
refactor some common operations
2019-01-01 20:05:36 -08:00
Kurt
80ef196468 fix info output off by one 2019-01-01 20:05:00 -08:00
Kurt
2b5272a395 Simplify gen4 save type detection
footer identifiers work just fine for any legitimately created save
file; I might have had the checksum check code for pokesav blank
savefiles

dropping support for bad-blanks in favor of a non-negligible speedup is
favorable :)
2019-01-01 11:16:31 -08:00
Kurt
7ba2860db8 more block details 2019-01-01 00:57:51 -08:00
Kurt
8129e91694 Add more detailed block offset docs 2018-12-31 22:19:40 -08:00
Kurt
4fcee0ae7a Move wr7 to mysterygift folder 2018-12-29 23:34:34 -08:00
Kurt
e7531dca30 Add wr7->pkm
Not sure if one of the 'level' fields is a move ID instead. Pound=1,
Level=1
Maybe a Chansey record would shed more light.
2018-12-29 23:33:36 -08:00
Kurt
03ad20dd16 Improve card title/filename logic
mystery gift editor still fails to generate a description (heldItem < 0
-> exception), the fallback behavior is fine I guess.
2018-12-29 22:15:40 -08:00
Kurt
8a33a95974 Add mystery gift record getset
Mystery Gift button now appears for GG, doesn't work yet
2018-12-29 22:09:59 -08:00
Kurt
f5e3358aaf Split up WR7 to separate files
settled on the class name; looks like it'll be roughly readable as a
mystery gift so inherit some properties. maybe can get r/w in the
mystery gift editor :)
2018-12-29 22:09:27 -08:00
Kurt
71dc944cbd Add wb7 gift record rw
another block documented ;)

https://projectpokemon.org/docs/gen-7/lets-go-pikachu-eevee-wonder-card-album-r109/

names subject to change
2018-12-29 21:24:38 -08:00
Kurt
6f22599baf Prevent slot overwriting on bulk import
https://projectpokemon.org/home/forums/topic/48912-how-to-batch-import-pokemon-boxes-without-erasing-existing-pokemon/
2018-12-28 17:58:13 -08:00
Kurt
d90f099a68 Next unoccupied after starting position 2018-12-27 13:10:55 -08:00
Kurt
f9eb1746ea Add NextOpenBoxSlot fetch for empty slot overwrites
< 0 is storage full
2018-12-27 01:08:42 -08:00
Kurt
9db771c0d5 Split out common 6+ pkm format to abstract class
Didn't really feel like pulling out the shared structure get/set
operations, only the derived properties & overall fixer methods. Should
be easier to maintain if any handling updates.

Clean up pb7 unused stuff; removes ribbon logic since none are used.

c# 8.0 interface defaults can maybe pull out more logic (ex making
FixRelearn and relearn moves into an interface); multiple inheritance
can be useful as features are added/dropped between generations.
2018-12-25 22:56:32 -08:00
Kurt
ec140431c0 Fix box sort for empty locked slot(s) 2018-12-22 13:13:06 -08:00
Kurt
d7a501c168 Relocate some logic to interfaces 2018-12-18 17:15:35 -08:00
Kurt
ff649009ca Misc tweaks
misc perf adjustments
add utility for slot locked check (without box argument, absolute slot
index)
localize dragdrop strings
increase dragdrop file delete delay (dropping files into discord waits
until you confirm; 10s gives enough time to hit confirm)
2018-12-17 11:17:19 -08:00
Kurt
efb9b7eba2 Misc cleanup
removes clickonce logic/reference
2018-12-10 20:32:08 -08:00
Kurt
8a0b9cd88c Add indication for party/starter slots 2018-12-09 23:18:37 -08:00
Kurt
8a98a89f6e Add height/weight and float->scalar
pgo transfer logic disassembly
FF 83 02 D1 FC 6F 04 A9  FA 67 05 A9 F8 5F 06 A9
2018-12-06 21:03:33 -08:00
Kurt
71fab815bf Provide more slot information
remove lockedslots, store & save all teamslots for sav7
differentiate locked slots from overwrite protected slots by emitting an
enum containing info about the slot

locked = can't be replaced, period.
starter/battleteam = can't be pasted over by bulk-pastes

can eventually show more specific sprite layers to denote party
indexes/team#/starter
2018-12-04 22:59:28 -08:00
Kurt
4c1232855f Add getstring method with non-sav data 2018-12-04 22:00:57 -08:00
Kurt
cc59c3cbe8 Remove variable naming hiding
new property named Stats
update sav7b/pb7 to delete unused handling trainer parameters too
2018-12-03 20:59:48 -08:00
Kurt
5750eabcc8 Add user protection for moved starters
Closes #2191
2018-12-02 11:48:44 -08:00
Kurt
0f01068d0d Update mystery match for dppt
off by one
2018-12-01 10:44:38 -08:00
Kurt
f6508bec5b Add dex size record editing via pokedex editor
Closes #2186
2018-11-29 21:40:20 -08:00
Kurt
35a85670b3 Set height/weight dex values
Closes #2167
Based off sub_71001D16A0 with shortcut modifications:
* code marks new entries for evolution processing later using the low
bit (hence the << 1); in save files I can't see any bits set, but I
can't see anywhere in the code that DOESNT set this bit. Thus the
assumption of post-processing.

As noted in gameplay, a new capture doesn't set Min and Max; it only
sets it if it is above the usual sizing values.

Megas apparently don't set until seen in battle, so don't worry about
setting the other forme based indexes.
2018-11-27 22:05:36 -08:00
Kurt
15b6ef0597 Increment wild encounter count on add capture 2018-11-27 08:53:56 -08:00
Kurt
adeaaea0b4 Allow folder import to import mystery gifts & gp1
Closes #2176
2018-11-23 12:22:51 -08:00
Kurt
ab4c3fc7ac Add go park slot delete (&all)
Closes #2179
2018-11-23 12:15:25 -08:00
Kurt
17b3732a7d Rework filename / nickname checks
Closes #2178
2018-11-23 10:31:55 -08:00
Kurt
f27816e622 Add party pointer sort
Pulls party members (and follower index if not already in party?) to the
first slot(s) in the (current/all) box.
2018-11-22 23:02:57 -08:00
Kurt
1d27f64235 Allow currentbox to be changed if not overriden
Now allows modifying/deleting 'current' box.
2018-11-22 10:55:20 -08:00
Kurt
6c0ad30b9a Add gp1-pb7 conversion
Add drop to pkmeditor & drop to saveditor
2018-11-21 20:48:55 -08:00
Kurt
9cf46d5bcb Add CP and Date to GP1 properties
thanks theslayer
2018-11-21 15:25:50 -08:00
Kurt
95776d8520 Set default savefile to gg 2018-11-21 13:51:26 -08:00
Kurt
34f8a71ad0 Always writeback pointer data
User sort isn't tracked, and reorganizes pointers. Set it back always,
no harm as values should always be sensical.

Closes #2171
2018-11-18 20:32:55 -08:00
Kurt
b818aff48a Remove evo tree sanitization
Evo data doesn't provide evolution values for these, fortunately.
2018-11-18 15:25:03 -08:00
Kurt
a1cc1a95c2 Fix species fetch, add altform
Thanks theSLAYER!
2018-11-18 13:54:47 -08:00
Kurt
c268d5ad05 Set party format values always 2018-11-17 19:42:48 -08:00
Kurt
cff1ec68fd Update filter
savedata.bin, not extensionless
cosmetic fix for the dialog window
Closes #2166
2018-11-16 22:17:18 -08:00
Kurt
5652e76728 Split go entities and go storage, rename classes 2018-11-15 17:36:29 -08:00
Kurt
6a0a6aa82a Add methods for 7b quirks
nidoran m/f when sanitized with the old way show the gender symbols as
'?'
2018-11-14 22:51:53 -08:00
Kurt
bf9344087e Update slot storage compression algo
now iterates for all boxes, and restores to the correct offset at the
end
update direct offset pointers to box specific (so that it can work on
gen3 rsefrlg saves if ever used on them).
2018-11-14 22:33:30 -08:00
Kurt
644fa4e929 Call slot compression
Doesn't work correctly (data shifted down still persists)
2018-11-14 22:20:59 -08:00
Kurt
1feecef874 Add go park summarizer 2018-11-14 22:02:01 -08:00
Kurt
fc44022836 Add gopkm block/abstraction 2018-11-14 19:34:21 -08:00
Kurt
7abe0c8a9e Add candy pouch type
reusing free space icon hides the give all button; just add another
sprite.
2018-11-13 20:46:48 -08:00
Kurt
1f985d8112 Remove unnecessary/incorrect flags
copypaste from sm lol uops
2018-11-13 20:46:03 -08:00
Kurt
13e1debe3e Add sav7b object & detection util 2018-11-13 19:18:29 -08:00
Kurt
5f456d705c Add misc setup objects 2018-11-13 19:16:14 -08:00
Kurt
025a290bc9 Update saveblock template for stored offset fetch 2018-11-13 19:15:27 -08:00
Kurt
486445897e Add 7b inventory r/w object 2018-11-13 19:15:11 -08:00
Kurt
707f7b5893 Fix displayed dex index for g7
off by 1 starting with formes
2018-11-13 19:14:42 -08:00
Kurt
49c4043e19 Update dex abstractions, add gg dex 2018-11-13 19:14:23 -08:00
Kurt
98ebf4c5cb Add sort pointer repointing
LGPE uses a list of pkm for boxes, and has pointers indicating where
each party member is at
need some logic for handling the sorting. Had suspected this a while
back so this pre-work came in handy (untested tho)

make eventflags offset ptr virtual, I might end up doing things
differently for event flags
2018-11-10 21:04:24 -08:00
Kurt
fe989d48fe Misc prep updates
Update comments / xmldoc
Add a savefile storage compressor (ie array[] with empty interstitials
-> list); return true if the compression moved anything (repopulate
views), and the count of occupied slots in the list.
Add saveblock base class; I haven't really liked how SAV6/7 do all the
logic; I'll still expose properties that will then point to a saveblock.
Cuts down clutter.
Add template Dex manipulator, with gen6/7 implementations
Speculate sequential gp/ge gameversion IDs
2018-11-01 15:38:09 -07:00
Kurt
8f9cc6cd7e Fix xmldoc ampersands 2018-10-31 13:52:09 -07:00
Kurt
39f98a4a94 Misc qol updates
Check max case for level first, then iterate upwards (eliminates inner
if)
change wc* nature to sbyte (update comparisons, 0xFF too magic-y)
use Rand.Next(x) instead of (0, x)
2018-10-27 21:59:31 -07:00
Kurt
ed3699fbb4 Update Ho-Oh mattle check
More languages than Italian have a rule-breaking name. Rework checks a
bit
Flag eggs more accurately
Update force hatch to move Link Trade met location to Egg Location

fix Ho-oh -> Ho-Oh text strings (correctness is key!)
2018-10-27 16:06:06 -07:00
Kurt
93af3e61b7 Add handling for Mt Battle Ho-Oh (italian) edgecase
https://projectpokemon.org/home/forums/topic/47917-colosseum-italian-ho-oh/

there's no shadow ID, so it can have both the short (transferred back)
or full name (never transferred) as CK3 without side effects.

allow 10chars in pkmeditor
2018-10-13 08:07:15 -07:00
Kurt
f7f5d78beb Misc perf tweaks
hopefully resolves the image corruption issue (dont use unsafe?)
remove some linq
2018-10-13 08:02:55 -07:00
Kurt
4deb5080d1 Misc tweaks
rearrange getmove with respect to tutors; verifycurrentmoves was getting
tutor moves in levelup
extract not-found hint fetch
Expose gen5 block objects (so I can play with saves in linqpad)
2018-10-06 18:45:15 -07:00
Kurt
2a2361220d Add more accurate daycare egg detection
uses eventflag, different index for each game

frlg:
https://www.pokecommunity.com/showthread.php?t=302347
"Flag 0x266 is set by the game engine if an Egg is in the Daycare."

emerald:
https://www.pokecommunity.com/showthread.php?t=330008
"0x86 : Daycare Centre has egg"

rs:
https://gist.github.com/rboninsegna/a4a63c2b66c42e371a94f860eae55361
" 0x86  Egg ready at Daycare"
2018-09-30 21:27:36 -07:00
Kurt
a3421a881d bounds check record set
closes #2129
2018-09-27 21:30:20 -07:00
Kurt
ca0a533779 Add frlg flag toggles from thread 2018-09-27 20:01:34 -07:00