mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Attacks fail if PP is 0 before subtraction
This commit is contained in:
parent
38c0d9368f
commit
57e7eb2935
@ -35,14 +35,20 @@
|
||||
If BattleScreen.FieldEffects.OwnUsedRandomMove = True Then
|
||||
For Each a As Attack In Pokemon.Attacks
|
||||
If a.Name.ToLower = "metronome" OrElse a.IsGameModeMove AndAlso a.gmUseRandomMove = True Then
|
||||
a.CurrentPP -= 1
|
||||
If a.CurrentPP > 0 Then
|
||||
a.CurrentPP -= 1
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OwnUsedMirrorMove = True Then
|
||||
For Each a As Attack In Pokemon.Attacks
|
||||
If a.Name.ToLower = "mirror move" Then
|
||||
a.CurrentPP -= 1
|
||||
If a.CurrentPP > 0 Then
|
||||
a.CurrentPP -= 1
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@ -53,14 +59,20 @@
|
||||
If BattleScreen.FieldEffects.OppUsedRandomMove = True Then
|
||||
For Each a As Attack In Pokemon.Attacks
|
||||
If a.Name.ToLower = "metronome" OrElse a.IsGameModeMove AndAlso a.gmUseRandomMove = True Then
|
||||
a.CurrentPP -= 1
|
||||
If a.CurrentPP > 0 Then
|
||||
a.CurrentPP -= 1
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If BattleScreen.FieldEffects.OppUsedMirrorMove = True Then
|
||||
For Each a As Attack In Pokemon.Attacks
|
||||
If a.Name.ToLower = "mirror move" Then
|
||||
a.CurrentPP -= 1
|
||||
If a.CurrentPP > 0 Then
|
||||
a.CurrentPP -= 1
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@ -1807,9 +1819,15 @@
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " used " & moveUsed.Name & "!"))
|
||||
|
||||
If moveUsed.DeductPP(own, BattleScreen) = True Then
|
||||
moveUsed.CurrentPP -= 1
|
||||
If op.Ability.Name.ToLower() = "pressure" And moveUsed.CurrentPP > 0 Then
|
||||
If moveUsed.CurrentPP > 0 Then
|
||||
moveUsed.CurrentPP -= 1
|
||||
If op.Ability.Name.ToLower() = "pressure" And moveUsed.CurrentPP > 0 Then
|
||||
moveUsed.CurrentPP -= 1
|
||||
End If
|
||||
Else
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject("But it failed..."))
|
||||
moveUsed.MoveMisses(own, BattleScreen)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user