mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 08:10:48 -05:00
Change Gen4 roamer default met tile
the groundtile bit permission was causing the Route 201 to set Water which isn't possible to encounter them on, so use the lowest bit instead of highest bit
This commit is contained in:
parent
bfc24dd5c2
commit
ff3081408a
|
|
@ -54,13 +54,12 @@ public static class GroundTileAllowedExtensions
|
|||
/// </summary>
|
||||
/// <param name="permit">Tile bit-permission value</param>
|
||||
/// <param name="value">Tile type to check.</param>
|
||||
/// <returns></returns>
|
||||
public static bool Contains(this GroundTileAllowed permit, GroundTileType value) => (permit & (GroundTileAllowed)(1 << (int)value)) != 0;
|
||||
|
||||
/// <summary>
|
||||
/// Grabs the highest set bit from the tile value.
|
||||
/// Grabs the lowest set bit from the tile value.
|
||||
/// </summary>
|
||||
/// <param name="permit">Tile bit-permission value</param>
|
||||
/// <returns>Bit index</returns>
|
||||
public static GroundTileType GetIndex(this GroundTileAllowed permit) => (GroundTileType)System.Numerics.BitOperations.Log2((uint)permit);
|
||||
public static GroundTileType GetIndex(this GroundTileAllowed permit) => (GroundTileType)System.Numerics.BitOperations.Log2((uint)(permit & ~(permit - 1)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user