mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-24 15:14:13 -05:00
Set egg form for gen5-9
Missed this in the PR gen5 needs form for basculin
This commit is contained in:
@@ -34,7 +34,7 @@ public IEnumerable<IEncounterable> GetEncounters(PKM pk, EvoCriteria[] chain, Le
|
||||
private const EntityContext Context = EntityContext.Gen5;
|
||||
private const byte EggLevel = EggStateLegality.EggMetLevel;
|
||||
|
||||
private static EncounterEgg5 CreateEggEncounter(ushort species, GameVersion version) => new(species, version);
|
||||
private static EncounterEgg5 CreateEggEncounter(ushort species, byte form, GameVersion version) => new(species, form, version);
|
||||
|
||||
private static (ushort Species, byte Form) GetBaby(EvoCriteria lowest)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public static bool TryGetEgg(ReadOnlySpan<EvoCriteria> chain, GameVersion versio
|
||||
if (!PersonalTable.B2W2.IsPresentInGame(species, form))
|
||||
return false;
|
||||
|
||||
result = CreateEggEncounter(species, version);
|
||||
result = CreateEggEncounter(species, form,version);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
public sealed record EncounterEgg5(ushort Species, GameVersion Version) : IEncounterEgg, IRandomCorrelation
|
||||
public sealed record EncounterEgg5(ushort Species, byte Form, GameVersion Version) : IEncounterEgg, IRandomCorrelation
|
||||
{
|
||||
private const ushort Location = Locations.HatchLocation5;
|
||||
|
||||
@@ -13,7 +13,6 @@ public sealed record EncounterEgg5(ushort Species, GameVersion Version) : IEncou
|
||||
public const byte Level = 1;
|
||||
public bool CanHaveVoltTackle => Species is (int)Core.Species.Pichu;
|
||||
|
||||
public byte Form => 0;
|
||||
public byte Generation => 5;
|
||||
public EntityContext Context => EntityContext.Gen5;
|
||||
public bool IsShiny => false;
|
||||
@@ -41,6 +40,7 @@ public PK5 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PK5
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)FixedBall,
|
||||
|
||||
@@ -41,6 +41,7 @@ public PK6 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PK6
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)Ball.Poke,
|
||||
|
||||
@@ -39,6 +39,7 @@ public PK7 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PK7
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)Ball.Poke,
|
||||
|
||||
@@ -36,6 +36,7 @@ public PK8 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PK8
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)Ball.Poke,
|
||||
|
||||
@@ -36,6 +36,7 @@ public PB8 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PB8
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)Ball.Poke,
|
||||
|
||||
@@ -36,6 +36,7 @@ public PK9 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
||||
var pk = new PK9
|
||||
{
|
||||
Species = Species,
|
||||
Form = Form,
|
||||
CurrentLevel = Level,
|
||||
Version = Version,
|
||||
Ball = (byte)Ball.Poke,
|
||||
|
||||
Reference in New Issue
Block a user