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