mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-13 14:12:39 +00:00
e3efa65160
handle messages for dirty cleaning :)
21 lines
No EOL
778 B
C#
21 lines
No EOL
778 B
C#
namespace PKHeX.Core
|
|
{
|
|
public struct TurnStartInstruction
|
|
{
|
|
public TurnStartCode TurnCode;
|
|
public int Count;
|
|
|
|
public TurnStartInstruction(byte Op)
|
|
{
|
|
TurnCode = (TurnStartCode)(Op >> 4);
|
|
Count = Op & 0xF;
|
|
}
|
|
|
|
public byte GetRawValue => (byte) ((Count & 0xF) | ((byte) TurnCode << 4));
|
|
|
|
public override bool Equals(object obj) => obj is TurnStartInstruction t && t.GetRawValue == GetRawValue;
|
|
public override int GetHashCode() => GetRawValue;
|
|
public static bool operator ==(TurnStartInstruction left, TurnStartInstruction right) => left.Equals(right);
|
|
public static bool operator !=(TurnStartInstruction left, TurnStartInstruction right) => !(left == right);
|
|
}
|
|
} |