Commit graph

660 commits

Author SHA1 Message Date
Kurt
aaad127b99 Condense things a little more 2020-12-31 10:41:55 -08:00
Kurt
38e02a53b2 Condense switch cases to switch expressions 2020-12-31 10:33:13 -08:00
Kurt
24332b6979 Minor tweaks 2020-12-30 13:08:15 -08:00
Kurt
de840f40d4 Invert some "!is" to "is not" 2020-12-29 00:58:08 -08:00
Kurt
e8c23f6644 Simplify some repeated comparisons with expressions
Less prone for bugs since it uses the same value for all comparisons without re-specifying
2020-12-29 00:37:59 -08:00
Kurt
a124168e87 Make FormArg editing a complex control
Shows a dropdown for alcremie only, and a number entry for everything else.

See 771086a222 for initial implementation; I don't want the lag anymore lol
2020-12-28 11:51:25 -08:00
Kurt
ee5349ff98 moar is or 2020-12-25 12:30:26 -08:00
Kurt
4a8a495d04 Condense some switch expressions
Should be it for now; exhaustively searched for all that made sense to change
2020-12-25 10:58:33 -08:00
Kurt
95e3337f2c More switch expressions 2020-12-24 17:12:08 -08:00
Kurt
43dd390f21 Split IContestStats, mark trades as records 2020-12-24 00:06:40 -08:00
Kurt
93910df2c6 Use new switch statements 2020-12-23 17:14:38 -08:00
Kurt
e34c8df044 Revise some method signatures 2020-12-22 20:50:33 -08:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
98be0f6739 Target type'd new 2020-12-21 17:17:56 -08:00
Kurt
0303eada32 this is not that
clearer than before, yay
2020-12-21 17:12:39 -08:00
Kurt
5729718d68 Simplify ternary byte casts
No longer needed to explicitly cast, thanks c#9 !
2020-12-21 16:53:28 -08:00
Kurt
62018cce1a Unify concepts with different names
AltForm & Form & Forme => Form
GenNumber & Generation => Generation

Extract out SpeciesForm interface, and re-add IGeneration

