mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 00:04:33 +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
|
||||
pNPC = BattleScreen.OwnPokemonNPC
|
||||
opNPC = BattleScreen.OppPokemonNPC
|
||||
If Not (own AndAlso BattleScreen.FieldEffects.OwnLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OwnLastMove.ID = 214) Then
|
||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||
End If
|
||||
Else
|
||||
p = BattleScreen.OppPokemon
|
||||
op = BattleScreen.OwnPokemon
|
||||
pNPC = BattleScreen.OppPokemonNPC
|
||||
opNPC = BattleScreen.OwnPokemonNPC
|
||||
If Not (Not own AndAlso BattleScreen.FieldEffects.OppLastMove IsNot Nothing AndAlso BattleScreen.FieldEffects.OppLastMove.ID = 214) Then
|
||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||
End If
|
||||
End If
|
||||
If WildHasEscaped Then
|
||||
WildHasEscaped = False
|
||||
Exit Sub
|
||||
@ -1351,6 +1355,7 @@
|
||||
Exit Sub
|
||||
End If
|
||||
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 Then
|
||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||
@ -1358,6 +1363,9 @@
|
||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||
End If
|
||||
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
|
||||
ChangeCameraAngle(1, own, BattleScreen)
|
||||
'Sleep Animation
|
||||
@ -1386,6 +1394,7 @@
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If p.Ability.Name.ToLower() = "truant" Then
|
||||
Dim truantTurn As Integer = BattleScreen.FieldEffects.OwnTruantRound
|
||||
|
@ -56,7 +56,7 @@
|
||||
End Sub
|
||||
|
||||
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
|
||||
If own = False Then
|
||||
|
Loading…
x
Reference in New Issue
Block a user