Fix cancel pp changing items skipping battle turn
This commit is contained in:
parent
390d8086dd
commit
a806284149
|
@ -1107,8 +1107,8 @@
|
||||||
|
|
||||||
Dim Item As Item = Item.GetItemByID(TempItemID)
|
Dim Item As Item = Item.GetItemByID(TempItemID)
|
||||||
|
|
||||||
TempBattleScreen.BattleQuery.Clear()
|
|
||||||
If Item.UseOnPokemon(PokeIndex) = True Then
|
If Item.UseOnPokemon(PokeIndex) = True Then
|
||||||
|
TempBattleScreen.BattleQuery.Clear()
|
||||||
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
|
||||||
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
|
||||||
TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Item, .Argument = TempItemID.ToString()})
|
TempBattleScreen.Battle.InitializeRound(TempBattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Item, .Argument = TempItemID.ToString()})
|
||||||
|
|
|
@ -27,7 +27,12 @@ Namespace Items.Berries
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
||||||
|
If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then
|
||||||
|
If ChooseAttackScreen.Selected <> -1 Then
|
||||||
Return True
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
||||||
|
|
|
@ -21,7 +21,12 @@ Namespace Items.Medicine
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
||||||
|
If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then
|
||||||
|
If ChooseAttackScreen.Selected <> -1 Then
|
||||||
Return True
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
||||||
|
|
|
@ -21,7 +21,12 @@ Namespace Items.Medicine
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
||||||
|
If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then
|
||||||
|
If ChooseAttackScreen.Selected <> -1 Then
|
||||||
Return True
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
||||||
|
|
|
@ -21,7 +21,12 @@ Namespace Items.Medicine
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
||||||
|
If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then
|
||||||
|
If ChooseAttackScreen.Selected <> -1 Then
|
||||||
Return True
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
||||||
|
|
|
@ -21,7 +21,12 @@ Namespace Items.Medicine
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
Core.SetScreen(New ChooseAttackScreen(Core.CurrentScreen, Core.Player.Pokemons(PokeIndex), True, True, AddressOf UseOnAttack))
|
||||||
|
If Core.CurrentScreen.Identification <> Screen.Identifications.ChooseAttackScreen Then
|
||||||
|
If ChooseAttackScreen.Selected <> -1 Then
|
||||||
Return True
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
Private Sub UseOnAttack(ByVal Pokemon As Pokemon, ByVal AttackIndex As Integer)
|
||||||
|
|
Loading…
Reference in New Issue