mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 16:24:45 +02:00
Fix Sleep Talk & Snore not working while asleep
This commit is contained in:
parent
4edb20faae
commit
0415df9ee3
@ -1212,14 +1212,18 @@
|
|||||||
op = BattleScreen.OppPokemon
|
op = BattleScreen.OppPokemon
|
||||||
pNPC = BattleScreen.OwnPokemonNPC
|
pNPC = BattleScreen.OwnPokemonNPC
|
||||||
opNPC = BattleScreen.OppPokemonNPC
|
opNPC = BattleScreen.OppPokemonNPC
|
||||||
|
If Not (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) Then
|
||||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
op = BattleScreen.OwnPokemon
|
op = BattleScreen.OwnPokemon
|
||||||
pNPC = BattleScreen.OppPokemonNPC
|
pNPC = BattleScreen.OppPokemonNPC
|
||||||
opNPC = BattleScreen.OwnPokemonNPC
|
opNPC = BattleScreen.OwnPokemonNPC
|
||||||
|
If Not (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
||||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
If WildHasEscaped Then
|
If WildHasEscaped Then
|
||||||
WildHasEscaped = False
|
WildHasEscaped = False
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@ -1351,6 +1355,7 @@
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
' If the last move was Sleep Talk, don't do sleep animation
|
||||||
If (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
If (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) OrElse (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
||||||
If own Then
|
If own Then
|
||||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||||
@ -1358,6 +1363,9 @@
|
|||||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
' If the used move is not Snore, do sleep animation or wake up
|
||||||
|
If Not (sleepTurns > 0 AndAlso moveUsed.ID = 173) Then
|
||||||
|
|
||||||
If sleepTurns > 0 Then
|
If sleepTurns > 0 Then
|
||||||
ChangeCameraAngle(1, own, BattleScreen)
|
ChangeCameraAngle(1, own, BattleScreen)
|
||||||
'Sleep Animation
|
'Sleep Animation
|
||||||
@ -1386,6 +1394,7 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If p.Ability.Name.ToLower() = "truant" Then
|
If p.Ability.Name.ToLower() = "truant" Then
|
||||||
Dim truantTurn As Integer = BattleScreen.FieldEffects.OwnTruantRound
|
Dim truantTurn As Integer = BattleScreen.FieldEffects.OwnTruantRound
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
|
||||||
Dim disabledMoves() As Integer = {214, 274, 117, 340, 448, 383, 91, 291, 19, 264, 382, 118, 119, 467, 166, 130, 214, 143, 76, 13, 253}
|
Dim disabledMoves() As Integer = {214, 274, 117, 340, 448, 383, 91, 291, 19, 264, 382, 118, 119, 467, 166, 130, 143, 76, 13, 253}
|
||||||
|
|
||||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||||
If own = False Then
|
If own = False Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user