diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb
index 4cd4374e4..3be35d01b 100644
--- a/P3D/Battle/BattleSystemV2/Battle.vb
+++ b/P3D/Battle/BattleSystemV2/Battle.vb
@@ -2113,6 +2113,14 @@
'Opp Pokémon move animation! This displays the move effects that target the other Pokémon and appear after the camera switched around.
moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
+ 'Reset Fly if needed after the animation definition
+ If own = True And BattleScreen.FieldEffects.OwnFlyCounter = 2 Then
+ BattleScreen.FieldEffects.OwnFlyCounter = 0
+ End If
+ If own = False And BattleScreen.FieldEffects.OppFlyCounter = 2 Then
+ BattleScreen.FieldEffects.OwnFlyCounter = 0
+ End If
+
If moveUsed.IsDamagingMove = True Then
ChangeCameraAngle(2, own, BattleScreen)
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
@@ -4553,13 +4561,21 @@
End If
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
End If
+
+ Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
+ If own = False Then
+ fly = BattleScreen.FieldEffects.OppFlyCounter
+ End If
+
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
- Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
- HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
- BattleScreen.BattleQuery.Add(HitAnimation)
+ If fly = 0 Then
+ Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
+ HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
+ HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
+ HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
+ HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
+ BattleScreen.BattleQuery.Add(HitAnimation)
+ End If
End If
If own = True Then
diff --git a/P3D/Content/Textures/Battle/Flying/Fly.png b/P3D/Content/Textures/Battle/Flying/Fly.png
new file mode 100644
index 000000000..f1823c7e9
Binary files /dev/null and b/P3D/Content/Textures/Battle/Flying/Fly.png differ
diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj
index e9d35c693..96174e77e 100644
--- a/P3D/P3D.vbproj
+++ b/P3D/P3D.vbproj
@@ -18437,6 +18437,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
diff --git a/P3D/Pokemon/Attacks/Attack.vb b/P3D/Pokemon/Attacks/Attack.vb
index 326055d6e..e95569d03 100644
--- a/P3D/Pokemon/Attacks/Attack.vb
+++ b/P3D/Pokemon/Attacks/Attack.vb
@@ -2361,6 +2361,30 @@
End If
End Sub
+ Public Sub FailPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
+ If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
+ Dim BattleFlip As Boolean = False
+ Dim CurrentPokemon As Pokemon = BattleScreen.OwnPokemon
+ Dim CurrentEntity As NPC = BattleScreen.OwnPokemonNPC
+ If own = False Then
+ BattleFlip = True
+ CurrentPokemon = BattleScreen.OppPokemon
+ CurrentEntity = BattleScreen.OppPokemonNPC
+ End If
+ Me.InternalFailPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
+ End If
+ End Sub
+
+ Public Overridable Sub InternalFailPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
+ If Me.IsGameModeMove = True Then
+ If gmUseMoveAnims IsNot Nothing Then
+ gmUseMoveAnims.InternalFailPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
+ End If
+ Else
+ 'Override this method in the attack class to insert the move animation query objects into the queue.
+ End If
+ End Sub
+
#End Region
'''
diff --git a/P3D/Pokemon/Attacks/Flying/Fly.vb b/P3D/Pokemon/Attacks/Flying/Fly.vb
index ed21906ef..492b82b24 100644
--- a/P3D/Pokemon/Attacks/Flying/Fly.vb
+++ b/P3D/Pokemon/Attacks/Flying/Fly.vb
@@ -110,14 +110,15 @@
BattleScreen.FieldEffects.OppFlyCounter = 1
End If
Return True
- Else
+ ElseIf fly = 1 Then
If Own = True Then
- BattleScreen.FieldEffects.OwnFlyCounter = 0
+ BattleScreen.FieldEffects.OwnFlyCounter = 2
Else
- BattleScreen.FieldEffects.OppFlyCounter = 0
+ BattleScreen.FieldEffects.OppFlyCounter = 2
End If
Return False
End If
+ Return False
End Function
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
If own = True Then
@@ -145,6 +146,7 @@
Else
BattleScreen.FieldEffects.OppFlyCounter = 0
End If
+ Me.FailPokemonMoveAnimation(BattleScreen, own)
End Sub
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
@@ -174,6 +176,85 @@
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
MoveFails(own, BattleScreen)
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
+ Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
+ If BattleFlip = True Then
+ fly = BattleScreen.FieldEffects.OppFlyCounter
+ End If
+ Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
+
+ If fly = 0 Then
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Start", 0, 0)
+ MoveAnimation.AnimationFade(Nothing, False, 0.2F, False, 0.0F, 0, 0)
+ Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 0.0F)
+ MoveAnimation.AnimationFade(FlyEntity, False, 0.2F, True, 1.0F, 0, 0)
+ MoveAnimation.AnimationMove(FlyEntity, True, 0.0, 2.0, 0.0, 0.06, False, False, 1.4F, 0.0,,, 0.06, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 32, 32, 32), ""), 1.3F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 64, 32, 32), ""), 1.4F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 96, 32, 32), ""), 1.5F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 128, 32, 32), ""), 1.6F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 160, 32, 32), ""), 1.7F, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ Else
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Start", 0, 0)
+ Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0, 0.9, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1.0F)
+ MoveAnimation.AnimationMove(FlyEntity, True, 2.0, 0.5, 0, 0.07, False, False, 0.0F, 0.0,,, 0.035, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End If
+ End Sub
+ Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
+ Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
+ If BattleFlip = True Then
+ fly = BattleScreen.FieldEffects.OppFlyCounter
+ End If
+
+ If fly = 2 Then
+ Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
+
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Hit", 0, 0)
+ Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(-2, 0.9, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1.0F)
+ MoveAnimation.AnimationMove(FlyEntity, True, 0.0, 0.0, 0.0, 0.07, False, False, 0.0, 0.0,,, 0.035, 3)
+
+ If BattleFlip = False Then
+ MoveAnimation.AnimationFade(BattleScreen.OwnPokemonNPC, False, 1, True, 1.0F, 0, 0)
+ Else
+ MoveAnimation.AnimationFade(BattleScreen.OppPokemonNPC, False, 1, True, 1.0F, 0, 0)
+ End If
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End If
+ End Sub
+ Public Overrides Sub InternalFailPokemonMoveAnimation(BattleScreen As BattleScreen, BattleFlip As Boolean, CurrentPokemon As Pokemon, CurrentEntity As NPC)
+ Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
+ Dim FadeDelay As Single = 0.0F
+ Dim FadeSpeed As Single = 1.0F
+
+ Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
+ If BattleFlip = True Then
+ fly = BattleScreen.FieldEffects.OppFlyCounter
+ End If
+
+ If BattleScreen.FieldEffects.Gravity > 0 Then
+ FadeDelay = 2.3F
+ FadeSpeed = 0.2F
+ Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0, 2, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 160, 32, 32), ""), New Vector3(0.5F), 1.0F)
+ MoveAnimation.AnimationMove(FlyEntity, False, 0.0, 0.0, 0.0, 0.1F, False, False, 0.0F, 0.0,,, 0.1F, 1)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 128, 32, 32), ""), 0.0F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 96, 32, 32), ""), 0.1F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 64, 32, 32), ""), 0.2F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 32, 32, 32), ""), 0.3F, 0)
+ MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), 0.4F, 0)
+ MoveAnimation.AnimationFade(FlyEntity, True, FadeSpeed, False, 0.0F, FadeDelay + 0.1F, 0, 1)
+ End If
+ If BattleFlip = False Then
+ MoveAnimation.AnimationFade(BattleScreen.OwnPokemonNPC, False, FadeSpeed, True, 1.0F, FadeDelay, 0)
+ Else
+ MoveAnimation.AnimationFade(BattleScreen.OppPokemonNPC, False, FadeSpeed, True, 1.0F, FadeDelay, 0)
+ End If
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file