18 lines
683 B
C#
18 lines
683 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Bulletproof is an ability that grants immunity to ball and bomb moves.
|
|
/// The Pokémon is unaffected by all damage and effects from moves flagged as ballistics, such as Shadow Ball and Sludge Bomb.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Bulletproof_(Ability)">Bulbapedia - Bulletproof</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "bulletproof")]
|
|
public class Bulletproof : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void FailIncomingMove(IExecutingMove move, IPokemon target, ref bool fail)
|
|
{
|
|
if (move.UseMove.HasFlag("ballistics"))
|
|
fail = true;
|
|
}
|
|
} |