Commit graph

2642 commits

Author SHA1 Message Date
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
Kurt
ac1311b432 Tapu Fini
"there's 5" -> only 4 in array. ok me
wish github gui had ez amend, too lazy to cmd
2017-03-13 18:41:32 -07:00
Kurt
f8cf53da3b Misc heavy ball tweak/fix
Legends weren't in inherit table (no breeding)
Move lineage fetch into check so that it is not calculated & unused for
other pkms
Instead of iterating over inherit table, just use a precomputed list

only 5 possible encounters are stored in the int[], there's more cases
where heavy ball is invalid but there's no possible encounter for them
which would already be flagged by another check.
2017-03-13 18:38:56 -07:00
Michael Scire
6913567a75 Fix heavy ball code. 2017-03-13 12:28:39 -07:00
Michael Scire
9b4d6618c3 Heavy ball legality checks. 2017-03-13 12:12:55 -07:00
Kurt
e5c516e828 Properly hide joyful tab
Now populates for emerald saves
2017-03-13 09:10:50 -07:00
Kaphotics
a3e62f6344 Merge pull request #938 from pokecal/pokecal-patch-4
tip for stats,value about Refresh,small fix.
2017-03-13 09:01:20 -07:00
ReignOfComputer
b7a5a861bc Fix Dump Boxes Naming (#937)
Off-by-one error.
2017-03-13 09:00:41 -07:00
pokecal
e5f10fe65e new value about pokeRefresh 2017-03-13 17:22:27 +09:00
pokecal
1e4c4b8f53 add tooltip for stats
tip for stats name(show long name), stats value(seconds, show how long it means)
2017-03-13 17:21:08 +09:00
pokecal
5cf36df360 Fix inBox
include 0
2017-03-13 17:20:48 +09:00
Kurt
cc5b065a39 Force validation when exporting data
Apply same logic to PKM exporting; the existing setup was manually
triggering validation by changing focus; now just call the
ValidateChildren method on the form.

Closes #936
Thanks @Storm-Eagle20 !
2017-03-12 17:01:48 -07:00
Kurt
fe66a65464 Misc updates
Closes #860 by adding in prompt for Gen1 saves to determine if the save
originated from VC. Will disable Gen2 legality sources when checking pk1
files.

--

Fixes froslass/gallade evolution tree pruning movesets. For whatever
reason, the level argument of the Evolution is not 0 when using the
item; I manually edited the evos_sm.pkl binary to set the 2 evolutions
from [XX] -> 00.

Fixes gen1 ingame trades slipping through the getEncounter12 preference.
Gen2 has set TIDs, so check if TID is set.

Loosens checks for Gen7 trades (including prior transfers) as trading
between games clears the memory.

Add 3 more g7 trainer stat records too.

Thanks Holla!

--

Add getMoves(100) optimization as gen7 learnsets can grab 1->100, better
than looping over the range every time it's checked.
2017-03-12 16:36:23 -07:00
Kurt
afd2c58aa2 Update 170311
Update g7 event binaries
2017-03-11 12:29:22 -08:00
Kurt
d4c70b760c Enhance record setting
Use actual max record type
65535 is unused (no type=4), there's one 6 hidden in there 👍

I noticed there's some copying to Festa stats going on (see
Savedata::AddRecord)

6 "Pokemon Caught"
8 "Eggs Hatched"
33 "Trades at the GTS"

100 "Champion Title Defense"

173 "Bubbling Spot Encounters/Items"

175
176
177
182
183

