mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +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
|
||||
var spec = pkm.Species;
|
||||
|
||||
if (638 <= spec && spec <= 640)
|
||||
return true; // Sub Legends
|
||||
if (722 <= spec && spec <= 730)
|
||||
return true; // Gen7 starters
|
||||
if (spec > Legal.MaxSpeciesID_8_R2)
|
||||
return false;
|
||||
if (Legal.Legends.Contains(spec))
|
||||
return false;
|
||||
var pi = (PersonalInfoSWSH)PersonalTable.SWSH[spec];
|
||||
var galarDex = pi.PokeDexIndex;
|
||||
var armorDex = pi.ArmorDexIndex;
|
||||
if (1 <= galarDex && galarDex <= 397)
|
||||
return true;
|
||||
if (1 <= armorDex && armorDex <= 210)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return pi.HP != 0; // exists in game
|
||||
}
|
||||
|
||||
private static IEnumerable<RibbonResult> GetInvalidRibbonsEvent1(PKM pkm, IEncounterable enc)
|
||||
|
|
Loading…
Reference in a new issue