2020-07-19 18:32:40 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Generation 2 Wild Encounter Slot data
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Contains Time data which is present in <see cref="GameVersion.C"/> origin data.
|
|
|
|
|
/// </remarks>
|
2020-08-21 23:35:49 +00:00
|
|
|
|
public sealed class EncounterSlot2 : EncounterSlot, INumberedSlot
|
2020-07-19 18:32:40 +00:00
|
|
|
|
{
|
2020-08-21 23:35:49 +00:00
|
|
|
|
public override int Generation => 2;
|
|
|
|
|
public int SlotNumber { get; set; }
|
|
|
|
|
|
2020-08-30 18:08:21 +00:00
|
|
|
|
public EncounterSlot2(EncounterArea2 area, int species, int min, int max, int slot) : base(area)
|
2020-07-19 18:32:40 +00:00
|
|
|
|
{
|
|
|
|
|
Species = species;
|
|
|
|
|
LevelMin = min;
|
|
|
|
|
LevelMax = max;
|
|
|
|
|
SlotNumber = slot;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
|
|
|
|
|
{
|
|
|
|
|
base.ApplyDetails(sav, criteria, pk);
|
|
|
|
|
|
|
|
|
|
var pk2 = (PK2)pk;
|
|
|
|
|
if (Version == GameVersion.C)
|
2020-08-30 17:23:22 +00:00
|
|
|
|
pk2.Met_TimeOfDay = ((EncounterArea2)Area!).Time.RandomValidTime();
|
2020-07-19 18:32:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|