PKHeX/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic5DR.cs
Kurt fc754b346b
File scoped namespaces (#3529)
[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`
2022-06-18 11:04:24 -07:00

29 lines
828 B
C#

namespace PKHeX.Core;
/// <summary>
/// Generation 5 Dream Radar gift encounters
/// </summary>
/// <inheritdoc cref="EncounterStatic"/>
public sealed record EncounterStatic5DR : EncounterStatic5
{
public EncounterStatic5DR(int species, int form, AbilityPermission ability = AbilityPermission.OnlyHidden) : base(GameVersion.B2W2)
{
Species = species;
Form = form;
Ability = ability;
Location = 30015;
Gift = true;
Ball = 25;
Level = 5; // to 40
Shiny = Shiny.Never;
}
protected override bool IsMatchLevel(PKM pk, EvoCriteria evo)
{
// Level from 5->40 depends on the number of badges
var met = pk.Met_Level;
if (met % 5 != 0)
return false;
return (uint) (met - 5) <= 35; // 5 <= x <= 40
}
}