mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Tweak apricorn inherit legality
best to store separate tables due to reusing inherit6 in inherit7, move so that the compiler has them in the same file (doesn't cause exception)
This commit is contained in:
parent
53eb8f9f57
commit
718576393c
3 changed files with 42 additions and 31 deletions
|
@ -981,7 +981,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
if (0x10 < pkm.Ball && pkm.Ball < 0x18) // Apricorn Ball
|
||||
{
|
||||
if (Legal.getLineage(pkm).All(e => !Legal.Inherit_Apricorn.Contains(e)))
|
||||
if (Legal.getLineage(pkm).All(e => !Legal.Inherit_Apricorn6.Contains(e)))
|
||||
AddLine(Severity.Invalid, "Apricorn Ball not possible for species.", CheckIdentifier.Ball);
|
||||
if (pkm.AbilityNumber == 4)
|
||||
AddLine(Severity.Invalid, "Apricorn Ball with Hidden Ability.", CheckIdentifier.Ball);
|
||||
|
@ -1073,13 +1073,8 @@ namespace PKHeX.Core
|
|||
}
|
||||
if (0x10 < pkm.Ball && pkm.Ball < 0x18) // Apricorn Ball
|
||||
{
|
||||
if ((pkm.Species >= 731 && pkm.Species <= 785)
|
||||
|| Lineage.Any(e => Legal.PastGenAlolanNatives.Contains(e))
|
||||
|| Lineage.Any(e => Legal.PastGenAlolanScans.Contains(e))
|
||||
|| Lineage.Any(e => Legal.Inherit_Apricorn.Contains(e))) // past gen
|
||||
{
|
||||
if (Lineage.Any(e => Legal.Inherit_Apricorn7.Contains(e))) // past gen
|
||||
AddLine(Severity.Valid, "Apricorn Ball possible for species.", CheckIdentifier.Ball);
|
||||
}
|
||||
else
|
||||
AddLine(Severity.Invalid, "Apricorn Ball not possible for species.", CheckIdentifier.Ball);
|
||||
|
||||
|
|
|
@ -586,30 +586,6 @@ namespace PKHeX.Core
|
|||
|
||||
313, // Via Illumise
|
||||
};
|
||||
internal static readonly int[] Inherit_Apricorn =
|
||||
{
|
||||
010, 013, 016, 019, 021, 023, 025, 027, 029, 035, 037, 039, 041,
|
||||
043, 046, 048, 050, 052, 054, 056, 058, 060, 063, 066, 069, 072, 074, 077, 079, 083, 084, 086, 088, 090, 092,
|
||||
095, 096, 098, 102, 104, 108, 109, 111, 113, 114, 115, 116, 118, 122, 124, 125, 126, 129, 131, 143, 147, 161,
|
||||
163, 165, 167, 170, 177, 179, 183, 185, 187, 190, 191, 193, 194, 198, 200, 202, 203, 204, 206, 207, 209, 211,
|
||||
213, 214, 215, 216, 218, 220, 222, 223, 225, 226, 227, 228, 231, 234, 235, 241, 246, 261, 263, 265, 273, 276,
|
||||
278, 280, 285, 287, 293, 296, 302, 303, 307, 311, 312, 316, 322, 325, 327, 333, 340, 359, 366, 369, 370, 396,
|
||||
399, 401, 403, 406, 412, 415, 418, 420, 427, 433, 441, 455,
|
||||
|
||||
032, // Via Nidoran-F
|
||||
|
||||
440, // Via Chansey
|
||||
238, // Via Jynx
|
||||
239, // Via Electabuzz
|
||||
240, // Via Magmar
|
||||
298, // Via Marill
|
||||
360, // Via Wobbuffet
|
||||
438, // Via Sudowoodo
|
||||
439, // Via Mr. Mime
|
||||
446, // Via Snorlax
|
||||
458, // Via Mantine
|
||||
};
|
||||
|
||||
internal static readonly int[] Inherit_Safari =
|
||||
{
|
||||
016, 019, 020, 021, 022, 023, 024, 025, 027, 029, 035, 039, 041,
|
||||
|
|
|
@ -388,6 +388,46 @@ namespace PKHeX.Core
|
|||
540, // [542] Leavanny (Sewaddle)
|
||||
602, // [604] Eelektross (Tynamo)
|
||||
};
|
||||
internal static readonly int[] Inherit_Apricorn6 =
|
||||
{
|
||||
010, 013, 016, 019, 021, 023, 025, 027, 029, 035, 037, 039, 041,
|
||||
043, 046, 048, 050, 052, 054, 056, 058, 060, 063, 066, 069, 072, 074, 077, 079, 083, 084, 086, 088, 090, 092,
|
||||
095, 096, 098, 102, 104, 108, 109, 111, 113, 114, 115, 116, 118, 122, 124, 125, 126, 129, 131, 143, 147, 161,
|
||||
163, 165, 167, 170, 177, 179, 183, 185, 187, 190, 191, 193, 194, 198, 200, 202, 203, 204, 206, 207, 209, 211,
|
||||
213, 214, 215, 216, 218, 220, 222, 223, 225, 226, 227, 228, 231, 234, 235, 241, 246, 261, 263, 265, 273, 276,
|
||||
278, 280, 285, 287, 293, 296, 302, 303, 307, 311, 312, 316, 322, 325, 327, 333, 340, 359, 366, 369, 370, 396,
|
||||
399, 401, 403, 406, 412, 415, 418, 420, 427, 433, 441, 455,
|
||||
|
||||
032, // Via Nidoran-F
|
||||
|
||||
440, // Via Chansey
|
||||
238, // Via Jynx
|
||||
239, // Via Electabuzz
|
||||
240, // Via Magmar
|
||||
298, // Via Marill
|
||||
360, // Via Wobbuffet
|
||||
438, // Via Sudowoodo
|
||||
439, // Via Mr. Mime
|
||||
446, // Via Snorlax
|
||||
458, // Via Mantine
|
||||
};
|
||||
internal static readonly int[] AlolanCaptureOffspring =
|
||||
{
|
||||
010, 019, 021, 025, 027, 035, 037, 039, 046, 050,
|
||||
052, 054, 056, 058, 060, 063, 066, 072, 079, 081,
|
||||
088, 092, 096, 102, 113, 115, 120, 123, 125, 127,
|
||||
128, 129, 131, 132, 143, 147, 170, 172, 173, 174,
|
||||
185, 198, 200, 209, 212, 215, 222, 225, 227, 235,
|
||||
240, 278, 283, 296, 299, 302, 318, 320, 324, 327,
|
||||
328, 339, 349, 359, 370, 374, 422, 425, 438, 440,
|
||||
443, 446, 506, 524, 546, 551, 587, 627, 629, 661,
|
||||
703, 704, 708,
|
||||
|
||||
731, 737, 739, 741, 744, 746, 747, 751, 753, 755,
|
||||
757, 759, 761, 765, 767, 769, 771, 774, 775, 776,
|
||||
777, 778, 780, 781, 782
|
||||
};
|
||||
internal static readonly int[] Inherit_Apricorn7 = Inherit_Apricorn6.Concat(PastGenAlolanScans).Concat(AlolanCaptureOffspring).ToArray();
|
||||
internal static readonly int[] Inherit_SafariMale =
|
||||
{
|
||||
128, // Tauros
|
||||
|
|
Loading…
Reference in a new issue