Fix crash when you can't switch (shadow tag etc.)

This commit is contained in:
JappaWakka 2024-03-18 14:32:29 +01:00
parent 5f826a799a
commit 24e1335caa
1 changed files with 2 additions and 2 deletions

View File

@ -856,8 +856,8 @@
ChangeCameraAngle(0, True, BattleScreen)
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.OwnPokemon.GetDisplayName() & " is trapped!"))
BattleScreen.FieldEffects.OppUsedMoves.Add(CInt(OppStep.Argument))
Dim oppMove As Attack = Attack.GetAttackByID(CInt(OppStep.Argument))
Dim oppMove As Attack = CType(OppStep.Argument, Attack)
BattleScreen.FieldEffects.OppUsedMoves.Add(oppMove.ID)
If SelectedMoveOpp = True Then oppMove.MoveSelected(False, BattleScreen)
DoAttackRound(BattleScreen, False, oppMove)
EndRound(BattleScreen, 2)