Don't display Pokemon woke up dialog if it fainted
This commit is contained in:
@@ -53,10 +53,14 @@ public class Sleep : Script, IScriptChangeNumberOfHits, IAIInfoScriptNumberTurns
|
||||
/// <inheritdoc />
|
||||
public override void OnRemove()
|
||||
{
|
||||
_pokemon?.BattleData?.Battle.EventHook.Invoke(new DialogEvent("pokemon_woke_up", new Dictionary<string, object>
|
||||
if (_pokemon is { IsFainted: false })
|
||||
{
|
||||
{ "pokemon", _pokemon },
|
||||
}));
|
||||
_pokemon.BattleData?.Battle.EventHook.Invoke(new DialogEvent("pokemon_woke_up",
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "pokemon", _pokemon },
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user