This commit is contained in:
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Infiltrator.cs
Normal file
20
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Infiltrator.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Infiltrator is an ability that allows the Pokémon's moves to ignore the opposing side's barriers and substitutes.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Infiltrator_(Ability)">Bulbapedia - Infiltrator</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "infiltrator")]
|
||||
public class Infiltrator : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void CustomTrigger(StringKey eventName, IDictionary<StringKey, object?>? parameters)
|
||||
{
|
||||
if ((eventName != CustomTriggers.BypassProtection && eventName != CustomTriggers.BypassSubstitute) ||
|
||||
parameters is null)
|
||||
return;
|
||||
|
||||
parameters["bypass"] = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user