Fixed two turn moves, part 3

This commit is contained in:
CaptainSegis 2016-12-20 01:00:03 -05:00
parent d1e58ff2eb
commit 15ce4e002d
10 changed files with 200 additions and 11 deletions

View File

@ -934,6 +934,7 @@
#End Region #End Region
Public Function IsChargingTurn(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal moveUsed As Attack) As Boolean Public Function IsChargingTurn(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal moveUsed As Attack) As Boolean
Dim p As Pokemon Dim p As Pokemon
Dim fly As Integer Dim fly As Integer
Dim bounce As Integer Dim bounce As Integer
Dim dig As Integer Dim dig As Integer

View File

@ -120,6 +120,14 @@
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnBounceCounter = 0
Else
BattleScreen.FieldEffects.OppBounceCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim bounce As Integer = BattleScreen.FieldEffects.OwnBounceCounter Dim bounce As Integer = BattleScreen.FieldEffects.OwnBounceCounter
If own = False Then If own = False Then

View File

@ -119,7 +119,13 @@
Return False Return False
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnFlyCounter = 0
Else
BattleScreen.FieldEffects.OppFlyCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
If own = False Then If own = False Then

View File

@ -122,25 +122,46 @@
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnSkyAttackCounter = 0
Else
BattleScreen.FieldEffects.OppSkyAttackCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim skyattack As Integer = BattleScreen.FieldEffects.OwnSkyAttackCounter Dim SkyAttack As Integer = BattleScreen.FieldEffects.OwnSkyAttackCounter
If own = False Then If own = False Then
skyattack = BattleScreen.FieldEffects.OppSkyAttackCounter SkyAttack = BattleScreen.FieldEffects.OppSkyAttackCounter
End If End If
If skyattack = 0 Then If SkyAttack = 0 Then
Return False Return False
Else Else
Return True Return True
End If End If
End Function End Function
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen) Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If Core.Random.Next(0, 100) < Me.GetEffectChance(0, own, BattleScreen) Then If own = True Then
BattleScreen.Battle.InflictFlinch(Not own, own, BattleScreen, "", "move:skyattack") BattleScreen.FieldEffects.OwnSkyAttackCounter = 0
Else
BattleScreen.FieldEffects.OppSkyAttackCounter = 0
End If End If
End Sub End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -147,6 +147,39 @@
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim solarBeam As Integer = BattleScreen.FieldEffects.OwnSolarBeam
If own = False Then
solarBeam = BattleScreen.FieldEffects.OppSolarBeam
End If
If solarBeam = 0 Then
Return False
Else
Return True
End If
End Function
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnSolarBeam = 0
Else
BattleScreen.FieldEffects.OppSolarBeam = 0
End If
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -94,16 +94,15 @@
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
End If End If
Dim hasToCharge As Boolean = True
If Not p.Item Is Nothing Then If Not p.Item Is Nothing Then
If p.Item.Name.ToLower() = "power herb" And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then If p.Item.Name.ToLower() = "power herb" And BattleScreen.FieldEffects.CanUseItem(Own) = True And BattleScreen.FieldEffects.CanUseOwnItem(Own, BattleScreen) = True Then
If BattleScreen.Battle.RemoveHeldItem(Own, Own, BattleScreen, "Power Herb pushed the use of Dig!", "move:dig") = True Then If BattleScreen.Battle.RemoveHeldItem(Own, Own, BattleScreen, "Power Herb pushed the use of Dig!", "move:dig") = True Then
hasToCharge = False digCounter = 1
End If End If
End If End If
End If End If
If digCounter = 0 And hasToCharge = True Then If digCounter = 0 Then
If Own = True Then If Own = True Then
BattleScreen.FieldEffects.OwnDigCounter = 1 BattleScreen.FieldEffects.OwnDigCounter = 1
Else Else
@ -131,6 +130,39 @@
BattleScreen.FieldEffects.OppDigCounter = 0 BattleScreen.FieldEffects.OppDigCounter = 0
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim dig As Integer = BattleScreen.FieldEffects.OwnDigCounter
If own = False Then
dig = BattleScreen.FieldEffects.OppDigCounter
End If
If dig = 0 Then
Return False
Else
Return True
End If
End Function
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnDigCounter = 0
Else
BattleScreen.FieldEffects.OppDigCounter = 0
End If
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class End Class

View File

@ -93,6 +93,46 @@
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnBideCounter = 0
Else
BattleScreen.FieldEffects.OppBideCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim bide As Integer = BattleScreen.FieldEffects.OwnBideCounter
If own = False Then
bide = BattleScreen.FieldEffects.OppBideCounter
End If
If bide = 0 Then
Return False
Else
Return True
End If
End Function
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnBideCounter = 0
Else
BattleScreen.FieldEffects.OppBideCounter = 0
End If
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -120,6 +120,14 @@
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnRazorWindCounter = 0
Else
BattleScreen.FieldEffects.OppRazorWindCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim razorWind As Integer = BattleScreen.FieldEffects.OwnRazorWindCounter Dim razorWind As Integer = BattleScreen.FieldEffects.OwnRazorWindCounter
If own = False Then If own = False Then
@ -133,6 +141,26 @@
End If End If
End Function End Function
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnRazorWindCounter = 0
Else
BattleScreen.FieldEffects.OppRazorWindCounter = 0
End If
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub AbsorbedBySubstitute(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -122,6 +122,14 @@
End If End If
End Function End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
BattleScreen.FieldEffects.OwnSkullBashCounter = 0
Else
BattleScreen.FieldEffects.OppSkullBashCounter = 0
End If
End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim skullBash As Integer = BattleScreen.FieldEffects.OwnSkullBashCounter Dim skullBash As Integer = BattleScreen.FieldEffects.OwnSkullBashCounter
If own = False Then If own = False Then

View File

@ -111,7 +111,7 @@
BattleScreen.FieldEffects.OppDiveCounter = 1 BattleScreen.FieldEffects.OppDiveCounter = 1
End If End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " burrowed its way underground!")) BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " dived into the water!"))
Return True Return True
Else Else
@ -132,6 +132,18 @@
BattleScreen.FieldEffects.OppDiveCounter = 0 BattleScreen.FieldEffects.OppDiveCounter = 0
End If End If
End Sub End Sub
Public Overrides Function DeductPP(own As Boolean, BattleScreen As BattleScreen) As Boolean
Dim Dive As Integer = BattleScreen.FieldEffects.OwnDiveCounter
If own = False Then
Dive = BattleScreen.FieldEffects.OppDiveCounter
End If
If Dive = 0 Then
Return False
Else
Return True
End If
End Function
Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen) Private Sub MoveFails(own As Boolean, BattleScreen As BattleScreen)
If own = True Then If own = True Then