2019-11-19 03:23:01 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
|
|
|
|
{
|
2019-11-26 18:46:16 +00:00
|
|
|
|
public class EncounterTrade8 : EncounterTrade, IDynamaxLevel, IRelearn, IMemoryOT
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
public byte DynamaxLevel { get; set; }
|
|
|
|
|
public int[] Relearn { get; set; } = Array.Empty<int>();
|
|
|
|
|
|
2019-11-26 18:46:16 +00:00
|
|
|
|
public int OT_Memory { get; }
|
|
|
|
|
public int OT_TextVar { get; }
|
|
|
|
|
public int OT_Feeling { get; }
|
|
|
|
|
public int OT_Intensity { get; }
|
|
|
|
|
|
|
|
|
|
public EncounterTrade8(int species, int level, int m, int a, int f, int i)
|
2019-11-19 03:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
Species = species;
|
|
|
|
|
Level = level;
|
2019-11-26 18:46:16 +00:00
|
|
|
|
|
|
|
|
|
OT_Memory = m;
|
|
|
|
|
OT_TextVar = a;
|
|
|
|
|
OT_Feeling = f;
|
|
|
|
|
OT_Intensity = i;
|
2019-11-19 03:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool IsMatch(PKM pkm, int lvl)
|
|
|
|
|
{
|
|
|
|
|
if (pkm is IDynamaxLevel d && d.DynamaxLevel < DynamaxLevel)
|
|
|
|
|
return false;
|
|
|
|
|
return base.IsMatch(pkm, lvl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void ApplyDetails(ITrainerInfo SAV, EncounterCriteria criteria, PKM pk)
|
|
|
|
|
{
|
|
|
|
|
base.ApplyDetails(SAV, criteria, pk);
|
2019-11-26 18:46:16 +00:00
|
|
|
|
pk.SetRelearnMoves(Relearn);
|
|
|
|
|
|
|
|
|
|
var pk8 = (PK8)pk;
|
|
|
|
|
pk8.DynamaxLevel = DynamaxLevel;
|
|
|
|
|
pk8.HT_Language = SAV.Language;
|
|
|
|
|
pk8.OT_Memory = OT_Memory;
|
|
|
|
|
pk8.OT_TextVar = OT_TextVar;
|
|
|
|
|
pk8.OT_Feeling = OT_Feeling;
|
|
|
|
|
pk8.OT_Intensity = OT_Intensity;
|
2019-11-19 03:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|