diff --git a/P3D/Battle/BattleSystemV2/BattleMenu.vb b/P3D/Battle/BattleSystemV2/BattleMenu.vb index e37923fb5..7fe88f745 100644 --- a/P3D/Battle/BattleSystemV2/BattleMenu.vb +++ b/P3D/Battle/BattleSystemV2/BattleMenu.vb @@ -1107,8 +1107,8 @@ Dim Item As Item = Item.GetItemByID(TempItemID) - TempBattleScreen.BattleQuery.Clear() If Item.UseOnPokemon(PokeIndex) = True Then + TempBattleScreen.BattleQuery.Clear() TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle()) TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True)) TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Item, .Argument = TempItemID.ToString()}) diff --git a/P3D/Pokemon/Items/Berries/LeppaBerry.vb b/P3D/Pokemon/Items/Berries/LeppaBerry.vb index 126332246..e59f7a7cb 100644 --- a/P3D/Pokemon/Items/Berries/LeppaBerry.vb +++ b/P3D/Pokemon/Items/Berries/LeppaBerry.vb @@ -27,7 +27,12 @@ Namespace Items.Berries Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack)) - Return True + If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then + If ChooseAttackScreen.Selected <> -1 Then + Return True + End If + End If + Return False End Function Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer) diff --git a/P3D/Pokemon/Items/Medicine/Ether.vb b/P3D/Pokemon/Items/Medicine/Ether.vb index eca84adb8..f2209c885 100644 --- a/P3D/Pokemon/Items/Medicine/Ether.vb +++ b/P3D/Pokemon/Items/Medicine/Ether.vb @@ -21,7 +21,12 @@ Namespace Items.Medicine Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack)) - Return True + If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then + If ChooseAttackScreen.Selected <> -1 Then + Return True + End If + End If + Return False End Function Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer) diff --git a/P3D/Pokemon/Items/Medicine/MaxEther.vb b/P3D/Pokemon/Items/Medicine/MaxEther.vb index 12a7fef56..bf8ae883f 100644 --- a/P3D/Pokemon/Items/Medicine/MaxEther.vb +++ b/P3D/Pokemon/Items/Medicine/MaxEther.vb @@ -21,7 +21,12 @@ Namespace Items.Medicine Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack)) - Return True + If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then + If ChooseAttackScreen.Selected <> -1 Then + Return True + End If + End If + Return False End Function Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer) diff --git a/P3D/Pokemon/Items/Medicine/PPMax.vb b/P3D/Pokemon/Items/Medicine/PPMax.vb index 91b0b3522..968161979 100644 --- a/P3D/Pokemon/Items/Medicine/PPMax.vb +++ b/P3D/Pokemon/Items/Medicine/PPMax.vb @@ -21,7 +21,12 @@ Namespace Items.Medicine Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack)) - Return True + If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then + If ChooseAttackScreen.Selected <> -1 Then + Return True + End If + End If + Return False End Function Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer) diff --git a/P3D/Pokemon/Items/Medicine/PPUp.vb b/P3D/Pokemon/Items/Medicine/PPUp.vb index 4bd453a0a..ee52f556a 100644 --- a/P3D/Pokemon/Items/Medicine/PPUp.vb +++ b/P3D/Pokemon/Items/Medicine/PPUp.vb @@ -21,7 +21,12 @@ Namespace Items.Medicine Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack)) - Return True + If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then + If ChooseAttackScreen.Selected <> -1 Then + Return True + End If + End If + Return False End Function Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)