This commit is contained in:
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Oblivious.cs
Normal file
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Oblivious.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Oblivious is an ability that prevents the Pokémon from being infatuated or taunted.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Oblivious_(Ability)">Bulbapedia - Oblivious</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "oblivious")]
|
||||
public class Oblivious : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventVolatileAdd(Script script, ref bool preventVolatileAdd)
|
||||
{
|
||||
preventVolatileAdd = script switch
|
||||
{
|
||||
Infatuated or TauntEffect => true,
|
||||
_ => preventVolatileAdd,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user