diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb index 05b1e1165..0814097cd 100644 --- a/P3D/Battle/BattleSystemV2/Battle.vb +++ b/P3D/Battle/BattleSystemV2/Battle.vb @@ -5938,6 +5938,23 @@ multiHP = CInt(.OwnPokemon.MaxHP / 6) End If End If + 'Clamp Animation + If Core.Player.ShowBattleAnimations <> 0 Then + ChangeCameraAngle(1, True, BattleScreen) + Dim ClampAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, True) + Dim offsetLeft As Single = 0.35 + Dim offsetRight As Single = -0.35 + ClampAnimation.AnimationPlaySound("Battle\Attacks\Water\Clamp", 0, 0) + Dim ClampEntityLeft = ClampAnimation.SpawnEntity(New Vector3(offsetLeft, -0.1, offsetLeft), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Left", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + Dim ClampEntityRight = ClampAnimation.SpawnEntity(New Vector3(offsetRight, -0.1, offsetRight), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Right", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + ClampAnimation.AnimationMove(ClampEntityLeft, False, -0.1, -0.1, -0.1, 0.02, False, False, 0, 0) + ClampAnimation.AnimationMove(ClampEntityRight, False, 0.1, -0.1, 0.1, 0.02, False, False, 0, 0) + ClampAnimation.AnimationMove(ClampEntityLeft, True, -0.35, -0.1, -0.35, 0.02, False, False, 2, 0) + ClampAnimation.AnimationMove(ClampEntityRight, True, 0.35, -0.1, 0.35, 0.02, False, False, 2, 0) + Dim SpawnEntity = ClampAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 2.5, 2) + ClampAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 4.5F, 0) + BattleScreen.BattleQuery.Add(ClampAnimation) + End If ReduceHP(multiHP, True, False, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by Clamp!", "clamp") End If End If @@ -6804,6 +6821,23 @@ multiHP = CInt(.OppPokemon.MaxHP / 6) End If End If + 'Clamp Animation + If Core.Player.ShowBattleAnimations <> 0 Then + ChangeCameraAngle(1, False, BattleScreen) + Dim ClampAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, False) + Dim offsetLeft As Single = -0.35 + Dim offsetRight As Single = 0.35 + ClampAnimation.AnimationPlaySound("Battle\Attacks\Water\Clamp", 0, 0) + Dim ClampEntityLeft = ClampAnimation.SpawnEntity(New Vector3(offsetLeft, -0.1, offsetLeft), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Left", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + Dim ClampEntityRight = ClampAnimation.SpawnEntity(New Vector3(offsetRight, -0.1, offsetRight), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Right", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + ClampAnimation.AnimationMove(ClampEntityLeft, False, -0.1, -0.1, -0.1, 0.02, False, False, 0, 0) + ClampAnimation.AnimationMove(ClampEntityRight, False, 0.1, -0.1, 0.1, 0.02, False, False, 0, 0) + ClampAnimation.AnimationMove(ClampEntityLeft, True, -0.35, -0.1, -0.35, 0.02, False, False, 2, 0) + ClampAnimation.AnimationMove(ClampEntityRight, True, 0.35, -0.1, 0.35, 0.02, False, False, 2, 0) + Dim SpawnEntity = ClampAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 2.5, 2) + ClampAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 4.5F, 0) + BattleScreen.BattleQuery.Add(ClampAnimation) + End If ReduceHP(multiHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by Clamp!", "clamp") End If End If diff --git a/P3D/Content/Sounds/Battle/Attacks/Water/Clamp.wav b/P3D/Content/Sounds/Battle/Attacks/Water/Clamp.wav new file mode 100644 index 000000000..dc33ea5fb Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Water/Clamp.wav differ diff --git a/P3D/Content/Textures/Battle/Water/Clamp_Left.png b/P3D/Content/Textures/Battle/Water/Clamp_Left.png new file mode 100644 index 000000000..4097d10c3 Binary files /dev/null and b/P3D/Content/Textures/Battle/Water/Clamp_Left.png differ diff --git a/P3D/Content/Textures/Battle/Water/Clamp_Right.png b/P3D/Content/Textures/Battle/Water/Clamp_Right.png new file mode 100644 index 000000000..7597cf147 Binary files /dev/null and b/P3D/Content/Textures/Battle/Water/Clamp_Right.png differ diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj index 24c369ba0..ec8947d4c 100644 --- a/P3D/P3D.vbproj +++ b/P3D/P3D.vbproj @@ -14704,6 +14704,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -15463,6 +15466,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/P3D/Pokemon/Attacks/Water/Clamp.vb b/P3D/Pokemon/Attacks/Water/Clamp.vb index 91db66f75..25066b13d 100644 --- a/P3D/Pokemon/Attacks/Water/Clamp.vb +++ b/P3D/Pokemon/Attacks/Water/Clamp.vb @@ -87,6 +87,26 @@ Namespace BattleSystem.Moves.Water End If End Sub + Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity) + Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip) + Dim offsetLeft As Single = -0.35 + Dim offsetRight As Single = 0.35 + If BattleFlip = True Then + offsetLeft = 0.35 + offsetRight = -0.35 + End If + MoveAnimation.AnimationPlaySound("Battle\Attacks\Water\Clamp", 0, 0) + Dim ClampEntityLeft = MoveAnimation.SpawnEntity(New Vector3(offsetLeft, -0.1, offsetLeft), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Left", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + Dim ClampEntityRight = MoveAnimation.SpawnEntity(New Vector3(offsetRight, -0.1, offsetRight), TextureManager.GetTexture("Textures\Battle\Water\Clamp_Right", New Rectangle(0, 0, 24, 64), ""), New Vector3(0.28F, 0.75F, 0.28F), 0.75F) + MoveAnimation.AnimationMove(ClampEntityLeft, False, -0.1, -0.1, -0.1, 0.02, False, False, 0, 0) + MoveAnimation.AnimationMove(ClampEntityRight, False, 0.1, -0.1, 0.1, 0.02, False, False, 0, 0) + MoveAnimation.AnimationMove(ClampEntityLeft, True, -0.35, -0.1, -0.35, 0.02, False, False, 2, 0) + MoveAnimation.AnimationMove(ClampEntityRight, True, 0.35, -0.1, 0.35, 0.02, False, False, 2, 0) + Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 2.5, 2) + MoveAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 4.5F, 0) + + BattleScreen.BattleQuery.Add(MoveAnimation) + End Sub End Class End Namespace \ No newline at end of file