mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Temp handling for bdsp case
This commit is contained in:
parent
f1fe2f6a8c
commit
2e20e75168
1 changed files with 25 additions and 9 deletions
|
@ -153,19 +153,35 @@ namespace PKHeX.Core
|
|||
|
||||
private static GameVersion GetIsTutor8(PKM pkm, int species, int form, bool specialTutors, int move)
|
||||
{
|
||||
var pi = (PersonalInfoSWSH)PersonalTable.SWSH.GetFormEntry(species, form);
|
||||
var type = Array.IndexOf(TypeTutor8, move);
|
||||
if (type != -1 && pi.TypeTutors[type])
|
||||
return GameVersion.Gen8;
|
||||
if (pkm.BDSP)
|
||||
{
|
||||
var pi = (PersonalInfoBDSP)PersonalTable.BDSP.GetFormEntry(species, form);
|
||||
if (!pi.IsPresentInGame)
|
||||
return NONE;
|
||||
var type = Array.IndexOf(TypeTutor8b, move);
|
||||
if (type != -1 && pi.TypeTutors[type])
|
||||
return GameVersion.BDSP;
|
||||
|
||||
if (!specialTutors)
|
||||
return NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
var pi = (PersonalInfoSWSH)PersonalTable.SWSH.GetFormEntry(species, form);
|
||||
if (!pi.IsPresentInGame)
|
||||
return NONE;
|
||||
var type = Array.IndexOf(TypeTutor8, move);
|
||||
if (type != -1 && pi.TypeTutors[type])
|
||||
return GameVersion.SWSH;
|
||||
|
||||
var tutor = Array.IndexOf(Tutors_SWSH_1, move);
|
||||
if (tutor != -1 && pi.SpecialTutors[0][tutor])
|
||||
return GameVersion.USUM;
|
||||
if (!specialTutors)
|
||||
return NONE;
|
||||
|
||||
return NONE;
|
||||
var tutor = Array.IndexOf(Tutors_SWSH_1, move);
|
||||
if (tutor != -1 && pi.SpecialTutors[0][tutor])
|
||||
return GameVersion.SWSH;
|
||||
|
||||
return NONE;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<int> GetTutorMoves(PKM pkm, int species, int form, bool specialTutors, int generation)
|
||||
|
|
Loading…
Reference in a new issue