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