From c287e2ce36f297716746f3d0d43725f1be8d1b4e Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Mon, 12 Jun 2023 16:15:45 +0200 Subject: [PATCH] Fix incorrect Voltorb Flip rules --- P3D/Screens/VoltorbFlipScreen.vb | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/P3D/Screens/VoltorbFlipScreen.vb b/P3D/Screens/VoltorbFlipScreen.vb index f57d601d6..5b5246c80 100644 --- a/P3D/Screens/VoltorbFlipScreen.vb +++ b/P3D/Screens/VoltorbFlipScreen.vb @@ -1056,8 +1056,8 @@ TryAgain: Next If Controls.Accept = True AndAlso ReadyAmount = CInt(GridSize * GridSize) AndAlso TextBox.Showing = False Then - SoundManager.PlaySound("select") If Delay = 0 Then + SoundManager.PlaySound("select") Delay = 5 End If If Delay > 3 Then @@ -1088,11 +1088,9 @@ TryAgain: PreviousLevel = CurrentLevel If CurrentFlips < CurrentLevel Then CurrentLevel = Math.Max(1, CurrentFlips) - Else - CurrentLevel = 1 End If - SoundManager.PlaySound("select") If Delay = 0 Then + SoundManager.PlaySound("select") Delay = 5 End If If Delay > 3 Then @@ -1274,14 +1272,27 @@ TryAgain: SoundManager.PlaySound("VoltorbFlip\QuitGame", True) TextBox.Show(Localization.GetString("VoltorbFlip_QuitGame_1", " received~") & CurrentCoins.ToString & " " & Localization.GetString("VoltorbFlip_QuitGame_2", "Coin(s)!")) - If GameState = States.QuitQuestion Then - TotalCoins += CurrentCoins - CurrentFlips = 0 - - CurrentCoins = 0 + If CurrentFlips < CurrentLevel Then + CurrentLevel = Math.Max(1, CurrentFlips) + End If + + If Delay = 0 Then + If GameState = States.QuitQuestion Then + TotalCoins += CurrentCoins + CurrentFlips = 0 + + CurrentCoins = 0 + End If + Delay = 5 + End If + If Delay > 3 Then + If CurrentLevel < PreviousLevel Then + TextBox.Show(Localization.GetString("VoltorbFlip_NewLevel_Lower1", "Dropped to Game Lv.") & " " & CurrentLevel & Localization.GetString("VoltorbFlip_NewLevel_Lower2", "!")) + End If + + ChooseBox.readyForResult = False + GameState = States.NewLevelQuestion End If - ChooseBox.readyForResult = False - GameState = States.NewLevelQuestion End Sub End Class