Commit graph

3059 commits

Author SHA1 Message Date
Kurt
346a9c9d4f Fix evolution invalid check
inserted optional param jumped in, resulting in incorrect inputs to the
method.
Closes #1080
2017-04-20 19:51:35 -07:00
Kurt
1aa386a537 Fix GC save cloning
optional method params led to calling the wrong method, just force all
params
2017-04-20 19:38:48 -07:00
Kurt
6bd2e3b20a Update egg related legality checks for g4
#1078
unhatched -> hatched when checking a hatched egg
faraway check for Pt as well as HGSS.
2017-04-19 21:39:05 -07:00
Kurt
36515b8178 Prevent moving boxes if any team slot is in box
Closes #1079
2017-04-19 20:54:49 -07:00
Kurt
ef35055d4e Fix directory not found issue
Thanks ArcticLoveBunny!
2017-04-19 18:47:42 -07:00
Kurt
757cf11f52 Database improvements
Reduce linq usage (toarray) and just use the actual index
Implement GetHashCode for Mystery Gifts to only add unique data arrays
#1071
2017-04-19 03:15:54 -07:00
Kurt
ceaf7547ad Merge pull request #1077 from wwwwwwzx/master
Fix Japanese choonpu in gen3 string
2017-04-18 07:26:57 -07:00
wwwwwwzx
3f51e119c7 Fix Japanese choonpu in gen3 string
Fix gen3->gen4 encoded value mapping. Also replace choonpu in gen4 unicode table
with later generation format.
2017-04-18 03:30:26 -07:00
Kurt
5d9962d102 Mark SAV as unmodified upon load
Closes #1076
seems kinda lazy as I didn't bother tracking down the suspect that
modifies the save (presumably the hex seed values); those should load
correctly and not change any bytes.
2017-04-17 23:36:46 -07:00
Kurt
3fcf92c9ba Misc tweaks
add namespace using, reduce nesting slightly
no functional change
2017-04-17 23:34:02 -07:00
Kurt
0ea8e392f8 Merge pull request #1068 from pokecal/master
adds for Gen3
2017-04-17 21:15:56 -07:00
Kurt
bdd5e26adb Update gift egg ribbon checking
Closes #1074
Check ribbons for the gift, then check for all ribbons except the ones
already checked.
Refactored out the ribbonset checking methods
2017-04-17 19:11:01 -07:00
pokecal
0adbf85177 add Gen3(Em) BattleFrontiers
Controls for trainerCard icons, streaks.
2017-04-16 15:59:16 +09:00
pokecal
a4f43f2afd add Gen3 Badge
without RS
2017-04-16 15:58:07 +09:00
Kurt
50753a0d5b Merge pull request #1067 from Tsunamical/master
Update IGeneration file name
2017-04-15 18:43:45 -07:00
Tsunamical
4f4228546d Update IGeneration file name
This fixes the Linux build. Windows isn't case-sensitive like Linux, hence why those builds still went through on TeamCity.
2017-04-15 19:25:04 -04:00
Kurt
abcd541266 Add party stat calc to report window 2017-04-15 14:38:43 -07:00
Kurt
d59d9fbe6c Fix bad origin pkm base egg moves
returns null, then was called ToList => exception
changes return value to same type as other returns
2017-04-15 12:24:30 -07:00
Kurt
5f5167cbf9 Remove reflection for super training checks
Offset is constant, just interpret the raw data instead of the
properties.
speed++;

Adds check for unused super training flags.
2017-04-15 12:22:29 -07:00
Kurt
e8aaf71b4d Tuck event ribbons behind interface
Reduces amount of reflection per legality check (faster checks!), can be
expressed a little clearer now with a bool array loop comparison.

