mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Flag non-pokeball GO shedinja (evo'd from nincada)
This commit is contained in:
parent
703a641b4a
commit
824e868efe
2 changed files with 9 additions and 2 deletions
|
@ -106,6 +106,7 @@ namespace PKHeX.Core
|
|||
if (sf == default)
|
||||
yield break;
|
||||
|
||||
var species = pkm.Species;
|
||||
var ball = (Ball)pkm.Ball;
|
||||
var met = Math.Max(sf.LevelMin, pkm.Met_Level);
|
||||
EncounterSlot8GO? deferredIV = null;
|
||||
|
@ -114,7 +115,7 @@ namespace PKHeX.Core
|
|||
{
|
||||
if (!slot.IsLevelWithinRange(met))
|
||||
continue;
|
||||
if (!slot.IsBallValid(ball))
|
||||
if (!slot.IsBallValid(ball, species))
|
||||
continue;
|
||||
if (!slot.Shiny.IsValid(pkm))
|
||||
continue;
|
||||
|
|
|
@ -26,7 +26,13 @@ namespace PKHeX.Core
|
|||
/// <summary>
|
||||
/// Checks if the <seealso cref="Ball"/> is compatible with the <seealso cref="PogoType"/>.
|
||||
/// </summary>
|
||||
public bool IsBallValid(Ball ball) => Type.IsBallValid(ball);
|
||||
public bool IsBallValid(Ball ball, int currentSpecies)
|
||||
{
|
||||
// GO does not natively produce Shedinja when evolving Nincada, and thus must be evolved in future games.
|
||||
if (currentSpecies == (int)Core.Species.Shedinja && currentSpecies != Species)
|
||||
return ball == Ball.Poke;
|
||||
return Type.IsBallValid(ball);
|
||||
}
|
||||
|
||||
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue