mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-12 23:37:07 +00:00
d47bb1d297
With the new version of Visual Studio bringing C# 12, we can revise our logic for better readability as well as use new methods/APIs introduced in the .NET 8.0 BCL.
31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
using System;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Details about moves in <see cref="EntityContext.Gen8b"/>
|
|
/// </summary>
|
|
internal static class MoveInfo8b
|
|
{
|
|
/// <summary>
|
|
/// Bitflag indexes of moves that are not usable in game.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This is a bitflag array, where each bit represents a move. If the bit is set, the move is not usable in game.
|
|
/// Instead of allocating a hashset, this is a more efficient method (no allocation) with O(1) lookup (faster than HashSet's O(1) lookup).
|
|
/// </remarks>
|
|
public static ReadOnlySpan<byte> DummiedMoves => // 314 moves (628 bytes) => 104 bytes.
|
|
[
|
|
0x1C, 0x20, 0x00, 0x0C, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00,
|
|
0x04, 0x00, 0x09, 0x00, 0xA1, 0x22, 0x19, 0x10, 0x26, 0xC0,
|
|
0x00, 0x0A, 0x00, 0x02, 0x02, 0x00, 0x00, 0x45, 0x10, 0x00,
|
|
0x00, 0x00, 0x00, 0x02, 0x04, 0x80, 0x26, 0x70, 0x00, 0x50,
|
|
0x91, 0x00, 0x00, 0x04, 0x60, 0x08, 0x20, 0x67, 0x04, 0x00,
|
|
0x00, 0x00, 0x00, 0x24, 0x00, 0x28, 0x00, 0x01, 0x04, 0x20,
|
|
0x22, 0x00, 0x04, 0x18, 0xD0, 0x81, 0xB8, 0xAA, 0xFF, 0xE7,
|
|
0x8B, 0x0E, 0x45, 0x98, 0x07, 0xCB, 0xE4, 0xE3, 0xFF, 0xFF,
|
|
0xFF, 0xFF, 0xFF, 0xA7, 0x74, 0xEB, 0xAF, 0xFF, 0xB7, 0xF7,
|
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x7F, 0xFF,
|
|
0xFF, 0xFF, 0xFF, 0x07,
|
|
];
|
|
}
|