2018-08-03 03:11:42 +00:00
|
|
|
using System;
|
|
|
|
|
2017-09-04 02:51:29 +00:00
|
|
|
namespace PKHeX.Core
|
|
|
|
{
|
2017-10-24 06:12:58 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Rejected Encounter Data containing a reason why the encounter was rejected (not compatible).
|
|
|
|
/// </summary>
|
2018-12-30 06:24:34 +00:00
|
|
|
public sealed class EncounterRejected : IEncounterable
|
2017-09-04 02:51:29 +00:00
|
|
|
{
|
|
|
|
public readonly IEncounterable Encounter;
|
|
|
|
public readonly CheckResult Check;
|
|
|
|
public string Reason => Check.Comment;
|
|
|
|
|
|
|
|
public int Species => Encounter.Species;
|
2019-11-19 06:20:55 +00:00
|
|
|
public int Form => Encounter.Form;
|
2017-09-04 02:51:29 +00:00
|
|
|
public string Name => Encounter.Name;
|
2019-03-18 05:19:37 +00:00
|
|
|
public string LongName => Encounter.LongName;
|
2017-09-04 02:51:29 +00:00
|
|
|
public bool EggEncounter => Encounter.EggEncounter;
|
|
|
|
public int LevelMin => Encounter.LevelMin;
|
|
|
|
public int LevelMax => Encounter.LevelMax;
|
2020-05-17 19:32:28 +00:00
|
|
|
public int Generation => Encounter.Generation;
|
2020-05-20 04:46:05 +00:00
|
|
|
public GameVersion Version => Encounter.Version;
|
2020-05-20 04:07:30 +00:00
|
|
|
|
2017-09-04 02:51:29 +00:00
|
|
|
public EncounterRejected(IEncounterable encounter, CheckResult check)
|
|
|
|
{
|
|
|
|
Encounter = encounter;
|
|
|
|
Check = check;
|
|
|
|
}
|
2018-03-29 03:38:07 +00:00
|
|
|
|
2020-06-17 02:46:22 +00:00
|
|
|
public PKM ConvertToPKM(ITrainerInfo sav) => ConvertToPKM(sav, EncounterCriteria.Unrestricted);
|
|
|
|
public PKM ConvertToPKM(ITrainerInfo sav, EncounterCriteria criteria) => throw new ArgumentException($"Cannot convert an {nameof(EncounterRejected)} to PKM.");
|
2017-09-04 02:51:29 +00:00
|
|
|
}
|
|
|
|
}
|