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;
|
2022-03-07 06:47:03 +00:00
|
|
|
|
public byte SlotNumber { get; }
|
2022-01-06 00:46:23 +00:00
|
|
|
|
public override Ball FixedBall => Ball.Poke;
|
2020-08-21 23:35:49 +00:00
|
|
|
|
|
2022-03-07 07:25:47 +00:00
|
|
|
|
public EncounterSlot1(EncounterArea1 area, byte species, byte min, byte max, byte 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
|
|
|
|
}
|