Fix defrosting moves not working

By putting the move defrost check before the freeze animation/move cancelation check
This commit is contained in:
JappaWakka 2023-03-27 17:26:07 +02:00
parent f1484c77ca
commit ae5a26f8e3
1 changed files with 6 additions and 6 deletions

View File

@ -1241,6 +1241,12 @@
Dim q As CameraQueryObject = CType(BattleScreen.FocusBattle(), CameraQueryObject) : q.ApplyCurrentCamera = True : BattleScreen.BattleQuery.Add(q)
BattleScreen.BattleQuery.Add(New DelayQueryObject(20))
If p.Status = Pokemon.StatusProblems.Freeze Then
If moveUsed.RemovesFrozen = True Then
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " got defrosted by " & moveUsed.Name & ".", "defrostmove")
End If
End If
If p.Status = Pokemon.StatusProblems.Freeze Then
If Core.Random.Next(0, 100) < 20 Then
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " thawed out.", "own defrost")
@ -1594,12 +1600,6 @@
End If
End If
If p.Status = Pokemon.StatusProblems.Freeze Then
If moveUsed.RemovesFrozen = True Then
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " got defrosted by " & moveUsed.Name & ".", "defrostmove")
End If
End If
If own = True Then
BattleScreen.FieldEffects.OwnLastMove = moveUsed
Else