PKHeX/PKHeX.Core/Game/GameStrings/LocationSet/LocationSet0.cs
Kurt 95fbf66a6e
Refactor: Gen3/4 Lead Encounters, property fixing (#4193)
In addition to the Method 1 (and other sibling PIDIV types) correlation, an encounter can only be triggered if the calls prior land on the Method {1} seed. The RNG community has dubbed these patterns as "Method J" (D/P/Pt), "Method K" (HG/SS), and "Method H" (Gen3, coined by yours truly). The basic gist of these is that they are pre-requisites, like the Shadow locks of Colosseum/XD. 

Rename/re-type a bunch of properties to get the codebase more in line with correct property names & more obvious underlying types.
2024-02-22 21:20:54 -06:00

30 lines
697 B
C#

using System;
using System.Collections.Generic;
namespace PKHeX.Core;
/// <summary>
/// Generation 2-3 specific met location name holder.
/// </summary>
/// <remarks>Single segment, no shift bias.</remarks>
public sealed record LocationSet0(string[] Met0) : ILocationSet
{
public ReadOnlySpan<string> GetLocationNames(int bankID) => bankID switch
{
0 => Met0,
_ => [],
};
public string GetLocationName(int locationID)
{
if ((uint)locationID >= Met0.Length)
return string.Empty;
return Met0[locationID];
}
public IEnumerable<(int Bank, ReadOnlyMemory<string> Names)> GetAll()
{
yield return (0, Met0);
}
}