For those using PKHeX as a dependency, this should be a pretty straightforward manual replacement... GenNumber and AltForm should be quick find-replace`s.
2020-12-10 20:42:30 -08:00
Kurt
6f7602f2ad Change signatures to use readonly if possible
Extract get/set team methods for battle video
2020-12-05 06:09:33 -08:00
Kurt
5bc5b611cb Make RefreshAbility virtual, add overrides for gen3&5
Gen5: set HA bit if hidden ability
Gen3: prevent setting AbilityBit if it doesn't have 2 distinct abilities

Failed test now passes; all tests are passing!
2020-11-29 15:02:57 -08:00
Kurt
67b7d44ced Fix accented-a/i for spanish in-game trade
I think this was a PKHeX issue that went unnoticed; originally, we didn't include the Á and Í chars in the dictionary.

I checked the transporter code:
The app maintains the international & japanese character tables, and depending on the ROM language, it may change a char to the language-specific entry. Refer to Bulbapedia's notes on the char tables for different languages:

https://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_II

However, none of these char-changes are able to be reached with a legal char.

Á and Í (only accessible from the Spanish in-game trades) and the german 0xC0 && z <= 0xC6 chars are already in the international table. Every single difference in the VC1/VC2 table is an un-enterable char.

tl;dr -- all possible char codes are transferred fine with the VC2 table without extra language logic. We just keep out any inaccessible char (replaced with space).
2020-11-27 16:49:06 -08:00
Kurt
e9075436b7 Split off g7 transporter string handling
Add katakana / hiragana sensitive transferring

var check = CheckKata("ぐリお") == "ぐりお";
check should be true, dugtrio case !
2020-11-27 15:37:55 -08:00
Kurt
9b178fefe2 Xmldoc, minor tweaks
Move form-info logic from FormConverter to AltFormInfo; now FormConverter is entirely form=>string[]
Add a bunch of xmldoc
Make pogo no-end-date cmp agaisnt UTCnow rather than local now.
2020-11-27 11:51:02 -08:00
sora10pls
a437cbb9ca Update FormConverter.cs
Display 0-9999 for Galarian Yamask formarg values.
2020-11-26 18:41:45 -05:00
Kurt
771086a222 Show all valid yamask-1 formarg values
from 319 (max HP-1) to 9999 (max saved value).

Causes a little bit of GUI lag when loading 10k items to the combobox; could be a number entry but meh. Lazily allocate the 10k strings; wait until it's requested.
2020-11-24 12:40:56 -08:00
Kurt
0af0c05bac Update go slot list yield and move fetch 2020-11-18 21:34:40 -08:00
Kurt
26e0f31c95 Include date legality parameters for LGPE
Extract common abstract class for GO transferred encounters
Clamp minlevel instead of met level
Add optional parameter for GO IV randomization
Update go legality binaries with latest
2020-11-16 15:32:22 -08:00
Kurt
b6da6c1207 Add raticate form list for gen8+ 2020-11-15 08:31:58 -08:00
Kurt
72e209a156 Split some methods, handle flow for go enc 2020-11-11 21:22:13 -08:00
Kurt
5b313210ed Handle SWSH gender strings same as LGPE
See 6a0a6aa82a for more context
2020-10-27 09:24:06 -07:00
Kurt
0aa95c42c0 Remove 0x42 from extrabytes
all values can be modified via the GUI, no need to expose as raw value.
2020-10-25 18:08:36 -07:00
Kurt
9264150b2b Add shiny1 batch editor, add ctrl-shiny (1)
GUI: Ctrl click star to get shiny1, shift click for shiny0, any-click to get random

make Alt click modify the SID instead of PID

add SetShinySID shiny type
2020-10-25 10:42:48 -07:00
Kurt
3b5bcc9dad Update comments with context/clarification
No functional change, the order of switch case won't matter
2020-10-24 23:08:39 -07:00
Kurt
5326067c8d Return old Chinese species name for Gen7 fetch
Add documentation comments, because changing species names is so weird.

ty anubis for confirming the game resets the old-nickname to new-nickname even without transferring to HOME.

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2020-10-24 22:28:39 -07:00
Kurt
5fa4ddd4a2 Update internal data sources for Crown Tundra
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
Co-Authored-By: ReignOfComputer <2667537+ReignOfComputer@users.noreply.github.com>
2020-10-24 11:11:05 -07:00
Kurt
7a01b1249c Minor clean
Handle more messages, add more xmldoc
2020-10-18 09:43:41 -07:00
Kurt
6239f59b9d Inline checksum logic for gen3, simplify else case 2020-10-18 09:16:52 -07:00
Kurt
e984f71d82 Fix PID mutation for VC shiny transfers 2020-10-13 22:43:43 -07:00
Kurt
ea81bb2c1e Add swsh items based on DLC1 metadata 2020-10-10 14:14:02 -07:00
Kurt
7132750c9b Placeholder crown tundra logic
To be updated:
- Tables8: magic numbers for maximums
- IGigantamax: any new gigantamax forms?
- FormConverter: any new forms? (calyrex)
2020-10-10 13:14:32 -07:00
Kurt
6efe279ffe Refresh nickname on transfer
Mimics official behavior

Co-Authored-By: Lusamine <30205550+Lusamine@users.noreply.github.com>
2020-10-08 14:00:17 -07:00
Kurt
478cb33788 Unshorten parameter names
lang->language
nick->nickname
2020-10-08 13:59:58 -07:00
Kurt
61dc9a45ae Revise Shadow state detection
Closes #3012
2020-10-06 22:36:27 -07:00
Kurt
3ab824d306 Refactoring
Condense some logic
2020-10-06 17:54:17 -07:00
Kurt
aa43904869 Add stad2 boxnames, registered flag handling 2020-10-05 08:29:17 -07:00
Kurt
978305b45e Fix pp up offset reads 2020-10-04 15:45:21 -07:00
Kurt
d4452ce3af SK2 coerce to load to a hint language
This format won't be supported cleanly, so let's just try to allow language detection to work as best as it can without storing metadata in the SK2 bytes.
2020-10-04 14:42:48 -07:00
Kurt
f4f25da986 Add IsEgg for SK2
Stored at 0x1E
2020-10-04 14:15:29 -07:00
Kurt
6938d2f94d Split VivillonTables into two classes
Indicate that the content is for 3DS specific logic
Reduce restriction for parameters requiring IGeoTrack => IRegionOrigin
2020-10-04 14:15:13 -07:00
Kurt
09c6359e3a Add flexibility for SK2 imports
Check language character table for English vs Japanese when loading for a destination
2020-10-04 10:25:34 -07:00
Kurt
d13b893351 Use PKHeX as blanksav language
Closes #3009

Make QRPK7 implement IEncounterable and remove hardcoded PKHeX strings
Let force hatching for WC3 eggs try to hatch from the savefile's language, then revert to english if failed to set an OT.
2020-10-04 08:59:33 -07:00