using PkmnLib.Static.Moves;
namespace PkmnLib.Plugin.Gen7.Scripts.Utils;
public static class CopyableMoves
{
///
/// Validates if a move can be copied by scripts, such as Assist.
///
public static bool CanCopyMove(this IMoveData move) => !NonCopyable.Contains(move.Name);
///
/// The names of moves that cannot be copied by scripts.
///
private static readonly HashSet NonCopyable =
[
"assist",
"baneful_bunker",
"beak_blast",
"belch",
"bestow",
"bounce",
"celebrate",
"chatter",
"circle_throw",
"copycat",
"counter",
"covet",
"destiny_bond",
"detect",
"dig",
"dive",
"dragon_tail",
"endure",
"feint",
"fly",
"focus_punch",
"follow_me",
"helping_hand",
"hold_hands",
"instruct",
"kings_shield",
"mat_block",
"me_first",
"metronome",
"mimic",
"mirror_coat",
"mirror_move",
"nature_power",
"phantom_force",
"protect",
"rage_powder",
"roar",
"shadow_force",
"shell_trap",
"sketch",
"sky_drop",
"sleep_talk",
"snatch",
"spiky_shield",
"spotlight",
"struggle",
"switcheroo",
"thief",
"transform",
"trick",
"whirlwind",
];
///
/// Validates if a move can be selected by Metronome.
///
public static bool CanBeSelectedByMetronome(this IMoveData move) =>
!MetronomeUnselectable.Contains(move.Name);
///
/// The names of moves that cannot be selected by Metronome. This differs from :
/// Metronome additionally cannot select moves such as After You and Wide Guard, while moves that are only
/// excluded for other copying moves (such as semi-invulnerable and forced-switch moves) remain selectable.
///
private static readonly HashSet MetronomeUnselectable =
[
"after_you",
"assist",
"baneful_bunker",
"beak_blast",
"belch",
"bestow",
"celebrate",
"chatter",
"copycat",
"counter",
"covet",
"crafty_shield",
"destiny_bond",
"detect",
"endure",
"feint",
"focus_punch",
"follow_me",
"helping_hand",
"hold_hands",
"instruct",
"kings_shield",
"mat_block",
"me_first",
"metronome",
"mimic",
"mirror_coat",
"mirror_move",
"nature_power",
"protect",
"quash",
"quick_guard",
"rage_powder",
"shell_trap",
"sketch",
"sleep_talk",
"snatch",
"snore",
"spectral_thief",
"spiky_shield",
"spotlight",
"struggle",
"switcheroo",
"thief",
"transform",
"trick",
"wide_guard",
];
}