mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-23 19:03:11 +00:00
2cdb5d26db
rename things to be a little more consistent in naming conventions
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Invalid Encounter Data
|
|
/// </summary>
|
|
public sealed class EncounterInvalid : IEncounterable
|
|
{
|
|
public static readonly EncounterInvalid Default = new EncounterInvalid();
|
|
|
|
public int Species { get; }
|
|
public int Form { get; }
|
|
public int LevelMin { get; }
|
|
public int LevelMax { get; }
|
|
public bool EggEncounter { get; }
|
|
public int Generation { get; }
|
|
public GameVersion Version { get; }
|
|
|
|
public string Name => "Invalid";
|
|
public string LongName => "Invalid";
|
|
|
|
private EncounterInvalid() { }
|
|
|
|
public EncounterInvalid(PKM pkm)
|
|
{
|
|
Species = pkm.Species;
|
|
Form = pkm.AltForm;
|
|
LevelMin = pkm.Met_Level;
|
|
LevelMax = pkm.CurrentLevel;
|
|
EggEncounter = pkm.WasEgg;
|
|
Generation = pkm.GenNumber;
|
|
Version = (GameVersion)pkm.Version;
|
|
}
|
|
|
|
public PKM ConvertToPKM(ITrainerInfo sav) => ConvertToPKM(sav, EncounterCriteria.Unrestricted);
|
|
public PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria) => throw new ArgumentException($"Cannot convert an {nameof(EncounterInvalid)} to PKM.");
|
|
}
|
|
}
|