mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 14:00:21 +00:00
Update gen9 sketch disallow
This commit is contained in:
parent
80faf97425
commit
a89b13027b
3 changed files with 24 additions and 10 deletions
|
@ -82,7 +82,7 @@ public static class MoveInfo
|
|||
/// <summary>
|
||||
/// Checks if the move is a Starmobile-only move.
|
||||
/// </summary>
|
||||
public static bool IsMoveTorque(ushort move) => move - (uint)BlazingTorque <= 3;
|
||||
public static bool IsMoveTorque(ushort move) => move - (uint)BlazingTorque <= 4;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the <see cref="move"/> is unable to be used in battle.
|
||||
|
@ -165,6 +165,7 @@ public static class MoveInfo
|
|||
|
||||
// Unreleased
|
||||
(int)LightofRuin => false,
|
||||
(int)MalignantChain => false,
|
||||
|
||||
_ => IsMoveKnowable(move),
|
||||
};
|
||||
|
@ -178,10 +179,27 @@ public static class MoveInfo
|
|||
{
|
||||
Gen6 when move is (int)ThousandArrows or (int)ThousandWaves => false,
|
||||
Gen8b when IsDummiedMove(MoveInfo8b.DummiedMoves, move) => false,
|
||||
Gen9 when IsDummiedMove(MoveInfo9.DummiedMoves, move) => false,
|
||||
Gen9 when IsDummiedMove(MoveInfo9.DummiedMoves, move) || DisallowSketch9.Contains(move) => false,
|
||||
_ => true,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Moves that cannot be sketched in <see cref="Gen9"/>.
|
||||
/// </summary>
|
||||
private static ReadOnlySpan<ushort> DisallowSketch9 =>
|
||||
[
|
||||
(ushort)DarkVoid,
|
||||
(ushort)HyperspaceFury,
|
||||
//(ushort)BreakneckBlitzP, // 3.0.0 has this move set, but this move is disallowed with our other checks
|
||||
(ushort)RevivalBlessing,
|
||||
(ushort)BlazingTorque, // Revavroom
|
||||
(ushort)WickedTorque, // Revavroom
|
||||
(ushort)NoxiousTorque, // Revavroom
|
||||
(ushort)CombatTorque, // Revavroom
|
||||
(ushort)MagicalTorque, // Revavroom
|
||||
(ushort)TeraStarstorm,
|
||||
];
|
||||
|
||||
private static int GetMaxMoveID(EntityContext context) => context switch
|
||||
{
|
||||
Gen1 => Legal.MaxMoveID_1,
|
||||
|
|
|
@ -18,12 +18,9 @@ public sealed class Chatter5 : SaveBlock<SAV5>, IChatter
|
|||
|
||||
public Span<byte> Recording => Data.AsSpan(Offset + sizeof(uint), IChatter.SIZE_PCM);
|
||||
|
||||
public int ConfusionChance
|
||||
public int ConfusionChance => !Initialized ? 0 : (Recording[99] ^ Recording[499] ^ Recording[699]) switch
|
||||
{
|
||||
get => !Initialized ? 0 : (Recording[99] ^ Recording[499] ^ Recording[699]) switch
|
||||
{
|
||||
< 100 or >= 150 => 10,
|
||||
_ => 0,
|
||||
};
|
||||
}
|
||||
< 100 or >= 150 => 10,
|
||||
_ => 0,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Reflection.Metadata;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
|
|
Loading…
Reference in a new issue