Fix some multiturn moves using pp every time

Outrage, Petal Dance, Thrash, Uproar & Rollout now only use pp the first time
This commit is contained in:
JappaWakka 2023-02-02 13:54:33 +01:00
parent 4042783c4c
commit f30ed7af8f
5 changed files with 58 additions and 0 deletions

View File

@ -71,6 +71,18 @@
End If End If
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim outrage As Integer = BattleScreen.FieldEffects.OwnOutrage
If own = False Then
outrage = BattleScreen.FieldEffects.OppOutrage
End If
If outrage > 0 Then
Return False
Else
Return True
End If
End Function
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
Dim outrage As Integer = 0 Dim outrage As Integer = 0

View File

@ -94,7 +94,18 @@
BattleScreen.FieldEffects.OppPetalDance = 0 BattleScreen.FieldEffects.OppPetalDance = 0
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim petalDance As Integer = BattleScreen.FieldEffects.OwnPetalDance
If own = False Then
petalDance = BattleScreen.FieldEffects.OppPetalDance
End If
If petalDance > 0 Then
Return False
Else
Return True
End If
End Function
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen) Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen) Interruption(own, BattleScreen)
End Sub End Sub

View File

@ -93,7 +93,18 @@
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim thrash As Integer = BattleScreen.FieldEffects.OwnThrash
If own = False Then
thrash = BattleScreen.FieldEffects.OppThrash
End If
If thrash > 0 Then
Return False
Else
Return True
End If
End Function
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen) Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen) Interruption(own, BattleScreen)
End Sub End Sub

View File

@ -63,6 +63,18 @@
End If End If
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim uproar As Integer = BattleScreen.FieldEffects.OwnUproar
If own = False Then
uproar = BattleScreen.FieldEffects.OwnUproar
End If
If uproar > 0 Then
Return False
Else
Return True
End If
End Function
Private Sub Interruption(own As Boolean, BattleScreen As BattleScreen) Private Sub Interruption(own As Boolean, BattleScreen As BattleScreen)
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon

View File

@ -101,6 +101,18 @@ Namespace BattleSystem.Moves.Rock
End If End If
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim rollout As Integer = BattleScreen.FieldEffects.OwnRolloutCounter
If own = False Then
rollout = BattleScreen.FieldEffects.OppRolloutCounter
End If
If rollout > 0 Then
Return False
Else
Return True
End If
End Function
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
If own = True Then If own = True Then