PKHeX/PKHeX.Core/Legality/Encounters/EncounterStaticShadow.cs
Kurt c0aae6ab78 Add cxd lock check info & begin troubleshooting
commented out test calls = not working
will have to debug in more detail later; the first lock is always
working at least.

data sourced from
https://github.com/ijuintekka/Eligor/blob/master/Eligor/Spread.cs , not
sure if it's perfect.

can't cleanly condense deviating team appearances as double-shadow leads
can't be selectively encountered. didn't feel like modding lockfinder's
recursive algo to be smarter.
2018-10-20 21:03:04 -05:00

38 lines
No EOL
1 KiB
C#

using System;
namespace PKHeX.Core
{
internal class EncounterStaticShadow : EncounterStatic
{
public TeamLock[] Locks { get; internal set; } = Array.Empty<TeamLock>();
public int Gauge { get; internal set; }
public bool EReader { get; set; }
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();
}
return result;
}
}
public class TeamLock
{
public int Species;
public string Comment;
public NPCLock[] Locks;
internal TeamLock Clone()
{
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;
}
}
}