2018-03-09 05:18:32 +00:00
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2020-11-27 19:51:02 +00:00
|
|
|
|
/// Encounter Slot found in <see cref="GameVersion.Gen1"/>.
|
2018-03-09 05:18:32 +00:00
|
|
|
|
/// </summary>
|
2020-11-27 19:51:02 +00:00
|
|
|
|
/// <inheritdoc cref="EncounterSlot"/>
|
2020-12-24 04:40:59 +00:00
|
|
|
|
public sealed record EncounterSlot1 : EncounterSlot, INumberedSlot
|
2018-03-09 05:18:32 +00:00
|
|
|
|
{
|
2020-08-21 23:35:49 +00:00
|
|
|
|
public override int Generation => 1;
|
2020-11-27 19:51:02 +00:00
|
|
|
|
public int SlotNumber { get; }
|
2020-08-21 23:35:49 +00:00
|
|
|
|
|
2021-01-01 18:53:05 +00:00
|
|
|
|
public EncounterSlot1(EncounterArea1 area, int species, int min, int max, int slot) : base(area, species, 0, min, max)
|
2020-07-19 18:32:40 +00:00
|
|
|
|
{
|
|
|
|
|
SlotNumber = slot;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
|
|
|
|
|
{
|
|
|
|
|
base.ApplyDetails(sav, criteria, pk);
|
|
|
|
|
|
|
|
|
|
var pk1 = (PK1)pk;
|
|
|
|
|
if (Version == GameVersion.YW)
|
|
|
|
|
{
|
2020-11-27 19:51:02 +00:00
|
|
|
|
// Since we don't keep track of Yellow's Personal Data, just handle any differences here.
|
2020-07-19 18:32:40 +00:00
|
|
|
|
pk1.Catch_Rate = Species switch
|
|
|
|
|
{
|
|
|
|
|
(int) Core.Species.Kadabra => 96,
|
|
|
|
|
(int) Core.Species.Dragonair => 27,
|
2021-08-20 20:49:20 +00:00
|
|
|
|
_ => PersonalTable.RB[Species].CatchRate,
|
2020-07-19 18:32:40 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pk1.Catch_Rate = PersonalTable.RB[Species].CatchRate; // RB
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-03-09 05:18:32 +00:00
|
|
|
|
}
|
2020-07-19 18:32:40 +00:00
|
|
|
|
}
|