From cf437a1e88410b8a4aafe38611b6ce6157794f3b Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Tue, 2 May 2023 13:36:57 +0200 Subject: [PATCH] =?UTF-8?q?Only=20play=20poison=20sound=20with=20poisoned?= =?UTF-8?q?=20pok=C3=A9mon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- P3D/Player/Player.vb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/P3D/Player/Player.vb b/P3D/Player/Player.vb index a85c30665..d0e2493fc 100644 --- a/P3D/Player/Player.vb +++ b/P3D/Player/Player.vb @@ -1883,7 +1883,16 @@ PoisonSteps -= 4 End If If PoisonAmount > 0 Then - SoundManager.PlaySound("OverworldPoison") + Dim PlayPoisonSound As Boolean = False + For i = 0 To Core.Player.Pokemons.Count - 1 + If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then + PlayPoisonSound = True + Exit For + End If + Next + If PlayPoisonSound = True Then + SoundManager.PlaySound("OverworldPoison") + End If For i = 0 To Core.Player.Pokemons.Count - 1 If Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Poison OrElse Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.BadPoison Then If Core.Player.Pokemons(i).Ability IsNot Ability.GetAbilityByID(17) Then