Commit graph

2949 commits

Author SHA1 Message Date
javierhimura
a66f106aef Detect English faraway island mew and hall of origin arceus as invalid, they are unreleased events 2017-03-27 01:51:19 +02:00
javierhimura
f1d4bccb09 WasEvent included in PK4 2017-03-27 01:38:31 +02:00
javierhimura
4bb9e01ff9 Better approach of WasEgg functions
Private variable _WasEgg is only needed for pokemon from gen 2 and 3, for gen 4 return WasEgg if EggLocation > 0
A gen4 Legal.EggLocations array should be created in the future
2017-03-27 01:36:08 +02:00
javierhimura
c93acf4767 In PK6 and PK7 defer to base properties when GenNumber < 5 for WasEgg, WasTradedEgg and WasIngameTrade 2017-03-27 01:28:34 +02:00
javierhimura
ed681fa626 Crown error text 2017-03-27 01:27:10 +02:00
javierhimura
bff867ce31 Add transporter or crown location text error 2017-03-27 01:18:26 +02:00
javierhimura
8729ddf17a Add verifyEncounterG4Transfer, is similar to gen3transfer but more simple, it just add an invalid transfer to gen 5 validation and return that if is wrong and there is no other wrong encounter result 2017-03-27 01:15:24 +02:00
javierhimura
25180a32c5 Include check of invalid transfer to gen 4/5 2017-03-27 01:00:52 +02:00
javierhimura
6d8d6b7758 Ignore NonEgg Encounter for gen 3 illegal transfer unhatched eggs 2017-03-27 00:48:50 +02:00
javierhimura
7f21973038 verifyEncounterG3Transfer function
For gen 3 transfer pokemon it checks the non egg possible encounter and if the pokemon could have been hatched egg encounter
Return the result from one of the two encounters that is valid, with non egg preference but marking WasEgg a True if it can be from an egg
In verify moves both possible encounters are considered, there is no way to discart one or another
2017-03-27 00:37:56 +02:00
javierhimura
286c8524d5 Merge remote-tracking branch 'remotes/kwsch/master' 2017-03-27 00:12:12 +02:00
javierhimura
c704fe5625 If pokemon is transfer from gen 3 to 4 or latter and it can be from an egg (pokeball 4, level and met level above 5, etc) check always for an egg encounter first, if does not match egg encounter then check other encounters
When verify moves for this pokemon it here is a non egg possible encounter first check moves from that encounter and if does not match check egg encounters
Also for gen 2 unhatched eggs ignore gen 1 encounters
2017-03-27 00:11:09 +02:00
Kurt
a3408b37f1 Merge pull request #996 from javierhimura/master
Gen 3 and 4 Safari Zones and Bug Contest Encounters
2017-03-26 14:44:02 -07:00
javierhimura
98fd09b653 Gen 4 Bug Contest source link was incorrect 2017-03-26 23:21:04 +02:00
javierhimura
14a42b5dc4 Merge remote-tracking branch 'remotes/kwsch/master' 2017-03-26 23:17:39 +02:00
javierhimura
cc994c7e7d Fix for pokemon with encounters in both safari zone and bug contest 2017-03-26 23:15:17 +02:00
Kurt
d17c92c2a8 Merge pull request #995 from pokecal/pokecal-patch-2
Add controls of G7Stamp,BallThrow
2017-03-26 14:12:02 -07:00
javierhimura
406d267ba6 Fix Magikarp rockey beach safari encounter 2017-03-26 23:10:49 +02:00
javierhimura
a12979ed41 Mark G3 and G4 Safari Slots 2017-03-26 22:46:05 +02:00
javierhimura
2f2014cdde Check safari ball and sport ball legality in encounters when met location is lost 2017-03-26 22:23:57 +02:00
pokecal
dce4b839b1 Add controls of G7Stamp,BallThrow
Some function has already included in SAV7, but no controls?
Add function about BallThrow Flags.
2017-03-27 04:50:38 +09:00
javierhimura
e952b8f435 Check valid ball for Safari Zone and Bug Contest 2017-03-26 21:44:56 +02:00
javierhimura
5371a51c43 HG SS Bug Contest Encounters
Safari Zone locations
2017-03-26 21:33:32 +02:00
javierhimura
082d87f5d0 HG SS Safari Zone encounters, extracted from Bulbapedia
Commented encounters with unknown levels
2017-03-26 21:11:00 +02:00
Kurt
a1e477606e Merge pull request #993 from wwwwwwzx/master
Fix gen4 encounters reading
2017-03-26 11:08:23 -07:00
Kurt
c42355b7bf Merge branch 'master' into master 2017-03-26 11:08:05 -07:00
Kurt
5b9e390909 Merge pull request #994 from javierhimura/master
Pre relearn egg moves analysis improved
2017-03-26 11:06:16 -07:00
javierhimura
d85f2444fc Revert "The last commit was reverted because the change should not apply to base moves from was egg pokemon, unlike egg moves base level moves are not equal among all generations."
Pokemon crystal does not store egg received location like generation 3 games, that means both crystal and gold/silver should be checked for base egg moves always
2017-03-26 19:17:30 +02:00
javierhimura
d9d138d2a5 Fix getBaseGamesIsEgg, there is some cases when crystal origin can be discarted 2017-03-26 18:47:26 +02:00
javierhimura
ca63bf2e51 Names changed to avoid confusions 2017-03-26 18:45:01 +02:00
javierhimura
59750b8cfe The last commit was reverted because the change should not apply to base moves from was egg pokemon, unlike egg moves base level moves are not equal among all generations.
Also for generation 2 check if pokemon have crystal location for the was egg base moves
2017-03-26 18:42:20 +02:00
javierhimura
b950879065 Revert "There is no need to check egg moves both times for gold/silver and crystal, gold/silver egg moves is a subset of crystal egg moves, every legal combination from g/s is also a legal combination in crystal"
This reverts commit 620df347f0.
2017-03-26 18:37:17 +02:00
javierhimura
620df347f0 There is no need to check egg moves both times for gold/silver and crystal, gold/silver egg moves is a subset of crystal egg moves, every legal combination from g/s is also a legal combination in crystal 2017-03-26 18:29:50 +02:00
javierhimura
aecd3f9738 Fix error loading save from gen 2 when pokeball does not have elements 2017-03-26 18:24:02 +02:00
javierhimura
d7156f1f42 Fix smeargle check, should be after verifyMovesIsEggPreRelearn but before verifyMovesWasEggPreRelearn 2017-03-26 18:14:15 +02:00
javierhimura
c4433d4436 Missing strings from new legality errors 2017-03-26 18:06:30 +02:00
javierhimura
e9befeae3f Fix for special moves with invalid move list order
Fix for minum level for gen 3 pokemon met as egg
Temporal fix for pokemon box encounters
2017-03-26 18:05:58 +02:00
javierhimura
813e68e0d6 Reverted base egg moves deletion from parseMovesRegular when pokemon was an egg but adapted to check that moves after all the normal moves and before egg moves, also checking if base egg moves are non tradeback moves 2017-03-26 17:20:55 +02:00
javierhimura
62b6f2c98d Base egg moves are not only moves from hatched level ( 5 in gen 2 and 3, 1 in gen 4 and 5)
Included level up moves learned above hatched level that can be inherited from parents, unlike base egg moves this moves are optional
Added to eggs machine moves and crytal tutor moves, it can be inherited too
2017-03-26 17:07:36 +02:00
javierhimura
ff6b6c5026 Base Egg Moves is not needed anymore in parseMovesRegular because if the pokemon is inside an egg base moves are already checked in verifyMovesEggPreRelearn, if the pokemon was an egg base egg moves are already included in level up moves 2017-03-26 15:46:25 +02:00
javierhimura
53984c1807 Verify egg moves from gen 2 to 5 pokemon inside egg with a algorithm similar to verify relearn moves.
Egg moves should have fist the base egg moves and after that inherited egg moves, with base egg moves present if there are less that 4 egg moves.
Also for special eggs like gift and events every special moves should be present after base egg moves but should not have any egg move that are not included in the special moves list
2017-03-26 15:39:09 +02:00
javierhimura
8e703e17fb Clean FutureGenMoves for format 1 and 2 2017-03-26 15:09:41 +02:00
wwwwwwzx
53635c9450 Remove duplicated swarms table 2017-03-26 06:02:18 -07:00
wwwwwwzx
21dd24638c Fix generations category 2017-03-26 05:02:04 -07:00
wwwwwwzx
270807b04c Fix sound slots level 2017-03-26 04:14:00 -07:00
wwwwwwzx
f3fd36a9de Add Spiritomb encounter (dppt)
Bulbapedia forgot you..
2017-03-26 03:01:42 -07:00
wwwwwwzx
7ebdaf3098 Fix hgss sound slots species reading
2 bytes is enough for species ID
for hgss the species ID are stored every 2 bytes instead of 4
bytes(dppt)
2017-03-26 02:43:11 -07:00
wwwwwwzx
1edde07418 Add GameVersion compare method
Recognize game grouping in encounter tables (DP as D or P, for example)
Also for future use.
2017-03-26 02:39:13 -07:00
Kurt
6a0d824b31 Add trophy garden encounters (dppt)
Refactor addExtraTableSlots to instead combine encounter tables
slightly faster due to not repeating the where comparison and over
multiple calls

select all tables from array -> group by location -> combine slots if
many tables -> return combined array

fixes transferred 4->5 event met level check
2017-03-26 01:25:21 -07:00
Kurt
6bea46ced3 Fix bad evo tree not creating move arrays 2017-03-25 22:23:54 -07:00