Attempt on fixing sleep infliction interaction with multi turn moves counters.

This commit is contained in:
CaptainSegis 2017-01-12 18:15:53 -05:00
parent 9ab5207271
commit 70714a9005
17 changed files with 64 additions and 1 deletions

View File

@ -1105,6 +1105,7 @@
End If
If p.Status = Pokemon.StatusProblems.Sleep Then
moveUsed.IsSleeping(own, BattleScreen)
Dim sleepTurns As Integer = BattleScreen.FieldEffects.OwnSleepTurns
If Not own Then
sleepTurns = BattleScreen.FieldEffects.OppSleepTurns
@ -2747,7 +2748,6 @@
End If
End If
End If
Return True
End If
End If

View File

@ -1726,6 +1726,15 @@
'DO NOTHING
End Sub
''' <summary>
''' Event that occurs when a the pokemon has been put to sleep.
''' </summary>
''' <param name="Own">If the own Pokémon used the move.</param>
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
Public Overridable Sub IsSleeping(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
'DO NOTHING
End Sub
''' <summary>
''' Returns the attack stat of a Pokémon (Physical or Special).
''' </summary>

View File

@ -109,6 +109,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -165,6 +165,10 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -163,6 +163,9 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -166,6 +166,9 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -109,6 +109,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -184,6 +184,10 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -167,6 +167,9 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -126,6 +126,9 @@
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -133,6 +133,10 @@
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -164,6 +164,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -166,6 +166,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -109,6 +109,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -98,6 +98,9 @@
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -126,6 +126,9 @@ Namespace BattleSystem.Moves.Rock
Interruption(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
Interruption(own, BattleScreen)
End Sub
End Class
End Namespace

View File

@ -168,6 +168,10 @@
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
Public Overrides Sub IsSleeping(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
End Class
End Namespace