mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
fc754b346b
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces) Updates all the files, one less level of indentation. Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Encounter Slot found in <see cref="GameVersion.Gen1"/>.
|
|
/// </summary>
|
|
/// <inheritdoc cref="EncounterSlot"/>
|
|
public sealed record EncounterSlot1 : EncounterSlot, INumberedSlot
|
|
{
|
|
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)
|
|
{
|
|
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)
|
|
{
|
|
// Since we don't keep track of Yellow's Personal Data, just handle any differences here.
|
|
pk1.Catch_Rate = Species switch
|
|
{
|
|
(int) Core.Species.Kadabra => 96,
|
|
(int) Core.Species.Dragonair => 27,
|
|
_ => PersonalTable.RB[Species].CatchRate,
|
|
};
|
|
}
|
|
else
|
|
{
|
|
pk1.Catch_Rate = PersonalTable.RB[Species].CatchRate; // RB
|
|
}
|
|
}
|
|
}
|