This commit is contained in:
@@ -3,17 +3,16 @@ using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||
|
||||
[Script(ScriptCategory.Side, "safe_guard")]
|
||||
public class SafeguardEffect : Script
|
||||
public class SafeguardEffect : Script, IScriptPreventStatusChange, IScriptPreventVolatileAdd
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void PreventStatusChange(IPokemon pokemon, StringKey status, bool selfInflicted,
|
||||
ref bool preventStatus)
|
||||
public 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)
|
||||
public void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
|
||||
{
|
||||
if (script.Category == ScriptCategory.Pokemon && script.Name == ScriptUtils.ResolveName<Confusion>())
|
||||
preventVolatileAdd = true;
|
||||
|
||||
Reference in New Issue
Block a user