Commit graph

203 commits

Author SHA1 Message Date
Kurt
df5ebd1f54 Minor clean
Resolve some messages
2020-11-11 21:01:41 -08:00
Kurt
51c872f4e1 Move more logic closer to where it's used 2020-11-02 14:46:26 -08:00
Kurt
a6b704b887 Update WC8.cs 2020-11-01 23:29:53 -08:00
Kurt
bfb9815782 Add PID generating loop for criteria nature 2020-10-18 10:00:44 -07:00
Kurt
7a01b1249c Minor clean
Handle more messages, add more xmldoc
2020-10-18 09:43:41 -07:00
Kurt
d2fed0d66c Set party stats on pkm create
Party stats are stored in box format
2020-10-05 09:04:32 -07:00
Kurt
d13b893351 Use PKHeX as blanksav language
Closes #3009

Make QRPK7 implement IEncounterable and remove hardcoded PKHeX strings
Let force hatching for WC3 eggs try to hatch from the savefile's language, then revert to english if failed to set an OT.
2020-10-04 08:59:33 -07:00
Kurt
eb6c570695 Add TSV=0 checks for WC8 home gifts
Don't match if TSV == 0
Don't assign at TSV of 0, randomize TID7 if it happens to be so.

Closes #3007
2020-09-29 23:10:48 -07:00
Kurt
6243135f28 Minor clean
Move Home8 location to Locations.cs for documentation
Move FestaFacility to correct folder
Remove unnecessary public modifier on interface method
Pass the program's Version to any loaded plugins, if they wanted to check compatibility...?
2020-09-25 23:55:31 -07:00
Kurt
af99e0b37c Revise fixed PID checks
Closes #3000
Thanks @CScorpion-h & @SciresM !
2020-09-24 19:29:01 -07:00
Kurt
2b7e06e217 Refactoring
Extract some logic, suppress some compiler messages
2020-09-18 22:11:13 -07:00
Kurt
416f5fe183 Check Winning/Victory ribbons for gen3 origin based on encounter
Closes #2990 ty @Atrius97 !

Remove the `object Content` accessor only used for Mystery Gifts (used to trickle up the PKM object since the two ribbon interfaces weren't implemented on the IEncounterable). Just make PCD/PGT implement the ribbon interfaces and delegate the get/set to PKM directly.

Rewrite the national ribbon check for clarity
Optimize invalid/missing ribbon string replace to operate on the final string rather than do linq and replace each input. With this we make 1 temp string only, rather than 1-per-ribbon.

Replace hardcoded "Ribbon" strings to use a shared const string in a central spot.
2020-09-18 16:23:17 -07:00
Kurt
e125424423 Refine zygarde encounter form checking logic
Closes #2984
ty atrius & matt via discord

Co-Authored-By: Atrius97 <39707481+Atrius97@users.noreply.github.com>
Co-Authored-By: Matt <17801814+sora10pls@users.noreply.github.com>
2020-09-13 15:45:15 -07:00
Kurt
0a6d53dc0d
Make IsHomeGift a public get property 2020-09-10 11:25:29 -07:00
Kurt
01fb233e48 Minor tweaks
Extract some interfaces
Suppress some warning messages with commented reasons if appropriate
2020-09-09 12:47:24 -07:00
Kurt
187ed9775a Use trainer details for manaphy egg if possible
https://projectpokemon.org/home/forums/topic/57790-bug-manaphy-egg-shown-illegal-wrong-egg-met-date-if-i-import-directly-the-pgt/?tab=comments#comment-260826
2020-09-06 11:34:50 -07:00
Kurt
9191f023a3 Minor clean
Nullability annotations and some logic simplification
2020-09-06 11:24:54 -07:00
Kurt
39e5c9000d Set Egg Met date for eggs rather than met date
This only applies to Manaphy
remove Nickname/Met Location set as it's handled in the SetUnhatchedEggDetails

precompute some default values
2020-09-05 13:11:16 -07:00
Kurt
6b472ffd62 Misc iencounterable->pkm generator fixes
Still some pending stuff like bad mystery gifts

gen2 static encounters on g/s applying met level and not location
gen6 ralts trade (no nickname) being flagged as nicknamed when it shouldn't
gen4 manaphy egg not having a hatch location (worked fine if you transferred it up)
gen3 antishiny gifts not setting their PIDs (jirachi WC3)
gen5 N's pkm gifts setting the wrong nature
gen3 unown not being generated correctly, cosplay pikachu being allowed form0, non-BugCatchingContest no longer require Sport ball, oras dexnav marill now uses the azurill eggmove table
2020-09-03 19:00:46 -07:00
Kurt
c2ec4d55e4 Minor clean
Add some xmldoc, remove some empty lines, move some small logic pieces to a better spot
2020-09-03 14:28:51 -07:00
Kurt
c738857010 Handle KOR Arcanine with PID=1 type
Revise some logic flow and add comments indicating why
There is no wc.Gender==3 for any gift; that's not how things are specified in GameFreak's internal tool (suspected).
2020-08-29 14:33:51 -07:00
Kurt
a62324a5a1
Refactoring some IEncounterable-type'd object initialization and original-generation evo chain (#2974) 2020-08-21 16:35:49 -07:00
Kurt
890f3375c9 Misc clean 2020-08-18 15:39:45 -07:00
Kurt
adb55c9e7b Make CanToggleGigantamax have a form argument
no more meowth-1/2 and or perrserker
Closes #2973
2020-08-16 23:06:49 -07:00
Kurt
71456d98fb Handle unhatched manaphy egg
Closes #2965
2020-08-09 20:02:28 -07:00
Kurt
b7211000b0 Split Country/Region/ConsoleRegion from ITrainerInfo
Only present in mainline gen6/7 game pairs, so it's not wise to have it for all games
2020-07-31 13:53:42 -07:00
Kurt
27f15d2f20 Split Country/Region/ConsoleRegion to interface 2020-07-31 11:17:31 -07:00
Kurt
8fae396b76 Inject matching dexlevel for form comparison 2020-07-18 13:29:16 -05:00
Kurt
5128825e78 Update WC8.cs 2020-07-18 10:46:22 -05:00
Kurt
035bac1ed3 Update WC8.cs 2020-07-18 10:27:44 -05:00
Kurt
9b14235a6c Add zeraora wc from event gallery 2020-07-17 20:40:11 -05:00
Kurt
4b881e7021
Update WC3.cs
Handle "RSE" as specified permitted version
2020-07-17 12:56:35 -05:00
Kurt
ea609d43a5 Move soup to gmax class (extension methods), fix home gmax starters
Directly accessing CanEatMaxSoup is now forbidden :)

