mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Merge remote-tracking branch 'remotes/kwsch/master' into VC1withVC2tradeback
This commit is contained in:
commit
153206be6c
4 changed files with 9 additions and 10 deletions
|
@ -1024,7 +1024,7 @@ namespace PKHeX.Core
|
|||
|
||||
case EncounterEgg e when pkm.AbilityNumber == 4:
|
||||
// Hidden Abilities for some are unbreedable (male only distribution)
|
||||
if (Legal.MixedGenderBreeding.Contains(e.Species))
|
||||
if (Legal.MixedGenderBreeding.Contains(e.Species) || Legal.FixedGenderFromBiGender.Contains(e.Species))
|
||||
break; // from female
|
||||
if ((pkm.PersonalInfo.Gender & 0xFF) == 0 || Legal.Ban_BreedHidden.Contains(e.Species))
|
||||
AddLine(Severity.Invalid, V112, CheckIdentifier.Ability);
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
if (pkm is IRibbonSetCommon7 s7)
|
||||
{
|
||||
bool inhabited7 = 3 <= gen && gen <= 7 || gen == 1;
|
||||
bool inhabited7 = gen <= 7;
|
||||
var iterate = inhabited7 ? GetInvalidRibbons7Any(pkm, s7) : GetInvalidRibbonsNone(s7.RibbonBits(), s7.RibbonNames());
|
||||
foreach (var z in iterate)
|
||||
yield return z;
|
||||
|
|
|
@ -365,7 +365,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
29, // Nidoran♀
|
||||
32, // Nidoran♂
|
||||
314, // Volbeat
|
||||
313, // Volbeat
|
||||
314, // Illumise
|
||||
};
|
||||
internal static readonly HashSet<int> FixedGenderFromBiGender = new HashSet<int>
|
||||
|
|
|
@ -236,16 +236,15 @@ namespace PKHeX.Core
|
|||
/// <returns>True if it does not match any language name, False if not nicknamed</returns>
|
||||
public static bool IsNicknamedAnyLanguage(int species, string nick, int generation)
|
||||
{
|
||||
int len = SpeciesLang.Length;
|
||||
IEnumerable<int> len;
|
||||
if (generation < 3)
|
||||
len = 3;
|
||||
len = new[] {1,2,8}; // check Korean for the VC case, never possible to match string outside of this case
|
||||
else if (generation < 7)
|
||||
len = 9; // chinese (CHS/CHT) introduced in Gen7
|
||||
len = Enumerable.Range(1, 9 - 1); // chinese (CHS/CHT) introduced in Gen7
|
||||
else
|
||||
len = Enumerable.Range(1, SpeciesLang.Length - 1);
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
if (GetSpeciesNameGeneration(species, i, generation) == nick)
|
||||
return false;
|
||||
return true;
|
||||
return len.All(lang => GetSpeciesNameGeneration(species, lang, generation) != nick);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue