Commit graph

3028 commits

Author SHA1 Message Date
Kurt
deac1724c7 Add gen4/5 event concatenated binaries
events now show up in the event browser too

pcd(4)/pgf(5) will be used for encounter matching by the legality check.
2017-03-19 16:19:59 -07:00
Kurt
623b836cdf Add gen3 pk3 encryption detection
pokebox gba can export encrypted, just recalc the checksum and if
invalid try decrypting.
2017-03-19 15:54:16 -07:00
Kurt
1b3294c8b3 Update nickname text check
Generation specific names now show up legal if they are correct (ie all
caps)
2017-03-19 15:40:49 -07:00
Kurt
865efe9c77 Merge pull request #949 from wwwwwwzx/master
Update gen3 encounterstatic and tradegift
2017-03-19 15:14:46 -07:00
wwwwwwzx
7c0470b4b5 Add gen5 tradegift 2017-03-19 14:49:37 -07:00
wwwwwwzx
104b559936 Add GameVersion and contest stats for tradegift 2017-03-19 13:57:24 -07:00
wwwwwwzx
3579290ce7 Add gen3 TradeGift 2017-03-19 13:32:00 -07:00
wwwwwwzx
cbe7f0fa3a Add gen3 EncounterStatic 2017-03-19 13:31:31 -07:00
wwwwwwzx
135c3e2653 Fix gen4 egglocation 2017-03-19 13:29:02 -07:00
wwwwwwzx
37a906d6ed Merge remote-tracking branch 'refs/remotes/kwsch/master' 2017-03-19 13:27:18 -07:00
Kurt
5a9340223b Map gen3 species in encounter slots to natdex ID
As noted in #947
FR/LG don't have any species > 251, so remapping didn't change the
binary.
To re-map rse the ushort species ID was written back to the byte array
at the same offset; after the entire table was loaded it was saved as a
new packed binary.
2017-03-19 12:44:59 -07:00
Kurt
1ab2a6d37f Add slotnumber tracking for gen3/4
As noted in #947

No need to tack on a RNG% range at this point, only use the slotnum &
slottype with origin game to look it up later
2017-03-19 12:27:58 -07:00
Kurt
248031a45c Precompute gen3 personaltable shuffling
Less convoluted & faster loading
2017-03-19 11:07:57 -07:00
Kurt
025b817e49 Cleanup
resharper pretty gud
add n sparkle check
2017-03-19 10:44:46 -07:00
Kurt
ab88f5b4e2 Fix application path detection
Launching from args sets the Environment.CurrentDirectory to that of the
files that launched the program; instead we want the
Application.StartupPath (where the exe is, which is where our backup
files are).

Closes #948
2017-03-19 10:42:48 -07:00
Kurt
07b4db8bbe Merge pull request #947 from javierhimura/master
Gen 3 and 4 Encounter Slots, Gen 3 to 5 Evolves
2017-03-19 09:21:03 -07:00
Kurt
9efb8f327d Merge pull request #946 from wwwwwwzx/master
Add gen4 TradeGift & TMHM Table
2017-03-19 09:14:46 -07:00
javierhimura
4252438e75 Fix honeey trees encounter species 2017-03-19 16:53:37 +01:00
javierhimura
1fd9b2d459 Ups, i forgot to add the headbutt encounters files 2017-03-19 16:45:05 +01:00
javierhimura
771cb88589 Gen 4 Honey Trees Slots 2017-03-19 16:44:36 +01:00
javierhimura
2515e5a480 Gen 4 headbutt encounters 2017-03-19 16:23:46 +01:00
javierhimura
b0fc485eb5 Replace hard coded grass type slot for the slot type parameter 2017-03-19 15:10:28 +01:00
javierhimura
cacb5fdfa0 Fix gen4 read slots, HGSS has wrong offset
G4 Extra Slots
Transform gen 3 encounter species into gen 4 species index
2017-03-19 14:38:30 +01:00
javierhimura
99d0a56cba Alt slots for gen 3, feebas and unown forms 2017-03-19 13:42:59 +01:00
javierhimura
394ef9063e Load g3 and 4 encounter slots 2017-03-19 13:37:30 +01:00
javierhimura
2cf81deed1 Load evolves 3 to 5 2017-03-19 13:33:20 +01:00
javierhimura
994a6844aa File for encounters 3 and 5 and evos 3 to 5 2017-03-19 13:29:18 +01:00
javierhimura
407e35d834 Evolutions gen 3, 4 and 5 2017-03-19 13:27:23 +01:00
javierhimura
d6a43312e7 Code for reading encounter slots from gen 3 and 4 2017-03-19 13:19:45 +01:00
wwwwwwzx
d57b51c7d9 Add GEN4 HMTM table 2017-03-19 03:14:03 -07:00
wwwwwwzx
5c82b864db Add TradeGift for Gen 4 2017-03-19 02:33:11 -07:00
Kurt
6cae7daa36 Merge pull request #945 from wwwwwwzx/master
Add EncounterStatic for DPPt
2017-03-19 00:53:31 -07:00
wwwwwwzx
c5ec85ce12 Add EncounterStatic for DPPt 2017-03-19 00:50:21 -07:00
Kurt
9b1a1661c7 Add gen5 wild encounter tables
Stuff is starting to appear legal again...
2017-03-19 00:00:15 -07:00
Kurt
99013d1214 Merge pull request #943 from wwwwwwzx/master
Update EncounterInfo for Gen4
2017-03-18 22:49:14 -07:00
wwwwwwzx
8cf563a7a5 EncounterStatic for HGSS 2017-03-18 22:00:25 -07:00
Kurt
a099d18c9c Alpha 3-5 legality checking
Incorporates files from #190
Skeleton added for future implementations; currently missing gifts,
encounter info, and the fine tuning that follows.
Basically sets up areas for future implementation... feel free to submit
pull requests filling in the EncounterStatic/EncounterTrade blocks with
the basic info. I'll probably focus on gen5->4->3 in terms of priority.

