mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
ce5897ff94
Restrict some setters to protected only
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Generation 1 Wild Encounter Slot data
|
|
/// </summary>
|
|
public sealed class EncounterSlot1 : EncounterSlot, INumberedSlot
|
|
{
|
|
public override int Generation => 1;
|
|
public int SlotNumber { get; set; }
|
|
|
|
public EncounterSlot1(EncounterArea1 area, int species, int min, int max, int slot) : base(area)
|
|
{
|
|
Species = species;
|
|
LevelMin = min;
|
|
LevelMax = 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)
|
|
{
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|