Prevent stuck in fly mode when gravity active

This commit is contained in:
JappaWakka 2024-04-07 12:19:43 +02:00
parent e47f20ef35
commit afb752ee4f
1 changed files with 9 additions and 0 deletions

View File

@ -1576,6 +1576,15 @@
Dim gravity As Integer = BattleScreen.FieldEffects.Gravity
If gravity > 0 Then
If moveUsed.DisabledWhileGravity = True Then
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
If own = False Then
fly = BattleScreen.FieldEffects.OppFlyCounter
End If
If fly > 0 Then
moveUsed.MoveMisses(own, BattleScreen)
End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & "'s move was prevented due to Gravity!"))
Exit Sub
End If