PKHeX/PKHeX.Core/Legality/Encounters/EncounterStaticShadow.cs

38 lines
1 KiB
C#
Raw Normal View History

using System;
namespace PKHeX.Core
2018-03-09 05:18:32 +00:00
{
public class EncounterStaticShadow : EncounterStatic
2018-03-09 05:18:32 +00:00
{
public TeamLock[] Locks { get; internal set; } = Array.Empty<TeamLock>();
2018-03-09 05:18:32 +00:00
public int Gauge { get; internal set; }
public bool EReader { get; set; }
2018-03-09 05:18:32 +00:00
internal override EncounterStatic Clone()
{
var result = (EncounterStaticShadow)base.Clone();
if (Locks.Length > 0)
{
result.Locks = new TeamLock[Locks.Length];
for (int i = 0; i < Locks.Length; i++)
result.Locks[i] = Locks[i].Clone();
}
2018-03-09 05:18:32 +00:00
return result;
}
}
2018-03-09 05:18:32 +00:00
public class TeamLock
{
public int Species;
public string Comment;
public NPCLock[] Locks;
internal TeamLock Clone()
2018-03-09 05:18:32 +00:00
{
var c = new TeamLock { Comment = Comment, Locks = (NPCLock[])Locks.Clone() };
for (int i = 0; i < Locks.Length; i++)
Locks[i] = Locks[i].Clone();
return c;
2018-03-09 05:18:32 +00:00
}
}
}