Fix stealth rock

This commit is contained in:
JappaWakka 2023-07-21 20:11:17 +02:00
parent 71bd0eaaef
commit 0e9623c557

View File

@ -7905,6 +7905,7 @@
End Sub
Public Sub SwitchInOpp(ByVal BattleScreen As BattleScreen, ByVal FirstTime As Boolean, ByVal index As Integer)
Dim AddSwitch As Boolean = False
If FirstTime = False Then
ChangeCameraAngle(1, False, BattleScreen)
HasSwitchedInOpp = True
@ -7959,8 +7960,10 @@
Dim oppModel As String = BattleScreen.GetModelName(False)
'Switch BattleStyle
If BattleScreen.FieldEffects.OwnDigCounter = 0 AndAlso BattleScreen.FieldEffects.OwnFlyCounter = 0 AndAlso BattleScreen.FieldEffects.OwnDiveCounter = 0 Then
If Core.Player.BattleStyle <> 1 AndAlso OppStep.StepType <> RoundConst.StepTypes.Switch AndAlso BattleScreen.IsPVPBattle = False Then
AddSwitch = True
BattleScreen.BattleQuery.Add(New SwitchPokemonQueryObject(BattleScreen, BattleScreen.OppPokemon))
BattleScreen.Battle.ChangeCameraAngle(1, False, BattleScreen)
End If
@ -8015,12 +8018,8 @@
BattleScreen.BattleQuery.Add(BallThrow)
End If
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
cq2.PassThis = True
BattleScreen.BattleQuery.AddRange({cq1, cq2})
End If
If AddSwitch = False Then
With BattleScreen
Dim p As Pokemon = .OppPokemon
Dim op As Pokemon = .OwnPokemon
@ -8110,6 +8109,7 @@
StartRound(BattleScreen)
End If
End With
End If
End Sub
#End Region