2021-01-01 20:21:46 +00:00
|
|
|
|
namespace PKHeX.Core
|
2020-08-22 18:59:43 +00:00
|
|
|
|
{
|
2020-11-27 19:51:02 +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
|
|
|
|
{
|
2020-08-30 23:10:24 +00:00
|
|
|
|
public override int Generation => 6;
|
|
|
|
|
|
2021-01-01 21:39:08 +00:00
|
|
|
|
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; }
|
2020-12-24 08:06:40 +00:00
|
|
|
|
|
2021-01-04 00:49:49 +00:00
|
|
|
|
public EncounterStatic6(GameVersion game) : base(game) { }
|
|
|
|
|
|
2020-08-31 02:24:24 +00:00
|
|
|
|
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;
|
2020-08-31 02:24:24 +00:00
|
|
|
|
}
|
2020-09-13 21:40:10 +00:00
|
|
|
|
|
2021-05-21 20:57:07 +00:00
|
|
|
|
protected override bool IsMatchEggLocation(PKM pkm)
|
|
|
|
|
{
|
|
|
|
|
var eggloc = pkm.Egg_Location;
|
|
|
|
|
if (!EggEncounter)
|
|
|
|
|
return eggloc == EggLocation;
|
|
|
|
|
|
|
|
|
|
if (!pkm.IsEgg) // hatched
|
|
|
|
|
return eggloc == EggLocation || eggloc == Locations.LinkTrade6;
|
|
|
|
|
|
|
|
|
|
// Unhatched:
|
|
|
|
|
if (eggloc != EggLocation)
|
|
|
|
|
return false;
|
|
|
|
|
if (pkm.Met_Location is not 0 or Locations.LinkTrade6)
|
|
|
|
|
return false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-13 21:40:10 +00:00
|
|
|
|
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
|
|
|
|
|
{
|
|
|
|
|
base.ApplyDetails(sav, criteria, pk);
|
|
|
|
|
var pk6 = (PK6)pk;
|
|
|
|
|
this.CopyContestStatsTo(pk6);
|
|
|
|
|
pk6.SetRandomMemory6();
|
2021-02-14 20:27:14 +00:00
|
|
|
|
pk6.SetRandomEC();
|
2020-09-13 21:40:10 +00:00
|
|
|
|
}
|
2020-08-22 18:59:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|