Commit graph

3578 commits

Author SHA1 Message Date
Kurt
4bf567c7b3 Add berryfix macro to gen3 RTC editor
arbitrary date set
2017-04-23 14:02:52 -07:00
Kurt
a9ff3aceaa Fix Navel Rock clearing issue
Closes #1090
Saving of the Battle Frontier symbols is clearing the flag

block2 ofs 0x40C = Navel Rock
block2 ofs 0x408 = symbols

bitconverter getbytes was fed an Int64 due to bit shifting ints and
uints. Forcibly cast to uint to keep only 32 bits -> intended behavior.

sneak in RNG readonly
2017-04-23 12:07:45 -07:00
Kurt
2b1bc213aa Prep for next wave of implementation
need to get a release out beforehand tho
2017-04-23 09:18:46 -07:00
Kurt
d402c1ee61 Merge pull request #1088 from javierhimura/master
Move validation for evolutions by move, and fix static typed encounters
2017-04-23 09:16:55 -07:00
Kurt
779d0a3b43 Merge pull request #1089 from pokecal/master
fix G4 Miscs
2017-04-23 08:57:56 -07:00
pokecal
748919bb71 fix G4 Miscs
for add DP stats
2017-04-23 23:55:29 +09:00
javierhimura
43eea1c93c Include MoveReminder in preevolution moves and post evolution moves 2017-04-23 16:50:36 +02:00
javierhimura
52b54c04d9 Reduced for in getValidPostEvolutionMoves 2017-04-23 16:48:23 +02:00
javierhimura
263f416edc Fix function name, this return all valid moves after evolving, not only the exclusive moves 2017-04-23 16:46:14 +02:00
javierhimura
710b126f60 Check moves for pokemon that evolved leveling up while learning a specific move, if they have 4 moves they must have at least the move that make them evolve or one move that can be learned after evolving
Fix generation 4 static encounters for those that have none encounter and those with not encounter type implemented yet
Fix comprobation of encounter type is static to include the new typed class
2017-04-23 14:54:52 +02:00
Kurt
016497bece Refactoring r2
Don't calculate suggested moves until prompted
Don't check EncounterType for gen7 pkm (no field to check)
2017-04-22 21:00:06 -07:00
Kurt
bcf1e63310 Refactoring
Simplify EncounterStatic type check as it is gen4 specific -> gen4
specific child class
Checks.cs: Move transfer legality check back to end as Gen4Result needs
to be defined (not null)
Rename EncounterType of Analysis class to avoid conflict with the
EncounterType enum
2017-04-22 13:04:12 -07:00
javierhimura
c847ef1d71 Special Eggs improvement and Generation 4 Encounter Type legal analysis (#1083)
* Ignore relearn level 2-100 moves from Phione

* Cave encounter types DPPt

* Generation 4 EncounterType filter and validation
Not every generation 4 static encounter have yet their encounter type defined, i temporally included Any to those encounters
Generation 4 roaaming static encounters have been splitted in two, grass and surf

* Added new legality texts

* Added unreleased event DP Darkai, added check for surf in jhoto route 45, is impossible
Moved unreleased DP locations to valid Platinum locations only

* Improved generation 3 special egg check.
Only check special egg if pokemon knows any of the special egg moves, also in that case do check for normal egg before special egg
because special eggs will explicitly check for normal egg moves but normal eggs will not check special egg moves, it will improve the error output

* Clean up

* Fix gen 5 pokemon from issue #1011
Those pokemon have generation 4 static gift encounters and also wild encounters, the analysis was selecting the static encounter, but if there is a valid wild encounter and the static encounter does not match the pokemon ball the willd encounter should be selected instead
Also move the transfer legality to check it before the static encounters and make that check to work like generation 3 transfer legality

* Another fix for Issue 1011, suppress temporally OT and pokemon name analysis for generations 3 to 5 instead of format 3 to 5, there is no data stored yet to make those analysis

* Do not make wild encounters prevail static encounter if the pokemon was an egg

* Changed type of WildEncounter variable to EncounterSlot[]

* Fix Jhoto Route 45 to avoid return error with fishing encounters
2017-04-22 11:49:49 -07:00
Kurt
45066be82b Merge pull request #1084 from pokecal/master
add G4 BattleFrontier controls
2017-04-22 08:04:24 -07:00
pokecal
c2f1fb4df6 add G4 BattleFrontier controls
Editable many values. It seems a batch button needs,
but little demand, I have not made it.
2017-04-22 21:40:02 +09:00
Kurt
298691a94e Fix frlg wish egg legality checks
Add the second special move to the movepool
Closes #1069
2017-04-21 23:01:09 -07:00
Kurt
5bf14642e5 Expand logging for invalid batch edits
Closes #1003
If the pkm has a bad checksum/sanity or is in a locked slot, it never
incremented the counter. Just increment the counter anyway and write the
msg to console.
2017-04-20 21:04:51 -07:00
Kurt
5c96066b13 Slightly speed up database scrolling
no linq operations
still sluggish due to generating the sprites multiple times (not cached)
#1071
2017-04-20 20:52:08 -07:00
Kurt
0506359c41 Fix pk3 marking overflow issue
Closes #1062
Closes #1047
For those affected, use the batch editor to edit MarkValue from 255 to
0.

=MarkValue=255
.MarkValue=0
2017-04-20 20:37:08 -07:00
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