Fixes home galar starters being flagged when gmax-final evos
2020-07-16 21:04:27 -05:00
Kurt
5d8a5ba045 Revise "Is HOME" gift check, add height/weight scalar condition 2020-07-02 17:18:36 -05:00
Kurt
0836d3191d Rewrite some magic gender value logic
it's always been a byte for ratios, but we never know; plus, it's a little more self documenting
2020-06-27 12:01:28 -05:00
Kurt
a2d9f06350 Differentiate AbilityType from AbilityNumber
invert ability index favoring so that the first ability index is most favored

ability num:
-1=>0/1/2
0=>0/1,
1=>0
2 =>1
4=>2

Ability Type:
0,1,2=>0,1,2
3=>0/1
4=>0/1/2

Should probably get rid of AbilityNumber definition usage but it's so entwined in the trade/static definitions...
2020-06-22 22:01:42 -05:00
Kurt
93308ca4ae Account for losing/gaining gmax for comparison
Don't defer for static, and don't skip for WC8

skip home gifts with player OT when SID7 not 0 (all home OTs have 6digit TID and 0 SID)
2020-06-22 21:29:21 -05:00
Kurt
645db23706 Extract EvoBase and MoveList from Core
These are really old bloated parts of the original legality checking logic; separating for now to rewrite.
2020-06-20 19:44:05 -05:00
Kurt
2cdb5d26db Clean up some method signatures
rename things to be a little more consistent in naming conventions
2020-06-16 21:46:22 -05:00
Kurt
afa368823e Minor clean
handle some compiler messages
2020-05-26 16:59:47 -07:00
Kurt
301350d32b Make IEncounterable expose IVersion get 2020-05-19 21:07:30 -07:00
Kurt
6164884700 Merge IGeneration into IEncounterable
all but egg exposed it; now, just make egg expose it and remove the unnecessary interface

we still need to Set generation for non-eggs/mgift, so have a separate Settable interface for internal purposes.
2020-05-17 12:32:28 -07:00
Kurt
913d2773bf Pass form when form doesn't match encounter
This is still a horrible hack, needs to be done similar to encounter slots

handle the galar NFE formchange cases
2020-04-23 20:53:57 -07:00
Kurt
e9406599e0 Remove more unnecessary null checks 2020-04-16 13:11:27 -07:00
Kurt
3100471299 Strip out some unnecessary logic
notnull => no need to check for null manually
2020-04-16 12:58:48 -07:00
Kurt
afeb06d3ae Allow ability 1/2 for wb7 origin 2020-03-18 22:31:27 -07:00
Kurt
3aaf318035 Update event database, handle HOME gifts horribly 2020-03-14 14:22:45 -07:00
Kurt
c4ce22412a Handle japanese name if egg
Closes #2756

For eggs that we don't know the OT of, they'll still show invalid (empty string).
ty @PrometheusG !
2020-03-13 18:37:51 -07:00
Kurt
fbd533092d Fix misspelling of the word "Received"
Closes #2757

Co-Authored-By: pi1024e <pi1024e@users.noreply.github.com>
2020-03-12 15:05:34 -07:00
Kurt
4771158194 Remove ribbon check for mew
- Data is set to give a Classic ribbon
- The classic ribbon isnt ever applied
- nor does a transferred pb7->pk8 get it

so just remove the interface and treat it as unused (cuz it is, unused.)
2020-02-20 21:43:02 -08:00