Commit graph

1945 commits

Author SHA1 Message Date
Kurt
2498b6bf50 Misc updates
Simplify unknown gen expression
allow mutation of FormIndex if desired
2019-02-10 21:31:27 -08:00
Kurt
304203262d Add species & ability enumerations
remove hardcoded 810 in unit test, add ability test too
2019-02-10 21:28:32 -08:00
Kurt
182348526c Add display TID/SID get/set 2019-02-10 10:31:20 -08:00
Kurt
9715a08342 Fix custom hex parse
hurr dont write your own parsers
Closes #2256
2019-02-10 10:19:05 -08:00
Kurt
a39f917f84 Simplify expression
ternary with a null check and long method signature is pretty ugly
2019-02-09 23:22:22 -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
dc5cdc34d7 Remove FieldsInitialized and rename check method 2019-02-09 17:07:44 -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
e79f46673c Refactoring iencounterable->pkm
SetPINGA{S}(pk, criteria) -> pid,iv, nature, gender, ability (stats
future?)
memes aside, this is where criteria data is forced

Split N encounterstatic (has fixed PID and special flag) from
EncounterStaticPID
2019-02-09 11:37:20 -08:00
Kurt
cda06bc701 Increase custom parse speed
remove double string replace (now less allocations); only add up values
if they're valid numbers.

builtin int.Parse throws with "1 2", but users can type stupid stuff
like that in the program (so we parse as 12).
2019-02-08 18:29:26 -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
3474d97fb2 Weaken float comparison for weight/height
ThePunish3D was able to find examples with less precise calcs

https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=240188
assuming these were unmodified
2019-02-07 16:57:17 -08:00
Kurt
59b41937e1 Misc variable name changes
readability++
2019-02-06 23:28:02 -08:00
Kurt
d03ff30140 Fix ita traded lgpe diglett OT
ty ThePunish3D!

https://projectpokemon.org/home/forums/topic/46143-bug-in-last-update/?do=findComment&comment=240159
2019-02-05 17:09:47 -08:00
Kurt
a97ae79086 Unban m&m go shinies
https://twitter.com/SerebiiNet/status/1092892163782991873
2019-02-05 15:33:59 -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
2eef523475 Misc clean
meh
2019-02-02 15:20:08 -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
d29f670840 Add QRPK7 to PK7
roughly converts the data into a PK7
2019-01-29 21:07:42 -08:00
Kurt
8cfd6d5a63 Expose SetBoxData 2019-01-27 21:57:33 -08:00
Kurt
6353e8d84d Add special set operation for alph rocksmash
closes #2253
ty @Subject21J & @ReignOfComputer
2019-01-27 11:08:21 -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
147b676d8c Misc api accessibility tweaks
disable GeneratePKMs from throwing an exception (it's a testing flag,
not to leak out if someone wants a debug dll I guess)
expose FixedGenderFromBiGender
expose ribbon interfaces
2019-01-26 14:48:32 -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
c033fe2741 Increase precision for cp/size calc
still isn't close enough, but removes the usage of decimals for cp calc.
redd.it/ahac9i

CP calc doesn't flag anything I have that is legal, but the calc is
still off by 2 bits at most... whyyyy? Even the same code run in cpp
results in the same inaccuracy? Maybe this is some arm64 difference?
2019-01-22 21:08:48 -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
f0d9e3f2e5 Fix encounter link wc6's
Closes #2244 thanks @kamronbatman & @NinFanBoyFTW !
2019-01-14 18:53:05 -08:00
Kurt
2969a42ad4 add missing ot name check
Closes #2246, needed to mirror wc7 via this commit but failed

41a3989b53
2019-01-14 18:33:00 -08:00
Kurt
ab33f7123b add null check for invalid relearn scenarios
Closes #2245
2019-01-14 16:39:11 -08:00
Kurt
d62a69a6a7 Misc fixes
Provide gen1/2 gb only version origin fetch for personal/moves ty
shadowmario (i assume this fixes things)
make listbox use ingame font for special characters

2f6e30bb3c (r31924945)
ty @pmarkive
2019-01-13 18:12:31 -08:00
Kurt
41a3989b53 Consolidate encounterlink into mysterygift
use synthetic wondercards to match link gifts
2019-01-12 23:50:31 -08:00
Kurt
ce11bda416 Update mystery gift database 2019-01-12 23:49:16 -08:00