Encounter slots need to be marked up for encounter slot legality (yay
32bit RNG), and will be used for PIDIV detection too.

XD/C is not in this round of implementation. Pretty much every pkm 3-5
will show up as invalid until this round of dev is finished.
2017-03-18 16:50:34 -07:00
Kurt
d0624119ab Fix egg move gen6+ requirement for relearnmoves
Thanks TJGameplay!
2017-03-18 16:17:42 -07:00
Kurt
9106896909 Update 170318
Updates event binaries
Clear AllowGBCartEra if not gen2.

lookin at u 3-5, 4/7 over 50%! /cryptic
2017-03-17 22:27:59 -07:00
Kurt
7d77455b54 Don't set count MaxInputLength regardless of mode
Closes #941
2017-03-17 00:52:48 -07:00
Kurt
17b87f568e Refactoring
Pre 3-5 moving of useful arrays
Reduce footprint of unpackMini (was taking 88ms, now <1us)
2017-03-16 23:16:11 -07:00
Kurt
e6b2da51db Remove arceus plate 4->5
Since 4->5 now allows item transfer, remove plate when appropriate.
2017-03-16 21:22:49 -07:00
Kurt
5423390863 Misc tweaks
Remove duplicated SAV pkm set method (byte[] instead of PKM, was unused.
All it did was getPKM(decryptPKM(data)).)

Tweak Seen/Caught count expression body to use the HasPokeDex bool, as
GB(A) games did not use the PokeDex int offset. Things were simpler back
then :)

Remove unnecessary toarrays

fix 3->4 items being deleted even if they were valid
be nice and allow held item to transfer 4->5 if it can still be held

invert purification values, heart gauge is [-100,0] not [0,100]
2017-03-16 21:20:16 -07:00
Kurt
b0bbbbadac Merge pull request #940 from wwwwwwzx/master
Fix WC to PKM Converter
2017-03-16 09:17:52 -07:00
wwwwwwzx
c5cde538a6 Actual Shiny Lock Mechanics 2017-03-16 03:02:54 -07:00
wwwwwwzx
c0338dfaaf Better way to generate final IVs
- HP IV isn't fixed
2017-03-16 03:01:42 -07:00
Kurt
cf29c912be Fix gen6 typetutor order
tfw nobody noticed for so long
only keep tutors6 -- they're the same table.
2017-03-15 00:04:16 -07:00
Kurt
9da79379f8 Pokédex refactoring
Add ability to get SeenCount & CaughtCount
switch gen1/2/3 get/set to use int species (since that's all they end up
using), removes the need to create a pk6 template for setting the flag
via the dex editor.
2017-03-14 22:41:15 -07:00
Kurt
e33b5323d3 Remove heavy ball early return
Continue onward to the appropriate checks.
Closes #939
2017-03-14 21:13:39 -07:00
Kurt
b98954e20b Add stamp value fetching, fashion info
lowest 4 bits are used for something else; stamps are bits 4-18
exposes wardrobe (fashion item list) as a tuple (IsOwned, IsNew)
reduce nesting in tr7, add comment on fashion bitflag setup, inb4
someone sets it the array to 01 and crossdresses ;)
2017-03-14 00:45:14 -07:00