Closes #1061
2017-04-15 01:20:29 -07:00
Kurt
18fb42e86d cleanup
no functional change
2017-04-14 19:55:40 -07:00
Kurt
ecb4212ab1 Merge pull request #1065 from lilymaniac/update-ko
ko: Update strings
2017-04-14 18:24:24 -07:00
lilymaniac
8ec9279eb7 ko: Update strings 2017-04-15 10:01:39 +09:00
Kurt
6ea7293ff3 Fix party only battle form legality check
Only set box value if in box
Only check party-only if <= gen6
Closes #1060 , thanks @White-Canary !
2017-04-14 17:49:13 -07:00
Kurt
974ca70e5f Fix reflective ability bit transfer
AbilityNumber is shared between XK3/PK3/CK3 and is the only setter that
sets the ability index between the formats.
2017-04-14 16:27:21 -07:00
wwwwwwzx
06f54bb3d0 Gen3/5 Ability Check Fixes (#1056)
* Fix gen3 abiltiy legality check

Seperate Ability (AbilityBit i.e top bit of IV32) and AbilityNumber
(PID)
Fix in-game trade Electrode's ability

* Fix function deal with "encountermatch is int"

Keep encountermatch as null after UpdateEncounterInfo

* Fix gen5-7 ability check

Consider ability capsule
gen5 personal table have HA, ability_count won't work
Some simplification and avoid duplicate invalid message

* Simplify ability check

Use bool? to mark 3 states
GameVersion CXD needs more info

* Temp fix gen3 in-game trade ability check

Lickitung have 2 regular ability at gen3, there is a AbilityBit and
AbilityNumber mismatch
Guess those ingame trade have static PID

* Change abilitybit to bool and revert change

revert change in UpdateEncounterChain.
let egg encounter / null encounter choose vs.Last().Species as before

* Update Chinese legality translation strings
2017-04-14 16:24:41 -07:00
Kurt
18794c4484 Merge pull request #1064 from javierhimura/FixNationalPark
Fix Bug Contest Butterfree error reported in issue #1011
2017-04-14 16:23:25 -07:00
javierhimura
9fa2c135c6 Fix Bug Contest Butterfree error reported in issue #1011
There is in the national park a butterfree encounter as a normal wild pokemon and another with the same levels in the bug contest, that means even in format 4 it could be more than one type encounters in the list, it should be filtered
2017-04-15 00:10:19 +02:00
javierhimura
60cde3ec68 Split Breed Egg Moves improvements (#1058)
* Added method getBaseEggSpecies to get the base species when the pokemon was an egg, is needed because for format 1 pokemon with egg origin every time getBaseSpecies is called is returning the gen 1 base species obtaining invalid eggmoves and base egg moves
Also getBaseEggSpecies was using Evolves1 when format = 1 even when asking for a gen2 egg base species, returning Pikachu egg moves (empty list) instead of Pichu egg moves

* Fix ability checking for generation 3 pokemon, likea de Seadra from Issue #1011
pkm.AbilityNumber have a value assuming PID match ability like a generation 4 pokemon but the validation should be ignored if is a generation 3 pokemon with only one ability in generation 3
Also changed the validation for ingame trades with fixed abilities to check only with generation 3 abilities in the case the species has two abilities generation 3, if only one was possible any PID should be valid with the generation 3 ability
Encounter Trades
Also the check for evolution was wrong, the most evolved species is the first in the evochain, not the last

* Fix evoltuion chains for gen 3 pokemon in format 4

* Fix ability for generation 3 trades. Ability could not change if there were 2 abilities in generation 3, that means it is irrelevant if the pokemon evolved in gen 4-5, the ability number must match the encounter

* Added missing skipOption to a call to getBaseEggSpecies

* Functions to obtain moves excluvie to preevolutions, like moves that Azurill/Happiny could learn throught level up or TM but Marill/Chansey could not learn, icompatible with any Marill/Chansey egg moves
Also add functions to return egg moves and base egg moves for both possible species for split breed eggs

* Check both species from split breed egg at the same time to report moves incompatibilities

* Reduced generation 4-5 was egg game check
There is no need to check every possible generation game.
For every egg species HGSS learnset tables y egg moves table contains all the moves from the same species in DP and Pt, without any move exclusive to that games except in legendaries, and they cant breed
In generation 5 is the same with B2W2 except for Exxegutte, it have a exclusive level up move from B1W1, Psychic, but it can learn the move with TM, it wont count as an egg move

* Check incompatible split breed moves in verify relearn egg

* Fix generation 1 incompatibility moves check
SolarBeam removed from Exeggcute/Exeggutor incompatiblity, Exeggutor could learn it with a TM in generation 1
Removed Vaporeon Mist and Eevee Take Down incompatiblity, Vaporeon could learn Take Down with a TM in generation 1
2017-04-14 10:11:50 -07:00
Kurt
90754ed4d5 Merge pull request #1059 from lilymaniac/legality-ko
Add Korean legality check strings
2017-04-14 09:49:38 -07:00
lilymaniac
d751cb9ba6 Add Korean legality check strings
* Also changed some strings to official one
2017-04-15 00:40:04 +09:00
Kurt
8a8b43948b Improve visual interactivity with storage slots
* Replace the background with a frosty partially transparent image to
snap user attention to the hovered slot
* change cursor to hand symbol when over a draggable box slot
* remove duplicated resource references
* remove unused line in rtc3
2017-04-13 23:05:19 -07:00
Kurt
bbc6915114 Add RTC Editor for Gen3
FRLG doesn't have an RTC, so only permit the editor on RS & E.
2017-04-13 19:11:01 -07:00
Kurt
c395bbebc4 Cleanup
null ?? null = null
with a cxd check in the verifyAbilityGen3Transfer check, can delete the
earlier cxd check
2017-04-13 09:19:50 -07:00
javierhimura
0af983547d Fix legality issues (#1055)
* Added method getBaseEggSpecies to get the base species when the pokemon was an egg, is needed because for format 1 pokemon with egg origin every time getBaseSpecies is called is returning the gen 1 base species obtaining invalid eggmoves and base egg moves
Also getBaseEggSpecies was using Evolves1 when format = 1 even when asking for a gen2 egg base species, returning Pikachu egg moves (empty list) instead of Pichu egg moves

* Fix ability checking for generation 3 pokemon, likea de Seadra from Issue #1011
pkm.AbilityNumber have a value assuming PID match ability like a generation 4 pokemon but the validation should be ignored if is a generation 3 pokemon with only one ability in generation 3
Also changed the validation for ingame trades with fixed abilities to check only with generation 3 abilities in the case the species has two abilities generation 3, if only one was possible any PID should be valid with the generation 3 ability
Encounter Trades
Also the check for evolution was wrong, the most evolved species is the first in the evochain, not the last

* Fix evolution chains for gen 3 pokemon in format 4

* Fix ability for generation 3 trades. Ability could not change if there were 2 abilities in generation 3, that means it is irrelevant if the pokemon evolved in gen 4-5, the ability number must match the encounter
2017-04-13 08:48:13 -07:00
Kurt
2f59710eee Refactoring
use linq to simplify the operation of inserting the ticket key items to
the save file
set back the pouch to the temp sav when adding tickets instead of
waiting until the end
don't change control text (respect localization text)
2017-04-12 23:42:08 -07:00
Kurt
bb97c0ffef Update wurmple check
wurmple index was calculated incorrectly
update main form EC reroll; now that legality checking (and gen1->7) is
implemented the legality indicator will alert the user to their error
instead.
2017-04-12 21:38:53 -07:00
Kurt
552237166f Isolate japanese config from legality settings
Loading the save initially needs it specified by the program (per save
file); when a save is cloned it needs to clone the Japanese parameter

No functional change when used with PKHeX, but other applications of
Core will now function correctly. (init 1 EN save, 1 JP save -> cloned
EN became JP; this no longer happens)

SAV3 is the only save object that needs the JP bool specified... I
wonder if there's some way to reliably detect with just the SAV data...
2017-04-12 18:19:31 -07:00
Kurt
ad962712f1 Merge pull request #1054 from pokecal/master
add for gen3
2017-04-12 18:15:36 -07:00
pokecal
a336849519 add gen3(Em) FerryTicket control
Button that issue tickets may not be necessary.
2017-04-13 06:02:34 +09:00
pokecal
d49fdfbe89 fix gen3 once-saved saves
Catch a case that all BitOrder is 0. (after delete all data)
2017-04-13 04:59:50 +09:00
pokecal
ac20c0574b fix for gen3 subforms
TrainerDataEditor can now show correct OT string.
2017-04-13 04:56:30 +09:00
Kurt
1235bfe17a Simplify ability checks
Broken into smaller methods, adjusted flow. Gen5/6/7 mystery gift
ability check was typical so just use one repeatable method.

Also...
Short circuit unflagged EV check fixed; case where 255 & 248 EVs used
will trip the 508 fishy flag but does not check the Format >= 6 for the
>252 check. Fixed by arranging all the Invalid checks without an
if-else.
2017-04-11 20:55:34 -07:00
javierhimura
6a4588d676 Varios legal analysis improvements and fixes (#1051)
* Ignore Shedinja evolution moves if the encounter species was a Shedinja

* Phione and Manaphy can not inherit level up moves, they hatch only with level 1 moves

* Verify ability for generation 5 events

* Removed unused sevii isle locations for FRLG valid met location

* Verify ability for generation 3 transfer pokemon

* Ability error text

* Fix gender validation

* Cleanup

* Check egg hatch cycles are not greater than species/ gift egg encounter hatch cycles

* Fix FiredRed Charmander moveset, have 67 moves when it only learns 11 moves

* Reduced redundant condition in ability checking
2017-04-11 20:11:58 -07:00
Kurt
30706835ad Fix PGF antishiny generation and nonshiny abils
Move PID modification for ability after all other PID modification methods
Update antishiny xor to match the games
2017-04-11 14:16:28 -07:00
Kamron Batman
b3118afa3b Fixes gen 5 force-shiny generation. (#1052)
Replicates the ingame PID generation for Forced Shiny
2017-04-11 14:07:16 -07:00
Kurt
4fec00dceb Simplify some legality checks
wurmple check expanded to work for all gens, ECPID broken up into
smaller methods
silcoon/cascoon string use the specieslist to fetch localized name
2017-04-10 19:00:58 -07:00
Kurt
c45a9f0428 Transfer legality for HGSS eggs
Faraway place (3002) can be retained on transfer
2017-04-10 18:46:37 -07:00
Kurt
6378eddc62 Add volt tackle special egg move gen3-5
Gen3 only has it on emerald
2017-04-10 18:20:58 -07:00
Kurt
6b65b905cc Cleanup
no need to do unchecked operation as the sum of 0x530 bytes will never
overflow 31 bits.
capitalize Japanese
2017-04-10 16:47:08 -07:00