22 lines
668 B
C#
22 lines
668 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Queenly Majesty is an ability that prevents priority moves from being used against the Pokémon.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Queenly_Majesty_(Ability)">Bulbapedia - Queenly Majesty</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "queenly_majesty")]
|
|
public class QueenlyMajesty : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void FailIncomingMove(IExecutingMove move, IPokemon target, ref bool fail)
|
|
{
|
|
if (move.Targets.Count != 1)
|
|
return;
|
|
|
|
if (move.MoveChoice.Priority > 0)
|
|
{
|
|
fail = true;
|
|
}
|
|
}
|
|
} |