PKHeX/PKHeX.Core/Saves/Substructures/Battle Videos/TurnStartInstruction.cs

13 lines
367 B
C#
Raw Normal View History

2018-08-19 03:10:30 +00:00
namespace PKHeX.Core
{
public readonly record struct TurnStartInstruction(TurnStartCode TurnCode, int Count)
2018-08-19 03:10:30 +00:00
{
public TurnStartInstruction(byte Op) : this()
2018-08-19 03:10:30 +00:00
{
TurnCode = (TurnStartCode)(Op >> 4);
Count = Op & 0xF;
}
public byte GetRawValue => (byte) ((Count & 0xF) | ((byte) TurnCode << 4));
2018-08-19 03:10:30 +00:00
}
}