BattleScreen + BattleCatchScreen softlock fixes

This commit is contained in:
JappaWakka 2023-01-13 14:46:44 +01:00
parent 9970d892de
commit dfbaaf2b33
8 changed files with 43 additions and 16 deletions

View File

@ -7,11 +7,18 @@
Moves
End Enum
Public CanInteract As Boolean = True
Public MenuState As MenuStates = MenuStates.Main
Public Visible As Boolean = False
Public Sub New()
Me.Reset()
Dim blockinteractscreen() As Screen.Identifications = {Screen.Identifications.PartyScreen, Screen.Identifications.SummaryScreen, Screen.Identifications.PauseScreen, Screen.Identifications.ChatScreen}
If blockinteractscreen.Contains(Core.CurrentScreen.Identification) = True Then
CanInteract = False
Else
CanInteract = True
End If
End Sub
Public Sub Reset()
@ -193,9 +200,9 @@
End If
Dim cX As Integer = 0
If HPpercentage <= 50.0F And HPpercentage > 15.0F Then
If HPpercentage <= 75.0F And HPpercentage > 25.0F Then
cX = 2
ElseIf HPpercentage <= 15.0F Then
ElseIf HPpercentage <= 25.0F Then
cX = 4
End If
@ -307,12 +314,14 @@
End Sub
Public Sub Update(ByRef BattleScreen As BattleScreen)
If CanInteract = True Then
Select Case MenuState
Case MenuStates.Main
UpdateMainMenu(BattleScreen)
Case MenuStates.Moves
UpdateMoveMenu(BattleScreen)
End Select
End If
End Sub
Private _allItemsExtended As Integer = 0

View File

@ -1025,11 +1025,13 @@ nextIndexForeground:
End If
Lighting.UpdateLighting(Screen.Effect)
If IsCurrentScreen() = True Then
Camera.Update()
Level.Update()
SkyDome.Update()
End If
TextBox.Update()
If TextBox.Showing = False Then
Dim cIndex As Integer = 0

View File

@ -58,11 +58,13 @@
Me._textIndex = Me._text.Length
End If
Else
If CurrentScreen.Identification <> Screen.Identifications.PauseScreen AndAlso CurrentScreen.Identification <> Screen.Identifications.ChatScreen Then
If Controls.Accept(True, True) = True Then
SoundManager.PlaySound("select")
Me._ready = True
End If
End If
End If
End Sub
Public Overrides Sub Draw(BV2Screen As BattleScreen)

View File

@ -61,9 +61,11 @@ Public Class ChatScreen
'Updates the level screen so online player entities get drawn.
If PreScreen.Identification = Identifications.OverworldScreen And JoinServerScreen.Online = True Then
Screen.Level.Update()
End If
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
PreScreen.Update()
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
PreScreen.Update()
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
End If
If CursorDelay > 0 Then

View File

@ -587,6 +587,9 @@ Public Class NewInventoryScreen
End Function
Public Overrides Sub Update()
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
PreScreen.Update()
End If
'Updates the tab highlight:
For index = 0 To _tabHighlight.Length - 1
If index <> _tabIndex Then

View File

@ -82,7 +82,10 @@
If PreScreen.Identification = Identifications.OverworldScreen Then
Screen.Level.Update()
ElseIf PreScreen.Identification = Identifications.BattleCatchScreen Then
PreScreen.Update()
CType(PreScreen, BattleCatchScreen).UpdateAnimations()
ElseIf PreScreen.Identification = Screen.Identifications.BattleScreen Then
PreScreen.Update()
End If
Screen.TextBox.reDelay = 0.0F

View File

@ -420,6 +420,9 @@ Public Class PartyScreen
End Function
Public Overrides Sub Update()
If PreScreen.Identification = Screen.Identifications.BattleScreen Then
PreScreen.Update()
End If
If _pokemonAnimations.Count > 0 Then
Dim animation As PokemonAnimation = _pokemonAnimations(_index)
If animation._shakeLeft Then

View File

@ -593,6 +593,9 @@
End Sub
Public Overrides Sub Update()
If PreScreen.PreScreen.Identification = Screen.Identifications.BattleScreen Then
PreScreen.PreScreen.Update()
End If
If _closing = True Then
If _fadeIn > 0F Then
_fadeIn = MathHelper.Lerp(0, _fadeIn, 0.8F)