mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 16:33:24 +00:00
f1264a1a97
Closes #3445
13 lines
398 B
C#
13 lines
398 B
C#
namespace PKHeX.Core;
|
|
|
|
public readonly record struct TurnStartInstruction(TurnStartCode TurnCode, int Count)
|
|
{
|
|
public static TurnStartInstruction Get(byte Op)
|
|
{
|
|
var TurnCode = (TurnStartCode)(Op >> 4);
|
|
var Count = Op & 0xF;
|
|
return new TurnStartInstruction(TurnCode, Count);
|
|
}
|
|
|
|
public byte GetRawValue => (byte) ((Count & 0xF) | ((byte) TurnCode << 4));
|
|
}
|