From a15414bf241e6794f714b205cdfc570b73bde2f8 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Fri, 27 Jan 2023 17:43:02 +0100 Subject: [PATCH] Fix roar not ending wild battle Made ability suction cups prevent Roar from hitting --- P3D/Pokemon/Attacks/Normal/Roar.vb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/P3D/Pokemon/Attacks/Normal/Roar.vb b/P3D/Pokemon/Attacks/Normal/Roar.vb index 65f449528..4997f5d46 100644 --- a/P3D/Pokemon/Attacks/Normal/Roar.vb +++ b/P3D/Pokemon/Attacks/Normal/Roar.vb @@ -65,13 +65,13 @@ p = BattleScreen.OppPokemon End If - If BattleCalculation.CanSwitch(BattleScreen, Not own) = True Then + If BattleCalculation.CanSwitch(BattleScreen, Not own) = True AndAlso p.Ability.Name.ToLower() <> "suction cups" Then BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got scared away!")) If BattleScreen.IsPVPBattle = True Or BattleScreen.IsTrainerBattle = True Or BattleScreen.IsRemoteBattle = True Then 'trainer battle If own = True Then If BattleScreen.Trainer.CountUseablePokemon > 1 Then - Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.count) + Dim i As Integer = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.Count) While BattleScreen.Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse BattleScreen.OppPokemonIndex = i OrElse BattleScreen.Trainer.Pokemons(i).HP <= 0 i = Core.Random.Next(0, BattleScreen.Trainer.Pokemons.Count - 1) End While @@ -92,16 +92,7 @@ End If Else 'wild battle - - If own = True Then - BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False)) - Else - If Core.Player.CountFightablePokemon > 1 Then - BattleScreen.Battle.SwitchOutOwn(BattleScreen, -1, -1) - Else - BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!")) - End If - End If + BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False)) End If Else BattleScreen.BattleQuery.Add(New TextQueryObject(Me.Name & " failed!"))