20 lines
623 B
C#
20 lines
623 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
public class SafeguardEffect : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted,
|
|
ref bool preventStatus)
|
|
{
|
|
preventStatus = true;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
|
|
{
|
|
if (script.Category == ScriptCategory.Pokemon && script.Name == ScriptUtils.ResolveName<Confusion>())
|
|
preventVolatileAdd = true;
|
|
}
|
|
} |