mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 00:04:33 +02:00
Fix two turns: part 4. Also fixed confusion conditions for Outrage and similar moves. Attempt on fix "but there's no target" issue.
This commit is contained in:
parent
15ce4e002d
commit
f4980e079b
@ -939,8 +939,8 @@
|
|||||||
Dim bounce As Integer
|
Dim bounce As Integer
|
||||||
Dim dig As Integer
|
Dim dig As Integer
|
||||||
Dim dive As Integer
|
Dim dive As Integer
|
||||||
Dim skyDrop As Integer
|
Dim skyDrop As Integer 'not implemented yet
|
||||||
Dim shadowForce As Integer
|
Dim shadowForce As Integer 'not implemented yet
|
||||||
Dim skullBash As Integer
|
Dim skullBash As Integer
|
||||||
Dim skyAttack As Integer
|
Dim skyAttack As Integer
|
||||||
Dim solarBeam As Integer
|
Dim solarBeam As Integer
|
||||||
@ -1243,6 +1243,7 @@
|
|||||||
If p.HasVolatileStatus(Pokemon.VolatileStatus.Flinch) = True Then
|
If p.HasVolatileStatus(Pokemon.VolatileStatus.Flinch) = True Then
|
||||||
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Flinch)
|
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Flinch)
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " flinched and couldn't move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " flinched and couldn't move!"))
|
||||||
|
moveUsed.InflictedFlinch(own, BattleScreen)
|
||||||
If p.Ability.Name.ToLower() = "steadfast" Then
|
If p.Ability.Name.ToLower() = "steadfast" Then
|
||||||
RaiseStat(own, Not own, BattleScreen, "Speed", 1, "", "steadfast")
|
RaiseStat(own, Not own, BattleScreen, "Speed", 1, "", "steadfast")
|
||||||
End If
|
End If
|
||||||
@ -1350,7 +1351,18 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'If there's no opponent (opponent is fainted), skip to end of turn:
|
'If there's no opponent (opponent is fainted), skip to end of turn:
|
||||||
If moveUsed.Target <> Attack.Targets.Self And moveUsed.Target <> Attack.Targets.All Then
|
Dim NoTargetCheck As Boolean = True
|
||||||
|
If moveUsed.ProtectAffected = False Then
|
||||||
|
NoTargetCheck = False
|
||||||
|
Select Case moveUsed.Name.ToLower
|
||||||
|
Case "accupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
|
||||||
|
NoTargetCheck = True
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
If IsChargingTurn(BattleScreen, own, moveUsed) Then
|
||||||
|
NoTargetCheck = False
|
||||||
|
End If
|
||||||
|
If NoTargetCheck = True Then
|
||||||
If op.HP <= 0 Or op.Status = Pokemon.StatusProblems.Fainted Then
|
If op.HP <= 0 Or op.Status = Pokemon.StatusProblems.Fainted Then
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject("But there was no target..."))
|
BattleScreen.BattleQuery.Add(New TextQueryObject("But there was no target..."))
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1392,7 +1404,7 @@
|
|||||||
If moveUsed.ProtectAffected = False Then
|
If moveUsed.ProtectAffected = False Then
|
||||||
UseTwoTurnCheck = False
|
UseTwoTurnCheck = False
|
||||||
Select Case moveUsed.Name.ToLower
|
Select Case moveUsed.Name.ToLower
|
||||||
Case "psych up", "play nice", "role play"
|
Case "accupressure", "confide", "feint", "hold hands", "hyperspace fury", "hyperspace hole", "phantom force", "psych up", "play nice", "roar", "role play", "shadow force", "sketch", "transform", "whirlwind"
|
||||||
UseTwoTurnCheck = True
|
UseTwoTurnCheck = True
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
@ -1709,6 +1709,15 @@
|
|||||||
'DO NOTHING
|
'DO NOTHING
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Event that occurs when a flinch has been inflicted.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||||
|
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||||
|
Public Overridable Sub InflictedFlinch(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||||
|
'DO NOTHING
|
||||||
|
End Sub
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Returns the attack stat of a Pokémon (Physical or Special).
|
''' Returns the attack stat of a Pokémon (Physical or Special).
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
@ -73,13 +73,25 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
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 p As Pokemon
|
||||||
|
If own = True Then
|
||||||
|
outrage = BattleScreen.FieldEffects.OwnOutrage
|
||||||
|
p = BattleScreen.OwnPokemon
|
||||||
|
Else
|
||||||
|
outrage = BattleScreen.FieldEffects.OppOutrage
|
||||||
|
p = BattleScreen.OppPokemon
|
||||||
|
End If
|
||||||
|
|
||||||
|
If outrage = 1 Then
|
||||||
|
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s Outrage stopped.", "move:outrage")
|
||||||
|
End If
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
BattleScreen.FieldEffects.OwnOutrage = 0
|
BattleScreen.FieldEffects.OwnOutrage = 0
|
||||||
Else
|
Else
|
||||||
BattleScreen.FieldEffects.OppOutrage = 0
|
BattleScreen.FieldEffects.OppOutrage = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:outrage")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||||
@ -94,6 +106,9 @@
|
|||||||
Interruption(own, BattleScreen)
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -161,6 +161,10 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
@ -159,6 +159,10 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -162,6 +162,10 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -73,13 +73,25 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||||
|
Dim petalDance As Integer = 0
|
||||||
|
Dim p As Pokemon
|
||||||
|
If own = True Then
|
||||||
|
petalDance = BattleScreen.FieldEffects.OwnPetalDance
|
||||||
|
p = BattleScreen.OwnPokemon
|
||||||
|
Else
|
||||||
|
petalDance = BattleScreen.FieldEffects.OppPetalDance
|
||||||
|
p = BattleScreen.OppPokemon
|
||||||
|
End If
|
||||||
|
|
||||||
|
If petalDance = 1 Then
|
||||||
|
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s PetalDance stopped.", "move:petaldance")
|
||||||
|
End If
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
BattleScreen.FieldEffects.OwnPetalDance = 0
|
BattleScreen.FieldEffects.OwnPetalDance = 0
|
||||||
Else
|
Else
|
||||||
BattleScreen.FieldEffects.OppPetalDance = 0
|
BattleScreen.FieldEffects.OppPetalDance = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:petaldance")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||||
@ -94,6 +106,9 @@
|
|||||||
Interruption(own, BattleScreen)
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -180,6 +180,10 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -163,6 +163,9 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
@ -122,6 +122,10 @@
|
|||||||
Interruption(own, BattleScreen)
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
@ -161,6 +161,9 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -163,6 +163,9 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -73,13 +73,25 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
Private Sub Interruption(ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||||
|
Dim thrash As Integer = 0
|
||||||
|
Dim p As Pokemon
|
||||||
|
If own = True Then
|
||||||
|
thrash = BattleScreen.FieldEffects.OwnThrash
|
||||||
|
p = BattleScreen.OwnPokemon
|
||||||
|
Else
|
||||||
|
thrash = BattleScreen.FieldEffects.OppThrash
|
||||||
|
p = BattleScreen.OppPokemon
|
||||||
|
End If
|
||||||
|
|
||||||
|
If thrash = 1 Then
|
||||||
|
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, p.GetDisplayName() & "'s Thrash stopped.", "move:thrash")
|
||||||
|
End If
|
||||||
If own = True Then
|
If own = True Then
|
||||||
BattleScreen.FieldEffects.OwnThrash = 0
|
BattleScreen.FieldEffects.OwnThrash = 0
|
||||||
Else
|
Else
|
||||||
BattleScreen.FieldEffects.OppThrash = 0
|
BattleScreen.FieldEffects.OppThrash = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
BattleScreen.Battle.InflictConfusion(own, own, BattleScreen, "", "move:thrash")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||||
@ -94,6 +106,9 @@
|
|||||||
Interruption(own, BattleScreen)
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -64,7 +64,7 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub StopMove(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
|
||||||
If own = False Then
|
If own = False Then
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
@ -79,11 +79,23 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHasNoEffect(own As Boolean, BattleScreen As BattleScreen)
|
||||||
Me.StopMove(own, BattleScreen)
|
Me.Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveFailsSoundproof(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveFailsSoundproof(own As Boolean, BattleScreen As BattleScreen)
|
||||||
Me.StopMove(own, BattleScreen)
|
Me.Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub MoveProtectedDetected(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
@ -122,6 +122,10 @@ Namespace BattleSystem.Moves.Rock
|
|||||||
Interruption(own, BattleScreen)
|
Interruption(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
Interruption(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
@ -165,6 +165,9 @@
|
|||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub InflictedFlinch(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
MoveFails(own, BattleScreen)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
Loading…
x
Reference in New Issue
Block a user