2020-07-19 18:32:40 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2020-11-27 19:51:02 +00:00
|
|
|
|
/// Encounter Slot found in <see cref="GameVersion.Gen2"/>.
|
2020-07-19 18:32:40 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
2020-11-27 19:51:02 +00:00
|
|
|
|
/// Referenced Area object contains Time data which is used for <see cref="GameVersion.C"/> origin data.
|
2020-07-19 18:32:40 +00:00
|
|
|
|
/// </remarks>
|
2020-11-27 19:51:02 +00:00
|
|
|
|
/// <inheritdoc cref="EncounterSlot"/>
|
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;
|
2020-11-27 19:51:02 +00:00
|
|
|
|
public int SlotNumber { get; }
|
2020-08-21 23:35:49 +00:00
|
|
|
|
|
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-11-27 19:51:02 +00:00
|
|
|
|
pk2.Met_TimeOfDay = ((EncounterArea2)Area).Time.RandomValidTime();
|
2020-07-19 18:32:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|