Looks like the setter increments data over at the Festa block if the
active Mission is the recordID.
2017-03-11 10:52:18 -08:00
Kurt
ff2dc1356b Add more g7 trainer stats
A little bit of clarification provided for some
Thanks tastymeatball!
2017-03-11 10:40:55 -08:00
Kurt
9180f32032 Remap spanish language ID for GameCube games
Rather than re-mapping the other pkm format language IDs, just make GC
games conform to the main series for uniform handling.
Closes #935
Thanks @javierhimura!
2017-03-11 10:40:21 -08:00
Kurt
bcbebf73ff Refactor qr server fetch & add notification 2017-03-10 20:35:18 -08:00
Kurt
08a7f818f2 Add 8 more g7 trainer stat records
Thanks tastymeatball & Holla!
2017-03-10 17:50:57 -08:00
sora10pls
cbfbad2f54 Fix Zygarde 10%-C legality check (#934)
Zygarde with Gen 6 origin can only be 50% or 50%-C, cannot make 10% or 10%-C without disassembling -- thus giving it Gen 7 origin.
2017-03-10 14:45:09 -08:00
Kaphotics
6f19f7dfac Fix alolan offspring table
Grubbin not Charjabug is the offspring of Vikavolt
2017-03-10 11:12:19 -08:00
Kurt
efd25a2c7c Add gen1->gen7 IV legality check
Also fix gen1/2 evo tree trimming error, thanks BeyondTheHorizon!
Also fix an exception when no static encounter can be generated for
1->7, match is now generated by checking gen1 and reusing the static
encounter creation info (now moved to core).
2017-03-09 20:27:03 -08:00
Kurt
0715f133d2 Add misc info editor for gen3
Closes #193
If there's more offsets found, this would be the place to edit oddball
stats.

Also threw in BP/Coin (& Rival Name FRLG only) editing.
2017-03-09 19:38:57 -08:00
Kurt
5887f1be6f Detect ability capsule usage on mystery gifts
Closes #932
2017-03-09 17:19:36 -08:00
Kaphotics
951711c45b Fix gen3 flag offsets for e/frlg
Were accidentally swapped; fix the underlying cause by reordering to show RS/E/FRLG instead of RS/FRLG/E, because that's how everyone refers to the games (RSE & FRLG).

#927
2017-03-09 11:12:57 -08:00
ReignOfComputer
ad8f661863 Add PanelScroll Value Check (#931)
Prevents ArgumentOutOfRangeException.
2017-03-08 23:32:52 -08:00
ReignOfComputer
13aa01ff99 Check for Null Event Constant Difference before Clipboard Export (#930)
Prevents ArgumentNullException.
2017-03-08 23:31:22 -08:00
Kurt
e9ea53ef8c Move wallpaper red check to BoxWallpaper
Add gen3-5 wallpaper checks
Rearrange and simplify general sprite layering logic to reduce some
comparisons
2017-03-08 21:50:34 -08:00
pokecal
6da4b3d41c Fix, stop using alt-ShinyIcon outside the box (#929)
with no filter for slot value, the alt-icon will be used for PKM-QR icon, team, and others.
2017-03-08 14:59:07 -08:00
pokecal
57c9b78108 replace RareIcon when wallpaper is red (#928)
* use alt-redstar when wall is red

* add rare_icon_alt

* add rare_icon_alt

* Add files via upload
2017-03-08 08:46:25 -08:00
Kurt
0a1a30eb5a Update 170308
Tweak batch editor behavior to show Any first (used by any pk* type),
sort alphabetically too. Highlights the propertytype text if the
property is not present for the type.
2017-03-08 00:16:34 -08:00
Kurt
baac850409 Gen4 dex fixes
Fix form1 offset for getter
move formNames into check (only fetch if forms exist for the dex
entries)
Add all forms to seen side when seen is toggled (behaves like gender)
2017-03-07 23:52:47 -08:00
Kurt
ea47d958ca Misc tweaks
Fix exceptions / insufficient behavior in pokedex4
change gen2 tutor name to be consistent with other gen variable names
replace gen2 trade checkresult with nothing as all properties are
already checked.
2017-03-07 23:41:05 -08:00
Kurt
a6b0e70577 Gen2 legality updates
Add the rest of the encounter tables (besides johto land, ha). Method
immediatley hopped out as the while-loop break never incremented the
read offset.
Add preference ranking for the gen1/gen2 encounters to better pick the
best match.
Add GSC move tutors (3 tutor bits are immediately after the TMHMs).
Special handling for gen1 encountertrades to pre-verify the OT name in
the event that a possible gen2 encounter exists.
2017-03-07 23:13:46 -08:00
Kurt
4874c174d8 Add gen4 pokedex editor
Fixes the setDex implementation for gen4
why u have to be so weird gen4
hgss has 0x1C extra form flags in the first form array... unused?
2017-03-06 22:43:46 -08:00
Kaphotics
3aa772bf22 Merge pull request #924 from kamronbatman/fixed_gen3_eggs
Fixes gen 3 egg name and language.
2017-03-06 22:11:03 -08:00
Kamron Batman
582c8a96bc Fixes gen 3 egg name and language. 2017-03-06 21:59:37 -08:00