mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Handle Ranked Battle Series 7 permissions
Closes #3070 Exclude all classified as Legends; everything else is permitted assuming it can exist in SW/SH. Co-Authored-By: Chris <28743231+Bappsack@users.noreply.github.com>
This commit is contained in:
parent
51c872f4e1
commit
c60ae57ab0
1 changed files with 5 additions and 13 deletions
|
@ -403,20 +403,12 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
// Clamp to permitted species
|
// Clamp to permitted species
|
||||||
var spec = pkm.Species;
|
var spec = pkm.Species;
|
||||||
|
if (spec > Legal.MaxSpeciesID_8_R2)
|
||||||
if (638 <= spec && spec <= 640)
|
return false;
|
||||||
return true; // Sub Legends
|
if (Legal.Legends.Contains(spec))
|
||||||
if (722 <= spec && spec <= 730)
|
return false;
|
||||||
return true; // Gen7 starters
|
|
||||||
var pi = (PersonalInfoSWSH)PersonalTable.SWSH[spec];
|
var pi = (PersonalInfoSWSH)PersonalTable.SWSH[spec];
|
||||||
var galarDex = pi.PokeDexIndex;
|
return pi.HP != 0; // exists in game
|
||||||
var armorDex = pi.ArmorDexIndex;
|
|
||||||
if (1 <= galarDex && galarDex <= 397)
|
|
||||||
return true;
|
|
||||||
if (1 <= armorDex && armorDex <= 210)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent1(PKM pkm, IEncounterable enc)
|
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent1(PKM pkm, IEncounterable enc)
|
||||||
|
|
Loading…
Reference in a new issue