Commit graph

3163 commits

Author SHA1 Message Date
Kurt
db642a257b Remove unnecessary Dragonite encounter
Thunderpunch is tutorable to Dragonite in B2W2; slightly reduces the
amount of comparisons by yielding the more generous encounter first.

Sprakling -> Sparkling comment typo fixed
2017-04-03 20:07:03 -07:00
wwwwwwzx
015bdc606b Misc gen4 legality checking fixes (#1025)
* Fix hgss safari zone encounters

* Add fishing slots at night (hgss)

* Fix Japanese Special Character (gen 4)

* Add gen4 ball with HA legality checking (gen7)

Males can pass the ball with HA females ONLY when they have the same
pokedex number

* Add safari ball with HA checking (gen7)

* Fix ball legality checking for shedninja

Poke Ball only

* Map Unicode Chinese characters to in-game chars

Chinese species names in sun/moon were remapped by GF.

* Add nickname legality check for east asia language

Can not give Chinese or Japanese kanji nickname to pkm.

* Remove hiding nickname textbox for chs/cht

Since remapping and legality checking are implemented, There will be no
strange character or misunderstanding.
2017-04-03 20:02:40 -07:00
javierhimura
71d452a9c3 Static encounter refactor to return a list for pokemon with multiple statics but different moves (#1023)
* Refactor getValidStaticEncounter to return a list instead only one encounter, for those encounters with the same data except moves like Dream World Dragonite
The treatment of the encounters is similar to the list of mystery gift encounters
parseMovesIsEggPreRelearn change to use only the split breed species equal to the egg species
Remove EventEggMoves array for parseMovesRelearn function, that array is only used for gen2-3 encounters that can be normal eggs or special eggs, gen 4-7 event eggs have the event moves in the SpecialMoves array

* Add optional paramter to the methods for getting evolution tree to use for gen 1 and 2 encounters, when searching for a gen 2 encounter maxSpecies should use gen 2 max and for gen 1 encounters gen 1 max species no matter in what format is the pkm
Also changed the ordenation of encounters by min species to use the less evolution form including generation 2 pre evolutions, for example for a gen 2 Hitmonlee whose static encounter could be gen 2 Tyrogue gift

* Added the same maxspeciesorigin criteria for wild encounters

* Fix memory card restore backup

* Fixed some other parseMoves function where staticencounter was not changed to staticencounter list
Separate VC Events for GB Era Events, VC Events was filter out for valid static encounters if was selected not allow GBCartEra exclusive encounters

* Fix getValidPreEvolutions
2017-04-03 19:59:29 -07:00
Kamron Batman
0d65973421 Fixes obedience flag to fateful encounter flag for palparking. (#1024) 2017-04-02 17:23:54 -07:00
Kurt
65fab7542e Cap coins/bp for gen3
Closes #1022
2017-04-02 14:08:11 -07:00
Kurt
3ae6256459 Refactoring
Adds game selection subform for RSEFRLG/Memcard game selection
Backs up entire memory card instead of just gci when loading from
memcard
Reduce string usage (easier dialog translation if that ever happens)

Does the memory card store date last saved? Could be used to autodetect
the last saved game and load directly instead of selecting.
2017-04-02 13:42:42 -07:00
Kurt
a8ce39d310 Fix button anchors for event flag editor
Form can't be widened anyway; maybe in the future.
2017-04-02 11:34:37 -07:00
Kurt
e9c4b0bcb9 Merge pull request #1021 from javierhimura/master
Load GC Memory Card files and some fixes
2017-04-02 11:23:19 -07:00
javierhimura
b95bfdaba0 Specify in the readme that only MC containing Pokémon savefiles are valid 2017-04-02 18:47:18 +02:00
javierhimura
ab67bf0d60 Split memory card files extension for bin and raw files.
Raw is the extension used by Dolphin and Bin is used by Wii Devolution, both have the exact internal format and size
2017-04-02 17:36:50 +02:00
javierhimura
f22dc2cf9f Update readme file with memory card extension 2017-04-02 17:18:44 +02:00
javierhimura
8655976d0f Merge branch 'master' into kwsch 2017-04-02 17:17:42 +02:00
javierhimura
9c003f1b51 Fix for legallity of Pokemon Box encounters to be included with gen 3 games static tables for every games.
Also split gbcartera game versions into gen 1 events, gen 2 events, stadium and stadium2, leaving GBCartEraOnly as a group of games.
Added Stadium 2 gift pokemon
2017-04-02 17:16:53 +02:00
javierhimura
699dadcccb The UI was checking wrong if a pokemon is shadow or purified
The internal data of GC games for purification for shadow pokemon does not have values from 0-non shadow to 100-total shadow, it have values sarting from the initial shadow hearth gauge to 0-non shadow.
2017-04-02 17:10:40 +02:00
javierhimura
b53a101f20 Fix for XD. XF files testes from inside a memory card only return true in getIsG3XDSAV if ignore the second pass in the for, only the first is equal to the sequence 2017-04-02 16:54:53 +02:00
javierhimura
a38e923e83 Load pokemon savegames directly from gamecube memory card files. This files can be saved again in the same memory card file or exported as a gci file with only the savegame.
Do not allow to resize memory cards nor create a new memory card from a gci files
If the MC contains multiple save files the program ask the user what game he want to edit
2017-04-02 16:53:46 +02:00
wwwwwwzx
ef7ca4f65c Misc legality checks (gen5-7) (#1020)
* Add Flabebe and Pumkaboo altform HA legality check

Fix issue #999
The derived value SpecForm can use for other legality checks

* Add N's pkm and Hidden Grotto shiny legality checks

-fix early return in verifyMisc
-add N's pkm legality check: IVs, OT Name, TID, SID, Shiny
-add Hidden Grotto shiny check

* Fix spelling

* More edge cases for gen6 ball checks

Ban several altform hidden ability with gen3 ball

* Fix gen4 Formcount for altform

Manually fix several bytes (http://i.imgur.com/l0Amuto.png)
2017-04-02 06:39:39 -07:00
Kurt
32b2abf7a9 Update lock capsule legality check
Met locations are modified after performing the event in gen5, resulting
in 2 locations
defer the PCD met location check to this PokéTransfer/Lock Capsule check
2017-04-01 14:38:50 -07:00
Kurt
7052968b58 Fix deoxys handling on gen6+
WasEvent was not yielding true for a past gen specimen as the deoxys
exclusion for ORAS was present. Remove and change handling.
2017-04-01 14:20:00 -07:00
Kurt
500613f98d Fix mystery gift edge cases
Per IRC discussion
2017-04-01 13:54:04 -07:00
Kurt
f00388c4ca Fix 5->6 dropping CNT_Sheen 2017-04-01 13:53:29 -07:00
Kurt
d54bb72d59 Temp fix egg detection
Egg location should be used to detect if it was an egg; encounter
matching should determine if it is a StaticEncounter gift.
2017-04-01 13:02:37 -07:00
Kurt
d800ffdf97 refactoring
Reduce nesting a little
2017-04-01 11:32:59 -07:00
javierhimura
f0e6e96435 parseMoves functions improvement (#1018)
* Add egg locations and gits egg locations for gen 4 and 5
Add WasGiftEgg property and diferenciate from WasEventEgg

* Separate parseMoves Pre Relearn and Post Relearn generations
Separte parseMoves Pre Relearn egg-encounter for non-egg encounters, a gen3 pokemon can be both
Post Relearn IsEgg pokemon should have all moves as relearn moves
parseMovesSketch should not be used for Smeargle inside an egg
WasGiftEgg should not have egg moves

* Fix WasEgg and WasEventEgg functions for Manaphy

* Add gen 5 trade egg location
Check for generation 3 IsEgg if is a gift egg or an event egg that there is a valid encounter for the egg

* Move parseMovesGetGift bellow WasEggPreRelearn. WasEggPreRelearn is already checking for gift encounters, some generation 3 pokemon could be both an egg or an event encounter

* Check for gift egg without valid encounter in verifyEncounterEgg

* Check WasEventEgg without encounter in verifyEncounterEgg
2017-04-01 09:45:13 -07:00
Kurt
7051c42078 Sync missing file
oops
2017-03-31 18:53:30 -07:00
Kurt
05c0a0bdb5 Filter GB Era only encounters if not allowed
All are encounter statics which were identified by GameVersion.SPECIAL;
rename enum value for clearer meaning and prevent these from matching if
not allowed.
2017-03-31 18:49:13 -07:00
Kurt
a1153f1004 Misc simplifications
Segregate gen4 transfer legality check from encounter detection
reorder EncounterSlot[] match test to be before EncounterStatic. Closes
#1016
Fix manaphy gift handling
2017-03-31 18:35:43 -07:00
javierhimura
f0fc473a7e Shedinja evolution moves and some egg fixes (#1015)
* Add getMoves function with min level and max level, usefull for shedjina evolves moves (min level 20) and generation 1 moves ( no move reminder, min level is min encounter level + 1)

Also for gen1 encounters another function should be created to get by the encounter level the four moves that the pokemon learn by default, the last four in its movepool up until the encounter level

* getShedinjaEvolveMoves, function that return the moves that shedinja could learn from Ninjask move pool at the moment when Nincada evolves, in the same format that getValidMovesAllGens

* Add validation in parse moves for shedinja evolve moves.
Shedinja could have any gen3/4 moves from Ninjas learnset but only one is allowed

* Shedinja evolve moves text resources

* Fix egg moves pre-gen 6 validation:
Add skipoption variable to getEggMoves function from pre-gen6 games, to verify egg moves from split breed species
Flag illegal combinations of base egg moves and special egg moves
Return crystal egg moves for gen2 pokemon that can be tradeback to gen 1 games

* Fix for mix between event egg moves and base egg moves

* Changes just to make if there is only shedinja evolve move that is also the only base egg move change it from base egg move to evolve move, to avoid flag illegal if also the pokemon have a special egg move

* Revert "Changes just to make if there is only shedinja evolve move that is also the only base egg move change it from base egg move to evolve move, to avoid flag illegal if also the pokemon have a special egg move"

Revert the last change, i search in bulbapedia an there wasn't any nincada distributed with special moves in generation 3 nor 4, making this complicated validation unnecessary

This reverts commit 57f5ac1bbb.

* Fix error
2017-03-31 17:40:30 -07:00
Kurt
5b204dfff6 Misc simplifications
only species outside of the NohatchFromEgg is manaphy; if it's a
recognized encounter it's okay. Safer to check generally than having to
update explicitly if there's a mew egg (lol)
remove HGSS check for BugContest, simpler to express as cant be
BugContest without HGSS anyway (implied)

pull out strings from trainer7 (localization cantidate), identify common
operations (getBits from ListBox), use |= instead of +=
2017-03-31 01:12:49 -07:00
Kurt
b3c5752476 Cleanup
refactor out the encounter trade screening; fixes the IV check loop (the
continue continued the for loop not the foreach).
Similar approach can be applied later for the encounterstatic checks if
it is to be converted to ienumerable (in which a secondary screen may be
necessary)
2017-03-31 00:04:29 -07:00
Kurt
5011ddca1b Merge pull request #1013 from javierhimura/master
Safari ball and sport ball checking
2017-03-30 23:29:47 -07:00
javierhimura
fcaa2d8b18 Revert unnecessary change 2017-03-31 00:14:52 +02:00
Kurt
1366e767b4 Merge pull request #1014 from pokecal/pokecal-patch-2
Add Gen7 Mega unlock
2017-03-30 14:39:20 -07:00
javierhimura
e93ebf838e Fix species in slots time replace for DPPt 2017-03-30 22:25:08 +02:00
javierhimura
9bac13ced9 Fix deoxys forms to get moves in gen3 format, there is no format info for deoxys in the gen 3 personal tables because deoxys have only 1 form available per game 2017-03-30 21:34:48 +02:00
javierhimura
78216a3b89 Fix for deoxys encounter, also was needed for any other gen 3 transfer encounters.
EncounterMatch was being overwritten, returns for gen3 the last valid encounter found
2017-03-30 21:13:38 +02:00
javierhimura
ab2d18eb8a Fix for Manaphy Egg Gen 4 event encounter
- changed trade egg location in mystery gift search
- adapted getMinLevelEncounter to take into account gen 4 eggs in gen 4 games
- remvoed manaphy for static encounters, is already included in event database
- fix no hatching for an egg check for gen 4 manaphy
2017-03-30 20:58:30 +02:00
pokecal
2f149a539d Add Gen7 Mega unlock
This checkbox just unlock the MegaButton in battle.
I have tested wildPokemon battle, not checked about InternetBattle.
2017-03-31 03:21:05 +09:00
javierhimura
70b3b22ab5 Correction in the comments 2017-03-30 13:24:38 +02:00
javierhimura
9bc7ee40d6 Safari ball and sport ball checking 2017-03-30 13:18:05 +02:00
Kurt
a692382ed2 Merge pull request #1012 from wwwwwwzx/master
General gen5 fixes
2017-03-30 00:34:00 -07:00
wwwwwwzx
dc079050c4 General gen5 fixes
- begin to impl ball checking
- add white forest for white (move greatmarshalt to table4)
- fix several datapoints
- fix ability from dream world
- add in-game version filtering
2017-03-29 23:31:02 -07:00
Kurt
288aee8c3b performance tweak
only do the flicker hack if the combobox is actually visible
delay form appearing until initial files are loaded
2017-03-29 22:23:18 -07:00
Kurt
f2c072bc8a Fix gen2 slot set
Fixes #1007
Closes #1008 with a slightly different implementation of the validation
check; other fixes for legality incorporated. Thanks @javierhimura !

Note for the Electrode encounter: both PIDIVs should be method 1 (not
J/K) thus only one is kept in the array.
2017-03-29 17:43:17 -07:00
Kurt
7feb5a8451 Add Pickup item record
This only applies to Pickup/honey gather ability procs

179 is incremented if some value is >10000, which is immediately after
photos rated (119)
184 is incremented if GetSelectRankRoyal == 3 (after 159 and 137)

other pairs: 5,137

eh just check Savedata::IncRecord usages
2017-03-29 00:58:19 -07:00
ReignOfComputer
d6f9ad9bf8 Unban Pidgeotite and Steelixite (#1009)
Stones have been released.
2017-03-29 00:48:56 -07:00
wwwwwwzx
c2f225b523 Two minor fixes (#1006)
* Fix ingame trade legality check

- fix early return
- fix locations of the same name "a link trade", otherwise
metlocation=30001 in sm be recogized as 30002

* Fix wc7 to pkm for event egg

Nickname should be added

* Fix gen4 in-game trade

- fix ivs order
- use default met location to compact table

* Support multiple ingame trade filtering

Fix Steelix glitch, fix some table data, thanks to RoCs' PC

* Minor improvement

As suggested

* Fix gen5 in-game trade

- skip gender checks if set to default
- fix in-game trade metloaction for gen5
- fix ivs order
2017-03-29 00:48:31 -07:00
ReignOfComputer
1e8e8bbb8e General Fixes (#1005)
* Fix FRLG Viapois Chamber Location

* Gen 3 In-game Trade Fixes

3rd Gen Trades still need changes to verifyNicknameTrade to work though.
Temporarily suppressed the legality warning. It seems Bulbapedia may
have some mistakes?

* Fix Squirtle Gift in HGSS
2017-03-28 02:02:46 -07:00
Kurt
0aa2149ca6 Merge pull request #1004 from javierhimura/master
Fix gen 3 level up moves and add some missing g3/4 encounters
2017-03-27 14:29:29 -07:00
javierhimura
c70d690e9a Return fr/lg level up moves for gen 3 pokemon 2017-03-27 23:11:16 +02:00