From 611e9688b931c3226a063bf8667196956d6002a1 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Mon, 27 Feb 2023 19:41:57 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20faint=20Pok=C3=A9mon=20message=20not=20sh?= =?UTF-8?q?owing...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when the Pokémon faints due to effects not caused by attacks/moves --- P3D/Battle/BattleSystemV2/Battle.vb | 3 +++ P3D/Pokemon/Attacks/AttackSpecialFunctions.vb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb index 7246a929a..c07dc585e 100644 --- a/P3D/Battle/BattleSystemV2/Battle.vb +++ b/P3D/Battle/BattleSystemV2/Battle.vb @@ -4531,6 +4531,9 @@ End If End If End If + If p.HP <= 0 And cause.Contains("move:") = False Then + FaintPokemon(own, BattleScreen, "") + End If End Sub Public Sub UseBerry(ByVal own As Boolean, ByVal from As Boolean, ByVal BerryItem As Item, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) diff --git a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb index 0fe5af41f..8d7d51a13 100644 --- a/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb +++ b/P3D/Pokemon/Attacks/AttackSpecialFunctions.vb @@ -87,7 +87,7 @@ Message = f.GetSplit(3, ",") End If End If - BattleScreen.Battle.ReduceHP(HPAmount, Target, own, BattleScreen, Message, Move.Name.ToLower) + BattleScreen.Battle.ReduceHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower) Case "gainhp", "increasehp", "heal" Dim Target As Boolean = CBool(f.GetSplit(1, ",")) Dim HPAmount As Integer = 0 @@ -99,7 +99,7 @@ Message = f.GetSplit(3, ",") End If End If - BattleScreen.Battle.GainHP(HPAmount, Target, own, BattleScreen, Message, Move.Name.ToLower) + BattleScreen.Battle.GainHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower) Case "endbattle" Dim Blackout As Boolean = False