PKHeX/PKHeX.Core/Legality/Encounters/EncounterStatic/EncounterStatic6.cs

40 lines
1.2 KiB
C#
Raw Normal View History

2021-01-01 20:21:46 +00:00
namespace PKHeX.Core
2020-08-22 18:59:43 +00:00
{
/// <summary>
/// Generation 6 Static Encounter
/// </summary>
/// <inheritdoc cref="EncounterStatic"/>
2021-01-01 20:21:46 +00:00
public sealed record EncounterStatic6 : EncounterStatic, IContestStats
2020-08-22 18:59:43 +00:00
{
public override int Generation => 6;
public byte CNT_Cool { get; init; }
public byte CNT_Beauty { get; init; }
public byte CNT_Cute { get; init; }
public byte CNT_Smart { get; init; }
public byte CNT_Tough { get; init; }
public byte CNT_Sheen { get; init; }
protected override bool IsMatchLocation(PKM pkm)
{
if (base.IsMatchLocation(pkm))
return true;
if (Species != (int) Core.Species.Pikachu)
return false;
// Cosplay Pikachu is given from multiple locations
var loc = pkm.Met_Location;
2020-12-25 20:30:26 +00:00
return loc is 180 or 186 or 194;
}
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
{
base.ApplyDetails(sav, criteria, pk);
var pk6 = (PK6)pk;
this.CopyContestStatsTo(pk6);
pk6.SetRandomMemory6();
}
2020-08-22 18:59:43 +00:00
}
}