mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Add DebutGeneration get
https://projectpokemon.org/home/forums/topic/43378-generation-search-in-pkmdb-andor-batch-editor/ (less than) < and (greater than) > not currently supported (no plan to add, would need to rewrite value eval logic)
This commit is contained in:
parent
4f489a720f
commit
c751c987a9
|
|
@ -1106,6 +1106,26 @@ internal static IEnumerable<int> GetFutureGenEvolutions(int generation)
|
|||
default: return Enumerable.Empty<int>();
|
||||
}
|
||||
}
|
||||
internal static int GetDebutGeneration(int species)
|
||||
{
|
||||
if (species <= 0)
|
||||
return 0;
|
||||
if (species <= MaxSpeciesID_1)
|
||||
return 1;
|
||||
if (species <= MaxSpeciesID_2)
|
||||
return 2;
|
||||
if (species <= MaxSpeciesID_3)
|
||||
return 3;
|
||||
if (species <= MaxSpeciesID_4)
|
||||
return 4;
|
||||
if (species <= MaxSpeciesID_5)
|
||||
return 5;
|
||||
if (species <= MaxSpeciesID_6)
|
||||
return 6;
|
||||
if (species <= MaxSpeciesID_7_USUM)
|
||||
return 7;
|
||||
return -1;
|
||||
}
|
||||
|
||||
internal static int GetMaxLanguageID(int generation)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -321,8 +321,9 @@ public int GenNumber
|
|||
if (VC1) return 1;
|
||||
if (VC2) return 2;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
public int DebutGeneration => Legal.GetDebutGeneration(Species);
|
||||
public bool PKRS_Infected => PKRS_Strain > 0;
|
||||
public bool PKRS_Cured => PKRS_Days == 0 && PKRS_Strain > 0;
|
||||
public virtual bool ChecksumValid => Checksum == CalculateChecksum();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user