mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
88830e0d00
Updates from net46->net7, dropping support for mono in favor of using the latest runtime (along with the performance/API improvements). Releases will be posted as 64bit only for now. Refactors a good amount of internal API methods to be more performant and more customizable for future updates & fixes. Adds functionality for Batch Editor commands to `>`, `<` and <=/>= TID/SID properties renamed to TID16/SID16 for clarity; other properties exposed for Gen7 / display variants. Main window has a new layout to account for DPI scaling (8 point grid) Fixed: Tatsugiri and Paldean Tauros now output Showdown form names as Showdown expects Changed: Gen9 species now interact based on the confirmed National Dex IDs (closes #3724) Fixed: Pokedex set all no longer clears species with unavailable non-base forms (closes #3720) Changed: Hyper Training suggestions now apply for level 50 in SV. (closes #3714) Fixed: B2/W2 hatched egg met locations exclusive to specific versions are now explicitly checked (closes #3691) Added: Properties for ribbon/mark count (closes #3659) Fixed: Traded SV eggs are now checked correctly (closes #3692)
57 lines
2.1 KiB
C#
57 lines
2.1 KiB
C#
using System;
|
|
|
|
namespace PKHeX.Core;
|
|
|
|
/// <summary>
|
|
/// Permitted <see cref="GroundTileType"/> values an encounter can be acquired with.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Some locations have multiple tile types that can proc an encounter, requiring multiple values possible.
|
|
/// </remarks>
|
|
[Flags]
|
|
public enum GroundTileAllowed
|
|
{
|
|
Undefined = 0,
|
|
None = 1 << 00, // No animation for the tile
|
|
Sand = 1 << 01, // Obtainable only via HG/SS
|
|
Grass = 1 << 02,
|
|
Puddle = 1 << 03, // No encounters from this tile type
|
|
Rock = 1 << 04,
|
|
Cave = 1 << 05,
|
|
Snow = 1 << 06, // No encounters from this tile type
|
|
Water = 1 << 07,
|
|
Ice = 1 << 08, // No encounters from this tile type
|
|
Building = 1 << 09,
|
|
Marsh = 1 << 10,
|
|
Bridge = 1 << 11, // No encounters from this tile type
|
|
Max_DP = 1 << 12, // Unspecific, catch-all for DP undefined tiles.
|
|
|
|
// added tile types in Pt
|
|
// no encounters from these tile types
|
|
Elite4_1 = 1 << 12, // Elite Four Room #1
|
|
Elite4_2 = 1 << 13, // Elite Four Room #2
|
|
Elite4_3 = 1 << 14, // Elite Four Room #3
|
|
Elite4_4 = 1 << 15, // Elite Four Room #4
|
|
Elite4_M = 1 << 16, // Elite Four Champion Room
|
|
DistortionSideways = 1 << 17, // Distortion World (Not Giratina)
|
|
BattleTower = 1 << 18,
|
|
BattleFactory = 1 << 19,
|
|
BattleArcade = 1 << 20,
|
|
BattleCastle = 1 << 21,
|
|
BattleHall = 1 << 22,
|
|
|
|
Distortion = 1 << 23,
|
|
Max_Pt = 1 << 24, // Unspecific, catch-all for Pt undefined tiles.
|
|
}
|
|
|
|
public static class GroundTileAllowedExtensions
|
|
{
|
|
public static bool Contains(this GroundTileAllowed g1, GroundTileType g2) => (g1 & (GroundTileAllowed)(1 << (int)g2)) != 0;
|
|
|
|
/// <summary>
|
|
/// Grabs the highest set bit from the tile value.
|
|
/// </summary>
|
|
/// <param name="g">Tile bit-permission value</param>
|
|
/// <returns>Bit index</returns>
|
|
public static GroundTileType GetIndex(this GroundTileAllowed g) => (GroundTileType)System.Numerics.BitOperations.Log2((uint)g);
|
|
}
|