diff --git a/Plugins/PkmnLib.Plugin.Gen7/Scripts/Status/Sleep.cs b/Plugins/PkmnLib.Plugin.Gen7/Scripts/Status/Sleep.cs index 36b4e4b..25b59d7 100644 --- a/Plugins/PkmnLib.Plugin.Gen7/Scripts/Status/Sleep.cs +++ b/Plugins/PkmnLib.Plugin.Gen7/Scripts/Status/Sleep.cs @@ -53,10 +53,14 @@ public class Sleep : Script, IScriptChangeNumberOfHits, IAIInfoScriptNumberTurns /// public override void OnRemove() { - _pokemon?.BattleData?.Battle.EventHook.Invoke(new DialogEvent("pokemon_woke_up", new Dictionary + if (_pokemon is { IsFainted: false }) { - { "pokemon", _pokemon }, - })); + _pokemon.BattleData?.Battle.EventHook.Invoke(new DialogEvent("pokemon_woke_up", + new Dictionary + { + { "pokemon", _pokemon }, + })); + } } ///