diff --git a/P3D/Battle/BattleAnimations/BABackground.vb b/P3D/Battle/BattleAnimations/BABackground.vb
new file mode 100644
index 000000000..929acc114
--- /dev/null
+++ b/P3D/Battle/BattleAnimations/BABackground.vb
@@ -0,0 +1,60 @@
+Public Class BABackground
+
+ Inherits BattleAnimation3D
+
+ Public TransitionSpeed As Single = 0.01F
+ Public FadeIn As Boolean = False
+ Public FadeOut As Boolean = False
+ Public BackgroundOpacity As Single = 1.0F
+ Public EndState As Single = 0.0F
+ Public Texture As Texture2D
+
+ Public Sub New(ByVal Texture As Texture2D, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, FadeOut As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 0.0F)
+ MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+ Me.Texture = Texture
+ Me.EndState = EndState
+ Me.FadeIn = FadeIn
+ Me.FadeOut = FadeOut
+ Me.TransitionSpeed = TransitionSpeed
+
+ Me.BackgroundOpacity = StartState
+ Me.Visible = False
+
+ Me.AnimationType = AnimationTypes.Background
+ End Sub
+
+ Public Overrides Sub Render()
+ If startDelay = 0.0F AndAlso Me.BackgroundOpacity > 0.0F Then
+ Core.SpriteBatch.Draw(Me.Texture, New Rectangle(0, 0, windowSize.Width, windowSize.Height), New Color(255, 255, 255, CInt(255 * Me.BackgroundOpacity)))
+ End If
+ End Sub
+
+ Public Overrides Sub DoActionActive()
+ If Me.FadeIn = True Then
+ If Me.EndState > Me.BackgroundOpacity Then
+ Me.BackgroundOpacity += Me.TransitionSpeed
+ If Me.BackgroundOpacity >= Me.EndState Then
+ Me.BackgroundOpacity = Me.EndState
+ Me.FadeIn = False
+ Me.EndState = 0
+ End If
+ End If
+ Else
+ If Me.FadeOut = True Then
+ If Me.EndState < Me.BackgroundOpacity Then
+ Me.BackgroundOpacity -= Me.TransitionSpeed
+ If Me.BackgroundOpacity <= Me.EndState Then
+ Me.BackgroundOpacity = Me.EndState
+ End If
+ End If
+ If Me.BackgroundOpacity = Me.EndState Then
+ Me.Ready = True
+ End If
+ Else
+ Me.BackgroundOpacity = Me.EndState
+ Me.Ready = True
+ End If
+ End If
+ End Sub
+
+End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BAEntityColor.vb b/P3D/Battle/BattleAnimations/BAEntityColor.vb
new file mode 100644
index 000000000..75ba229d4
--- /dev/null
+++ b/P3D/Battle/BattleAnimations/BAEntityColor.vb
@@ -0,0 +1,67 @@
+Public Class BAEntityColor
+
+ Inherits BattleAnimation3D
+
+ Public TargetEntity As Entity
+ Public TransitionSpeed As Single = 0.01F
+ Public FadeIn As Boolean = False
+ Public ColorTo As Vector3 = New Vector3(1.0F, 1.0F, 1.0F)
+
+ Public Sub New(ByVal Entity As Entity, ByVal TransitionSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal ColorTo As Color, Optional ByVal ColorFrom As Color = Nothing)
+ MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+
+ Me.TransitionSpeed = TransitionSpeed
+ Me.TargetEntity = Entity
+
+ If Not ColorFrom = Nothing Then
+ TargetEntity.Color = ColorFrom.ToVector3
+ End If
+ Me.ColorTo = ColorTo.ToVector3
+
+ Me.Visible = False
+
+ Me.AnimationType = AnimationTypes.Transition
+ End Sub
+
+ Public Overrides Sub DoActionActive()
+
+ If TargetEntity.Color.X > ColorTo.X Then
+ TargetEntity.Color.X -= CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.X <= ColorTo.X Then
+ TargetEntity.Color.X = ColorTo.X
+ End If
+ ElseIf TargetEntity.Color.X < ColorTo.X Then
+ TargetEntity.Color.X += CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.X >= ColorTo.X Then
+ TargetEntity.Color.X = ColorTo.X
+ End If
+ End If
+ If TargetEntity.Color.Y > ColorTo.Y Then
+ TargetEntity.Color.Y -= CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.Y <= ColorTo.Y Then
+ TargetEntity.Color.Y = ColorTo.Y
+ End If
+ ElseIf TargetEntity.Color.Y < ColorTo.Y Then
+ TargetEntity.Color.Y += CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.Y >= ColorTo.Y Then
+ TargetEntity.Color.Y = ColorTo.Y
+ End If
+ End If
+ If TargetEntity.Color.Z > ColorTo.Z Then
+ TargetEntity.Color.Z -= CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.Z <= ColorTo.Z Then
+ TargetEntity.Color.Z = ColorTo.Z
+ End If
+ ElseIf TargetEntity.Color.Z < ColorTo.Z Then
+ TargetEntity.Color.Z += CByte(Me.TransitionSpeed)
+ If TargetEntity.Color.Z >= ColorTo.Z Then
+ TargetEntity.Color.Z = ColorTo.Z
+ End If
+ End If
+
+ If TargetEntity.Color = ColorTo Then
+ Me.Ready = True
+ End If
+ End Sub
+
+End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BABillMove.vb b/P3D/Battle/BattleAnimations/BAEntityMove.vb
similarity index 85%
rename from P3D/Battle/BattleAnimations/BABillMove.vb
rename to P3D/Battle/BattleAnimations/BAEntityMove.vb
index 120d3b87f..daf6a2eba 100644
--- a/P3D/Battle/BattleAnimations/BABillMove.vb
+++ b/P3D/Battle/BattleAnimations/BAEntityMove.vb
@@ -1,10 +1,11 @@
-Public Class BABillMove
+Public Class BAEntityMove
Inherits BattleAnimation3D
Public TargetEntity As Entity
Public Destination As Vector3
Public MoveSpeed As Single
+ Public MoveYSpeed As Single
Public InterpolationSpeed As Single
Public SpinX As Boolean = False
Public SpinZ As Boolean = False
@@ -13,6 +14,7 @@
Public MovementCurve As Integer = 3
Private EasedIn As Boolean = False
Private EasedOut As Boolean = False
+ Public RemoveEntityAfter As Boolean
Public Enum Curves As Integer
EaseIn
EaseOut
@@ -20,11 +22,17 @@
Linear
End Enum
- Public Sub New(ByRef entity As Entity, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
+ Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3, Optional MoveYSpeed As Single = 0.0F)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+ Me.RemoveEntityAfter = RemoveEntityAfter
Me.Destination = Destination
Me.MoveSpeed = Speed
+ If MoveYSpeed = 0F Then
+ Me.MoveYSpeed = MoveSpeed
+ Else
+ Me.MoveYSpeed = MoveYSpeed
+ End If
Me.MovementCurve = CType(MovementCurve, Curves)
Me.SpinX = SpinX
@@ -33,7 +41,7 @@
Me.SpinSpeedZ = SpinZSpeed
Me.Visible = False
- Me.TargetEntity = entity
+ Me.TargetEntity = Entity
Select Case MovementCurve
Case Curves.EaseIn
@@ -59,8 +67,7 @@
Private Sub Spin()
If Me.SpinX = True Then
- Dim targetEntity = Me.TargetEntity
- targetEntity.Rotation.X += SpinSpeedX
+ TargetEntity.Rotation.X += SpinSpeedX
End If
If Me.SpinZ = True Then
TargetEntity.Rotation.Z += SpinSpeedZ
@@ -122,13 +129,13 @@
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
- TargetEntity.Position.Y += Me.MoveSpeed
+ TargetEntity.Position.Y += Me.MoveYSpeed
If TargetEntity.Position.Y >= Me.Destination.Y Then
TargetEntity.Position.Y = Me.Destination.Y
End If
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
- TargetEntity.Position.Y -= Me.MoveSpeed
+ TargetEntity.Position.Y -= Me.MoveYSpeed
If TargetEntity.Position.Y <= Me.Destination.Y Then
TargetEntity.Position.Y = Me.Destination.Y
@@ -186,5 +193,10 @@
Me.Ready = True
End If
End Sub
+ Public Overrides Sub DoRemoveEntity()
+ If Me.RemoveEntityAfter = True Then
+ TargetEntity.CanBeRemoved = True
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BABillOpacity.vb b/P3D/Battle/BattleAnimations/BAEntityOpacity.vb
similarity index 71%
rename from P3D/Battle/BattleAnimations/BABillOpacity.vb
rename to P3D/Battle/BattleAnimations/BAEntityOpacity.vb
index e2bc7e3d8..0f6fe5f55 100644
--- a/P3D/Battle/BattleAnimations/BABillOpacity.vb
+++ b/P3D/Battle/BattleAnimations/BAEntityOpacity.vb
@@ -1,4 +1,4 @@
-Public Class BABillOpacity
+Public Class BAEntityOpacity
Inherits BattleAnimation3D
@@ -6,9 +6,11 @@
Public TransitionSpeed As Single = 0.01F
Public FadeIn As Boolean = False
Public EndState As Single = 0.0F
+ Public RemoveEntityAfter As Boolean
- Public Sub New(ByVal entity As Entity, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
+ Public Sub New(ByVal entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+ Me.RemoveEntityAfter = RemoveEntityAfter
Me.EndState = EndState
Me.FadeIn = FadeIn
Me.TransitionSpeed = TransitionSpeed
@@ -41,5 +43,9 @@
Me.Ready = True
End If
End Sub
-
+ Public Overrides Sub DoRemoveEntity()
+ If Me.RemoveEntityAfter = True Then
+ TargetEntity.CanBeRemoved = True
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BAEntityRotate.vb b/P3D/Battle/BattleAnimations/BAEntityRotate.vb
new file mode 100644
index 000000000..2ac3c8b7e
--- /dev/null
+++ b/P3D/Battle/BattleAnimations/BAEntityRotate.vb
@@ -0,0 +1,137 @@
+Public Class BAEntityRotate
+
+ Inherits BattleAnimation3D
+
+ Dim TargetEntity As Entity
+ Dim RotationSpeedVector As Vector3
+ Dim EndRotation As Vector3
+ Dim DoReturn As Boolean = False
+ Dim ReturnVector As Vector3
+ Dim hasReturned As Boolean = False
+ Dim DoRotation As Vector3 = New Vector3(1.0F)
+ Public RemoveEntityAfter As Boolean = False
+
+ Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
+ MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+ Me.RemoveEntityAfter = RemoveEntityAfter
+ Me.RotationSpeedVector = RotationSpeedVector
+ Me.EndRotation = EndRotation
+ Me.ReturnVector = Me.Rotation
+ Me.TargetEntity = Entity
+ End Sub
+
+ Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean)
+ Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay)
+
+ If DoXRotation = False Then
+ DoRotation.X = 0.0F
+ End If
+ If DoYRotation = False Then
+ DoRotation.Y = 0.0F
+ End If
+ If DoZRotation = False Then
+ DoRotation.Z = 0.0F
+ End If
+ End Sub
+
+ Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
+ Me.New(Entity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation)
+
+ Me.DoReturn = DoReturn
+ End Sub
+
+ Public Overrides Sub DoActionActive()
+ If VectorReached() = False Then
+
+ If DoRotation.X = 1.0F Then
+ If TargetEntity.Rotation.X > Me.EndRotation.X Then
+ TargetEntity.Rotation.X += Me.RotationSpeedVector.X
+
+ If TargetEntity.Rotation.X <= Me.EndRotation.X Then
+ TargetEntity.Rotation.X = Me.EndRotation.X
+ End If
+ ElseIf TargetEntity.Rotation.X < Me.EndRotation.X Then
+ TargetEntity.Rotation.X += Me.RotationSpeedVector.X
+
+ If TargetEntity.Rotation.X >= Me.EndRotation.X Then
+ TargetEntity.Rotation.X = Me.EndRotation.X
+ End If
+ End If
+ End If
+
+ If DoRotation.Y = 1.0F Then
+ If TargetEntity.Rotation.Y > Me.EndRotation.Y Then
+ TargetEntity.Rotation.Y += Me.RotationSpeedVector.Y
+
+ If TargetEntity.Rotation.Y <= Me.EndRotation.Y Then
+ TargetEntity.Rotation.Y = Me.EndRotation.Y
+ End If
+ ElseIf TargetEntity.Rotation.Y < Me.EndRotation.Y Then
+ TargetEntity.Rotation.Y += Me.RotationSpeedVector.Y
+
+ If TargetEntity.Rotation.Y >= Me.EndRotation.Y Then
+ TargetEntity.Rotation.Y = Me.EndRotation.Y
+ End If
+ End If
+ End If
+
+ If DoRotation.Z = 1.0F Then
+ If TargetEntity.Rotation.Z > Me.EndRotation.Z Then
+ TargetEntity.Rotation.Z += Me.RotationSpeedVector.Z
+
+ If TargetEntity.Rotation.Z <= Me.EndRotation.Z Then
+ TargetEntity.Rotation.Z = Me.EndRotation.Z
+ End If
+ ElseIf TargetEntity.Rotation.Z < Me.EndRotation.Z Then
+ TargetEntity.Rotation.Z += Me.RotationSpeedVector.Z
+
+ If TargetEntity.Rotation.Z >= Me.EndRotation.Z Then
+ TargetEntity.Rotation.Z = Me.EndRotation.Z
+ End If
+ End If
+ End If
+
+ If VectorReached() = True Then
+ RotationReady()
+ End If
+ Else
+ RotationReady()
+ End If
+ End Sub
+
+ Private Sub RotationReady()
+ If Me.DoReturn = True And Me.hasReturned = False Then
+ Me.hasReturned = True
+ Me.EndRotation = Me.ReturnVector
+ Me.RotationSpeedVector = New Vector3(Me.RotationSpeedVector.X * -1, Me.RotationSpeedVector.Y * -1, Me.RotationSpeedVector.Z * -1)
+ Else
+ Me.Ready = True
+ End If
+ End Sub
+
+ Private Function VectorReached() As Boolean
+ If DoRotation.X = 1.0F Then
+ If EndRotation.X <> TargetEntity.Rotation.X Then
+ Return False
+ End If
+ End If
+ If DoRotation.Y = 1.0F Then
+ If EndRotation.Y <> TargetEntity.Rotation.Y Then
+ Return False
+ End If
+ End If
+ If DoRotation.Z = 1.0F Then
+ If EndRotation.Z <> TargetEntity.Rotation.Z Then
+ Return False
+ End If
+ End If
+
+ Return True
+ End Function
+
+ Public Overrides Sub DoRemoveEntity()
+ If Me.RemoveEntityAfter = True Then
+ TargetEntity.CanBeRemoved = True
+ End If
+ End Sub
+End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BABillSize.vb b/P3D/Battle/BattleAnimations/BAEntityScale.vb
similarity index 79%
rename from P3D/Battle/BattleAnimations/BABillSize.vb
rename to P3D/Battle/BattleAnimations/BAEntityScale.vb
index ce7ff373a..d48dc96a0 100644
--- a/P3D/Battle/BattleAnimations/BABillSize.vb
+++ b/P3D/Battle/BattleAnimations/BAEntityScale.vb
@@ -1,4 +1,4 @@
-Public Class BABillSize
+Public Class BAEntityScale
Inherits BattleAnimation3D
@@ -6,13 +6,14 @@
Public EndSize As Vector3
Public SizeSpeed As Single = 0.01F
Public TargetEntity As Entity
- Public Anchors As String
+ Public Anchors As String '1 = Bottom, 2 = Top, 3 = Left, 4 = Right. Combinations are possible.
Public Change As New Vector3(1)
+ Public RemoveEntityAfter As Boolean
- Public Sub New(ByVal Entity As Entity, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
+ Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, Scale, startDelay, endDelay)
-
+ Me.RemoveEntityAfter = RemoveEntityAfter
Me.Anchors = Anchors
Me.Grow = Grow
Me.EndSize = EndSize
@@ -78,22 +79,22 @@
'Bottom
If Anchors.Contains("1") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
- Me.Position.Y -= diffY / 2
+ TargetEntity.Position.Y -= diffY / 2
End If
'Top
If Anchors.Contains("2") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
- Me.Position.Y += diffY / 2
+ TargetEntity.Position.Y += diffY / 2
End If
'Left
If Anchors.Contains("3") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
- Me.Position.X -= diffX / 2
+ TargetEntity.Position.X -= diffX / 2
End If
'Right
If Anchors.Contains("4") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
- Me.Position.X += diffX / 2
+ TargetEntity.Position.X += diffX / 2
End If
If Me.EndSize = TargetEntity.Scale Then
@@ -104,5 +105,10 @@
Public Sub SetChange(ByVal changeX As Single, ByVal changeY As Single, ByVal changeZ As Single)
Me.Change = New Vector3(changeX, changeY, changeZ)
End Sub
+ Public Overrides Sub DoRemoveEntity()
+ If Me.RemoveEntityAfter = True Then
+ TargetEntity.CanBeRemoved = True
+ End If
+ End Sub
End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BAEntityTextureChange.vb b/P3D/Battle/BattleAnimations/BAEntityTextureChange.vb
new file mode 100644
index 000000000..ced0d473b
--- /dev/null
+++ b/P3D/Battle/BattleAnimations/BAEntityTextureChange.vb
@@ -0,0 +1,27 @@
+Public Class BAEntityTextureChange
+
+ Inherits BattleAnimation3D
+
+ Public Texture As Texture2D
+ Public TargetEntity As Entity
+ Public RemoveEntityAfter As Boolean
+
+ Public Sub New(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
+ MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
+ Me.RemoveEntityAfter = RemoveEntityAfter
+ Me.TargetEntity = Entity
+ Me.Texture = Texture
+ Me.AnimationType = AnimationTypes.Texture
+ End Sub
+
+ Public Overrides Sub DoActionActive()
+ TargetEntity.Textures = {Me.Texture}
+ Me.Ready = True
+ End Sub
+
+ Public Overrides Sub DoRemoveEntity()
+ If Me.RemoveEntityAfter = True Then
+ TargetEntity.CanBeRemoved = True
+ End If
+ End Sub
+End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BAMove.vb b/P3D/Battle/BattleAnimations/BAMove.vb
deleted file mode 100644
index c1220411d..000000000
--- a/P3D/Battle/BattleAnimations/BAMove.vb
+++ /dev/null
@@ -1,194 +0,0 @@
-Public Class BAMove
-
- Inherits BattleAnimation3D
-
- Public Destination As Vector3
- Public MoveSpeed As Single
- Public SpinX As Boolean = False
- Public SpinZ As Boolean = False
-
- Public InterpolationSpeed As Single
- Public SpinSpeedX As Single = 0.1F
- Public SpinSpeedZ As Single = 0.1F
- Public MovementCurve As Integer = 2
-
- Private EasedIn As Boolean = False
- Private EasedOut As Boolean = False
- Public Enum Curves As Integer
- EaseIn
- EaseOut
- EaseInAndOut
- Linear
- End Enum
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 2)
- MyBase.New(Position, Texture, Scale, startDelay, endDelay)
-
- Me.Position = Position
- Me.Destination = Destination
- Me.MovementCurve = CType(MovementCurve, Curves)
-
- Me.MoveSpeed = Speed
- Me.Scale = Scale
- Me.SpinSpeedX = SpinXSpeed
- Me.SpinSpeedZ = SpinZSpeed
-
- Me.SpinX = SpinX
- Me.SpinZ = SpinZ
-
- Select Case MovementCurve
- Case Curves.EaseIn
- InterpolationSpeed = 0.0F
- Case Curves.EaseOut
- InterpolationSpeed = MoveSpeed
- Case Curves.EaseInAndOut
- InterpolationSpeed = 0.0F
- Case Curves.Linear
- InterpolationSpeed = MoveSpeed
- End Select
-
- Me.AnimationType = AnimationTypes.Move
- End Sub
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Destination As Vector3, ByVal Speed As Single, ByVal startDelay As Single, ByVal endDelay As Single)
- Me.New(Position, Texture, Scale, Destination, Speed, False, False, startDelay, endDelay, 0.1, 0.1, 2)
- End Sub
-
- Public Overrides Sub DoActionUpdate()
- Spin()
- End Sub
-
- Public Overrides Sub DoActionActive()
- Move()
- End Sub
-
- Private Sub Spin()
- If Me.SpinX = True Then
- Me.Rotation.X += SpinSpeedX
- End If
- If Me.SpinZ = True Then
- Me.Rotation.Z += SpinSpeedZ
- End If
- End Sub
-
- Private Sub Move()
- Select Case MovementCurve
- Case Curves.EaseIn
- If EasedIn = False Then
- If InterpolationSpeed < MoveSpeed Then
- InterpolationSpeed += MoveSpeed / 10
- Else
- EasedIn = True
- InterpolationSpeed = MoveSpeed
- End If
- End If
- Case Curves.EaseOut
- If EasedOut = False Then
- If InterpolationSpeed > 0 Then
- InterpolationSpeed -= MoveSpeed / 10
- Else
- EasedOut = True
- InterpolationSpeed = 0
- End If
- End If
- Case Curves.EaseInAndOut
- If EasedIn = False Then
- If InterpolationSpeed < MoveSpeed Then
- InterpolationSpeed += MoveSpeed / 10
- Else
- EasedIn = True
- InterpolationSpeed = MoveSpeed
- End If
- Else
- If EasedOut = False Then
- If InterpolationSpeed > 0 Then
- InterpolationSpeed -= MoveSpeed / 10
- Else
- EasedOut = True
- InterpolationSpeed = 0
- End If
- End If
- End If
- End Select
- If MovementCurve = Curves.Linear Then
- If Me.Position.X < Me.Destination.X Then
- Me.Position.X += Me.MoveSpeed
-
- If Me.Position.X >= Me.Destination.X Then
- Me.Position.X = Me.Destination.X
- End If
- ElseIf Me.Position.X > Me.Destination.X Then
- Me.Position.X -= Me.MoveSpeed
-
- If Me.Position.X <= Me.Destination.X Then
- Me.Position.X = Me.Destination.X
- End If
- End If
- If Me.Position.Y < Me.Destination.Y Then
- Me.Position.Y += Me.MoveSpeed
-
- If Me.Position.Y >= Me.Destination.Y Then
- Me.Position.Y = Me.Destination.Y
- End If
- ElseIf Me.Position.Y > Me.Destination.Y Then
- Me.Position.Y -= Me.MoveSpeed
-
- If Me.Position.Y <= Me.Destination.Y Then
- Me.Position.Y = Me.Destination.Y
- End If
- End If
- If Me.Position.Z < Me.Destination.Z Then
- Me.Position.Z += Me.MoveSpeed
-
- If Me.Position.Z >= Me.Destination.Z Then
- Me.Position.Z = Me.Destination.Z
- End If
- ElseIf Me.Position.Z > Me.Destination.Z Then
- Me.Position.Z -= Me.MoveSpeed
-
- If Me.Position.Z <= Me.Destination.Z Then
- Me.Position.Z = Me.Destination.Z
- End If
- End If
- Else
- If Me.Position.X < Me.Destination.X Then
- Me.Position.X = MathHelper.Lerp(Me.Position.X, Me.Destination.X, Me.InterpolationSpeed)
- If Me.Position.X > Me.Destination.X - 0.05 Then
- Me.Position.X = Me.Destination.X
- End If
- ElseIf Me.Position.X > Me.Destination.X Then
- Me.Position.X = MathHelper.Lerp(Me.Position.X, Me.Destination.X, Me.InterpolationSpeed)
- If Me.Position.X < Me.Destination.X + 0.05 Then
- Me.Position.X = Me.Destination.X
- End If
- End If
- If Me.Position.Y < Me.Destination.Y Then
- Me.Position.Y = MathHelper.Lerp(Me.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
- If Me.Position.Y > Me.Destination.Y - 0.05 Then
- Me.Position.Y = Me.Destination.Y
- End If
- ElseIf Me.Position.Y > Me.Destination.Y Then
- Me.Position.Y = MathHelper.Lerp(Me.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
- If Me.Position.Y < Me.Destination.Y + 0.05 Then
- Me.Position.Y = Me.Destination.Y
- End If
- End If
- If Me.Position.Z < Me.Destination.Z Then
- Me.Position.Z = MathHelper.Lerp(Me.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
- If Me.Position.Z > Me.Destination.Z - 0.05 Then
- Me.Position.Z = Me.Destination.Z
- End If
- ElseIf Me.Position.Z > Me.Destination.Z Then
- Me.Position.Z = MathHelper.Lerp(Me.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
- If Me.Position.Z < Me.Destination.Z + 0.05 Then
- Me.Position.Z = Me.Destination.Z
- End If
- End If
- End If
-
- If Me.Position = Destination Then
- Me.Ready = True
- End If
-
- End Sub
-
-End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BAOpacity.vb b/P3D/Battle/BattleAnimations/BAOpacity.vb
deleted file mode 100644
index 5326dcea2..000000000
--- a/P3D/Battle/BattleAnimations/BAOpacity.vb
+++ /dev/null
@@ -1,41 +0,0 @@
-Public Class BAOpacity
-
- Inherits BattleAnimation3D
-
- Public TransitionSpeed As Single = 0.01F
- Public FadeIn As Boolean = False
- Public EndState As Single = 0.0F
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal StartState As Single = 1.0F)
- MyBase.New(Position, Texture, Scale, startDelay, endDelay)
- MyBase.Opacity = StartState
- Me.EndState = EndState
- Me.FadeIn = FadeIn
- Me.TransitionSpeed = TransitionSpeed
-
- Me.AnimationType = AnimationTypes.Transition
- End Sub
-
- Public Overrides Sub DoActionActive()
- If Me.FadeIn = True Then
- If Me.EndState > Me.Opacity Then
- Me.Opacity += Me.TransitionSpeed
- If Me.Opacity >= Me.EndState Then
- Me.Opacity = Me.EndState
- End If
- End If
- Else
- If Me.EndState < Me.Opacity Then
- Me.Opacity -= Me.TransitionSpeed
- If Me.Opacity <= Me.EndState Then
- Me.Opacity = Me.EndState
- End If
- End If
- End If
-
- If Me.Opacity = Me.EndState Then
- Me.Ready = True
- End If
- End Sub
-
-End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BASound.vb b/P3D/Battle/BattleAnimations/BAPlaySound.vb
similarity index 96%
rename from P3D/Battle/BattleAnimations/BASound.vb
rename to P3D/Battle/BattleAnimations/BAPlaySound.vb
index da699ec23..120ec1106 100644
--- a/P3D/Battle/BattleAnimations/BASound.vb
+++ b/P3D/Battle/BattleAnimations/BAPlaySound.vb
@@ -1,4 +1,4 @@
-Public Class BASound
+Public Class BAPlaySound
Inherits BattleAnimation3D
diff --git a/P3D/Battle/BattleAnimations/BARotation.vb b/P3D/Battle/BattleAnimations/BARotation.vb
deleted file mode 100644
index 13f921a10..000000000
--- a/P3D/Battle/BattleAnimations/BARotation.vb
+++ /dev/null
@@ -1,129 +0,0 @@
-Public Class BARotation
-
- Inherits BattleAnimation3D
-
- Dim RotationVector As Vector3
- Dim EndRotation As Vector3
- Dim DoReturn As Boolean = False
- Dim ReturnVector As Vector3
- Dim hasReturned As Boolean = False
- Dim DoRotation As Vector3 = New Vector3(1.0F)
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal RotationVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
- MyBase.New(Position, Texture, Scale, startDelay, endDelay)
-
- Me.RotationVector = RotationVector
- Me.EndRotation = EndRotation
- Me.ReturnVector = Me.Rotation
- End Sub
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal RotationVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean)
- Me.New(Position, Texture, Scale, RotationVector, EndRotation, startDelay, endDelay)
-
- If DoXRotation = False Then
- DoRotation.X = 0.0F
- End If
- If DoYRotation = False Then
- DoRotation.Y = 0.0F
- End If
- If DoZRotation = False Then
- DoRotation.Z = 0.0F
- End If
- End Sub
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal RotationVector As Vector3, ByVal EndRotation As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
- Me.New(Position, Texture, Scale, RotationVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation)
-
- Me.DoReturn = DoReturn
- End Sub
-
- Public Overrides Sub DoActionActive()
- If VectorReached() = False Then
-
- If DoRotation.X = 1.0F Then
- If Me.Rotation.X > Me.EndRotation.X Then
- Me.Rotation.X += Me.RotationVector.X
-
- If Me.Rotation.X <= Me.EndRotation.X Then
- Me.Rotation.X = Me.EndRotation.X
- End If
- ElseIf Me.Rotation.X < Me.EndRotation.X Then
- Me.Rotation.X += Me.RotationVector.X
-
- If Me.Rotation.X >= Me.EndRotation.X Then
- Me.Rotation.X = Me.EndRotation.X
- End If
- End If
- End If
-
- If DoRotation.Y = 1.0F Then
- If Me.Rotation.Y > Me.EndRotation.Y Then
- Me.Rotation.Y += Me.RotationVector.Y
-
- If Me.Rotation.Y <= Me.EndRotation.Y Then
- Me.Rotation.Y = Me.EndRotation.Y
- End If
- ElseIf Me.Rotation.Y < Me.EndRotation.Y Then
- Me.Rotation.Y += Me.RotationVector.Y
-
- If Me.Rotation.Y >= Me.EndRotation.Y Then
- Me.Rotation.Y = Me.EndRotation.Y
- End If
- End If
- End If
-
- If DoRotation.Z = 1.0F Then
- If Me.Rotation.Z > Me.EndRotation.Z Then
- Me.Rotation.Z += Me.RotationVector.Z
-
- If Me.Rotation.Z <= Me.EndRotation.Z Then
- Me.Rotation.Z = Me.EndRotation.Z
- End If
- ElseIf Me.Rotation.Z < Me.EndRotation.Z Then
- Me.Rotation.Z += Me.RotationVector.Z
-
- If Me.Rotation.Z >= Me.EndRotation.Z Then
- Me.Rotation.Z = Me.EndRotation.Z
- End If
- End If
- End If
-
- If VectorReached() = True Then
- RotationReady()
- End If
- Else
- RotationReady()
- End If
- End Sub
-
- Private Sub RotationReady()
- If Me.DoReturn = True And Me.hasReturned = False Then
- Me.hasReturned = True
- Me.EndRotation = Me.ReturnVector
- Me.RotationVector = New Vector3(Me.RotationVector.X * -1, Me.RotationVector.Y * -1, Me.RotationVector.Z * -1)
- Else
- Me.Ready = True
- End If
- End Sub
-
- Private Function VectorReached() As Boolean
- If DoRotation.X = 1.0F Then
- If EndRotation.X <> Me.Rotation.X Then
- Return False
- End If
- End If
- If DoRotation.Y = 1.0F Then
- If EndRotation.Y <> Me.Rotation.Y Then
- Return False
- End If
- End If
- If DoRotation.Z = 1.0F Then
- If EndRotation.Z <> Me.Rotation.Z Then
- Return False
- End If
- End If
-
- Return True
- End Function
-
-End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BASize.vb b/P3D/Battle/BattleAnimations/BASize.vb
deleted file mode 100644
index b8926f1da..000000000
--- a/P3D/Battle/BattleAnimations/BASize.vb
+++ /dev/null
@@ -1,106 +0,0 @@
-Public Class BASize
-
- Inherits BattleAnimation3D
-
- Public Grow As Boolean = False
- Public EndSize As Vector3
- Public SizeSpeed As Single = 0.01F
- Public Anchors As String
-
- Public Change As New Vector3(1)
-
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Grow As Boolean, ByVal EndSize As Vector3, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal Anchors As String)
- MyBase.New(Position, Texture, Scale, startDelay, endDelay)
-
- Me.Anchors = Anchors
- Me.Grow = Grow
- Me.EndSize = EndSize
- Me.SizeSpeed = SizeSpeed
-
- Me.AnimationType = AnimationTypes.Size
- End Sub
-
- Public Overrides Sub DoActionActive()
- Dim saveScale As Vector3 = Me.Scale
-
- Dim changeX As Single = SizeSpeed * Change.X
- Dim changeY As Single = SizeSpeed * Change.Y
- Dim changeZ As Single = SizeSpeed * Change.Z
-
- If Grow = True Then
- If Me.Scale.X < Me.EndSize.X Then
- Me.Scale.X += changeX
-
- If Me.Scale.X >= Me.EndSize.X Then
- Me.Scale.X = Me.EndSize.X
- End If
- End If
- If Me.Scale.Y < Me.EndSize.Y Then
- Me.Scale.Y += changeY
-
- If Me.Scale.Y >= Me.EndSize.Y Then
- Me.Scale.Y = Me.EndSize.Y
- End If
- End If
- If Me.Scale.Z < Me.EndSize.Z Then
- Me.Scale.Z += changeZ
-
- If Me.Scale.Z >= Me.EndSize.Z Then
- Me.Scale.Z = Me.EndSize.Z
- End If
- End If
- Else
- If Me.Scale.X > Me.EndSize.X Then
- Me.Scale.X -= changeX
-
- If Me.Scale.X <= Me.EndSize.X Then
- Me.Scale.X = Me.EndSize.X
- End If
- End If
- If Me.Scale.Y > Me.EndSize.Y Then
- Me.Scale.Y -= changeY
-
- If Me.Scale.Y <= Me.EndSize.Y Then
- Me.Scale.Y = Me.EndSize.Y
- End If
- End If
- If Me.Scale.Z > Me.EndSize.Z Then
- Me.Scale.Z -= changeZ
-
- If Me.Scale.Z <= Me.EndSize.Z Then
- Me.Scale.Z = Me.EndSize.Z
- End If
- End If
- End If
-
- 'Bottom
- If Anchors.Contains("1") = True Then
- Dim diffY As Single = saveScale.Y - Me.Scale.Y
- Me.Position.Y -= diffY / 2
- End If
- 'Top
- If Anchors.Contains("2") = True Then
- Dim diffY As Single = saveScale.Y - Me.Scale.Y
- Me.Position.Y += diffY / 2
- End If
- 'Left
- If Anchors.Contains("3") = True Then
- Dim diffX As Single = saveScale.X - Me.Scale.X
- Me.Position.X -= diffX / 2
- End If
- 'Right
- If Anchors.Contains("4") = True Then
- Dim diffX As Single = saveScale.X - Me.Scale.X
- Me.Position.X += diffX / 2
- End If
-
- If Me.EndSize = Me.Scale Then
- Me.Ready = True
- End If
- End Sub
-
- Public Sub SetChange(ByVal changeX As Single, ByVal changeY As Single, ByVal changeZ As Single)
- Me.Change = New Vector3(changeX, changeY, changeZ)
- End Sub
-
-End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleAnimations/BattleAnimation3D.vb b/P3D/Battle/BattleAnimations/BattleAnimation3D.vb
index 7d7c8050b..1eb6bfeb2 100644
--- a/P3D/Battle/BattleAnimations/BattleAnimation3D.vb
+++ b/P3D/Battle/BattleAnimations/BattleAnimation3D.vb
@@ -17,6 +17,7 @@
Wait
ViewPokeBill
Sound
+ Background
End Enum
Public AnimationType As AnimationTypes = AnimationTypes.Nothing
@@ -24,14 +25,16 @@
Public Ready As Boolean = False
Public startDelay As Single
Public endDelay As Single
+ Public SpawnedEntity As Boolean = False
- Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single)
+ Public Sub New(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal startDelay As Single, ByVal endDelay As Single, Optional SpawnedEntity As Boolean = False)
MyBase.New(Position.X, Position.Y, Position.Z, "BattleAnimation", {Texture}, {0, 0}, False, 0, Scale, BaseModel.BillModel, 0, "", New Vector3(1.0F))
- Me.Visible = Visible
Me.startDelay = startDelay
Me.endDelay = endDelay
+ Me.SpawnedEntity = SpawnedEntity
+
Me.CreateWorldEveryFrame = True
Me.DropUpdateUnlessDrawn = False
End Sub
@@ -47,6 +50,7 @@
End If
Else
CanRemove = True
+ DoRemoveEntity()
End If
Else
If startDelay > 0.0F Then
@@ -56,6 +60,11 @@
startDelay = 0.0F
End If
Else
+ If SpawnedEntity = True Then
+ Ready = True
+ Else
+ Me.Visible = True
+ End If
DoActionActive()
End If
End If
@@ -81,6 +90,9 @@
Public Overridable Sub DoActionActive()
'Insert code in Inherits class here.
End Sub
+ Public Overridable Sub DoRemoveEntity()
+ 'Insert code in Inherits class here.
+ End Sub
Public Overrides Sub Render()
If Me.startDelay <= 0.0F Then
diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb
index 0b0fb2977..07b311e05 100644
--- a/P3D/Battle/BattleSystemV2/Battle.vb
+++ b/P3D/Battle/BattleSystemV2/Battle.vb
@@ -486,8 +486,10 @@
Sub DoMegaEvolution(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
Dim p As Pokemon = BattleScreen.OwnPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If Not own Then
p = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OppPokemonNPC
End If
'Transform a Pokemon into it's Mega Evolution
Dim _base As String = p.GetDisplayName()
@@ -504,6 +506,36 @@
p.CalculateStats()
p.LoadAltAbility()
Me.ChangeCameraAngle(1, own, BattleScreen)
+ '***Mega Evolution Animation***
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim MegaAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own)
+ MegaAnimation.AnimationPlaySound("Battle\Effects\MegaEvolution", 0, 0)
+
+ Dim maxAmount As Integer = 16
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase1")
+ Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+ Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+
+ Dim Position As New Vector3(xPos, 0.8, zPos)
+
+ Dim Scale As New Vector3(0.5F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim Phase1Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay))
+
+ Dim Destination As New Vector3(CSng(pNPC.Position.X - Phase1Entity.Position.X), -0.8, CSng(pNPC.Position.Z - Phase1Entity.Position.Z))
+ MegaAnimation.AnimationMove(Phase1Entity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ Dim Phase2Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position, TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase2"), New Vector3(0.0F), 1.0F, 4.0F, 0.0F)
+ MegaAnimation.AnimationRotate(Phase2Entity, False, 0, 0, 0.1F, 0, 0, 10.0F, 4, 0F, False, False, True, False)
+ MegaAnimation.AnimationScale(Phase2Entity, False, True, 1.25F, 1.25F, 1.25F, 0.02F, 4.0F, 0.0F)
+ BattleScreen.BattleQuery.Add(MegaAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\MegaEvolution", False))
+ End If
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(own, ToggleEntityQueryObject.BattleEntities.OwnPokemon, PokemonForms.GetOverworldSpriteName(p), 0, 1, -1, -1))
BattleScreen.BattleQuery.Add(New TextQueryObject(_base & " has Mega Evolved!"))
TriggerAbilityEffect(BattleScreen, own)
@@ -946,48 +978,35 @@
'Potion,Super Point,Hyper Potion,Full Heal,Full Restore,Burn Heal,Antidote,Paralyze heal,Awakening,Ice Heal,Revive,Max Revive,Max Potion
Select Case ItemID
- Case 18 'Potion
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.GainHP(20, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Potion on " & p.GetDisplayName() & "!", "item:potion")
- Case 17 'Super Potion
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.GainHP(50, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Super Potion on " & p.GetDisplayName() & "!", "item:superpotion")
- Case 16 'Hyper Potion
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.GainHP(100, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Hyper Potion on " & p.GetDisplayName() & "!", "item:hyperpotion")
- Case 15 'Max Potion
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Max Potion on " & p.GetDisplayName() & "!", "item:maxpotion")
- Case 14 'Full Restore
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Restore on " & p.GetDisplayName() & "!", "item:fullrestore")
+ Case 18 'Potion
+ Me.GainHP(20, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Potion on " & p.GetDisplayName() & "!", "item:potion")
+ Case 17 'Super Potion
+ Me.GainHP(50, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Super Potion on " & p.GetDisplayName() & "!", "item:superpotion")
+ Case 16 'Hyper Potion
+ Me.GainHP(100, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Hyper Potion on " & p.GetDisplayName() & "!", "item:hyperpotion")
+ Case 15 'Max Potion
+ Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Max Potion on " & p.GetDisplayName() & "!", "item:maxpotion")
+ Case 14 'Full Restore
+ Me.GainHP(p.MaxHP, False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Restore on " & p.GetDisplayName() & "!", "item:fullrestore")
Me.CureStatusProblem(False, False, BattleScreen, "", "item:fullrestore")
- Case 38 'Full Heal
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Heal on " & p.GetDisplayName() & "!", "item:fullheal")
- Case 9 'Antidote
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
- Case 10 'Burn Heal
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Burn Heal on " & p.GetDisplayName() & "!", "item:burnheal")
- Case 11 'Ice Heal
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Ice Heal on " & p.GetDisplayName() & "!", "item:iceheal")
- Case 12 'Awakening
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Awakening on " & p.GetDisplayName() & "!", "item:awakening")
- Case 13 'Paralyze Heal
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Paralyze Heal on " & p.GetDisplayName() & "!", "item:paralyzeheal")
- Case 39 'Revive
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
+ Case 38 'Full Heal
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Full Heal on " & p.GetDisplayName() & "!", "item:fullheal")
+ Case 9 'Antidote
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Antidote on " & p.GetDisplayName() & "!", "item:antidote")
+ Case 10 'Burn Heal
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Burn Heal on " & p.GetDisplayName() & "!", "item:burnheal")
+ Case 11 'Ice Heal
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Ice Heal on " & p.GetDisplayName() & "!", "item:iceheal")
+ Case 12 'Awakening
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used an Awakening on " & p.GetDisplayName() & "!", "item:awakening")
+ Case 13 'Paralyze Heal
+ Me.CureStatusProblem(False, False, BattleScreen, BattleScreen.Trainer.Name & " used a Paralyze Heal on " & p.GetDisplayName() & "!", "item:paralyzeheal")
+ Case 39 'Revive
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
p.Status = Pokemon.StatusProblems.None
p.HP = CInt(Math.Ceiling(p.MaxHP / 2))
- Case 40 'Max Revive
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Use_Item", False))
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
+ Case 40 'Max Revive
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & " used a Revive on " & p.GetDisplayName() & "!"))
p.Status = Pokemon.StatusProblems.None
p.HP = p.MaxHP
End Select
@@ -1122,14 +1141,20 @@
'p: the attacking pokemon
'op: the target pokemon
Dim p As Pokemon
+ Dim pNPC As NPC
Dim op As Pokemon
+ Dim opNPC As NPC
If own Then
p = BattleScreen.OwnPokemon
op = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OwnPokemonNPC
+ opNPC = BattleScreen.OppPokemonNPC
BattleScreen.FieldEffects.OwnLastMove = moveUsed
Else
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
+ pNPC = BattleScreen.OppPokemonNPC
+ opNPC = BattleScreen.OwnPokemonNPC
BattleScreen.FieldEffects.OppLastMove = moveUsed
End If
If WildHasEscaped Then
@@ -1198,7 +1223,39 @@
If Core.Random.Next(0, 100) < 20 Then
CureStatusProblem(own, own, BattleScreen, p.GetDisplayName() & " thawed out.", "own defrost")
Else
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Frozen", False))
+ 'Frozen animation
+ ChangeCameraAngle(1, own, BattleScreen)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim FrozenAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own)
+
+ FrozenAnimation.AnimationPlaySound("Battle\Effects\Frozen", 0, 0)
+ Dim maxAmount As Integer = 8
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatusEffect\Frozen", New Rectangle(0, 0, 32, 32), "")
+ Dim xPos As Single
+ Dim zPos As Single
+ If own = False Then
+ xPos = CSng(Random.Next(-2, 4) / 8)
+ zPos = CSng(Random.Next(-2, 4) / 8)
+ Else
+ xPos = CSng(Random.Next(-4, 2) / 8)
+ zPos = CSng(Random.Next(-4, 2) / 8)
+ End If
+
+ Dim Position As New Vector3(xPos, -0.25, zPos)
+ Dim Scale As New Vector3(0.25F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim SnowflakeEntity = FrozenAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay))
+
+ FrozenAnimation.AnimationFade(SnowflakeEntity, True, 0.02, False, 0.0F, CSng(startDelay), 0.0)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ BattleScreen.BattleQuery.Add(FrozenAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Frozen", False))
+ End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is frozen solid!"))
Exit Sub
End If
@@ -1233,6 +1290,25 @@
End If
Else
If sleepTurns > 0 Then
+ ChangeCameraAngle(1, own, BattleScreen)
+ 'Sleep Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim SleepAnimation As New AnimationQueryObject(pNPC, Not own)
+
+ SleepAnimation.AnimationPlaySound("Battle\Effects\Asleep", 0, 0)
+ Dim SleepEntity1 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 0, 1)
+ SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
+ SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
+
+ Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
+
+ SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
+ SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
+
+ BattleScreen.BattleQuery.Add(SleepAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Asleep", False))
+ End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fast asleep."))
Exit Sub
Else
@@ -1351,6 +1427,48 @@
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is no longer confused!"))
p.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
Else
+ Me.ChangeCameraAngle(1, own, BattleScreen)
+ 'Confused Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim ConfusedAnimation As New AnimationQueryObject(pNPC, Not own)
+
+ ConfusedAnimation.AnimationPlaySound("Battle\Effects\Confused", 0, 0)
+ Dim DuckEntity1 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(-0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+ Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+ Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+
+ BattleScreen.BattleQuery.Add(ConfusedAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Confused", False))
+ End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is confused!"))
'Previously 'If Core.Random.Next(0, 2) = 0 Then' (Updated to gen 7's 33% instead of 50%)
If Core.Random.Next(0, 3) = 0 Then
@@ -1397,6 +1515,19 @@
If op.HP > 0 And op.Status <> Pokemon.StatusProblems.Fainted Then
If p.HasVolatileStatus(Pokemon.VolatileStatus.Infatuation) = True Then
If Core.Random.Next(0, 2) = 0 Then
+ Me.ChangeCameraAngle(1, own, BattleScreen)
+ 'Infatuated animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim HeartAnimation = New AnimationQueryObject(pNPC, Not own)
+ For i = 0 To 6
+ Dim HeartEntity = HeartAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Normal\Attract"), New Vector3(0.25F), 1.0F, CSng(i * 0.2))
+ Dim zPos As Single = CSng(Random.Next(-2, 2) * 0.2)
+ HeartAnimation.AnimationMove(HeartEntity, False, 0.0, 0.25, zPos, 0.01, False, False, CSng(i * 0.2), 0.0)
+ HeartAnimation.AnimationFade(HeartEntity, True, 0.02, False, 0.0, CSng(1 + i * 0.2), 0.0)
+ i += 1
+ Next
+ BattleScreen.BattleQuery.Add(HeartAnimation)
+ End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is in love with " & op.GetDisplayName() & "!"))
Exit Sub
End If
@@ -1405,7 +1536,37 @@
If p.Status = Pokemon.StatusProblems.Paralyzed Then
If Core.Random.Next(0, 4) = 0 Then
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
+ Me.ChangeCameraAngle(1, own, BattleScreen)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim ParalyzedAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
+
+ ParalyzedAnimation.AnimationPlaySound("Battle\Effects\Paralyzed", 0, 0)
+ Dim maxAmount As Integer = 4
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(0, 0, 16, 16), "")
+ Dim xPos = CSng(Random.Next(-4, 4) / 8)
+ Dim zPos = CSng(Random.Next(-4, 4) / 8)
+
+ Dim Position As New Vector3(xPos, -0.25, zPos)
+ Dim Destination As New Vector3(xPos - xPos * 2, 0, zPos - zPos * 2)
+ Dim Scale As New Vector3(0.25F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim ShockEntity = ParalyzedAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
+ ParalyzedAnimation.AnimationMove(ShockEntity, True, Destination.X, Destination.Y, Destination.Z, 0.025F, False, True, CSng(startDelay), 0.0F)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(16, 0, 16, 16), ""), CSng(startDelay + 1), 1)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(32, 0, 16, 16), ""), CSng(startDelay + 2), 1)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(48, 0, 16, 16), ""), CSng(startDelay + 3), 1)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(64, 0, 16, 16), ""), CSng(startDelay + 4), 1)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(72, 0, 16, 16), ""), CSng(startDelay + 5), 1)
+
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ BattleScreen.BattleQuery.Add(ParalyzedAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
+ End If
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
Exit Sub
End If
@@ -1496,7 +1657,7 @@
End If
'Own Pokémon move animation! This displays any effects that should display on the user of the move.
- moveUsed.UserPokemonMoveAnimation(BattleScreen)
+ moveUsed.UserPokemonMoveAnimation(BattleScreen, own)
If moveUsed.Target <> Attack.Targets.Self And moveUsed.FocusOppPokemon = True Then
If own = True Then
@@ -1849,7 +2010,7 @@
End If
'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)
+ moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
If moveUsed.IsDamagingMove = True Then
ChangeCameraAngle(2, own, BattleScreen)
@@ -2543,13 +2704,21 @@
p.HP = 0
p.Status = Pokemon.StatusProblems.Fainted
Me.ChangeCameraAngle(1, own, BattleScreen)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(p.Number.ToString(), True))
If message = "" Then
- message = p.GetDisplayName() & " fainted!"
+ message = p.GetDisplayName() & " " & "fainted!"
End If
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
+ If BattleScreen.IsTrainerBattle = False AndAlso Core.Player.ShowBattleAnimations <> 0 Then
+ If own = False Then
+ Dim FaintAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
+ FaintAnimation.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
+ FaintAnimation.AnimationMove(Nothing, False, 0, -1, 0, 0.05, False, False, 2, 2)
+ BattleScreen.BattleQuery.Add(FaintAnimation)
+ End If
+ End If
+
Dim str = p.AdditionalData.ToLower()
Select Case str
Case "mega", "mega_x", "mega_y", "primal", "blade"
@@ -2643,9 +2812,12 @@
Public Function InflictBurn(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim pNPC As Entity = BattleScreen.OwnPokemonNPC
+
If own = False Then
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
+ pNPC = BattleScreen.OppPokemonNPC
End If
If p.HP <= 0 OrElse p.Status = Pokemon.StatusProblems.Fainted Then
@@ -2701,7 +2873,16 @@
'Works!
p.Status = Pokemon.StatusProblems.Burn
ChangeCameraAngle(1, own, BattleScreen)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Burned", False))
+ 'Burn animation
+ Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
+ BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
+ Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(0, -0.25F, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5, 0.5, 0.5), 1.0F)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 32, 32, 32), ""), 0.75, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 64, 32, 32), ""), 1.5, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 96, 32, 32), ""), 2.25, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 128, 32, 32), ""), 3, 0)
+ BattleScreen.BattleQuery.Add(BurnAnimation)
+
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got burned!"))
@@ -2744,7 +2925,9 @@
Public Function InflictFreeze(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If own = False Then
+ pNPC = BattleScreen.OppPokemonNPC
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If
@@ -2813,7 +2996,38 @@
'Works!
p.Status = Pokemon.StatusProblems.Freeze
ChangeCameraAngle(1, own, BattleScreen)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Frozen", False))
+ 'Frozen animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim FrozenAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own)
+
+ FrozenAnimation.AnimationPlaySound("Battle\Effects\Frozen", 0, 0)
+ Dim maxAmount As Integer = 8
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatusEffect\Frozen", New Rectangle(0, 0, 32, 32), "")
+ Dim xPos As Single
+ Dim zPos As Single
+ If own = False Then
+ xPos = CSng(Random.Next(-2, 4) / 8)
+ zPos = CSng(Random.Next(-2, 4) / 8)
+ Else
+ xPos = CSng(Random.Next(-4, 2) / 8)
+ zPos = CSng(Random.Next(-4, 2) / 8)
+ End If
+
+ Dim Position As New Vector3(xPos, -0.25, zPos)
+ Dim Scale As New Vector3(0.25F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim SnowflakeEntity = FrozenAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay))
+
+ FrozenAnimation.AnimationFade(SnowflakeEntity, True, 0.02, False, 0.0F, CSng(startDelay), 0.0)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ BattleScreen.BattleQuery.Add(FrozenAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Frozen", False))
+ End If
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " was frozen solid!"))
@@ -2855,7 +3069,9 @@
Public Function InflictParalysis(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If own = False Then
+ pNPC = BattleScreen.OppPokemonNPC
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
End If
@@ -2916,7 +3132,36 @@
'Works!
p.Status = Pokemon.StatusProblems.Paralyzed
ChangeCameraAngle(1, own, BattleScreen)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim ParalyzedAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
+
+ ParalyzedAnimation.AnimationPlaySound("Battle\Effects\Paralyzed", 0, 0)
+ Dim maxAmount As Integer = 4
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(0, 0, 16, 16), "")
+ Dim xPos = CSng(Random.Next(-4, 4) / 8)
+ Dim zPos = CSng(Random.Next(-4, 4) / 8)
+
+ Dim Position As New Vector3(xPos, -0.25, zPos)
+ Dim Destination As New Vector3(xPos - xPos * 2, 0, zPos - zPos * 2)
+ Dim Scale As New Vector3(0.25F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim ShockEntity = ParalyzedAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
+ ParalyzedAnimation.AnimationMove(ShockEntity, False, Destination.X, Destination.Y, Destination.Z, 0.025F, False, True, CSng(startDelay), 0.0F)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(16, 0, 16, 16), ""), CSng(startDelay + 1), 0)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(32, 0, 16, 16), ""), CSng(startDelay + 2), 0)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(48, 0, 16, 16), ""), CSng(startDelay + 3), 0)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(64, 0, 16, 16), ""), CSng(startDelay + 4), 0)
+ ParalyzedAnimation.AnimationChangeTexture(ShockEntity, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Paralyzed", New Rectangle(72, 0, 16, 16), ""), CSng(startDelay + 5), 0)
+
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ BattleScreen.BattleQuery.Add(ParalyzedAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
+ End If
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is paralyzed!" & Environment.NewLine & "It can't move!"))
@@ -2957,10 +3202,14 @@
Public Function InflictSleep(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal turnsPreset As Integer, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim opNPC As NPC = BattleScreen.OppPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OppPokemonNPC
op = BattleScreen.OwnPokemon
+ opNPC = BattleScreen.OwnPokemonNPC
End If
If p.HP <= 0 OrElse p.Status = Pokemon.StatusProblems.Fainted Then
@@ -3046,6 +3295,25 @@
Return False
Else
'Works!
+ ChangeCameraAngle(1, own, BattleScreen)
+ 'Sleep Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim SleepAnimation As New AnimationQueryObject(pNPC, Not own)
+
+ SleepAnimation.AnimationPlaySound("Battle\Effects\Asleep", 0, 0)
+ Dim SleepEntity1 As Entity = SleepAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 0, 1)
+ SleepAnimation.AnimationChangeTexture(SleepEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 1, 1)
+ SleepAnimation.AnimationMove(SleepEntity1, True, 0, 0.5, 0.25, 0.01, False, False, 0, 0)
+
+ Dim SleepEntity2 As Entity = SleepAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 1, 1.5, 1)
+
+ SleepAnimation.AnimationChangeTexture(SleepEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Asleep", New Rectangle(0, 16, 16, 16), ""), 2.5, 1)
+ SleepAnimation.AnimationMove(SleepEntity2, True, 0, 0.5, 0.25, 0.01, False, False, 2, 0)
+
+ BattleScreen.BattleQuery.Add(SleepAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Asleep", False))
+ End If
If own = True Then
BattleScreen.FieldEffects.OwnBideCounter = 0
BattleScreen.FieldEffects.OwnBideDamage = 0
@@ -3100,9 +3368,11 @@
Public Function InflictPoison(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal bad As Boolean, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
op = BattleScreen.OwnPokemon
+ pNPC = BattleScreen.OppPokemonNPC
End If
If p.HP <= 0 OrElse p.Status = Pokemon.StatusProblems.Fainted Then
@@ -3157,7 +3427,7 @@
Else
'Works!
ChangeCameraAngle(1, own, BattleScreen)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+
If bad = True Then
p.Status = Pokemon.StatusProblems.BadPoison
Select Case message
@@ -3169,7 +3439,42 @@
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is badly poisoned!"))
End Select
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 2, 1)
+ Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 2, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 3, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 3, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 4, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
Else
+ 'Poison animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
+
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
p.Status = Pokemon.StatusProblems.Poison
Select Case message
Case "" 'Print default message only
@@ -3218,10 +3523,14 @@
Public Function InflictConfusion(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
Dim op As Pokemon = BattleScreen.OppPokemon
+ Dim opNPC As NPC = BattleScreen.OppPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OppPokemonNPC
op = BattleScreen.OwnPokemon
+ opNPC = BattleScreen.OwnPokemonNPC
End If
If p.HP <= 0 OrElse p.Status = Pokemon.StatusProblems.Fainted Then
@@ -3254,6 +3563,48 @@
Return False
Else
'Works!
+ Me.ChangeCameraAngle(1, own, BattleScreen)
+ 'Confused Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim ConfusedAnimation As New AnimationQueryObject(pNPC, Not own)
+
+ ConfusedAnimation.AnimationPlaySound("Battle\Effects\Confused", 0, 0)
+ Dim DuckEntity1 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(-0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+ Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+ Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 1.5F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 2.25F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), 3.0F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 3.75F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 32, 16, 16), ""), 4.5F, 0)
+
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity2, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+ ConfusedAnimation.AnimationChangeTexture(DuckEntity3, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 48, 16, 16), ""), 5.25F, 1)
+
+ BattleScreen.BattleQuery.Add(ConfusedAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Confused", False))
+ End If
p.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
Select Case message
Case "" 'Print default message only
@@ -3399,8 +3750,30 @@
End If
End If
- '***SHOW STAT INCREASE ANIMATION HERE***
+ '***STAT INCREASE ANIMATION***
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own)
+ Dim maxAmount As Integer = 20 * val
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatChange\statUp")
+ Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+ Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+ Dim Position As New Vector3(xPos, -0.4, zPos)
+ Dim Destination As New Vector3(0, 1.2, 0)
+ Dim Scale As New Vector3(0.2F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim StatEntity As Entity = StatAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay))
+
+ StatAnimation.AnimationMove(StatEntity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+ StatAnimation.AnimationPlaySound("Battle\Effects\Stat_Raise", 0, 0)
+ BattleScreen.BattleQuery.Add(StatAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Stat_Raise", False))
+ End If
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
Select Case val
Case 2
@@ -3660,9 +4033,29 @@
val = 6 + statC
End If
End If
+ '***STAT DECREASE ANIMATION***
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, Not own)
+ Dim maxAmount As Integer = 20 * val
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatChange\statDown")
+ Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+ Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
- '***SHOW STAT DECREASE ANIMATION HERE***
-
+ Dim Position As New Vector3(xPos, 0.8, zPos)
+ Dim Destination As New Vector3(0, -1.2, 0)
+ Dim Scale As New Vector3(0.2F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim StatEntity As Entity = StatAnimation.SpawnEntity(pNPC.Position + Position, Texture, Scale, 1.0F, CSng(startDelay))
+ StatAnimation.AnimationMove(StatEntity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+ StatAnimation.AnimationPlaySound("Battle\Effects\Stat_Lower", 0, 0)
+ BattleScreen.BattleQuery.Add(StatAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Stat_Lower", False))
+ End If
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
Select Case val
Case 2
@@ -3890,8 +4283,10 @@
Public Sub GainHP(ByVal HPAmount As Integer, ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String)
Dim p As Pokemon = BattleScreen.OwnPokemon
+ Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OppPokemonNPC
End If
If p.HP < p.MaxHP And p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
@@ -3905,6 +4300,31 @@
HPAmount = p.MaxHP - p.HP
End If
+ '***HP INCREASE ANIMATION***
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim HealAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
+ Dim maxAmount As Integer = 20
+ Dim currentAmount As Integer = 0
+ While currentAmount <= maxAmount
+ Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatChange\Heal")
+ Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+ Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
+
+ Dim Position As New Vector3(xPos, -0.4, zPos)
+ Dim Destination As New Vector3(xPos, 0.8, zPos)
+ Dim Scale As New Vector3(0.2F)
+ Dim startDelay As Double = 5.0 * Random.NextDouble()
+ Dim HealEntity As Entity = HealAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
+
+ HealAnimation.AnimationMove(HealEntity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+ HealAnimation.AnimationPlaySound("Battle\Effects\Heal", 0, 0)
+ BattleScreen.BattleQuery.Add(HealAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Heal", False))
+ End If
+
If own = True Then
BattleScreen.BattleQuery.Add(New MathHPQueryObject(p.HP, p.MaxHP, -HPAmount, New Vector2(200, 256)))
Else
@@ -3926,8 +4346,10 @@
Public Sub ReduceHP(ByVal HPAmount As Integer, ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String, ByVal sound As String)
Dim p As Pokemon = BattleScreen.OwnPokemon
+ Dim pNPC As Entity = BattleScreen.OwnPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
+ pNPC = BattleScreen.OppPokemonNPC
End If
If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
@@ -3943,7 +4365,14 @@
End If
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
End If
-
+ If Core.Player.ShowBattleAnimations <> 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
If own = True Then
BattleScreen.BattleQuery.Add(New MathHPQueryObject(p.HP, p.MaxHP, HPAmount, New Vector2(200, 256)))
Else
@@ -4696,14 +5125,14 @@
#End Region
- '''
- ''' Switches camera to angle
- '''
- ''' 0=main battle/1=own pokemon/2=opp pokemon
- ''' If the code comes from the own player or not.
- ''' Battlescreen reference
- ''' If the call should get added the PVP list or the own queue.
- Public Sub ChangeCameraAngle(ByVal direction As Integer, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal AddPVP As Boolean = False)
+ '''
+ ''' Switches camera to angle
+ '''
+ ''' 0=main battle/1=own pokemon/2=opp pokemon
+ ''' If the code comes from the own player or not.
+ ''' Battlescreen reference
+ ''' If the call should get added the PVP list or the own queue.
+ Public Sub ChangeCameraAngle(ByVal direction As Integer, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal AddPVP As Boolean = False)
Dim q As CameraQueryObject = Nothing
Select Case direction
@@ -5295,14 +5724,54 @@
Else
If .OwnPokemon.Ability.Name.ToLower() <> "magic guard" Then
If .OwnPokemon.Status = Pokemon.StatusProblems.Poison Then 'Own Poison
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Poison animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, True)
+
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
+ 'Actual damage
ReduceHP(CInt(.OwnPokemon.MaxHP / 8), True, True, BattleScreen, "The poison hurt " & .OwnPokemon.GetDisplayName() & ".", "poison")
End If
If .OwnPokemon.Status = Pokemon.StatusProblems.BadPoison Then 'Own Toxic
.FieldEffects.OwnPoisonCounter += 1
Dim multiplier As Double = (.FieldEffects.OwnPoisonCounter / 16)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Poison animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, True)
+
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 2, 1)
+ Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 2, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 3, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 3, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 4, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
+ 'Actual damage
ReduceHP(CInt(.OwnPokemon.MaxHP * multiplier), True, True, BattleScreen, "The toxic hurt " & .OwnPokemon.GetDisplayName() & ".", "badpoison")
End If
End If
@@ -5316,8 +5785,22 @@
If .OwnPokemon.Ability.Name.ToLower() = "heatproof" Then
reduceAmount = CInt(.OwnPokemon.MaxHP / 32)
End If
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Burn animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, True)
+ BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Burned", False))
+ Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(0, 0.25F, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5, 0.5, 0.5), 1.0F)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 32, 32, 32), ""), 0.75, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 64, 32, 32), ""), 1.5, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 96, 32, 32), ""), 2.25, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 128, 32, 32), ""), 3, 0)
+ BattleScreen.BattleQuery.Add(BurnAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Burned", False))
+ End If
+ 'Actual damage
ReduceHP(reduceAmount, True, True, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
End If
End If
@@ -5372,6 +5855,29 @@
multiHP = CInt(.OwnPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Wrap Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+
+ Dim WrapAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, False)
+ WrapAnimation.AnimationPlaySound("Battle\Attacks\Normal\Wrap", 5.0F, 0)
+ Dim WrapEntity = WrapAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+ WrapAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ WrapAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ WrapAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ WrapAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ WrapAnimation.AnimationFade(WrapEntity, True, 0.03, False, 0.0, 11, 0)
+ BattleScreen.BattleQuery.Add(WrapAnimation)
+ End If
ReduceHP(multiHP, True, False, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by Wrap!", "wrap")
End If
End If
@@ -5386,6 +5892,19 @@
multiHP = CInt(.OwnPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Whirlpool Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+
+ Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, False,, True)
+ WhirlpoolAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
+ Dim WhirlpoolEntity As Entity = WhirlpoolAnimation.SpawnEntity(New Vector3(0, -0.3, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
+ WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)
+ WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, 0, 0, 0.2F, 0, 0, 10.0F, 0.0F, 0.0F, False, False, True, True)
+ WhirlpoolAnimation.AnimationScale(WhirlpoolEntity, False, True, 1.0F, 1.0F, 1.0F, 0.025F, 0.0F, 0.0F)
+ WhirlpoolAnimation.AnimationScale(WhirlpoolEntity, True, False, 0.0F, 0.0F, 0.0F, 0.025F, 5.0F, 0.0F)
+ BattleScreen.BattleQuery.Add(WhirlpoolAnimation)
+ End If
ReduceHP(multiHP, True, False, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by Whirlpool!", "whirlpool")
End If
End If
@@ -5414,6 +5933,28 @@
multiHP = CInt(.OwnPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Bind Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BindAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, False)
+ BindAnimation.AnimationPlaySound("Battle\Attacks\Normal\Bind", 5.0F, 0)
+ Dim BindEntity = BindAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+ BindAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ BindAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ BindAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ BindAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ BindAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ BindAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ BindAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ BindAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ BindAnimation.AnimationFade(BindEntity, True, 0.03, False, 0.0, 11, 0)
+ BattleScreen.BattleQuery.Add(BindAnimation)
+ End If
ReduceHP(multiHP, True, False, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by Bind!", "bind")
End If
End If
@@ -5428,6 +5969,23 @@
multiHP = CInt(.OwnPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, True, BattleScreen)
+ 'Clamp Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ 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
@@ -6044,15 +6602,55 @@
Else
If .OppPokemon.Ability.Name.ToLower() <> "magic guard" Then
If .OppPokemon.Status = Pokemon.StatusProblems.Poison Then 'Opp Poison
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Poison animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
+
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
+ 'Actual damage
ReduceHP(CInt(.OppPokemon.MaxHP / 8), False, False, BattleScreen, "The poison hurt " & .OppPokemon.GetDisplayName() & ".", "poison")
End If
If .OppPokemon.Status = Pokemon.StatusProblems.BadPoison Then 'Opp Toxic
.FieldEffects.OppPoisonCounter += 1
Dim multiplier As Double = (.FieldEffects.OppPoisonCounter / 16)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ ChangeCameraAngle(1, False, BattleScreen)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ 'Poison animation
+ Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
+
+ PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
+ Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 2, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 2, 1)
+ Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 2, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 3, 1)
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 32, 32, 32), ""), 3, 1)
+
+ PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Poisoned", New Rectangle(0, 64, 32, 32), ""), 4, 1)
+
+ BattleScreen.BattleQuery.Add(PoisonAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Poisoned", False))
+ End If
+ 'Actual damage
ReduceHP(CInt(.OppPokemon.MaxHP * multiplier), False, False, BattleScreen, "The toxic hurt " & .OppPokemon.GetDisplayName() & ".", "badpoison")
+
End If
End If
End If
@@ -6065,8 +6663,22 @@
If .OppPokemon.Ability.Name.ToLower() = "heatproof" Then
reduceAmount = CInt(.OppPokemon.MaxHP / 16)
End If
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Burn animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
+ BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Burned", False))
+ Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5, 0.5, 0.5), 1.0F)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 32, 32, 32), ""), 0.75, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 64, 32, 32), ""), 1.5, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 96, 32, 32), ""), 2.25, 0)
+ BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\StatusEffect\Burned", New Rectangle(0, 128, 32, 32), ""), 3, 0)
+ BattleScreen.BattleQuery.Add(BurnAnimation)
+ Else
+ BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Burned", False))
+ End If
+ 'Actual damage
ReduceHP(reduceAmount, False, False, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
End If
End If
@@ -6122,6 +6734,28 @@
multiHP = CInt(.OppPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Wrap Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim WrapAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, True)
+ WrapAnimation.AnimationPlaySound("Battle\Attacks\Normal\Wrap", 5.0F, 0)
+ Dim WrapEntity = WrapAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ WrapAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+ WrapAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ WrapAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ WrapAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ WrapAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ WrapAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ WrapAnimation.AnimationFade(WrapEntity, True, 0.03, False, 0.0, 11, 0)
+ BattleScreen.BattleQuery.Add(WrapAnimation)
+ End If
ReduceHP(multiHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by Wrap!", "wrap")
End If
End If
@@ -6136,6 +6770,18 @@
multiHP = CInt(.OppPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Whirlpool Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, True,, True)
+ WhirlpoolAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
+ Dim WhirlpoolEntity As Entity = WhirlpoolAnimation.SpawnEntity(New Vector3(0, -0.3, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
+ WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)
+ WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, 0, 0, 0.2F, 0, 0, 10.0F, 0.0F, 0.0F, False, False, True, True)
+ WhirlpoolAnimation.AnimationScale(WhirlpoolEntity, False, True, 1.0F, 1.0F, 1.0F, 0.025F, 0.0F, 0.0F)
+ WhirlpoolAnimation.AnimationScale(WhirlpoolEntity, True, False, 0.0F, 0.0F, 0.0F, 0.025F, 5.0F, 0.0F)
+ BattleScreen.BattleQuery.Add(WhirlpoolAnimation)
+ End If
ReduceHP(multiHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by Whirlpool!", "whirlpool")
End If
End If
@@ -6164,6 +6810,28 @@
multiHP = CInt(.OppPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Bind Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BindAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, True)
+ BindAnimation.AnimationPlaySound("Battle\Attacks\Normal\Bind", 5.0F, 0)
+ Dim BindEntity = BindAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ BindAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+ BindAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ BindAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ BindAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ BindAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ BindAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ BindAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ BindAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ BindAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ BindAnimation.AnimationFade(BindEntity, True, 0.03, False, 0.0, 11, 0)
+ BattleScreen.BattleQuery.Add(BindAnimation)
+ End If
ReduceHP(multiHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by Bind!", "bind")
End If
End If
@@ -6178,6 +6846,23 @@
multiHP = CInt(.OppPokemon.MaxHP / 6)
End If
End If
+ ChangeCameraAngle(1, False, BattleScreen)
+ 'Clamp Animation
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ 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
@@ -6449,10 +7134,9 @@
Dim HasSwitchedInOpp As Boolean = False
Public Sub SwitchOutOwn(ByVal BattleScreen As BattleScreen, ByVal SwitchInIndex As Integer, ByVal InsertIndex As Integer, Optional ByVal message As String = "")
With BattleScreen
- ChangeCameraAngle(1, True, BattleScreen)
-
'Natural cure cures status problems
If .OwnPokemon.Ability.Name.ToLower() = "natural cure" Then
+ ChangeCameraAngle(1, True, BattleScreen)
If .OwnPokemon.Status <> Pokemon.StatusProblems.Fainted And .OwnPokemon.Status <> Pokemon.StatusProblems.None Then
.OwnPokemon.Status = Pokemon.StatusProblems.None
.AddToQuery(InsertIndex, New TextQueryObject(.OwnPokemon.GetDisplayName() & "'s status problem got healed by Natural Cure"))
@@ -6460,6 +7144,7 @@
End If
'Regenerator ability heals 1/3 of it's max HP
If .OwnPokemon.Ability.Name.ToLower() = "regenerator" Then
+ ChangeCameraAngle(1, True, BattleScreen)
If Not (.OwnPokemon.Status = Pokemon.StatusProblems.Fainted Or .OwnPokemon.HP = 0) Then
Dim restoreHP = CInt(.OwnPokemon.MaxHP / 3)
If restoreHP > 0 And .OwnPokemon.HP < .OwnPokemon.MaxHP And .OwnPokemon.HP > 0 Then
@@ -6469,6 +7154,7 @@
End If
'save baton pass stuff:
If .FieldEffects.OwnUsedBatonPass = True Then
+ ChangeCameraAngle(1, True, BattleScreen)
.FieldEffects.OwnBatonPassStats = New List(Of Integer)
With .OwnPokemon
BattleScreen.FieldEffects.OwnBatonPassStats.AddRange({ .StatAttack, .StatDefense, .StatSpAttack, .StatSpDefense, .StatSpeed, .Evasion, .Accuracy})
@@ -6590,39 +7276,40 @@
End If
Else
If BattleScreen.IsTrainerBattle = True Then
- EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, False)
- If BattleScreen.IsRemoteBattle = True Then
- EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, True)
- End If
- Else
- EndBattle(EndBattleReasons.LoseWild, BattleScreen, False)
- End If
- End If
- End With
- End Sub
+ EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, False)
+ If BattleScreen.IsRemoteBattle = True Then
+ EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, True)
+ End If
+ Else
+ EndBattle(EndBattleReasons.LoseWild, BattleScreen, False)
+ End If
+ End If
+ End With
+ End Sub
- Public Sub ApplyOwnBatonPass(ByVal BattleScreen As BattleScreen)
- If BattleScreen.FieldEffects.OwnUsedBatonPass = True Then
- BattleScreen.FieldEffects.OwnUsedBatonPass = False
+ Public Sub ApplyOwnBatonPass(ByVal BattleScreen As BattleScreen)
+ If BattleScreen.FieldEffects.OwnUsedBatonPass = True Then
+ BattleScreen.FieldEffects.OwnUsedBatonPass = False
- BattleScreen.OwnPokemon.StatAttack = BattleScreen.FieldEffects.OwnBatonPassStats(0)
- BattleScreen.OwnPokemon.StatDefense = BattleScreen.FieldEffects.OwnBatonPassStats(1)
- BattleScreen.OwnPokemon.StatSpAttack = BattleScreen.FieldEffects.OwnBatonPassStats(2)
- BattleScreen.OwnPokemon.StatSpDefense = BattleScreen.FieldEffects.OwnBatonPassStats(3)
- BattleScreen.OwnPokemon.StatSpeed = BattleScreen.FieldEffects.OwnBatonPassStats(4)
- BattleScreen.OwnPokemon.Evasion = BattleScreen.FieldEffects.OwnBatonPassStats(5)
- BattleScreen.OwnPokemon.Accuracy = BattleScreen.FieldEffects.OwnBatonPassStats(6)
+ BattleScreen.OwnPokemon.StatAttack = BattleScreen.FieldEffects.OwnBatonPassStats(0)
+ BattleScreen.OwnPokemon.StatDefense = BattleScreen.FieldEffects.OwnBatonPassStats(1)
+ BattleScreen.OwnPokemon.StatSpAttack = BattleScreen.FieldEffects.OwnBatonPassStats(2)
+ BattleScreen.OwnPokemon.StatSpDefense = BattleScreen.FieldEffects.OwnBatonPassStats(3)
+ BattleScreen.OwnPokemon.StatSpeed = BattleScreen.FieldEffects.OwnBatonPassStats(4)
+ BattleScreen.OwnPokemon.Evasion = BattleScreen.FieldEffects.OwnBatonPassStats(5)
+ BattleScreen.OwnPokemon.Accuracy = BattleScreen.FieldEffects.OwnBatonPassStats(6)
- If BattleScreen.FieldEffects.OwnBatonPassConfusion = True Then
- BattleScreen.FieldEffects.OwnBatonPassConfusion = False
- BattleScreen.OwnPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
- End If
- End If
- End Sub
+ If BattleScreen.FieldEffects.OwnBatonPassConfusion = True Then
+ BattleScreen.FieldEffects.OwnBatonPassConfusion = False
+ BattleScreen.OwnPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
+ End If
+ End If
+ End Sub
Public Sub SwitchInOwn(ByVal BattleScreen As BattleScreen, ByVal NewPokemonIndex As Integer, ByVal FirstTime As Boolean, ByVal InsertIndex As Integer, Optional ByVal message As String = "")
HasSwitchedInOwn = True
If FirstTime = False Then
+ ChangeCameraAngle(1, True, BattleScreen)
Dim insertMessage As String = message
If insertMessage = "" Then
@@ -6631,6 +7318,39 @@
BattleScreen.AddToQuery(InsertIndex, New TextQueryObject(insertMessage))
+ Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False, BattleScreen.OwnPokemonModel)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ ' Ball Closes
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
+ Dim SmokeReturned As Integer = 0
+ Do
+ Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+ Dim SmokeDestination As Vector3 = New Vector3(0, 0, 0)
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+
+ Dim SmokeEntity As Entity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
+ BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeReturned)
+ Loop While SmokeReturned <= 38
+ End If
+
+ ' Pokemon disappears
+ BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+
+ ' Ball returns
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
+ Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(Nothing, BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
+ End If
+ BattleScreen.AddToQuery(InsertIndex, BallReturn)
+
Dim index As Integer = NewPokemonIndex
If index <= -1 Then
For i = 0 To Core.Player.Pokemons.Count - 1
@@ -6655,16 +7375,52 @@
End If
Dim ownModel As String = BattleScreen.GetModelName(True)
-
If ownModel = "" Then
BattleScreen.AddToQuery(InsertIndex, New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OwnPokemon, PokemonForms.GetOverworldSpriteName(BattleScreen.OwnPokemon), 0, 1, -1, -1))
Else
BattleScreen.AddToQuery(InsertIndex, New ToggleEntityQueryObject(True, ownModel, 1, 0, -1, -1))
End If
- BattleScreen.AddToQuery(InsertIndex, New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OwnPokemon, 1, -1, -1, -1, -1))
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(BattleScreen.OwnPokemon.Number.ToString(), True))
BattleScreen.AddToQuery(InsertIndex, New TextQueryObject("Go, " & BattleScreen.OwnPokemon.GetDisplayName() & "!"))
+
+ ' Ball is thrown
+ Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False, BattleScreen.OwnPokemonModel)
+
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
+
+ Dim BallThrowEntity As Entity = BallThrow.SpawnEntity(New Vector3(-2, -0.15, 0), BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, -0.3,, 0.025F)
+
+ ' Ball Opens
+ BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
+
+ Dim SmokeSpawned As Integer = 0
+ Do
+ Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+
+ Dim SmokeEntity As Entity = BallThrow.SpawnEntity(Nothing, SmokeTexture, SmokeScale, 1.0F, 3)
+ BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeSpawned)
+ Loop While SmokeSpawned <= 38
+ End If
+
+ ' Pokemon appears
+ BallThrow.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
+ BallThrow.AnimationPlaySound(CStr(BattleScreen.OwnPokemon.Number), 4, 0,, True)
+
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ ' Pokémon falls down
+ BallThrow.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0,,, 3)
+ End If
+
+ BattleScreen.AddToQuery(InsertIndex, BallThrow)
End If
With BattleScreen
@@ -6812,7 +7568,6 @@
.OppTruantRound = 0
.OppTaunt = 0
.OppSmacked = 0
- .OppFlashFire = 0
.OppRageCounter = 0
.OppUproar = 0
If .OppUsedBatonPass = False Then .OppFocusEnergy = 0
@@ -6909,7 +7664,7 @@
BattleScreen.OppPokemon.Ability.SwitchOut(BattleScreen.OppPokemon)
If BattleScreen.IsTrainerBattle = False Then
- ChangeCameraAngle(1, False, BattleScreen)
+
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
EndBattle(EndBattleReasons.WinWild, BattleScreen, False)
@@ -6918,7 +7673,6 @@
If BattleScreen.OppPokemon.HP <= 0 Or BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Fainted Then
GainEXP(BattleScreen)
End If
- BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
If BattleScreen.IsRemoteBattle And BattleScreen.OppFaint Then
'Next pokemon is selected by the opponent.
@@ -6929,14 +7683,45 @@
GainEXP(BattleScreen)
ChangeCameraAngle(1, False, BattleScreen)
- BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
-
If message = "" Then
message = BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""
End If
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
+ ' Ball Closes
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
+ Dim SmokeReturned As Integer = 0
+ Do
+ Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+ Dim SmokeDestination = New Vector3(0, 0, 0)
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+ Dim SmokeEntity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1)
+ BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeReturned)
+ Loop While SmokeReturned <= 38
+
+ ' Pokemon disappears
+ BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
+
+ BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+
+ ' Ball returns
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
+ Dim BallReturnEntity = BallReturn.SpawnEntity(New Vector3(0, 0, 0), BattleScreen.OppPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 0F, 0F,, 0.3)
+ BattleScreen.BattleQuery.Add(BallReturn)
+ Else
+ BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
+ End If
+
EndBattle(EndBattleReasons.WinTrainer, BattleScreen, False)
If BattleScreen.IsRemoteBattle = True Then
EndBattle(EndBattleReasons.WinTrainer, BattleScreen, True)
@@ -6965,12 +7750,43 @@
End Sub
Public Sub SwitchInOpp(ByVal BattleScreen As BattleScreen, ByVal FirstTime As Boolean, ByVal index As Integer)
-
If FirstTime = False Then
- HasSwitchedInOpp = True
ChangeCameraAngle(1, False, BattleScreen)
+ HasSwitchedInOpp = True
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
+
+ ' Ball Closes
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
+ Dim SmokeReturned As Integer = 0
+ Do
+ Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+ Dim SmokeDestination = New Vector3(0, 0, 0)
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+ Dim SmokeEntity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1)
+ BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+ Threading.Interlocked.Increment(SmokeReturned)
+ Loop While SmokeReturned <= 38
+
+ ' Pokemon disappears
+ BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
+ BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+
+ ' Ball returns
+ BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
+ Dim BallReturnEntity = BallReturn.SpawnEntity(New Vector3(0, 0, 0), BattleScreen.OppPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 0F, 0F,, 0.3)
+
+ BattleScreen.BattleQuery.Add(BallReturn)
+ Else
+ BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 1, -1, -1, -1, -1))
+ End If
BattleScreen.SendInNewTrainerPokemon(index)
Me.ApplyOppBatonPass(BattleScreen)
@@ -6992,8 +7808,41 @@
End If
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 1, -1, -1, -1, -1))
- BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(BattleScreen.OppPokemon.Number.ToString(), True))
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Go, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
+
+ Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False, BattleScreen.OppPokemonModel)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ ' Ball is thrown
+
+ BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
+ Dim BallThrowEntity = BallThrow.SpawnEntity(New Vector3(2, -0.15, 0), BattleScreen.OppPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, 0.3,, 0.025F)
+
+ ' Ball opens
+ BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
+ Dim SmokeSpawned As Integer = 0
+ Do
+ Dim SmokePosition = New Vector3(0, 0.35, 0)
+ Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+ Dim SmokeEntity = BallThrow.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3)
+
+ BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
+ Threading.Interlocked.Increment(SmokeSpawned)
+ Loop While SmokeSpawned <= 38
+ End If
+ ' Pokemon appears
+ BallThrow.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
+ BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 4, 0,, True)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ ' Pokémon falls down
+ BallThrow.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0)
+ BattleScreen.BattleQuery.Add(BallThrow)
+ End If
End If
With BattleScreen
@@ -7022,10 +7871,7 @@
'Sticky Web
If spikeAffected = True Then
If .FieldEffects.OwnStickyWeb > 0 Then
-
LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a Sticky Web!", "stickyweb")
-
-
End If
End If
If spikeAffected = True Then
@@ -7089,79 +7935,79 @@
#Region "EndBattle"
- Enum EndBattleReasons
- WinWild
- LoseWild
- WinTrainer
- LoseTrainer
- WinPvP
- LosePvP
- End Enum
+ Enum EndBattleReasons
+ WinWild
+ LoseWild
+ WinTrainer
+ LoseTrainer
+ WinPvP
+ LosePvP
+ End Enum
- Public Sub EndBattle(ByVal reason As EndBattleReasons, ByVal BattleScreen As BattleScreen, ByVal AddPVP As Boolean)
- BattleScreen.OwnFaint = False
- BattleScreen.OppFaint = False
- IsAfterFaint = False
- If AddPVP = True Then
- Select Case reason
- Case EndBattleReasons.WinTrainer 'Lost
- Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 5, q)
+ Public Sub EndBattle(ByVal reason As EndBattleReasons, ByVal BattleScreen As BattleScreen, ByVal AddPVP As Boolean)
+ BattleScreen.OwnFaint = False
+ BattleScreen.OppFaint = False
+ IsAfterFaint = False
+ If AddPVP = True Then
+ Select Case reason
+ Case EndBattleReasons.WinTrainer 'Lost
+ Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 5, q)
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 4, New TextQueryObject("You lost the battle!"))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, New TextQueryObject(""))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject(""))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 4, New TextQueryObject("You lost the battle!"))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, New TextQueryObject(""))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject(""))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
- Case EndBattleReasons.LoseTrainer 'Won
- Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, q)
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
+ Case EndBattleReasons.LoseTrainer 'Won
+ Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, q)
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject("Pokémon Trainer " & Core.Player.Name & " was defeated!"))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject("Pokémon Trainer " & Core.Player.Name & " was defeated!"))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
- End Select
- Else
- Select Case reason
- Case EndBattleReasons.WinWild
- Won = True
- Core.Player.AddPoints(1, "Won against wild Pokémon.")
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
+ End Select
+ Else
+ Select Case reason
+ Case EndBattleReasons.WinWild
+ Won = True
+ Core.Player.AddPoints(1, "Won against wild Pokémon.")
- BattleScreen.BattleQuery.Add(New PlayMusicQueryObject("wild_defeat"))
- ChangeCameraAngle(1, True, BattleScreen)
+ BattleScreen.BattleQuery.Add(New PlayMusicQueryObject("wild_defeat"))
+ ChangeCameraAngle(1, True, BattleScreen)
- GainEXP(BattleScreen)
+ GainEXP(BattleScreen)
- If BattleScreen.FieldEffects.OwnPayDayCounter > 0 Then
- Core.Player.Money += BattleScreen.FieldEffects.OwnPayDayCounter
- BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " picked up $" & BattleScreen.FieldEffects.OwnPayDayCounter & "!"))
- End If
+ If BattleScreen.FieldEffects.OwnPayDayCounter > 0 Then
+ Core.Player.Money += BattleScreen.FieldEffects.OwnPayDayCounter
+ BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " picked up $" & BattleScreen.FieldEffects.OwnPayDayCounter & "!"))
+ End If
- BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
- Case EndBattleReasons.WinTrainer
- Won = True
- Core.Player.AddPoints(3, "Won against trainer.")
+ BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
+ Case EndBattleReasons.WinTrainer
+ Won = True
+ Core.Player.AddPoints(3, "Won against trainer.")
- Core.Player.Money += BattleScreen.GetTrainerMoney()
+ Core.Player.Money += BattleScreen.GetTrainerMoney()
- BattleScreen.BattleQuery.Add(New PlayMusicQueryObject(BattleScreen.Trainer.GetDefeatMusic()))
+ BattleScreen.BattleQuery.Add(New PlayMusicQueryObject(BattleScreen.Trainer.GetDefeatMusic()))
- Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.04F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.BattleQuery.Add(q)
+ Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.04F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.BattleQuery.Add(q)
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.TrainerType & " " & BattleScreen.Trainer.Name & " was defeated!"))
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.OutroMessage))
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.TrainerType & " " & BattleScreen.Trainer.Name & " was defeated!"))
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.OutroMessage))
- If BattleScreen.GetTrainerMoney() > 0 Then
- BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " got $" & BattleScreen.GetTrainerMoney() & "!"))
- End If
+ If BattleScreen.GetTrainerMoney() > 0 Then
+ BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " got $" & BattleScreen.GetTrainerMoney() & "!"))
+ End If
- BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
- Case EndBattleReasons.LoseTrainer, EndBattleReasons.LoseWild
- Won = False
+ BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
+ Case EndBattleReasons.LoseTrainer, EndBattleReasons.LoseWild
+ Won = False
Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
q.ApplyCurrentCamera = True
BattleScreen.BattleQuery.Add(q)
diff --git a/P3D/Battle/BattleSystemV2/BattleMenu.vb b/P3D/Battle/BattleSystemV2/BattleMenu.vb
index 870ecb4e9..c63e7f3cc 100644
--- a/P3D/Battle/BattleSystemV2/BattleMenu.vb
+++ b/P3D/Battle/BattleSystemV2/BattleMenu.vb
@@ -384,7 +384,7 @@
Core.SpriteBatch.Draw(Me.IconUnselected, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), Color.White)
If isSelected = True Then
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, (SelExtended + AllExtended)))
- Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Text, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86, 144 + Index * 96), New Color(0, 0, 0, (SelExtended + AllExtended)))
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Text, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(144 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended)))
Else
If IconFading > 0 Then
Core.SpriteBatch.Draw(Me.IconSelected, New Rectangle(Core.ScreenSize.Width - (AllExtended) + 28, 132 + Index * 96, 48, 48), New Color(255, 255, 255, IconFading))
@@ -471,10 +471,10 @@
Dim ppColor As Color = GetPPColor()
ppColor.A = CByte((extraExtended + AllExtended - deductAlpha).Clamp(0, 255))
- Core.SpriteBatch.DrawString(FontManager.MiniFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 150 + Index * 96), ppColor)
- Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86, 144 + Index * 96), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.CurrentPP & "/" & Me.Move.MaxPP, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28), CInt(152 + Index * 96)), ppColor)
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(CInt(Core.ScreenSize.Width - (AllExtended + extraExtended) + 86), CInt(132 + Index * 96)), New Color(0, 0, 0, (SelExtended + AllExtended) - deductAlpha))
Else
- Core.SpriteBatch.DrawString(FontManager.MiniFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 150 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Move.Name, New Vector2(Core.ScreenSize.Width - (AllExtended + extraExtended) + 28, 152 + Index * 96), New Color(0, 0, 0, 255 - (extraExtended + AllExtended) - deductAlpha))
End If
End Sub
@@ -604,10 +604,21 @@
_mainMenuItemList.Clear()
BattleScreen.ClearMainMenuTime = False
End If
-
If _mainMenuItemList.Count = 0 Then
CreateMainMenuItems(BattleScreen)
End If
+ If BattleScreen.OwnFaint = True Then
+ If BattleScreen.BattleQuery(0).QueryType <> QueryObject.QueryTypes.ScreenFade Then
+ TempBattleScreen = BattleScreen
+
+ Player.Temp.PokemonScreenIndex = BattleScreen.OwnPokemonIndex
+ Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ShowPokemonMenu, "Choose Pokémon", False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = False}
+ AddHandler selScreen.SelectedObject, AddressOf ShowPokemonMenuHandler
+
+ Core.SetScreen(selScreen)
+
+ End If
+ End If
If _retractMenu = False Then
For Each m As MainMenuItem In _mainMenuItemList
m.Update(BattleScreen, _allItemsExtended, (m.Index = _mainMenuIndex))
diff --git a/P3D/Battle/BattleSystemV2/BattleScreen.vb b/P3D/Battle/BattleSystemV2/BattleScreen.vb
index 4cc142822..65ea22efd 100644
--- a/P3D/Battle/BattleSystemV2/BattleScreen.vb
+++ b/P3D/Battle/BattleSystemV2/BattleScreen.vb
@@ -226,11 +226,11 @@
Dim oppModel As String = GetModelName(False)
If ownModel = "" Then
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
- OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
+ OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, 1), ModelEntity)
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
@@ -279,6 +279,8 @@
Dim q31 As New PlaySoundQueryObject(OwnPokemon.Number.ToString(), True, 3.0F)
Dim q4 As TextQueryObject = New TextQueryObject("Go, " & Me.OwnPokemon.GetDisplayName() & "!")
+ Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q31, q4})
+
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
@@ -286,8 +288,6 @@
cq2.PassThis = True
- Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q31, q4})
-
Battle.SwitchInOwn(Me, meIndex, True, -1)
Battle.SwitchInOpp(Me, True, 0)
@@ -359,23 +359,33 @@
Dim ownModel As String = GetModelName(True)
Dim oppModel As String = GetModelName(False)
+ Dim InitiallyVisibleOwn As Integer = 1
+ If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
+ InitiallyVisibleOwn = 0
+ End If
+
If ownModel = "" Then
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOwn), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
- OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, InitiallyVisibleOwn), ModelEntity)
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OwnPokemonModel)
+ Dim InitiallyVisibleOpp As Integer = 1
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ InitiallyVisibleOpp = 0
+ End If
+
If oppModel = "" Then
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOpp), NPC)
OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
- OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, oppModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OppPokemon), 1, OppPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, oppModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, InitiallyVisibleOpp), ModelEntity)
End If
Screen.Level.Entities.Add(OppPokemonNPC)
@@ -401,21 +411,93 @@
Dim q As CameraQueryObject = New CameraQueryObject(New Vector3(13, 0, 15), New Vector3(21, 0, 15), 0.05F, 0.05F, -0.8F, 1.4F, 0.0F, 0.0F, 0.016F, 0.016F)
q.PassThis = True
- Dim hisher As String = "his"
- If Trainer.Gender = 1 Then
- hisher = "her"
+ Dim q1 As TextQueryObject = New TextQueryObject(Trainer.Name & " " & "wants to battle!")
+ Dim q11 As TextQueryObject = New TextQueryObject(Trainer.Name & ": """ & "Go," & " " & OppPokemon.GetDisplayName() & "!""")
+
+ ' Ball is thrown
+ Dim BallThrowOpp As AnimationQueryObject = New AnimationQueryObject(OppPokemonNPC, False, OppPokemonModel)
+
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ BallThrowOpp.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
+ BallThrowOpp.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+ Dim BallThrowEntity As Entity = BallThrowOpp.SpawnEntity(New Vector3(2, -0.15, 0), Me.OppPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallThrowOpp.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, 0.3,, 0.025F)
+
+ ' Ball Opens
+ BallThrowOpp.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
+ Dim SmokeSpawnedOpp As Integer = 0
+ Do
+ Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+
+ Dim SmokeEntity As Entity = BallThrowOpp.SpawnEntity(Nothing, SmokeTexture, SmokeScale, 1.0F, 3)
+ BallThrowOpp.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeSpawnedOpp)
+ Loop While SmokeSpawnedOpp <= 38
+
+ ' Pokemon appears
+ BallThrowOpp.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
+ End If
+ BallThrowOpp.AnimationPlaySound(CStr(Me.OppPokemon.Number), 4, 0,, True)
+
+ ' Pokémon falls down
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ ' Pokémon falls down
+ BallThrowOpp.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 4, 0,,, 3)
End If
- Dim q1 As New PlaySoundQueryObject(OppPokemon.Number.ToString(), True, 5.0F)
- Dim q2 As TextQueryObject = New TextQueryObject(Trainer.Name & " and " & hisher & " " & Me.OppPokemon.GetDisplayName() & " want to battle!")
-
- Dim q22 As CameraQueryObject = New CameraQueryObject(New Vector3(14, 0, 15), New Vector3(13, 0, 15), 0.05F, 0.05F, MathHelper.PiOver2, -0.8F, 0.0F, 0.0F, 0.05F, 0.05F)
+ Dim q2 As CameraQueryObject = New CameraQueryObject(New Vector3(14, 0, 15), New Vector3(13, 0, 15), 0.05F, 0.05F, MathHelper.PiOver2, -0.8F, 0.0F, 0.0F, 0.05F, 0.05F)
Dim q3 As CameraQueryObject = New CameraQueryObject(New Vector3(14, 0, 11), New Vector3(14, 0, 15), 0.01F, 0.01F, MathHelper.PiOver2, MathHelper.PiOver2, 0.0F, 0.0F)
q3.PassThis = True
-
Dim q31 As New PlaySoundQueryObject(OwnPokemon.Number.ToString(), True, 3.0F)
- Dim q4 As TextQueryObject = New TextQueryObject("Go, " & Me.OwnPokemon.GetDisplayName() & "!")
+ Dim q4 As TextQueryObject = New TextQueryObject("Go," & " " & Me.OwnPokemon.GetDisplayName() & "!")
+
+
+ Me.BattleQuery.AddRange({cq, q, q1, q11, BallThrowOpp, q2, q3, q31, q4})
+
+ If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
+ ' Ball is thrown
+ Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
+
+ BallThrowOwn.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
+ BallThrowOwn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+
+ Dim BallThrowEntity As Entity = BallThrowOwn.SpawnEntity(New Vector3(-2, -0.15, 0), Me.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
+ BallThrowOwn.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, 0.3,, 0.025F)
+
+ ' Ball Opens
+ BallThrowOwn.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
+
+ Dim SmokeSpawned As Integer = 0
+ Do
+ Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
+
+ Dim SmokeEntity As Entity = BallThrowOwn.SpawnEntity(Nothing, SmokeTexture, SmokeScale, 1.0F, 3)
+ BallThrowOwn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeSpawned)
+ Loop While SmokeSpawned <= 38
+
+
+ ' Pokemon appears
+ BallThrowOwn.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
+ BallThrowOwn.AnimationPlaySound(CStr(Me.OwnPokemon.Number), 4, 0,, True)
+
+ ' Pokémon falls down
+ BallThrowOwn.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0,,, 3)
+ Me.BattleQuery.Add(BallThrowOwn)
+ End If
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
@@ -424,8 +506,6 @@
cq2.PassThis = True
- Me.BattleQuery.AddRange({cq, q, q1, q2, q22, q3, q31, q4})
-
Battle.SwitchInOwn(Me, meIndex, True, OwnPokemonIndex)
Battle.SwitchInOpp(Me, True, OppPokemonIndex)
TempPVPBattleQuery.Clear()
@@ -496,10 +576,10 @@
Dim oppModel As String = GetModelName(False)
If ownModel = "" Then
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
End If
@@ -507,10 +587,10 @@
Screen.Level.Entities.Add(OwnPokemonModel)
If oppModel = "" Then
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, oppModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
End If
@@ -608,21 +688,21 @@
Dim oppModel As String = GetModelName(False)
If ownModel = "" Then
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
- OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
+ OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(OwnPokemon), 3, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
+ OwnPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 0.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, ownModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, 1), ModelEntity)
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OwnPokemonModel)
If oppModel = "" Then
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", True, New Vector3(1), 1, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 0, "Models\Bulbasaur\Normal", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
Else
- OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 12.5F) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
+ OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0, 13) + BattleMapOffset, {Nothing}, {0, 0}, False, New Vector3(0), New Vector3(1), BaseModel.BillModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), {PokemonForms.GetOverworldSpriteName(WildPokemon), 1, WildPokemon.GetDisplayName(), 1, True, "Still", New List(Of Rectangle)}), NPC)
OppPokemonModel = CType(Entity.GetNewEntity("ModelEntity", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(MathHelper.Pi * 0.5F, MathHelper.Pi * 1.5F, 0), New Vector3(0.07F), BaseModel.BlockModel, 1, oppModel, True, New Vector3(1), 0, "", "", New Vector3(0), Nothing), ModelEntity)
End If
@@ -657,6 +737,8 @@
Dim q31 As New PlaySoundQueryObject(OwnPokemon.Number.ToString(), True, 3.0F)
Dim q4 As TextQueryObject = New TextQueryObject("Go, " & Me.OwnPokemon.GetDisplayName() & "!")
+ Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q4})
+
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
@@ -664,8 +746,6 @@
cq2.PassThis = True
- Me.BattleQuery.AddRange({cq, q, q1, q2, q22, q3, q31, q4})
-
Battle.SwitchInOwn(Me, meIndex, True, -1)
Battle.SwitchInOpp(Me, True, 0)
@@ -768,7 +848,33 @@
Public Overrides Sub Draw()
SkyDome.Draw(45.0F)
- Level.Draw()
+
+ Dim ForegroundEntities As New List(Of Entity)
+ For Each e As Entity In Level.Entities
+ If e Is OwnPokemonNPC Then
+ ForegroundEntities.Add(e)
+ End If
+ If e Is OppPokemonNPC Then
+ ForegroundEntities.Add(e)
+ End If
+ If e Is OwnTrainerNPC Then
+ ForegroundEntities.Add(e)
+ End If
+ If e Is OppTrainerNPC Then
+ ForegroundEntities.Add(e)
+ End If
+ If e Is OwnPokemonModel Then
+ ForegroundEntities.Add(e)
+ End If
+ If e Is OppPokemonModel Then
+ ForegroundEntities.Add(e)
+ End If
+ Next
+ If ForegroundEntities.Count > 0 Then
+ ForegroundEntities = (From f In ForegroundEntities Order By f.CameraDistance Descending).ToList()
+ End If
+ Level.Draw()
+
World.DrawWeather(Screen.Level.World.CurrentMapWeather)
If HasToWaitPVP() = True Then
@@ -781,13 +887,28 @@
End If
End If
+ Dim ForegroundAnimationList As New List(Of AnimationQueryObject)
+ Dim BackgroundAnimationList As New List(Of AnimationQueryObject)
If BattleQuery.Count > 0 Then
Dim cIndex As Integer = 0
Dim cQuery As New List(Of QueryObject)
nextIndex:
If BattleQuery.Count > cIndex Then
Dim cQueryObject As QueryObject = BattleQuery(cIndex)
- cQuery.Add(cQueryObject)
+ If cQueryObject.QueryType = QueryObject.QueryTypes.MoveAnimation Then
+ If CType(cQueryObject, AnimationQueryObject).DrawBeforeEntities = True Then
+ BackgroundAnimationList.Add(CType(cQueryObject, AnimationQueryObject))
+ cIndex += 1
+ GoTo nextIndex
+ Else
+ ForegroundAnimationList.Add(CType(cQueryObject, AnimationQueryObject))
+ cIndex += 1
+ GoTo nextIndex
+ End If
+ Else
+ cQuery.Add(cQueryObject)
+ End If
+
If cQueryObject.PassThis = True Then
cIndex += 1
@@ -795,13 +916,58 @@ nextIndex:
End If
End If
+ cQuery.Reverse()
+ If cQuery.Count > 0 Then
+ For Each cQueryObject As QueryObject In cQuery
+ cQueryObject.Draw(Me)
+ Next
+ End If
+ End If
+ If BackgroundAnimationList.Count > 0 Then
+ Dim cIndex As Integer = 0
+ Dim cQuery As New List(Of QueryObject)
+nextIndexBackground:
+ If BackgroundAnimationList.Count > cIndex Then
+ Dim cQueryObject As QueryObject = BackgroundAnimationList(cIndex)
+ cQuery.Add(cQueryObject)
+
+ If cQueryObject.PassThis = True Then
+ cIndex += 1
+ GoTo nextIndexBackground
+ End If
+ End If
+
+ cQuery.Reverse()
+
+ For Each cQueryObject As QueryObject In cQuery
+ cQueryObject.Draw(Me)
+ Next
+
+ For i = 0 To ForegroundEntities.Count - 1
+ ForegroundEntities(i).Render()
+ DebugDisplay.MaxVertices += ForegroundEntities(i).VertexCount
+ Next
+ End If
+ If ForegroundAnimationList.Count > 0 Then
+ Dim cIndex As Integer = 0
+ Dim cQuery As New List(Of QueryObject)
+nextIndexForeground:
+ If ForegroundAnimationList.Count > cIndex Then
+ Dim cQueryObject As QueryObject = ForegroundAnimationList(cIndex)
+ cQuery.Add(cQueryObject)
+
+ If cQueryObject.PassThis = True Then
+ cIndex += 1
+ GoTo nextIndexForeground
+ End If
+ End If
+
cQuery.Reverse()
For Each cQueryObject As QueryObject In cQuery
cQueryObject.Draw(Me)
Next
End If
-
'Core.SpriteBatch.DrawString(FontManager.MiniFont, "Battle system not final!", New Vector2(0, Core.windowSize.Height - 20), Color.White)
TextBox.Draw()
diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/AnimationQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/AnimationQueryObject.vb
index bf5d71de7..6ea89d65a 100644
--- a/P3D/Battle/BattleSystemV2/QueryObjects/AnimationQueryObject.vb
+++ b/P3D/Battle/BattleSystemV2/QueryObjects/AnimationQueryObject.vb
@@ -5,10 +5,12 @@
Public AnimationStarted As Boolean = False
Public AnimationEnded As Boolean = False
- Public BAFlipped As Boolean
+ Public BattleFlipped As Boolean = Nothing
Public AnimationSequence As List(Of BattleAnimation3D)
+ Public SpawnedEntities As List(Of Entity)
Public CurrentEntity As Entity
Public CurrentModel As ModelEntity
+ Public DrawBeforeEntities As Boolean
Public Overrides ReadOnly Property IsReady As Boolean
Get
@@ -16,23 +18,38 @@
End Get
End Property
- Public Sub New(ByVal entity As NPC, ByVal BAFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing)
+ Public Sub New(ByVal entity As Entity, ByVal BattleFlipped As Boolean, Optional ByVal model As ModelEntity = Nothing, Optional DrawBeforeEntities As Boolean = False)
MyBase.New(QueryTypes.MoveAnimation)
Me.AnimationSequence = New List(Of BattleAnimation3D)
- Me.BAFlipped = BAFlipped
+ Me.SpawnedEntities = New List(Of Entity)
+ Me.DrawBeforeEntities = DrawBeforeEntities
+ If BattleFlipped <> Nothing Then
+ Me.BattleFlipped = BattleFlipped
+ End If
Me.CurrentEntity = entity
Me.CurrentModel = model
AnimationSequenceBegin()
End Sub
Public Overrides Sub Draw(ByVal BV2Screen As BattleScreen)
+ Dim Backgrounds As New List(Of Entity)
+
Dim RenderObjects As New List(Of Entity)
For Each a As BattleAnimation3D In Me.AnimationSequence
- RenderObjects.Add(a)
+ If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
+ Backgrounds.Add(a)
+ Else
+ RenderObjects.Add(a)
+ End If
+ Next
+ For Each entity As BattleAnimation3D In Me.SpawnedEntities
+ RenderObjects.Add(entity)
Next
If RenderObjects.Count > 0 Then
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
End If
-
+ For Each [Object] As Entity In Backgrounds
+ [Object].Render()
+ Next
For Each [Object] As Entity In RenderObjects
[Object].Render()
Next
@@ -54,189 +71,196 @@
If AnimationSequence.Count <= 0 Then
AnimationSequenceEnd()
End If
+
For Each Animation As BattleAnimation3D In AnimationSequence
Animation.UpdateEntity()
Next
+ For Each Entity As Entity In SpawnedEntities
+ Entity.Update()
+ Entity.UpdateEntity()
+ Next
+ For i = 0 To Me.SpawnedEntities.Count - 1
+ If i <= SpawnedEntities.Count - 1 Then
+ Dim entity As Entity = SpawnedEntities(i)
+
+ If entity.CanBeRemoved = True Then
+ i -= 1
+ RemoveEntity(entity)
+ End If
+ End If
+ Next
End If
End Sub
Public Sub AnimationSequenceBegin()
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceBegin OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceBegin INSIDE ANIMATION SEQUENCE, DID YOU MEAN AnimationSequenceEnd?")
- Else
- AnimationStarted = True
- End If
+ AnimationStarted = True
End Sub
Public Sub AnimationSequenceEnd()
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceEnd OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationSequenceEnd BEFORE CALLING AnimationSequenceBegin")
- Else
- AnimationEnded = True
- End If
+ AnimationEnded = True
End Sub
- Public Sub AnimationSpawnFadingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = 1.0F)
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
+ Public Function SpawnEntity(ByVal Position As Vector3, ByVal Texture As Texture2D, ByVal Scale As Vector3, ByVal Opacity As Single, Optional ByVal startDelay As Single = 0.0F, Optional ByVal endDelay As Single = 0.0F) As Entity
+ Dim NewPosition As Vector3
+ If Not Position = Nothing Then
+ If BattleFlipped = True Then
+ If CurrentEntity IsNot Nothing Then
+ NewPosition.X = CurrentEntity.Position.X - Position.X
+ NewPosition.Y = CurrentEntity.Position.Y + Position.Y
+ NewPosition.Z = CurrentEntity.Position.Z + Position.Z
+ Else
+ NewPosition = Position
+ End If
+ Else
+ If CurrentEntity IsNot Nothing Then
+ NewPosition = CurrentEntity.Position + Position
+ Else
+ NewPosition = Position
+ End If
+ End If
Else
- Dim stringArray = Texture.Split(","c)
- Dim texture2D As Texture2D = Nothing
-
- If stringArray.Length = 1 Then
- texture2D = TextureManager.GetTexture(Texture)
- ElseIf stringArray.Length = 5 Then
- Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
- texture2D = TextureManager.GetTexture(stringArray(0), r, "")
+ If CurrentEntity IsNot Nothing Then
+ NewPosition = CurrentEntity.Position
+ Else
+ NewPosition = New Vector3(0, 0, 0)
End If
-
- If BAFlipped Then
- PositionX -= PositionX * 2.0F
- PositionZ -= PositionZ * 2.0F
- End If
-
- Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
- Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
-
- Dim baOpacity As BAOpacity = New BAOpacity(Position, texture2D, Scale, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
- AnimationSequence.Add(baOpacity)
End If
+ Dim SpawnedEntity = New BattleAnimation3D(NewPosition, Texture, Scale, startDelay, endDelay, False)
+ SpawnedEntity.Opacity = Opacity
+ SpawnedEntity.Visible = False
+
+ SpawnedEntities.Add(SpawnedEntity)
+
+ Return SpawnedEntity
+ End Function
+ Public Sub RemoveEntity(Entity As Entity)
+ SpawnedEntities.Remove(Entity)
+ End Sub
+ Public Sub AnimationChangeTexture(ByVal Entity As Entity, RemoveEntityAfter As Boolean, ByVal Texture As Texture2D, ByVal startDelay As Single, ByVal endDelay As Single)
+ Dim TextureChangeEntity As Entity
+
+ If Entity Is Nothing Then
+ TextureChangeEntity = CurrentEntity
+ Else
+ TextureChangeEntity = Entity
+ End If
+
+ Dim baEntityTextureChange As BAEntityTextureChange = New BAEntityTextureChange(TextureChangeEntity, RemoveEntityAfter, Texture, startDelay, endDelay)
+ AnimationSequence.Add(baEntityTextureChange)
+
End Sub
- Public Sub AnimationSpawnMovingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
+ Public Sub AnimationMove(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3, Optional MoveYSpeed As Single = 0.0F)
+ Dim MoveEntity As Entity
+ Dim ModelEntity As Entity = Nothing
+ Dim Destination As Vector3
+
+ If Entity Is Nothing Then
+ MoveEntity = CurrentEntity
+ If Me.CurrentModel IsNot Nothing Then
+ ModelEntity = Me.CurrentModel
+ End If
Else
- Dim stringArray = Texture.Split(","c)
- Dim texture2D As Texture2D = Nothing
-
- If stringArray.Length = 1 Then
- texture2D = TextureManager.GetTexture(Texture)
- ElseIf stringArray.Length = 5 Then
- Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
- texture2D = TextureManager.GetTexture(stringArray(0), r, "")
- End If
-
- If BAFlipped Then
- PositionX -= PositionX * 2.0F
- PositionZ -= PositionZ * 2.0F
- DestinationX -= DestinationX * 2.0F
- DestinationZ -= DestinationZ * 2.0F
- SpinXSpeed -= SpinXSpeed * 2.0F
- SpinZSpeed -= SpinZSpeed * 2.0F
- End If
-
- Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
- Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
- Dim Destination As Vector3 = New Vector3(CurrentEntity.Position.X + DestinationX, CurrentEntity.Position.Y + DestinationY, CurrentEntity.Position.Z + DestinationZ)
-
- Dim baMove As BAMove = New BAMove(Position, texture2D, Scale, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
- AnimationSequence.Add(baMove)
+ MoveEntity = Entity
End If
- End Sub
- Public Sub AnimationMovePokemonEntity(ByVal DestinationX As Single, ByVal DestinationY As Single, ByVal DestinationZ As Single, ByVal Speed As Single, ByVal SpinX As Boolean, ByVal SpinZ As Boolean, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal SpinXSpeed As Single = 0.1F, Optional ByVal SpinZSpeed As Single = 0.1F, Optional MovementCurve As Integer = 3)
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
- Else
- If BAFlipped Then
+
+ If Not BattleFlipped = Nothing Then
+ If BattleFlipped = True Then
DestinationX -= DestinationX * 2.0F
DestinationZ -= DestinationZ * 2.0F
End If
-
- Dim Destination As Vector3 = New Vector3(CurrentEntity.Position.X + DestinationX, CurrentEntity.Position.Y + DestinationY, CurrentEntity.Position.Z + DestinationZ)
-
- Dim baBillMove As BABillMove = New BABillMove(CurrentEntity, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
- AnimationSequence.Add(baBillMove)
-
- If Me.CurrentModel IsNot Nothing Then
- Dim baModelMove As BABillMove = New BABillMove(CType(CurrentModel, Entity), Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve)
- AnimationSequence.Add(baModelMove)
- End If
End If
- End Sub
- Public Sub AnimationFadePokemonEntity(ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = -1.0F)
If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnMovingAnimation BEFORE CALLING AnimationSequenceBegin")
+ Destination = MoveEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
Else
- If startState = -1.0F Then startState = CurrentEntity.Opacity
- Dim baBillOpacity As BABillOpacity = New BABillOpacity(CurrentEntity, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
- AnimationSequence.Add(baBillOpacity)
+ Destination = CurrentEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
+ End If
+ Dim baEntityMove As BAEntityMove = New BAEntityMove(MoveEntity, RemoveEntityAfter, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
+ AnimationSequence.Add(baEntityMove)
+
+ If ModelEntity IsNot Nothing Then
+ Dim baModelMove As BAEntityMove = New BAEntityMove(CType(CurrentModel, Entity), False, Destination, Speed, SpinX, SpinZ, startDelay, endDelay, SpinXSpeed, SpinZSpeed, MovementCurve, MoveYSpeed)
+ AnimationSequence.Add(baModelMove)
+ End If
+
+ End Sub
+
+ Public Sub AnimationFade(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = -1.0F)
+ Dim FadeEntity As Entity
+ Dim FadeModel As Entity = Nothing
+ If Entity Is Nothing Then
+ FadeEntity = CurrentEntity
If Me.CurrentModel IsNot Nothing Then
- Dim baModelOpacity As BABillOpacity = New BABillOpacity(CType(CurrentModel, Entity), TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
- AnimationSequence.Add(baModelOpacity)
+ FadeModel = Me.CurrentModel
End If
+ Else
+ FadeEntity = Entity
+ End If
+ If startState = -1.0F Then startState = FadeEntity.Opacity
+ Dim baEntityOpacity As BAEntityOpacity = New BAEntityOpacity(FadeEntity, RemoveEntityAfter, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
+ AnimationSequence.Add(baEntityOpacity)
+
+ If FadeModel IsNot Nothing Then
+ Dim baModelOpacity As BAEntityOpacity = New BAEntityOpacity(CType(FadeModel, Entity), False, TransitionSpeed, FadeIn, EndState, startDelay, endDelay, startState)
+ AnimationSequence.Add(baModelOpacity)
+ End If
+
+ End Sub
+ Public Sub AnimationRotate(Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal RotationSpeedX As Single, ByVal RotationSpeedY As Single, ByVal RotationSpeedZ As Single, ByVal EndRotationX As Single, ByVal EndRotationY As Single, ByVal EndRotationZ As Single, ByVal startDelay As Single, ByVal endDelay As Single, ByVal DoXRotation As Boolean, ByVal DoYRotation As Boolean, ByVal DoZRotation As Boolean, ByVal DoReturn As Boolean)
+ Dim RotateEntity As Entity
+ Dim RotateModel As Entity = Nothing
+ If Entity Is Nothing Then
+ RotateEntity = CurrentEntity
+ If Me.CurrentModel IsNot Nothing Then
+ RotateModel = Me.CurrentModel
+ End If
+ Else
+ RotateEntity = Entity
+ End If
+
+ Dim RotationSpeedVector As Vector3 = New Vector3(RotationSpeedX, RotationSpeedY, RotationSpeedZ)
+ Dim EndRotation As Vector3 = New Vector3(EndRotationX, EndRotationY, EndRotationZ)
+ Dim baEntityRotate As BAEntityRotate = New BAEntityRotate(RotateEntity, RemoveEntityAfter, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
+ AnimationSequence.Add(baEntityRotate)
+
+ If RotateModel IsNot Nothing Then
+ Dim baModelOpacity As BAEntityRotate = New BAEntityRotate(CType(RotateModel, Entity), False, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
+ AnimationSequence.Add(baModelOpacity)
+ End If
+
+ End Sub
+ Public Sub AnimationScale(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "")
+ Dim ScaleEntity As Entity
+ Dim ScaleModel As Entity = Nothing
+ If Entity Is Nothing Then
+ ScaleEntity = CurrentEntity
+ If Me.CurrentModel IsNot Nothing Then
+ ScaleModel = Me.CurrentModel
+ End If
+ Else
+ ScaleEntity = Entity
+ End If
+
+ Dim Scale As Vector3 = ScaleEntity.Scale
+ Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
+ Dim baEntityScale As BAEntityScale = New BAEntityScale(ScaleEntity, RemoveEntityAfter, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
+ AnimationSequence.Add(baEntityScale)
+
+ If ScaleModel IsNot Nothing Then
+ Dim baModelScale As BAEntityScale = New BAEntityScale(CType(ScaleModel, Entity), False, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
End If
End Sub
+
Public Sub AnimationPlaySound(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False)
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AnimationPlaySound BEFORE CALLING AnimationSequenceBegin")
- Else
- Dim baSound As BASound = New BASound(sound, startDelay, endDelay, stopMusic, IsPokemon)
- AnimationSequence.Add(baSound)
- End If
+ Dim baSound As BAPlaySound = New BAPlaySound(sound, startDelay, endDelay, stopMusic, IsPokemon)
+ AnimationSequence.Add(baSound)
End Sub
- Public Sub AnimationSpawnScalingEntity(ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "1")
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation BEFORE CALLING AnimationSequenceBegin")
- Else
- Dim stringArray = Texture.Split(","c)
- Dim texture2D As Texture2D = Nothing
-
- If stringArray.Length = 1 Then
- texture2D = TextureManager.GetTexture(Texture)
- ElseIf stringArray.Length = 5 Then
- Dim r As Rectangle = New Rectangle(CInt(stringArray(1)), CInt(stringArray(2)), CInt(stringArray(3)), CInt(stringArray(4)))
- texture2D = TextureManager.GetTexture(stringArray(0), r, "")
- End If
-
- If BAFlipped Then
- PositionX -= PositionX * 2.0F
- PositionZ -= PositionZ * 2.0F
- End If
- Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
- Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
- Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
- Dim baSize As BASize = New BASize(Position, texture2D, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
- AnimationSequence.Add(baSize)
- End If
+ Public Sub AnimationBackground(Texture As Texture2D, ByVal TransitionSpeed As Single, ByVal FadeIn As Boolean, ByVal FadeOut As Boolean, ByVal EndState As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal startState As Single = 0.0F)
+ Dim baBackground As BABackground = New BABackground(Texture, TransitionSpeed, FadeIn, FadeOut, EndState, startDelay, endDelay, startState)
+ AnimationSequence.Add(baBackground)
End Sub
- Public Sub AnimationScalePokemonEntity(ByVal entity As Entity, ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal Texture As String, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal ScaleZ As Single, ByVal Grow As Boolean, ByVal EndSizeX As Single, ByVal EndSizeY As Single, ByVal EndSizeZ As Single, ByVal SizeSpeed As Single, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal Anchors As String = "1")
- If CurrentEntity Is Nothing Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation OUTSIDE OF ATTACK ANIMATION DELEGATE")
- ElseIf Not AnimationStarted Then
- Logger.Log(Logger.LogTypes.Warning, "ATTEMPT TO USE AttackSpawnSizeAnimation BEFORE CALLING AnimationSequenceBegin")
- Else
- Dim stringArray = Texture.Split(","c)
-
- If BAFlipped Then
- PositionX -= PositionX * 2.0F
- PositionZ -= PositionZ * 2.0F
- End If
- Dim Position As Vector3 = New Vector3(CurrentEntity.Position.X + PositionX, CurrentEntity.Position.Y + PositionY, CurrentEntity.Position.Z + PositionZ)
- Dim Scale As Vector3 = New Vector3(ScaleX, ScaleY, ScaleZ)
- Dim EndSize As Vector3 = New Vector3(EndSizeX, EndSizeY, EndSizeZ)
- Dim baBillSize As BABillSize = New BABillSize(entity, Scale, Grow, EndSize, SizeSpeed, startDelay, endDelay, Anchors)
- AnimationSequence.Add(baBillSize)
- End If
- End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/MoveAnimationQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/MoveAnimationQueryObject.vb
deleted file mode 100644
index 9cb854966..000000000
--- a/P3D/Battle/BattleSystemV2/QueryObjects/MoveAnimationQueryObject.vb
+++ /dev/null
@@ -1,3 +0,0 @@
-Public Class MoveAnimationQueryObject
-
-End Class
\ No newline at end of file
diff --git a/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb b/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb
index 74013718b..02b6551be 100644
--- a/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb
+++ b/P3D/Battle/BattleSystemV2/QueryObjects/TextQueryObject.vb
@@ -67,11 +67,11 @@
Public Overrides Sub Draw(BV2Screen As BattleScreen)
Dim rec As New Rectangle(100, Core.windowSize.Height - 250, Core.windowSize.Width - 200, 200)
-
- Canvas.DrawRectangle(rec, New Color(0, 0, 0, 150))
-
Dim text As String = Me._text.Substring(0, _textIndex)
- text = text.CropStringToWidth(FontManager.TextFont, 2.0F, Core.windowSize.Width - 300)
+ If text.Length > 0 Then
+ Canvas.DrawRectangle(rec, New Color(0, 0, 0, 150))
+ End If
+ Text = text.CropStringToWidth(FontManager.TextFont, 2.0F, Core.windowSize.Width - 300)
Core.SpriteBatch.DrawString(FontManager.TextFont, text, New Vector2(rec.X + 20, rec.Y + 20), Color.White, 0.0F, Vector2.Zero, 2.0F, SpriteEffects.None, 0.0F)
diff --git a/P3D/Content/Data/maps/barktown0.dat b/P3D/Content/Data/maps/barktown0.dat
index f7a648065..7aa0768a7 100644
Binary files a/P3D/Content/Data/maps/barktown0.dat and b/P3D/Content/Data/maps/barktown0.dat differ
diff --git a/P3D/Content/Data/maps/battle/gyms/violet_gym.dat b/P3D/Content/Data/maps/battle/gyms/violet_gym.dat
index 7607c6bd5..5f3d1ff46 100644
Binary files a/P3D/Content/Data/maps/battle/gyms/violet_gym.dat and b/P3D/Content/Data/maps/battle/gyms/violet_gym.dat differ
diff --git a/P3D/Content/Data/maps/elmlab.dat b/P3D/Content/Data/maps/elmlab.dat
index 415f9318e..c1066e7c5 100644
Binary files a/P3D/Content/Data/maps/elmlab.dat and b/P3D/Content/Data/maps/elmlab.dat differ
diff --git a/P3D/Content/Data/maps/gyms/violet_gym.dat b/P3D/Content/Data/maps/gyms/violet_gym.dat
index 9a9cfe0bd..bc0080835 100644
Binary files a/P3D/Content/Data/maps/gyms/violet_gym.dat and b/P3D/Content/Data/maps/gyms/violet_gym.dat differ
diff --git a/P3D/Content/Data/maps/yourroom.dat b/P3D/Content/Data/maps/yourroom.dat
index a2098c4b1..1b992b861 100644
Binary files a/P3D/Content/Data/maps/yourroom.dat and b/P3D/Content/Data/maps/yourroom.dat differ
diff --git a/P3D/Content/Localization/Tokens_en.dat b/P3D/Content/Localization/Tokens_en.dat
index 47fc8956b..577276c11 100644
--- a/P3D/Content/Localization/Tokens_en.dat
+++ b/P3D/Content/Localization/Tokens_en.dat
@@ -85,10 +85,13 @@ HP,HP
PP,PP
Lv.,Lv.
Level,Level
+MaxHP,Max HP
Attack,Attack
Defense,Defense
Special_Attack,Special Attack
+Sp_Attack,Sp. Attack
Special_Defense,Special Defense
+Sp_Defense,Sp. Defense
Speed,Speed
---
GameInteractions:
diff --git a/P3D/Content/Sounds/Battle/Attacks/Thunderbolt.wav b/P3D/Content/Sounds/Battle/Attacks/Electric/Thunderbolt.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Thunderbolt.wav
rename to P3D/Content/Sounds/Battle/Attacks/Electric/Thunderbolt.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Ember_Hit.wav b/P3D/Content/Sounds/Battle/Attacks/Fire/Ember_Hit.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Ember_Hit.wav
rename to P3D/Content/Sounds/Battle/Attacks/Fire/Ember_Hit.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Ember_Start.wav b/P3D/Content/Sounds/Battle/Attacks/Fire/Ember_Start.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Ember_Start.wav
rename to P3D/Content/Sounds/Battle/Attacks/Fire/Ember_Start.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Fly_Hit.wav b/P3D/Content/Sounds/Battle/Attacks/Flying/Fly_Hit.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Fly_Hit.wav
rename to P3D/Content/Sounds/Battle/Attacks/Flying/Fly_Hit.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Fly_Start.wav b/P3D/Content/Sounds/Battle/Attacks/Flying/Fly_Start.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Fly_Start.wav
rename to P3D/Content/Sounds/Battle/Attacks/Flying/Fly_Start.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Grass/Absorb.wav b/P3D/Content/Sounds/Battle/Attacks/Grass/Absorb.wav
new file mode 100644
index 000000000..84c0f3f60
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Grass/Absorb.wav differ
diff --git a/P3D/Content/Sounds/Battle/Attacks/Normal/Attract.wav b/P3D/Content/Sounds/Battle/Attacks/Normal/Attract.wav
new file mode 100644
index 000000000..6ab974270
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Normal/Attract.wav differ
diff --git a/P3D/Content/Sounds/Battle/Attacks/Normal/Bind.wav b/P3D/Content/Sounds/Battle/Attacks/Normal/Bind.wav
new file mode 100644
index 000000000..9749a0da6
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Normal/Bind.wav differ
diff --git a/P3D/Content/Sounds/Battle/Attacks/Pound.wav b/P3D/Content/Sounds/Battle/Attacks/Normal/Pound.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Pound.wav
rename to P3D/Content/Sounds/Battle/Attacks/Normal/Pound.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Tackle.wav b/P3D/Content/Sounds/Battle/Attacks/Normal/Tackle.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/Tackle.wav
rename to P3D/Content/Sounds/Battle/Attacks/Normal/Tackle.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/Normal/Wrap.wav b/P3D/Content/Sounds/Battle/Attacks/Normal/Wrap.wav
new file mode 100644
index 000000000..aac7fa92a
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Normal/Wrap.wav differ
diff --git a/P3D/Content/Sounds/Battle/Attacks/PoisonSting_Hit.wav b/P3D/Content/Sounds/Battle/Attacks/Poison/PoisonSting_Hit.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/PoisonSting_Hit.wav
rename to P3D/Content/Sounds/Battle/Attacks/Poison/PoisonSting_Hit.wav
diff --git a/P3D/Content/Sounds/Battle/Attacks/PoisonSting_Start.wav b/P3D/Content/Sounds/Battle/Attacks/Poison/PoisonSting_Start.wav
similarity index 100%
rename from P3D/Content/Sounds/Battle/Attacks/PoisonSting_Start.wav
rename to P3D/Content/Sounds/Battle/Attacks/Poison/PoisonSting_Start.wav
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/Sounds/Battle/Attacks/Water/Whirlpool.wav b/P3D/Content/Sounds/Battle/Attacks/Water/Whirlpool.wav
new file mode 100644
index 000000000..de5b37b3b
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Attacks/Water/Whirlpool.wav differ
diff --git a/P3D/Content/Sounds/Battle/Effects/Asleep.wav b/P3D/Content/Sounds/Battle/Effects/Asleep.wav
new file mode 100644
index 000000000..2807c5619
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Effects/Asleep.wav differ
diff --git a/P3D/Content/Sounds/Battle/Effects/Frozen.wav b/P3D/Content/Sounds/Battle/Effects/Frozen.wav
index 3634accf6..e21fa9775 100644
Binary files a/P3D/Content/Sounds/Battle/Effects/Frozen.wav and b/P3D/Content/Sounds/Battle/Effects/Frozen.wav differ
diff --git a/P3D/Content/Sounds/Battle/Effects/Heal.wav b/P3D/Content/Sounds/Battle/Effects/Heal.wav
new file mode 100644
index 000000000..6e952de6d
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Effects/Heal.wav differ
diff --git a/P3D/Content/Sounds/Battle/Effects/Infatuated.wav b/P3D/Content/Sounds/Battle/Effects/Infatuated.wav
new file mode 100644
index 000000000..2ecea357b
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Effects/Infatuated.wav differ
diff --git a/P3D/Content/Sounds/Battle/Effects/MegaEvolution.wav b/P3D/Content/Sounds/Battle/Effects/MegaEvolution.wav
new file mode 100644
index 000000000..83da982da
Binary files /dev/null and b/P3D/Content/Sounds/Battle/Effects/MegaEvolution.wav differ
diff --git a/P3D/Content/Sounds/Emote_Exclamation.wav b/P3D/Content/Sounds/Emote_Exclamation.wav
new file mode 100644
index 000000000..06ccd271c
Binary files /dev/null and b/P3D/Content/Sounds/Emote_Exclamation.wav differ
diff --git a/P3D/Content/Textures/Battle/Other/Star.png b/P3D/Content/Textures/Battle/BallCatchStar.png
similarity index 100%
rename from P3D/Content/Textures/Battle/Other/Star.png
rename to P3D/Content/Textures/Battle/BallCatchStar.png
diff --git a/P3D/Content/Textures/Battle/Electric/Sparks.png b/P3D/Content/Textures/Battle/Electric/Sparks.png
new file mode 100644
index 000000000..1c0bd76cb
Binary files /dev/null and b/P3D/Content/Textures/Battle/Electric/Sparks.png differ
diff --git a/P3D/Content/Textures/Battle/Fighting/forcepalmhand.png b/P3D/Content/Textures/Battle/Fighting/forcepalmhand.png
deleted file mode 100644
index ca1fa7664..000000000
Binary files a/P3D/Content/Textures/Battle/Fighting/forcepalmhand.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Fighting/forcepalmhandfaded.png b/P3D/Content/Textures/Battle/Fighting/forcepalmhandfaded.png
deleted file mode 100644
index 6d7e52fb2..000000000
Binary files a/P3D/Content/Textures/Battle/Fighting/forcepalmhandfaded.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Fighting/forcepalmhandfading.png b/P3D/Content/Textures/Battle/Fighting/forcepalmhandfading.png
deleted file mode 100644
index 5b3bd33ad..000000000
Binary files a/P3D/Content/Textures/Battle/Fighting/forcepalmhandfading.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Fighting/forcepalmimpact.png b/P3D/Content/Textures/Battle/Fighting/forcepalmimpact.png
deleted file mode 100644
index dcb19dac5..000000000
Binary files a/P3D/Content/Textures/Battle/Fighting/forcepalmimpact.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Fighting/forcepalmparticle.png b/P3D/Content/Textures/Battle/Fighting/forcepalmparticle.png
deleted file mode 100644
index 3ece9177f..000000000
Binary files a/P3D/Content/Textures/Battle/Fighting/forcepalmparticle.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Fire/Hand.png b/P3D/Content/Textures/Battle/Fire/Hand.png
deleted file mode 100644
index 51d3171d6..000000000
Binary files a/P3D/Content/Textures/Battle/Fire/Hand.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Grass/Absorb.png b/P3D/Content/Textures/Battle/Grass/Absorb.png
new file mode 100644
index 000000000..1d4a6efbc
Binary files /dev/null and b/P3D/Content/Textures/Battle/Grass/Absorb.png differ
diff --git a/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase1.png b/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase1.png
new file mode 100644
index 000000000..1d4a6efbc
Binary files /dev/null and b/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase1.png differ
diff --git a/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase2.png b/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase2.png
new file mode 100644
index 000000000..68cd6e9aa
Binary files /dev/null and b/P3D/Content/Textures/Battle/MegaEvolution/Mega_Phase2.png differ
diff --git a/P3D/Content/Textures/Battle/Normal/Attract.png b/P3D/Content/Textures/Battle/Normal/Attract.png
new file mode 100644
index 000000000..f1f1fc3eb
Binary files /dev/null and b/P3D/Content/Textures/Battle/Normal/Attract.png differ
diff --git a/P3D/Content/Textures/Battle/Normal/Bind.png b/P3D/Content/Textures/Battle/Normal/Bind.png
new file mode 100644
index 000000000..a45062aed
Binary files /dev/null and b/P3D/Content/Textures/Battle/Normal/Bind.png differ
diff --git a/P3D/Content/Textures/Battle/Normal/Wrap.png b/P3D/Content/Textures/Battle/Normal/Wrap.png
new file mode 100644
index 000000000..d9bbc47fa
Binary files /dev/null and b/P3D/Content/Textures/Battle/Normal/Wrap.png differ
diff --git a/P3D/Content/Textures/Battle/Other/RedCircle.png b/P3D/Content/Textures/Battle/Other/RedCircle.png
deleted file mode 100644
index 277e030d0..000000000
Binary files a/P3D/Content/Textures/Battle/Other/RedCircle.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Other/YellowCloud.png b/P3D/Content/Textures/Battle/Other/YellowCloud.png
deleted file mode 100644
index 1e75ef2bb..000000000
Binary files a/P3D/Content/Textures/Battle/Other/YellowCloud.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Poison/Stinger.png b/P3D/Content/Textures/Battle/Poison/Stinger.png
index 68fa6e649..b37b8b491 100644
Binary files a/P3D/Content/Textures/Battle/Poison/Stinger.png and b/P3D/Content/Textures/Battle/Poison/Stinger.png differ
diff --git a/P3D/Content/Textures/Battle/Cloud.png b/P3D/Content/Textures/Battle/Smoke.png
similarity index 100%
rename from P3D/Content/Textures/Battle/Cloud.png
rename to P3D/Content/Textures/Battle/Smoke.png
diff --git a/P3D/Content/Textures/Battle/StatChange/statDown.png b/P3D/Content/Textures/Battle/StatChange/statDown.png
index 44e7ba040..5b4326ff0 100644
Binary files a/P3D/Content/Textures/Battle/StatChange/statDown.png and b/P3D/Content/Textures/Battle/StatChange/statDown.png differ
diff --git a/P3D/Content/Textures/Battle/StatChange/statUp.png b/P3D/Content/Textures/Battle/StatChange/statUp.png
index 5b4326ff0..44e7ba040 100644
Binary files a/P3D/Content/Textures/Battle/StatChange/statUp.png and b/P3D/Content/Textures/Battle/StatChange/statUp.png differ
diff --git a/P3D/Content/Textures/Battle/Status.png b/P3D/Content/Textures/Battle/Status.png
deleted file mode 100644
index 731861d6c..000000000
Binary files a/P3D/Content/Textures/Battle/Status.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Asleep.png b/P3D/Content/Textures/Battle/StatusEffect/Asleep.png
new file mode 100644
index 000000000..1a350b9bb
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Asleep.png differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Burned.png b/P3D/Content/Textures/Battle/StatusEffect/Burned.png
new file mode 100644
index 000000000..3ca6e2e66
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Burned.png differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Confused.png b/P3D/Content/Textures/Battle/StatusEffect/Confused.png
new file mode 100644
index 000000000..be3416b85
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Confused.png differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Frozen.png b/P3D/Content/Textures/Battle/StatusEffect/Frozen.png
new file mode 100644
index 000000000..2ec075fc5
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Frozen.png differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Paralyzed.png b/P3D/Content/Textures/Battle/StatusEffect/Paralyzed.png
new file mode 100644
index 000000000..1c0bd76cb
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Paralyzed.png differ
diff --git a/P3D/Content/Textures/Battle/StatusEffect/Poisoned.png b/P3D/Content/Textures/Battle/StatusEffect/Poisoned.png
new file mode 100644
index 000000000..5d45ad64d
Binary files /dev/null and b/P3D/Content/Textures/Battle/StatusEffect/Poisoned.png 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/Content/Textures/Battle/Water/Water.png b/P3D/Content/Textures/Battle/Water/Water.png
deleted file mode 100644
index 4722e8b3d..000000000
Binary files a/P3D/Content/Textures/Battle/Water/Water.png and /dev/null differ
diff --git a/P3D/Content/Textures/Battle/Water/Whirlpool.png b/P3D/Content/Textures/Battle/Water/Whirlpool.png
new file mode 100644
index 000000000..96bdc8c60
Binary files /dev/null and b/P3D/Content/Textures/Battle/Water/Whirlpool.png differ
diff --git a/P3D/Content/Textures/Battle/Water/bubble.png b/P3D/Content/Textures/Battle/Water/bubble.png
deleted file mode 100644
index da25aff4a..000000000
Binary files a/P3D/Content/Textures/Battle/Water/bubble.png and /dev/null differ
diff --git a/P3D/Content/Textures/Gym.png b/P3D/Content/Textures/Gym.png
index ceb22ffe4..030112f4d 100644
Binary files a/P3D/Content/Textures/Gym.png and b/P3D/Content/Textures/Gym.png differ
diff --git a/P3D/Entites/Entity.vb b/P3D/Entites/Entity.vb
index 998344643..99d766dfc 100644
--- a/P3D/Entites/Entity.vb
+++ b/P3D/Entites/Entity.vb
@@ -22,6 +22,7 @@
Public Visible As Boolean = True
Public Shader As New Vector3(1.0F)
Public Shaders As New List(Of Vector3)
+ Public Color As Vector3 = New Vector3(1.0F)
Public CameraDistanceDelta As Single = 0.0F
diff --git a/P3D/Entites/Other/NPC.vb b/P3D/Entites/Other/NPC.vb
index 29d3ebcdb..a26840f1e 100644
--- a/P3D/Entites/Other/NPC.vb
+++ b/P3D/Entites/Other/NPC.vb
@@ -418,14 +418,16 @@
If CType(Screen.Camera, OverworldCamera).ThirdPerson = True And IsOnScreen() = False Then
s &= "@camera.setfocus(npc," & Me.NPCID & ")" & Environment.NewLine
Dim cPosition = .ThirdPersonOffset.X.ToString() & "," & .ThirdPersonOffset.Y.ToString() & "," & .ThirdPersonOffset.Z.ToString()
- s &= "@entity.showmessagebulb(1|" & Me.Position.X + offset.X & "|" & Me.Position.Y + 0.7F & "|" & Me.Position.Z + offset.Y & ")" & Environment.NewLine &
+ s &= "@sound.play(Emote_Exclamation)" & Environment.NewLine &
+ "@entity.showmessagebulb(1|" & Me.Position.X + offset.X & "|" & Me.Position.Y + 0.7F & "|" & Me.Position.Z + offset.Y & ")" & Environment.NewLine &
"@npc.move(" & Me.NPCID & "," & distance - 1 & ")" & Environment.NewLine &
+ "@script.start(" & Me.AdditionalValue & ")" & Environment.NewLine &
"@camera.resetfocus" & Environment.NewLine &
"@camera.setposition(" & cPosition & ")" & Environment.NewLine &
- "@script.start(" & Me.AdditionalValue & ")" & Environment.NewLine &
":end"
Else
- s &= "@entity.showmessagebulb(1|" & Me.Position.X + offset.X & "|" & Me.Position.Y + 0.7F & "|" & Me.Position.Z + offset.Y & ")" & Environment.NewLine &
+ s &= "@sound.play(Emote_Exclamation)" & Environment.NewLine &
+ "@entity.showmessagebulb(1|" & Me.Position.X + offset.X & "|" & Me.Position.Y + 0.7F & "|" & Me.Position.Z + offset.Y & ")" & Environment.NewLine &
"@npc.move(" & Me.NPCID & "," & distance - 1 & ")" & Environment.NewLine &
"@script.start(" & Me.AdditionalValue & ")" & Environment.NewLine &
":end"
diff --git a/P3D/Entites/Other/NetworkPlayer.vb b/P3D/Entites/Other/NetworkPlayer.vb
index 2a86a7e1c..0828b2ffe 100644
--- a/P3D/Entites/Other/NetworkPlayer.vb
+++ b/P3D/Entites/Other/NetworkPlayer.vb
@@ -165,6 +165,10 @@
Return 0
Case 2
Return 1
+ Case 3
+ Return 0
+ Case 4
+ Return 1
End Select
ElseIf Me.Texture.Width = Me.Texture.Height Then
Select Case AnimationX
@@ -198,14 +202,8 @@
If Me.AnimationDelay <= 0.0F Then
Me.AnimationDelay = AnimationDelayLength
AnimationX += 1
- If Me.Texture.Width = Me.Texture.Height / 2 Then
- If AnimationX > 2 Then
- AnimationX = 1
- End If
- Else
- If AnimationX > 4 Then
- AnimationX = 1
- End If
+ If AnimationX > 4 Then
+ AnimationX = 1
End If
End If
End If
diff --git a/P3D/Entites/Other/NetworkPokemon.vb b/P3D/Entites/Other/NetworkPokemon.vb
index 97a7174f0..9682b7ec9 100644
--- a/P3D/Entites/Other/NetworkPokemon.vb
+++ b/P3D/Entites/Other/NetworkPokemon.vb
@@ -6,13 +6,14 @@
Public LevelFile As String = ""
Public PokemonTexture As String = ""
Public faceRotation As Integer = 0
+ Dim Moving As Boolean = False
Dim Texture As Texture2D
Dim lastRectangle As New Rectangle(0, 0, 0, 0)
Dim loadedTexture As String = ""
Dim AnimationX As Integer = 1
- Dim AnimationDelayLength As Single = 2.2F
+ Dim AnimationDelayLength As Single = 1.1F
Dim AnimationDelay As Single = AnimationDelayLength
Public Sub New(ByVal pos As Vector3, ByVal PokemonTexture As String, ByVal visible As Boolean)
@@ -51,22 +52,26 @@
If Me.PokemonTexture <> "" Then
Me.ChangeTexture()
-
- Me.AnimationDelay -= 0.1F
- If AnimationDelay <= 0.0F Then
- AnimationX += 1
- AnimationDelay = AnimationDelayLength
- If Me.Texture.Width = Me.Texture.Height / 2 Then
- If AnimationX > 2 Then
- AnimationX = 1
- End If
- ElseIf Me.Texture.Width = Me.Texture.Height Then
+ If Moving = True Then
+ Me.AnimationDelay -= 0.1F
+ If AnimationDelay <= 0.0F Then
+ AnimationX += 1
+ AnimationDelay = AnimationDelayLength
If AnimationX > 4 Then
AnimationX = 1
End If
+ End If
+ Else
+ If Me.Texture.Width = Me.Texture.Height Then
+ AnimationX = 1
Else
- If AnimationX > 3 Then
- AnimationX = 1
+ Me.AnimationDelay -= 0.1F
+ If AnimationDelay <= 0.0F Then
+ AnimationX += 1
+ AnimationDelay = 2.2F
+ If AnimationX > 4 Then
+ AnimationX = 1
+ End If
End If
End If
End If
@@ -160,6 +165,10 @@
Return 0
Case 2
Return 1
+ Case 3
+ Return 0
+ Case 4
+ Return 1
End Select
ElseIf Me.Texture.Width = Me.Texture.Height Then
Select Case AnimationX
@@ -197,7 +206,7 @@
Public Sub ApplyPlayerData(ByVal p As Servers.Player)
Try
Me.PlayerID = p.ServersID
-
+ Me.Moving = p.Moving
Me.PokemonTexture = p.PokemonSkin
Me.Position = p.PokemonPosition
Me.LevelFile = p.LevelFile
diff --git a/P3D/Entites/Other/OverworldPokemon.vb b/P3D/Entites/Other/OverworldPokemon.vb
index 7a8ba86b8..6cd0fe9e1 100644
--- a/P3D/Entites/Other/OverworldPokemon.vb
+++ b/P3D/Entites/Other/OverworldPokemon.vb
@@ -40,7 +40,6 @@ Public Class OverworldPokemon
Me.Texture = PokemonReference.GetOverworldTexture()
End If
-
Dim cameraRotation As Integer = Screen.Camera.GetFacingDirection()
Dim spriteIndex As Integer = Me.faceRotation - cameraRotation
@@ -96,18 +95,8 @@ Public Class OverworldPokemon
If AnimationDelay <= 0.0F Then
AnimationX += 1
AnimationDelay = AnimationDelayLength
- If Me.Texture.Width = Me.Texture.Height / 2 Then
- If AnimationX > 2 Then
- AnimationX = 1
- End If
- ElseIf Me.Texture.Width = Me.Texture.Height Then
- If AnimationX > 4 Then
- AnimationX = 1
- End If
- Else
- If AnimationX > 3 Then
- AnimationX = 1
- End If
+ If AnimationX > 4 Then
+ AnimationX = 1
End If
End If
Else
@@ -183,15 +172,19 @@ Public Class OverworldPokemon
If Screen.Camera.IsMoving() = True And Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CInt(Me.Position.X) <> CInt(Screen.Camera.Position.X) Or CInt(Me.Position.Z) <> CInt(Screen.Camera.Position.Z) Then
Me.Position += GetMove()
- Me.AnimationDelayLength = 1.1F
+ If Core.Player.IsRunning = True Then
+ Me.AnimationDelayLength = 1.1F / 1.4F
+ Else
+ Me.AnimationDelayLength = 1.1F
+ End If
Me.Moving = True
End If
Else
- Me.AnimationDelayLength = 1.1F
- If Me.Texture.Width = Me.Texture.Height / 2 Then
- Me.Moving = True
- Else
+ Me.AnimationDelayLength = 2.2F
+ If Me.Texture.Width = Me.Texture.Height Then
Me.Moving = False
+ Else
+ Me.Moving = True
End If
End If
End Sub
@@ -310,6 +303,10 @@ Public Class OverworldPokemon
Return 0
Case 2
Return 1
+ Case 3
+ Return 0
+ Case 4
+ Return 1
End Select
ElseIf Me.Texture.Width = Me.Texture.Height Then
Select Case AnimationX
diff --git a/P3D/Entites/Other/OwnPlayer.vb b/P3D/Entites/Other/OwnPlayer.vb
index ac4c506b0..94c74c9e3 100644
--- a/P3D/Entites/Other/OwnPlayer.vb
+++ b/P3D/Entites/Other/OwnPlayer.vb
@@ -90,14 +90,8 @@
If AnimationDelay <= 0.0F Then
AnimationDelay = GetAnimationDelay()
AnimationX += 1
- If Me.Texture.Width = Me.Texture.Height / 2 Then
- If AnimationX > 2 Then
- AnimationX = 1
- End If
- Else
- If AnimationX > 4 Then
- AnimationX = 1
- End If
+ If AnimationX > 4 Then
+ AnimationX = 1
End If
End If
Else
@@ -164,6 +158,10 @@
Return 0
Case 2
Return 1
+ Case 3
+ Return 0
+ Case 4
+ Return 1
End Select
ElseIf Me.Texture.Width = Me.Texture.Height Then
Select Case AnimationX
diff --git a/P3D/Input/UI/SelectMenu.vb b/P3D/Input/UI/SelectMenu.vb
index 19998d8bf..c2829e53c 100644
--- a/P3D/Input/UI/SelectMenu.vb
+++ b/P3D/Input/UI/SelectMenu.vb
@@ -47,7 +47,7 @@
Public Sub Update()
If Visible = True Then
- cursorPos.Y = MathHelper.Lerp(cursorDest.Y, cursorPos.Y, 0.6F)
+ cursorPos.Y = CInt(MathHelper.Lerp(cursorDest.Y, cursorPos.Y, 0.6F))
If Controls.Up(True, True, True, True, True, True) = True Then
Me.Index -= 1
@@ -64,7 +64,7 @@
For i = Scroll To Me.Scroll + 8
If i <= Me.Items.Count - 1 Then
- If Controls.Accept(True, False, False) = True And i = Me.Index And New Rectangle(Core.windowSize.Width - 270, 66 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True Or
+ If Controls.Accept(True, False, False) = True And i = Me.Index And New Rectangle(Core.windowSize.Width - 270, 72 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True Or
Controls.Accept(False, True, True) = True And i = Me.Index Or Controls.Dismiss(True, True, True) = True And Me.BackIndex = Me.Index Then
If Not ClickHandler Is Nothing Then
@@ -79,7 +79,7 @@
End If
Me.Visible = False
End If
- If New Rectangle(Core.windowSize.Width - 270, 66 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True And Controls.Accept(True, False, False) = True Then
+ If New Rectangle(Core.windowSize.Width - 270, 72 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True And Controls.Accept(True, False, False) = True Then
Me.Index = i
End If
End If
@@ -104,25 +104,25 @@
If i <= Me.Items.Count - 1 Then
Dim Text As String = Items(i)
- Dim startPos As New Vector2(Core.windowSize.Width - 270, 66 * ((i + 1) - Scroll))
+ Dim startPos As New Vector2(Core.windowSize.Width - 270, 72 * ((i + 1) - Scroll))
Core.SpriteBatch.Draw(t1, New Rectangle(CInt(startPos.X), CInt(startPos.Y), 64, 64), Color.White)
Core.SpriteBatch.Draw(t2, New Rectangle(CInt(startPos.X + 64), CInt(startPos.Y), 64, 64), Color.White)
Core.SpriteBatch.Draw(t2, New Rectangle(CInt(startPos.X + 128), CInt(startPos.Y), 64, 64), Color.White)
Core.SpriteBatch.Draw(t1, New Rectangle(CInt(startPos.X + 192), CInt(startPos.Y), 64, 64), Nothing, Color.White, 0.0F, New Vector2(0), SpriteEffects.FlipHorizontally, 0.0F)
- Core.SpriteBatch.DrawString(FontManager.MainFont, Text, New Vector2(startPos.X + 128 - (FontManager.MainFont.MeasureString(Text).X * 1.4F) / 2, startPos.Y + 15), Color.Black, 0.0F, Vector2.Zero, 1.4F, SpriteEffects.None, 0.0F)
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Text, New Vector2(CInt(startPos.X + 20), CInt(startPos.Y + 32 - FontManager.MainFont.MeasureString(Text).Y / 2)), Color.Black, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
End If
Next
End If
- Dim cPosition As Vector2 = New Vector2(cursorPos.X + 128, cursorPos.Y - 40)
+ Dim cPosition As Vector2 = New Vector2(CInt(cursorPos.X + 128), CInt(cursorPos.Y - 40))
Dim t As Texture2D = TextureManager.GetTexture("GUI\Menus\General", New Rectangle(0, 0, 16, 16), "")
Core.SpriteBatch.Draw(t, New Rectangle(CInt(cPosition.X), CInt(cPosition.Y), 64, 64), Color.White)
End Sub
Private Sub SetCursorDest()
- cursorDest = New Vector2(Core.windowSize.Width - 270, 66 * ((Index + 1) - Scroll))
+ cursorDest = New Vector2(CInt(Core.windowSize.Width - 270), CInt(72 * (Index + 1 - Scroll)))
End Sub
Public ReadOnly Property SelectedItem() As String
diff --git a/P3D/Network/ChatScreen.vb b/P3D/Network/ChatScreen.vb
index 4863086d3..6bc99999f 100644
--- a/P3D/Network/ChatScreen.vb
+++ b/P3D/Network/ChatScreen.vb
@@ -591,7 +591,7 @@ Public Class ChatScreen
For Each l As String In lineArr
Canvas.DrawRectangle(New Rectangle(100, (Core.windowSize.Height - 82) - offset - 64, Core.windowSize.Width - 200, 32), backC)
- Core.SpriteBatch.DrawString(FontManager.ChatFont, l, New Vector2(100, (Core.windowSize.Height - 50 - 32) - offset - 64), c, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
+ Core.SpriteBatch.DrawString(FontManager.ChatFont, l, New Vector2(100 + 8, (Core.windowSize.Height - 50 - 32) - offset - 64), c, 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
offset += 32
items += 1
Next
@@ -675,21 +675,26 @@ Public Class ChatScreen
Private Sub DrawChatTabs()
Dim p = MouseHandler.MousePosition
+ Dim globalText As String = "Global"
+ Dim globalTextWidth As Integer = CInt(FontManager.MainFont.MeasureString(globalText).X)
+ Dim commandsText As String = "Commands"
+ Dim commandsTextWidth As Integer = CInt(FontManager.MainFont.MeasureString(commandsText).X)
+
'First, draw global:
- DrawChatTab(100, "global", HasNewGlobalMessages, "Global", ChatState = ChatStates.Global)
- If p.X >= 100 And p.X < 220 Then
+ DrawChatTab(100, "global", HasNewGlobalMessages, globalText, ChatState = ChatStates.Global)
+ If p.X >= 100 And p.X < 100 + 48 + globalTextWidth Then
canClickOnTab = True
canClickOnTabType = ChatStates.Global
canClickOnTabText = "Global"
End If
'Then, if active, draw the Commands tab:
- Dim x As Integer = 120
+ Dim x As Integer = CInt(48 + globalTextWidth)
If HasCommandChat = True Then
- DrawChatTab(x + 100, "command", False, "Commands", ChatState = ChatStates.Command)
- x += 120
- If p.X >= 220 And p.X < 340 Then
+ DrawChatTab(x + 100, "command", False, commandsText, ChatState = ChatStates.Command)
+ x += CInt(48 + commandsTextWidth)
+ If p.X >= CInt(100 + 48 + globalTextWidth) And p.X < CInt(100 + 48 + globalTextWidth + 48 + commandsTextWidth) Then
canClickOnTab = True
canClickOnTabType = ChatStates.Command
canClickOnTabText = "Commands"
@@ -752,7 +757,7 @@ Public Class ChatScreen
'''
Private Shared Function DrawChatTab(ByVal xPosition As Integer, ByVal textureType As String, ByVal HasNewMessages As Boolean, ByVal Text As String, ByVal IsActive As Boolean) As Integer
Dim drawHeight As Integer = 32
- Dim drawWidth As Integer = 120
+ Dim drawWidth As Integer = CInt(48 + FontManager.MainFont.MeasureString(Text).X)
If IsActive = False Then
drawHeight = 24
@@ -780,7 +785,7 @@ Public Class ChatScreen
Core.SpriteBatch.Draw(texture, New Rectangle(xPosition, Core.windowSize.Height - 50 - drawHeight - 12, 24, 24), New Rectangle(48, 0, 24, 24), Color.White)
End If
- Core.SpriteBatch.DrawString(FontManager.MainFont, Text, New Vector2(xPosition + 32, CInt(Core.windowSize.Height - 50 + 4)), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
+ Core.SpriteBatch.DrawString(FontManager.MainFont, Text, New Vector2(xPosition + 24 + 12, CInt(Core.windowSize.Height - 50 + drawHeight / 2 - FontManager.MainFont.MeasureString(Text).Y / 2)), Color.White, 0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0F)
Return drawWidth
End Function
@@ -881,7 +886,7 @@ Public Class ChatScreen
For Each l As String In lineArr
Canvas.DrawRectangle(New Rectangle(100, (Core.windowSize.Height - 82) - offset - 64, Core.windowSize.Width - 200, 32), New Color(0, 0, 0, opacity))
- Core.SpriteBatch.DrawString(FontManager.ChatFont, l, New Vector2(100, (Core.windowSize.Height - 50 - 32) - offset - 64), New Color(c.R, c.G, c.B, CInt(opacity * 1.7)), 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
+ Core.SpriteBatch.DrawString(FontManager.ChatFont, l, New Vector2(100 + 8, (Core.windowSize.Height - 50 - 32) - offset - 64), New Color(c.R, c.G, c.B, CInt(opacity * 1.7)), 0.0F, Vector2.Zero, 1.0F, SpriteEffects.None, 0.0F)
offset += 32
Next
End If
diff --git a/P3D/P3D.vbproj b/P3D/P3D.vbproj
index 0d3da61b1..4a9dc364a 100644
--- a/P3D/P3D.vbproj
+++ b/P3D/P3D.vbproj
@@ -14666,31 +14666,49 @@
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
PreserveNewest
@@ -14702,15 +14720,51 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -15371,6 +15425,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -15380,6 +15437,9 @@
PreserveNewest
+
+ PreserveNewest
+
PreserveNewest
@@ -15389,7 +15449,7 @@
PreserveNewest
-
+
PreserveNewest
@@ -15398,6 +15458,30 @@
PreserveNewest
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
PreserveNewest
@@ -26264,33 +26348,6 @@
PreserveNewest
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
PreserveNewest
@@ -26300,15 +26357,6 @@
PreserveNewest
-
- PreserveNewest
-
-
- PreserveNewest
-
-
- PreserveNewest
-
PreserveNewest
@@ -27540,10 +27588,14 @@
PreserveNewest
-
-
-
-
+
+
+
+
+
+
+
+
@@ -29227,10 +29279,6 @@
-
-
-
-
@@ -29250,7 +29298,6 @@
-
@@ -30910,7 +30957,9 @@
false
-
+
+
+
diff --git a/P3D/Pokemon/Attacks/Attack.vb b/P3D/Pokemon/Attacks/Attack.vb
index 35b2af5b6..cdddaf3ee 100644
--- a/P3D/Pokemon/Attacks/Attack.vb
+++ b/P3D/Pokemon/Attacks/Attack.vb
@@ -1844,7 +1844,7 @@
'returnMove = New Moves.Fighting.MeteorAssault()
'Case 795
'returnMove = New Moves.Dragon.Eternabeam()
- Case 796
+ Case 796
returnMove = New Moves.Steel.SteelBeam()
'Case 797
'Blank
@@ -2163,23 +2163,43 @@
#Region "Animation"
- Public Sub UserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen)
- If Core.Player.ShowBattleAnimations = 1 Then
- Me.InternalUserPokemonMoveAnimation(BattleScreen)
+ Public Sub UserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BattleFlip As Boolean = False
+ Dim CurrentPokemon As Pokemon = BattleScreen.OwnPokemon
+ Dim CurrentEntity As NPC = BattleScreen.OwnPokemonNPC
+ Dim CurrentModel As ModelEntity = BattleScreen.OwnPokemonModel
+ If own = False Then
+ BattleFlip = True
+ CurrentPokemon = BattleScreen.OppPokemon
+ CurrentEntity = BattleScreen.OppPokemonNPC
+ CurrentModel = BattleScreen.OppPokemonModel
+ End If
+ Me.InternalUserPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity, CurrentModel)
End If
End Sub
- Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen)
+ Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
'Override this method in the attack class to insert the move animation query objects into the queue.
End Sub
- Public Sub OpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen)
- If Core.Player.ShowBattleAnimations = 1 Then
- Me.InternalOpponentPokemonMoveAnimation(BattleScreen)
+ Public Sub OpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
+ If Core.Player.ShowBattleAnimations <> 0 Then
+ Dim BattleFlip As Boolean = False
+ Dim CurrentPokemon As Pokemon = BattleScreen.OppPokemon
+ Dim CurrentEntity As NPC = BattleScreen.OppPokemonNPC
+ Dim CurrentModel As ModelEntity = BattleScreen.OppPokemonModel
+ If own = False Then
+ BattleFlip = True
+ CurrentPokemon = BattleScreen.OwnPokemon
+ CurrentEntity = BattleScreen.OwnPokemonNPC
+ CurrentModel = BattleScreen.OwnPokemonModel
+ End If
+ Me.InternalOpponentPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity, CurrentModel)
End If
End Sub
- Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen)
+ Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
'Override this method in the attack class to insert the move animation query objects into the queue.
End Sub
diff --git a/P3D/Pokemon/Attacks/Fire/Ember.vb b/P3D/Pokemon/Attacks/Fire/Ember.vb
index 48a698f0d..d977fa38a 100644
--- a/P3D/Pokemon/Attacks/Fire/Ember.vb
+++ b/P3D/Pokemon/Attacks/Fire/Ember.vb
@@ -50,7 +50,6 @@
Me.IsOneHitKOMove = False
Me.IsWonderGuardAffected = True
'#End
-
Me.AIField1 = AIField.Damage
Me.AIField2 = AIField.CanBurn
@@ -58,19 +57,63 @@
End Sub
Public Overrides Sub MoveHits(own As Boolean, BattleScreen As BattleScreen)
- Dim p As Pokemon = BattleScreen.OwnPokemon
- Dim op As Pokemon = BattleScreen.OppPokemon
- If own = False Then
- p = BattleScreen.OppPokemon
- op = BattleScreen.OwnPokemon
- End If
-
Dim chance As Integer = GetEffectChance(0, own, BattleScreen)
If Core.Random.Next(0, 100) < chance Then
BattleScreen.Battle.InflictBurn(Not own, own, BattleScreen, "", "move:ember")
End If
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
+ Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
+ Dim FireballEntity = MoveAnimation.SpawnEntity(Nothing, TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F)
+
+ MoveAnimation.AnimationMove(FireballEntity, True, 2.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Start", 0, 0)
+ For i = 0 To 12
+ Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1, CSng(i * 0.2))
+ MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
+
+ i += 1
+ Next
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ 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 = New AnimationQueryObject(CurrentEntity, BattleFlip)
+ Dim FireballEntity = MoveAnimation.SpawnEntity(New Vector3(-2.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F)
+
+ MoveAnimation.AnimationMove(FireballEntity, True, -0.05, 0.0, 0.0, 0.05, False, True, 0.0, 1.0,, -0.5)
+
+ For i = 0 To 12
+ Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(-3.0 + i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1, CSng(i * 0.2))
+ MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
+
+ i += 1
+ Next
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Hit", 4, 0)
+
+ Dim FireEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 0)
+ Dim FireEntity2 As Entity = MoveAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 0)
+ Dim FireEntity3 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 0)
+
+ MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 3.75, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 3.75, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32), ""), 3.75, 0)
+
+ MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 4.5, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 4.5, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32), ""), 4.5, 0)
+
+ MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 5.25, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 5.25, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32), ""), 5.25, 0)
+
+ MoveAnimation.AnimationChangeTexture(FireEntity1, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 6, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity2, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 6, 0)
+ MoveAnimation.AnimationChangeTexture(FireEntity3, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32), ""), 6, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Grass/Absorb.vb b/P3D/Pokemon/Attacks/Grass/Absorb.vb
index 4c0c2f7b7..efd2552a5 100644
--- a/P3D/Pokemon/Attacks/Grass/Absorb.vb
+++ b/P3D/Pokemon/Attacks/Grass/Absorb.vb
@@ -92,6 +92,24 @@
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 maxAmount As Integer = 12
+ Dim currentAmount As Integer = 0
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Grass\Absorb", 0, 0)
+ While currentAmount <= maxAmount
+ Dim yPos As Single = CSng(Random.Next(-1, 3) * 0.15)
+ Dim zPos As Single = CSng(Random.Next(-3, 3) * 0.15)
+ Dim AbsorbEntity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Grass\Absorb"), New Vector3(0.35F), 1, CSng(currentAmount * 0.8))
+ MoveAnimation.AnimationMove(AbsorbEntity, True, -1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount * 0.8), 0.0, 0.1, 0.5,, 0.005F)
+
+ Threading.Interlocked.Increment(currentAmount)
+ End While
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
+
+
End Namespace
diff --git a/P3D/Pokemon/Attacks/Normal/Attract.vb b/P3D/Pokemon/Attacks/Normal/Attract.vb
index 5f34f5a4f..496f977b2 100644
--- a/P3D/Pokemon/Attacks/Normal/Attract.vb
+++ b/P3D/Pokemon/Attacks/Normal/Attract.vb
@@ -76,6 +76,34 @@
End If
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
+ Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
+ For i = 0 To 6
+ Dim HeartEntity = MoveAnimation.SpawnEntity(Nothing, TextureManager.GetTexture("Textures\Battle\Normal\Attract"), New Vector3(0.25F), 1.0F, CSng(i * 0.2))
+
+ MoveAnimation.AnimationMove(HeartEntity, True, 2.0, 0.0, 0.0, 0.075, False, False, CSng(i * 0.2), 0.0)
+ i += 1
+ Next
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Attract", 0, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ 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 = New AnimationQueryObject(CurrentEntity, BattleFlip)
+
+ For i = 0 To 6
+ Dim HeartEntity = MoveAnimation.SpawnEntity(New Vector3(-2.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Normal\Attract"), New Vector3(0.25F), 1.0F, CSng(i * 0.2))
+
+ MoveAnimation.AnimationMove(HeartEntity, False, 0.0, 0.0, 0.0, 0.06, False, False, CSng(i * 0.2), 0.0)
+ Dim zPos As Single = CSng(Random.Next(-2, 2) * 0.2)
+ MoveAnimation.AnimationMove(HeartEntity, False, 0.0, 0.25, zPos, 0.01, False, False, CSng(1 + i * 0.2), 0.0)
+ MoveAnimation.AnimationFade(HeartEntity, True, 0.02, False, 0.0, CSng(2 + i * 0.2), 0.0)
+ i += 1
+ Next
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Normal/Bind.vb b/P3D/Pokemon/Attacks/Normal/Bind.vb
index 4a4e36a82..e50542ea6 100644
--- a/P3D/Pokemon/Attacks/Normal/Bind.vb
+++ b/P3D/Pokemon/Attacks/Normal/Bind.vb
@@ -87,6 +87,28 @@ Namespace BattleSystem.Moves.Normal
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)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Bind", 5.0F, 0)
+ Dim BindEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ MoveAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ MoveAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ MoveAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ MoveAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ MoveAnimation.AnimationChangeTexture(BindEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+
+ MoveAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ MoveAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ MoveAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ MoveAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ MoveAnimation.AnimationScale(BindEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ MoveAnimation.AnimationScale(BindEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ MoveAnimation.AnimationFade(BindEntity, True, 0.03, False, 0.0, 11, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Normal/Growl.vb b/P3D/Pokemon/Attacks/Normal/Growl.vb
index c42633558..714437ec3 100644
--- a/P3D/Pokemon/Attacks/Normal/Growl.vb
+++ b/P3D/Pokemon/Attacks/Normal/Growl.vb
@@ -62,6 +62,22 @@
End If
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(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)
+
+ MoveAnimation.AnimationPlaySound(CStr(CurrentPokemon.Number), 0, 0,, True)
+ Dim SoundwaveEntity As Entity
+ ' If BattleFlip = False Then
+ SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+ 'Else
+ ' SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
+ 'End If
+ MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 1, 1)
+ MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), 2, 1)
+ MoveAnimation.AnimationChangeTexture(SoundwaveEntity, True, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 3, 1)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Normal/Pound.vb b/P3D/Pokemon/Attacks/Normal/Pound.vb
index 2f542a2ab..5acd68c02 100644
--- a/P3D/Pokemon/Attacks/Normal/Pound.vb
+++ b/P3D/Pokemon/Attacks/Normal/Pound.vb
@@ -55,6 +55,14 @@
Me.AIField2 = AIField.Nothing
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)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Pound", 0.5, 2.5)
+ Dim PoundEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Pound"), New Vector3(0.5F), 1, 0, 3)
+ MoveAnimation.AnimationFade(PoundEntity, True, 1.0F, False, 0.0F, 3, 0)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
+
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Normal/Tackle.vb b/P3D/Pokemon/Attacks/Normal/Tackle.vb
index 36b8ca00f..9db1f6f88 100644
--- a/P3D/Pokemon/Attacks/Normal/Tackle.vb
+++ b/P3D/Pokemon/Attacks/Normal/Tackle.vb
@@ -52,6 +52,20 @@
'#End
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(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, CurrentModel)
+ MoveAnimation.AnimationMove(Nothing, False, -0.5F, 0, 0, 0.3F, False, False, 0, 0,,, 2)
+ MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.3F, False, False, 1, 0,,, 2)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ 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)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Tackle", 0, 0)
+ Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 0, 2)
+ MoveAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 2, 0)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Normal/Wrap.vb b/P3D/Pokemon/Attacks/Normal/Wrap.vb
index 199cc4c64..534165c7e 100644
--- a/P3D/Pokemon/Attacks/Normal/Wrap.vb
+++ b/P3D/Pokemon/Attacks/Normal/Wrap.vb
@@ -87,6 +87,28 @@
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)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Wrap", 5.0F, 0)
+ Dim WrapEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)
+ MoveAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 40, 80, 40), ""), 0.75, 0.75)
+ MoveAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 80, 80, 40), ""), 1.5, 0.75)
+ MoveAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 120, 80, 40), ""), 2.25, 0.75)
+ MoveAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 160, 80, 40), ""), 3, 0.75)
+ MoveAnimation.AnimationChangeTexture(WrapEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 200, 80, 40), ""), 3.75, 0.75)
+ MoveAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 5, 0)
+ MoveAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 5, 0)
+ MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 7, 0)
+ MoveAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 7, 0)
+ MoveAnimation.AnimationScale(Nothing, False, False, 0.75F, 1.0F, 0.75F, 0.02F, 9, 0)
+ MoveAnimation.AnimationScale(WrapEntity, False, False, 0.75F, 0.5F, 0.75F, 0.02F, 9, 0)
+ MoveAnimation.AnimationScale(Nothing, False, True, 1.0F, 1.0F, 1.0F, 0.04F, 11, 0)
+ MoveAnimation.AnimationScale(WrapEntity, False, True, 1.0F, 0.5F, 1.0F, 0.04F, 11, 0)
+ MoveAnimation.AnimationFade(WrapEntity, True, 0.03, False, 0.0, 11, 0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
+
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Pokemon/Attacks/Poison/PoisonSting.vb b/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
index 7e857aa53..50517801e 100644
--- a/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
+++ b/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
@@ -65,6 +65,53 @@
End If
End Sub
+ Public Overrides Sub InternalUserPokemonMoveAnimation(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 TextureYOffset As Integer = 0
+ If BattleFlip = True Then
+ TextureYOffset = 16
+ End If
+ Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(Nothing, TextureManager.GetTexture("Textures\Battle\Poison\Stinger", New Rectangle(0, TextureYOffset, 16, 16), ""), New Vector3(0.2F), 1.0F)
+
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Start", 0, 0)
+ MoveAnimation.AnimationMove(StingerEntity, True, 2.0, 0.0, 0.0, 0.08, False, False, 0.0, 0.0)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ 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 TextureYOffset As Integer = 0
+ If BattleFlip = True Then
+ TextureYOffset = 16
+ End If
+ Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(-2.0, 0, 0.0), TextureManager.GetTexture("Textures\Battle\Poison\Stinger", New Rectangle(0, TextureYOffset, 16, 16), ""), New Vector3(0.2F), 1)
+
+ MoveAnimation.AnimationMove(StingerEntity, True, 0.0, 0.0, 0.0, 0.08, False, False, 0.0, 0.0)
+
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Hit", 1, 0)
+
+ Dim BubbleEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 2, 1)
+
+ MoveAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32), ""), 3, 1)
+
+ Dim BubbleEntity2 As Entity = MoveAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 3, 1)
+
+ MoveAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32), ""), 4, 1)
+ MoveAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32), ""), 4, 1)
+
+ Dim BubbleEntity3 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 4, 1)
+
+ MoveAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32), ""), 5, 1)
+ MoveAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32), ""), 5, 1)
+
+ MoveAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32), ""), 6, 1)
+
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
+
End Class
End Namespace
\ No newline at end of file
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
diff --git a/P3D/Pokemon/Attacks/Water/Whirlpool.vb b/P3D/Pokemon/Attacks/Water/Whirlpool.vb
index d40914b55..88fed6eee 100644
--- a/P3D/Pokemon/Attacks/Water/Whirlpool.vb
+++ b/P3D/Pokemon/Attacks/Water/Whirlpool.vb
@@ -99,7 +99,16 @@ Namespace BattleSystem.Moves.Water
End If
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,, True)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
+ Dim WhirlpoolEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(0, -0.3F, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
+ MoveAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)
+ MoveAnimation.AnimationRotate(WhirlpoolEntity, False, 0, 0, 0.2F, 0, 0, 10.0F, 0.0F, 0.0F, False, False, True, True)
+ MoveAnimation.AnimationScale(WhirlpoolEntity, False, True, 1.0F, 1.0F, 1.0F, 0.025F, 0.0F, 0.0F)
+ MoveAnimation.AnimationScale(WhirlpoolEntity, True, False, 0.0F, 0.0F, 0.0F, 0.025F, 5.0F, 0.0F)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
+ End Sub
End Class
End Namespace
\ No newline at end of file
diff --git a/P3D/Resources/Models/BaseModel.vb b/P3D/Resources/Models/BaseModel.vb
index 3fcb82c6e..24bf37960 100644
--- a/P3D/Resources/Models/BaseModel.vb
+++ b/P3D/Resources/Models/BaseModel.vb
@@ -15,7 +15,7 @@
Screen.Effect.TextureEnabled = True
Screen.Effect.Alpha = Entity.Opacity
- Screen.Effect.DiffuseColor = effectDiffuseColor * Entity.Shader
+ Screen.Effect.DiffuseColor = effectDiffuseColor * Entity.Shader * Entity.Color
If Screen.Level.IsDark = True Then
Screen.Effect.DiffuseColor *= New Vector3(0.5, 0.5, 0.5)
@@ -70,7 +70,9 @@
End If
Screen.Effect.DiffuseColor = effectDiffuseColor
- If DebugDisplay.MaxDistance < Entity.CameraDistance Then DebugDisplay.MaxDistance = CInt(Entity.CameraDistance)
+ If DebugDisplay.MaxDistance < Entity.CameraDistance Then
+ DebugDisplay.MaxDistance = CInt(Entity.CameraDistance)
+ End If
End Sub
Private Sub ApplyTexture(ByVal texture As Texture2D)
diff --git a/P3D/Screens/Battle/BattleCatchScreen.vb b/P3D/Screens/Battle/BattleCatchScreen.vb
index 3720b2ede..9de11a298 100644
--- a/P3D/Screens/Battle/BattleCatchScreen.vb
+++ b/P3D/Screens/Battle/BattleCatchScreen.vb
@@ -3,10 +3,15 @@
Inherits Screen
Dim Ball As Item
- Dim Animations As New List(Of BattleAnimation3D)
+
+ Dim Animations As BattleSystem.AnimationQueryObject = New BattleSystem.AnimationQueryObject(BattleScreen.OppPokemonNPC, Nothing, BattleScreen.OppPokemonModel)
+ Dim BallStartPosition As Vector3 = New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 1.0F) + BattleScreen.BattleMapOffset
+ Dim BallEntity As Entity = Nothing
+
+ Dim PokemonScale As Vector3
Dim AnimationStarted As Boolean = False
- Dim catched As Boolean = False
+ Dim caught As Boolean = False
Dim InBall As Boolean = False
Dim AnimationIndex As Integer = 0
Dim renamed As Boolean = False
@@ -49,9 +54,6 @@
Level.Draw()
Dim RenderObjects As New List(Of Entity)
- For Each a As BattleAnimation3D In Me.Animations
- RenderObjects.Add(a)
- Next
If InBall = False Then
RenderObjects.Add(BattleScreen.OppPokemonNPC)
@@ -65,29 +67,15 @@
[Object].Render()
Next
+ Animations.Draw(CType(Me.PreScreen, BattleSystem.BattleScreen))
+
World.DrawWeather(Screen.Level.World.CurrentMapWeather)
TextBox.Draw()
End Sub
Private Sub UpdateAnimations()
- Animations = (From a In Animations Order By a.CameraDistance Descending).ToList()
-
- For i = 0 To Animations.Count - 1
- If i <= Animations.Count - 1 Then
- Dim a As BattleAnimation3D = Animations(i)
- If a.CanRemove = True Then
- i -= 1
- Animations.Remove(a)
- Else
- a.Update()
- End If
- End If
- Next
-
- For Each Animation As BattleAnimation3D In Animations
- Animation.UpdateEntity()
- Next
+ Animations.Update(CType(Me.PreScreen, BattleSystem.BattleScreen))
End Sub
Private Sub SetCamera()
@@ -118,86 +106,83 @@
If TextBox.Showing = False Then
- If Me._playIntroSound = False Then
- Me._playIntroSound = True
- SoundManager.PlaySound("Battle\Pokeball\throw")
- End If
-
UpdateAnimations()
If Me.IsCurrentScreen() = True Then
If AnimationStarted = False Then
+ If Me._playIntroSound = False Then
+ Me._playIntroSound = True
+ SoundManager.PlaySound("Battle\Pokeball\throw")
+ End If
+ BallEntity = Animations.SpawnEntity(BallStartPosition, Ball.Texture, New Vector3(0.3F), 1.0F)
SetupAnimation()
Else
- If Me.Animations.Count = 0 Then
- Select Case Me.AnimationIndex
- Case 0
- SoundManager.PlaySound("Battle\Pokeball\open")
- InBall = True
- AnimationIndex = 1
- AnimationStarted = False
- SetupAnimation()
- Case 1
- AnimationIndex = 2
- AnimationStarted = False
- SetupAnimation()
- Case 2, 3, 4, 5
- If StayInBall() = True Then
- SoundManager.PlaySound("Battle\Pokeball\shake")
- AnimationIndex += 1
- Else
- SoundManager.PlaySound("Battle\Pokeball\break")
- AnimationIndex = 21
- InBall = False
- End If
- AnimationStarted = False
- SetupAnimation()
- Case 6
- AnimationIndex = 7
- AnimationStarted = False
- SetupAnimation()
- SoundManager.PlaySound("Battle\Pokeball\catch", False)
- Case 7
- AnimationIndex = 8
- AnimationStarted = False
- SetupAnimation()
- CatchPokemon()
- BattleSystem.Battle.Caught = True
- Case 8
- AnimationIndex = 9
- If showPokedexEntry = True Then
- Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexViewScreen(Core.CurrentScreen, p, True), Color.White, False))
- End If
- Case 9
- AnimationIndex = 10
- Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, p))
- Case 10 ' After Catch
- If p.CatchBall.ID = 186 Then
- p.FullRestore() ' Heal Ball
- End If
+ Select Case Me.AnimationIndex
+ Case 0
+ SoundManager.PlaySound("Battle\Pokeball\open")
+ InBall = True
+ AnimationIndex = 1
+ AnimationStarted = False
+ SetupAnimation()
+ Case 1
+ AnimationIndex = 2
+ AnimationStarted = False
+ SetupAnimation()
+ Case 2, 3, 4, 5
+ If StayInBall() = True Then
+ SoundManager.PlaySound("Battle\Pokeball\shake")
+ AnimationIndex += 1
+ Else
+ SoundManager.PlaySound("Battle\Pokeball\break")
+ AnimationIndex = 21
+ InBall = False
+ End If
+ AnimationStarted = False
+ SetupAnimation()
+ Case 6
+ AnimationIndex = 7
+ AnimationStarted = False
+ SetupAnimation()
+ Case 7
+ AnimationIndex = 8
+ AnimationStarted = False
+ SetupAnimation()
+ CatchPokemon()
+ BattleSystem.Battle.Caught = True
+ Case 8
+ AnimationIndex = 9
+ If showPokedexEntry = True Then
+ Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexViewScreen(Core.CurrentScreen, p, True), Color.White, False))
+ End If
+ Case 9
+ AnimationIndex = 10
+ Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, p))
+ Case 10 ' After Catch
+ If p.CatchBall.ID = 186 Then
+ p.FullRestore() ' Heal Ball
+ End If
- PlayerStatistics.Track("Caught Pokemon", 1)
- StorePokemon()
- AnimationIndex = 11
- Case 11
- Core.SetScreen(Me.PreScreen)
- BattleSystem.Battle.Won = True
- CType(Core.CurrentScreen, BattleSystem.BattleScreen).EndBattle(False)
- Case 20 ' Failed
- If Core.Player.Pokemons.Count < 6 Then
- Dim p As Pokemon = BattleScreen.OppPokemon
- p.SetCatchInfos(Me.Ball, "Illegally caught!")
+ PlayerStatistics.Track("Caught Pokemon", 1)
+ StorePokemon()
+ AnimationIndex = 11
+ Case 11
+ Core.SetScreen(Me.PreScreen)
+ BattleSystem.Battle.Won = True
+ CType(Core.CurrentScreen, BattleSystem.BattleScreen).EndBattle(False)
+ Case 20 ' Failed
+ If Core.Player.Pokemons.Count < 6 Then
+ Dim p As Pokemon = BattleScreen.OppPokemon
+ p.SetCatchInfos(Me.Ball, "Illegally caught!")
- Core.Player.Pokemons.Add(p)
- End If
- ResetVisibility()
- Core.SetScreen(Me.PreScreen)
- Case 21 ' After Break
- ResetVisibility()
- Core.SetScreen(Me.PreScreen)
- CType(Core.CurrentScreen, BattleSystem.BattleScreen).Battle.InitializeRound(CType(Core.CurrentScreen, BattleSystem.BattleScreen), New BattleSystem.Battle.RoundConst() With {.StepType = BattleSystem.Battle.RoundConst.StepTypes.Text, .Argument = "It broke free!"})
- End Select
- End If
+ Core.Player.Pokemons.Add(p)
+ End If
+ ResetVisibility()
+ Core.SetScreen(Me.PreScreen)
+ Case 21 ' After Break
+ SetupAnimation()
+ Core.SetScreen(Me.PreScreen)
+ CType(Core.CurrentScreen, BattleSystem.BattleScreen).Battle.InitializeRound(CType(Core.CurrentScreen, BattleSystem.BattleScreen), New BattleSystem.Battle.RoundConst() With {.StepType = BattleSystem.Battle.RoundConst.StepTypes.Text, .Argument = "It broke free!"})
+ End Select
End If
End If
End If
@@ -272,30 +257,68 @@
Select Case Me.AnimationIndex
Case 0
- Animations.Add(New BAMove(New Vector3(Camera.Position.X - 1.0F, Camera.Position.Y, Camera.Position.Z - 0.5F) + BattleScreen.BattleMapOffset, Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.04F, True, True, 1.0F, 0.0F,,, 3))
+ PokemonScale = BattleScreen.OppPokemonNPC.Scale
+ Animations.AnimationMove(BallEntity, False, BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z, 0.1, False, True, 0F, 0F,, 0.3)
Case 1
- BattleScreen.OppPokemonNPC.Visible = False
- Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), 0.01F, False, False, 0.0F, 6.0F,,, 3))
+ Dim SmokeParticles As Integer = 0
+ Do
+ Dim SmokePosition = BattleScreen.OwnPokemonNPC.Position + New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+ Dim SmokeDestination = BattleScreen.OwnPokemonNPC.Position
- Dim Size As New BASize(BattleScreen.OppPokemonNPC.Position, BattleScreen.OppPokemonNPC.Textures(0), BattleScreen.OppPokemonNPC.Scale, False, New Vector3(0.05F), 0.02F, 0.0F, 0.0F, "1")
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
- Animations.Add(Size)
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
+
+ Dim SmokeEntity As Entity = Animations.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
+
+ Animations.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeParticles)
+ Loop While SmokeParticles <= 38
+
+ Animations.AnimationMove(BallEntity, False, BattleScreen.OppPokemonNPC.Position.X, BattleScreen.OwnPokemonNPC.Position.Y, BattleScreen.OppPokemonNPC.Position.Z, 0.01F, False, False, 0.0F, 6.0F,,, 3)
+
+ Animations.AnimationScale(Nothing, False, False, 0.05F, 0.05F, 0.05F, 0.02F, 0.0F, 0.0F, "1")
+ Animations.AnimationFade(Nothing, False, 1, False, 0.0F, 0.0F, 0.0F)
Case 2
- Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, 0.0F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3))
+ Animations.AnimationMove(BallEntity, False, BattleScreen.OppPokemonNPC.Position.X, BattleScreen.OwnPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z, 0.02F, False, False, 0.0F, 6.0F,,, 3)
Case 3, 5
- Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, 0.05F), New Vector3(0, 0, 1.0F), 0.0F, 4.0F, False, False, True, True))
+ Animations.AnimationRotate(BallEntity, False, 0, 0, 0.05F, 0, 0, 1.0F, 0.0F, 4.0F, False, False, True, True)
Case 4, 6
- Animations.Add(New BARotation(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(0, 0, -0.05F), New Vector3(0, 0, -1.0F), 0.0F, 4.0F, False, False, True, True))
+ Animations.AnimationRotate(BallEntity, False, 0, 0, -0.05F, 0, 0, -1.0F, 0.0F, 4.0F, False, False, True, True)
Case 7 ' Catch Animation
For i = 0 To 2
- Dim v As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z)
-
- Animations.Add(New BAMove(v, TextureManager.GetTexture("Textures\Battle\Other\Star"), New Vector3(0.1F), New Vector3(v.X, v.Y + 0.4F, v.Z - ((1 - i) * 0.4F)), 0.01F, False, False, 0.0F, 0.0F,,, 3))
+ Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z)
+ Dim StarDestination As Vector3 = New Vector3(StarPosition.X, StarPosition.Y + 0.4F, StarPosition.Z - ((1 - i) * 0.4F))
+ Dim StarEntity As Entity = Animations.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.1F), 1.0F)
+ Animations.AnimationMove(StarEntity, True, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 0.0F, 0.0F,,, 3)
Next
- Animations.Add(New BAMove(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), 0.02F, False, False, 0.0F, 6.0F,,, 3))
+ Animations.AnimationMove(BallEntity, False, BattleScreen.OppPokemonNPC.Position.X, BattleScreen.OwnPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z, 0.02F, False, False, 0.0F, 6.0F,,, 3)
Case 8
- Animations.Add(New BAOpacity(New Vector3(BattleScreen.OppPokemonNPC.Position.X - 0.05F, -0.35F, BattleScreen.OppPokemonNPC.Position.Z), Ball.Texture, New Vector3(0.3F), 0.01F, False, 0.0F, 0.0F, 0.0F))
+ Animations.AnimationFade(BallEntity, True, 0.01F, False, 0.0F, 0.0F, 0.0F)
Case 21 ' Break Animation
+ ' Ball Opens
+ Dim SmokeParticles As Integer = 0
+ Do
+ Dim SmokePosition = BattleScreen.OwnPokemonNPC.Position
+ Dim SmokeDestination = BattleScreen.OwnPokemonNPC.Position + New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
+
+ Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+
+ Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
+ Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
+
+ Dim SmokeEntity As Entity = Animations.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
+
+ Animations.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ Threading.Interlocked.Increment(SmokeParticles)
+ Loop While SmokeParticles <= 38
+
+ ' Pokemon appears
+ Animations.AnimationFade(Nothing, False, 1, False, 1, 0.0F, 0.0F)
+ Animations.AnimationScale(Nothing, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.02F, 0.0F, 0.0F, "1")
End Select
End Sub
diff --git a/P3D/Screens/Battle/BattleGrowStatsScreen.vb b/P3D/Screens/Battle/BattleGrowStatsScreen.vb
index 7532b2c81..9fe64c82a 100644
--- a/P3D/Screens/Battle/BattleGrowStatsScreen.vb
+++ b/P3D/Screens/Battle/BattleGrowStatsScreen.vb
@@ -41,47 +41,60 @@
Dim pokeTexture = Pokemon.GetMenuTexture()
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(p.X + 20), CInt(p.Y + 20), pokeTexture.Width * 2, 64), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Pokemon.GetDisplayName(), New Vector2(p.X + 90, p.Y + 32), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, " reached level " & Pokemon.Level & "!", New Vector2(p.X + 90 + FontManager.InGameFont.MeasureString(Pokemon.GetDisplayName()).X, p.Y + 41), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, " reached level " & Pokemon.Level & "!", New Vector2(p.X + 90 + FontManager.InGameFont.MeasureString(Pokemon.GetDisplayName()).X, p.Y + 41), Color.Black)
+
+ Dim OldOffset As Integer = 160
If Delay >= 3.0F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Max HP: " & OldStats(0).ToString(), New Vector2(p.X + 32, p.Y + 84), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Attack: " & OldStats(1).ToString(), New Vector2(p.X + 32, p.Y + 124), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Defense: " & OldStats(2).ToString(), New Vector2(p.X + 32, p.Y + 164), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Sp Attack: " & OldStats(3).ToString(), New Vector2(p.X + 32, p.Y + 204), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Sp Defense: " & OldStats(4).ToString(), New Vector2(p.X + 32, p.Y + 244), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "Speed: " & OldStats(5).ToString(), New Vector2(p.X + 32, p.Y + 284), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("MaxHP") & ":", New Vector2(p.X + 32, p.Y + 84), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(0).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 84), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Attack") & ":", New Vector2(p.X + 32, p.Y + 124), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(1).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 124), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Defense") & ":", New Vector2(p.X + 32, p.Y + 164), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(2).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 164), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Sp_Attack") & ":", New Vector2(p.X + 32, p.Y + 204), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(3).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 204), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Sp_Defense") & ":", New Vector2(p.X + 32, p.Y + 244), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(4).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 244), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("Speed") & ":", New Vector2(p.X + 32, p.Y + 284), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, OldStats(5).ToString(), New Vector2(p.X + 32 + OldOffset, p.Y + 284), Color.Black)
End If
+
+ Dim NewOffset As Integer = 208
If Delay >= 5.0F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newMaxHP, New Vector2(p.X + 200, p.Y + 84), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newMaxHP, New Vector2(p.X + 32 + NewOffset, p.Y + 84), Color.Black)
End If
If Delay >= 5.5F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newAttack, New Vector2(p.X + 200, p.Y + 124), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newAttack, New Vector2(p.X + 32 + NewOffset, p.Y + 124), Color.Black)
End If
If Delay >= 6.0F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newDefense, New Vector2(p.X + 200, p.Y + 164), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newDefense, New Vector2(p.X + 32 + NewOffset, p.Y + 164), Color.Black)
End If
If Delay >= 6.5F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newSpAttack, New Vector2(p.X + 200, p.Y + 204), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newSpAttack, New Vector2(p.X + 32 + NewOffset, p.Y + 204), Color.Black)
End If
If Delay >= 7.0F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newSpDefense, New Vector2(p.X + 200, p.Y + 244), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newSpDefense, New Vector2(p.X + 32 + NewOffset, p.Y + 244), Color.Black)
End If
If Delay >= 7.5F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "+ " & newSpeed, New Vector2(p.X + 200, p.Y + 284), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "+ " & newSpeed, New Vector2(p.X + 32 + NewOffset, p.Y + 284), Color.Black)
End If
+
+ Dim ResultOffset As Integer = 272
+
If Delay >= 9.0F Then
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.MaxHP, New Vector2(p.X + 252, p.Y + 84), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.Attack, New Vector2(p.X + 252, p.Y + 124), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.Defense, New Vector2(p.X + 252, p.Y + 164), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.SpAttack, New Vector2(p.X + 252, p.Y + 204), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.SpDefense, New Vector2(p.X + 252, p.Y + 244), Color.Black)
- Core.SpriteBatch.DrawString(FontManager.MiniFont, "= " & Pokemon.Speed, New Vector2(p.X + 252, p.Y + 284), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.MaxHP, New Vector2(p.X + 32 + ResultOffset, p.Y + 84), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.Attack, New Vector2(p.X + 32 + ResultOffset, p.Y + 124), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.Defense, New Vector2(p.X + 32 + ResultOffset, p.Y + 164), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.SpAttack, New Vector2(p.X + 32 + ResultOffset, p.Y + 204), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.SpDefense, New Vector2(p.X + 32 + ResultOffset, p.Y + 244), Color.Black)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, "= " & Pokemon.Speed, New Vector2(p.X + 32 + ResultOffset, p.Y + 284), Color.Black)
End If
If Delay >= 11.0F Then
Dim newStat As Integer = 0
newStat = newAttack + newDefense + newSpAttack + newMaxHP + newSpDefense + newSpeed
- Core.SpriteBatch.DrawString(FontManager.MiniFont, Pokemon.GetDisplayName() & " got a boost of " & newStat.ToString() & "!", New Vector2(p.X + 32, p.Y + 320), Color.DarkRed)
+ Core.SpriteBatch.DrawString(FontManager.InGameFont, Pokemon.GetDisplayName() & " got a boost of " & newStat.ToString() & "!", New Vector2(p.X + 32, p.Y + 320), Color.DarkRed)
End If
End Sub
diff --git a/P3D/Screens/BattleIntroScreen.vb b/P3D/Screens/BattleIntroScreen.vb
index d929ee26a..75170fa5e 100644
--- a/P3D/Screens/BattleIntroScreen.vb
+++ b/P3D/Screens/BattleIntroScreen.vb
@@ -171,6 +171,7 @@
Private Sub DrawTrainerIntro()
Dim barPosition As Vector2 = New Vector2(Trainer.BarImagePosition.X * 128, Trainer.BarImagePosition.Y * 128)
Dim VSPosition As Vector2 = New Vector2(Trainer.VSImagePosition.X * 128, Trainer.VSImagePosition.Y * 128 + 64)
+ Dim TrainerFrameSize As Size = New Size(CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName).Width / 3), CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName).Height / 4))
If Trainer.VSImageOrigin <> "VSIntro" Then
VSPosition.Y -= 64
@@ -178,17 +179,18 @@
Dim t1 As Texture2D = TextureManager.GetTexture("GUI\Intro\VSIntro", New Rectangle(CInt(barPosition.X), CInt(barPosition.Y), 128, 64), "")
Dim t2 As Texture2D = TextureManager.GetTexture("GUI\Intro\" & Trainer.VSImageOrigin, New Rectangle(CInt(VSPosition.X), CInt(VSPosition.Y), Trainer.VSImageSize.Width, Trainer.VSImageSize.Height), "")
- Dim t3 As Texture2D = TextureManager.GetTexture("NPC\" & Trainer.SpriteName, New Rectangle(0, 64, 32, 32))
+ Dim t3 As Texture2D = TextureManager.GetTexture("NPC\" & Trainer.SpriteName, New Rectangle(0, TrainerFrameSize.Height * 2, TrainerFrameSize.Width, TrainerFrameSize.Height))
Dim t4 As Texture2D = Nothing
If Trainer.DoubleTrainer = True Then
- t4 = TextureManager.GetTexture("NPC\" & Trainer.SpriteName2, New Rectangle(0, 64, 32, 32))
+ Dim Trainer2FrameSize As Size = New Size(CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName2).Width / 3), CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName2).Height / 4))
+ t4 = TextureManager.GetTexture("NPC\" & Trainer.SpriteName2, New Rectangle(0, Trainer2FrameSize.Height * 2, Trainer2FrameSize.Width, Trainer2FrameSize.Height))
End If
If Trainer.GameJoltID <> "" Then
If GameJolt.Emblem.HasDownloadedSprite(Trainer.GameJoltID) = True Then
Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID)
If Not t Is Nothing Then
- Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F)
+ Dim spriteSize As New Vector2(CInt(t.Width / 3), CInt(t.Height / 4))
t3 = TextureManager.GetTexture(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y)))
End If
End If
@@ -237,20 +239,22 @@
Private Sub DrawFaceshotIntro()
Dim barPosition As Vector2 = New Vector2(Trainer.BarImagePosition.X * 128, Trainer.BarImagePosition.Y * 128)
Dim VSPosition As Vector2 = New Vector2(Trainer.VSImagePosition.X * 128, Trainer.VSImagePosition.Y * 128 + 64)
+ Dim TrainerFrameSize As Size = New Size(CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName).Width / 3), CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName).Height / 4))
Dim t1 As Texture2D = TextureManager.GetTexture("GUI\Intro\VSIntro", New Rectangle(CInt(barPosition.X), CInt(barPosition.Y), 128, 64), "")
Dim t2 As Texture2D = TextureManager.GetTexture("GUI\Intro\VSIntro", New Rectangle(CInt(VSPosition.X), CInt(VSPosition.Y), 61, 54), "")
- Dim t3 As Texture2D = TextureManager.GetTexture("NPC\" & Trainer.SpriteName, New Rectangle(0, 64, 32, 32))
+ Dim t3 As Texture2D = TextureManager.GetTexture("NPC\" & Trainer.SpriteName, New Rectangle(0, TrainerFrameSize.Height * 2, TrainerFrameSize.Width, TrainerFrameSize.Height))
Dim t4 As Texture2D = Nothing
If Trainer.DoubleTrainer = True Then
- t4 = TextureManager.GetTexture("NPC\" & Trainer.SpriteName2, New Rectangle(0, 64, 32, 32))
+ Dim Trainer2FrameSize As Size = New Size(CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName2).Width / 3), CInt(TextureManager.GetTexture("Textures\NPC\" & Trainer.SpriteName2).Height / 4))
+ t4 = TextureManager.GetTexture("NPC\" & Trainer.SpriteName2, New Rectangle(0, Trainer2FrameSize.Height * 2, Trainer2FrameSize.Width, Trainer2FrameSize.Height))
End If
If Trainer.GameJoltID <> "" Then
If GameJolt.Emblem.HasDownloadedSprite(Trainer.GameJoltID) = True Then
Dim t As Texture2D = GameJolt.Emblem.GetOnlineSprite(Trainer.GameJoltID)
If Not t Is Nothing Then
- Dim spriteSize As New Vector2(t.Width / 3.0F, t.Height / 4.0F)
+ Dim spriteSize As New Vector2(CInt(t.Width / 3), CInt(t.Height / 4))
t3 = TextureManager.GetTexture(t, New Rectangle(0, CInt(spriteSize.Y * 2), CInt(spriteSize.X), CInt(spriteSize.Y)))
End If
End If
@@ -454,7 +458,7 @@
If Animations.Count = 0 Then
Animations.Add(New Rectangle(CInt(Core.windowSize.Width / 2 - (Core.windowSize.Width / 100 / 2)), CInt(Core.windowSize.Height / 2 - (Core.windowSize.Height / 100 / 2)), CInt(Core.windowSize.Width / 100), CInt(Core.windowSize.Height / 100)))
Else
- Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 6)
+ Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 4)
If Animations(0).Height >= Core.windowSize.Height + 128 Then
ready = True
End If
@@ -475,7 +479,7 @@
If Animations.Count = 0 Then
Animations.Add(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height))
Else
- If value >= Core.windowSize.Height / 2 - 4 Then
+ If value >= Core.windowSize.Height / 2 + 4 Then
ready = True
Else
value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3))
diff --git a/P3D/Screens/Inventory/NewInventoryScreen.vb b/P3D/Screens/Inventory/NewInventoryScreen.vb
index 9d6c66594..425d907a0 100644
--- a/P3D/Screens/Inventory/NewInventoryScreen.vb
+++ b/P3D/Screens/Inventory/NewInventoryScreen.vb
@@ -821,16 +821,23 @@ Public Class NewInventoryScreen
If Controls.Accept() AndAlso _items.Length > 0 Then
Dim cItem As Item = Item.GetItemByID(_items(ItemIndex + PageIndex * 10).ItemID)
SoundManager.PlaySound("select")
- If cItem.CanBeUsedInBattle = True Then
+ If Me.PreScreen.Identification = Screen.Identifications.BattleScreen Then
+ If cItem.CanBeUsedInBattle = True Then
+ _infoItemOptionSelection = 0
+ _isInfoShowing = True
+ SetInfoSettings()
+ SetItemOptions()
+ Else
+ TextBox.Show("This item can't~be used in Battle.")
+ End If
+ Else
_infoItemOptionSelection = 0
_isInfoShowing = True
SetInfoSettings()
SetItemOptions()
- Else
- TextBox.Show("This item can't~be used in Battle.")
End If
- End If
+ End If
If Controls.Dismiss() Then
SoundManager.PlaySound("select")
_tabInControl = True
diff --git a/P3D/Screens/Pokemon/HatchEggScreen.vb b/P3D/Screens/Pokemon/HatchEggScreen.vb
index e4f2c31f1..7e1aa39c7 100644
--- a/P3D/Screens/Pokemon/HatchEggScreen.vb
+++ b/P3D/Screens/Pokemon/HatchEggScreen.vb
@@ -72,7 +72,7 @@
If Stage = 6 Then
SoundManager.PlaySound("egg_hatch")
Else
- SoundManager.PlaySound("Battle\Attacks\Pound")
+ SoundManager.PlaySound("Battle\Attacks\Normal\Pound")
End If
Egg = GetEggTexture()
diff --git a/P3D/Screens/Pokemon/PartyScreen.vb b/P3D/Screens/Pokemon/PartyScreen.vb
index f3d242116..a831acb44 100644
--- a/P3D/Screens/Pokemon/PartyScreen.vb
+++ b/P3D/Screens/Pokemon/PartyScreen.vb
@@ -183,10 +183,10 @@ Public Class PartyScreen
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2 - 150), CInt(Core.windowSize.Height - 200), 300, 100), New Color(0, 0, 0, CInt(150 * textFade * _interfaceFade)))
- Dim text As String = _messageText.CropStringToWidth(FontManager.ChatFont, 250) '''???
- Dim size As Vector2 = FontManager.ChatFont.MeasureString(text)
+ Dim text As String = _messageText.CropStringToWidth(FontManager.MainFont, 250) '''???
+ Dim size As Vector2 = FontManager.MainFont.MeasureString(text)
- SpriteBatch.DrawString(FontManager.ChatFont, text, New Vector2(CSng(Core.windowSize.Width / 2 - size.X / 2), CSng(Core.windowSize.Height - 150 - size.Y / 2)), New Color(255, 255, 255, CInt(255 * textFade * _interfaceFade)))
+ SpriteBatch.DrawString(FontManager.MainFont, text, New Vector2(CSng(Core.windowSize.Width / 2 - size.X / 2), CSng(Core.windowSize.Height - 150 - size.Y / 2)), New Color(255, 255, 255, CInt(255 * textFade * _interfaceFade)))
End If
End Sub
@@ -214,7 +214,10 @@ Public Class PartyScreen
_preScreenTexture = target
End If
- SpriteBatch.Draw(_blur.Perform(_preScreenTexture), windowSize, Color.White)
+ If _interfaceFade < 1.0F Then
+ SpriteBatch.Draw(_preScreenTexture, windowSize, Color.White)
+ End If
+ SpriteBatch.Draw(_blur.Perform(_preScreenTexture), windowSize, New Color(255, 255, 255, CInt(255 * _interfaceFade * 2).Clamp(0, 255)))
End Sub
@@ -232,7 +235,7 @@ Public Class PartyScreen
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 140, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 124, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
- SpriteBatch.DrawString(FontManager.ChatFont, POKEMON_TITLE, New Vector2(halfWidth - 390, halfHeight - 228), mainBackgroundColor)
+ SpriteBatch.DrawString(FontManager.MainFont, POKEMON_TITLE, New Vector2(halfWidth - 390, halfHeight - 228), mainBackgroundColor)
For y = 0 To CInt(_enrollY) Step 16
For x = 0 To 800 Step 16
@@ -292,7 +295,7 @@ Public Class PartyScreen
_pokemonAnimations(index)._shakeV * shakeMulti, New Vector2(16, 16), SpriteEffects.None, 0F)
'name:
- GetFontRenderer().DrawString(FontManager.MiniFont, p.GetDisplayName(), New Vector2(position.X + 156, position.Y + 27), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ GetFontRenderer().DrawString(FontManager.MainFont, p.GetDisplayName(), New Vector2(position.X + 156, position.Y + 27), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
Else
Dim shakeMulti As Single = CSng((p.HP / p.MaxHP).Clamp(0.2F, 1.0F))
@@ -308,18 +311,18 @@ Public Class PartyScreen
End If
'name:
- GetFontRenderer().DrawString(FontManager.MiniFont, p.GetDisplayName(), New Vector2(position.X + 78, position.Y + 5), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ GetFontRenderer().DrawString(FontManager.MainFont, p.GetDisplayName(), New Vector2(position.X + 78, position.Y + 5), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
'Gender symbol:
Select Case p.Gender
Case Pokemon.Genders.Male
- SpriteBatch.Draw(_menuTexture, New Rectangle(CInt(position.X + FontManager.MiniFont.MeasureString(p.GetDisplayName()).X + 86), CInt(position.Y + 9), 7, 13), New Rectangle(25, 0, 7, 13), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ SpriteBatch.Draw(_menuTexture, New Rectangle(CInt(position.X + FontManager.MainFont.MeasureString(p.GetDisplayName()).X + 86), CInt(position.Y + 9), 7, 13), New Rectangle(25, 0, 7, 13), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
Case Pokemon.Genders.Female
- SpriteBatch.Draw(_menuTexture, New Rectangle(CInt(position.X + FontManager.MiniFont.MeasureString(p.GetDisplayName()).X + 85), CInt(position.Y + 9), 9, 13), New Rectangle(32, 0, 9, 13), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ SpriteBatch.Draw(_menuTexture, New Rectangle(CInt(position.X + FontManager.MainFont.MeasureString(p.GetDisplayName()).X + 85), CInt(position.Y + 9), 9, 13), New Rectangle(32, 0, 9, 13), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
End Select
'Level:
- GetFontRenderer().DrawString(FontManager.MiniFont, "Lv. " & p.Level.ToString(), New Vector2(position.X + 4, position.Y + 56), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ GetFontRenderer().DrawString(FontManager.MainFont, "Lv. " & p.Level.ToString(), New Vector2(position.X + 4, position.Y + 50), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
'HP Bar:
SpriteBatch.Draw(_menuTexture, New Rectangle(CInt(position.X) + 102, CInt(position.Y) + 32, 111, 15), New Rectangle(16, 32, 74, 10), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
@@ -354,7 +357,7 @@ Public Class PartyScreen
End With
'HP display:
- GetFontRenderer().DrawString(FontManager.MiniFont, p.HP & " / " & p.MaxHP, New Vector2(position.X + 100, position.Y + 50), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ GetFontRenderer().DrawString(FontManager.MainFont, p.HP & " / " & p.MaxHP, New Vector2(position.X + 100, position.Y + 50), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
'status condition
Dim StatusTexture As Texture2D = BattleStats.GetStatImage(p.Status)
@@ -379,7 +382,7 @@ Public Class PartyScreen
End If
End Select
End If
- GetFontRenderer().DrawString(FontManager.MiniFont, AttackLabel, New Vector2(position.X + 210, position.Y + 50), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
+ GetFontRenderer().DrawString(FontManager.MainFont, AttackLabel, New Vector2(position.X + 210, position.Y + 50), New Color(255, 255, 255, CInt(255 * _interfaceFade)))
End If
diff --git a/P3D/World/Lighting.vb b/P3D/World/Lighting.vb
index 951024204..afbf03a6e 100644
--- a/P3D/World/Lighting.vb
+++ b/P3D/World/Lighting.vb
@@ -48,7 +48,7 @@ Public Class Lighting
Case 0 ' Night
refEffect.AmbientLightColor = New Vector3(0.8F)
- refEffect.DirectionalLight0.DiffuseColor = New Vector3(-0.4F, -0.4F, -0.6F)
+ refEffect.DirectionalLight0.DiffuseColor = New Vector3(-0.2F)
refEffect.DirectionalLight0.Direction = Vector3.Normalize(New Vector3(-1.0F, 0.0F, 1.0F))
refEffect.DirectionalLight0.SpecularColor = New Vector3(0.0F)
refEffect.DirectionalLight0.Enabled = True
diff --git a/P3D/World/PokemonEncounter.vb b/P3D/World/PokemonEncounter.vb
index 28f6b9664..26e8eb4e8 100644
--- a/P3D/World/PokemonEncounter.vb
+++ b/P3D/World/PokemonEncounter.vb
@@ -40,22 +40,32 @@ Public Class PokemonEncounter
End If
If System.IO.File.Exists(GameModeManager.GetPokeFilePath(pokeFile)) = True Then ' Only try to register a wild battle if the .poke file exists:
- Dim startRandomValue As Integer = 12
- Dim minRandomValue As Integer = 5
-
+ Dim encounterRate As Single = 1.0F
+ Dim minTileValue As Integer
+ Select Case Method
+ Case Spawner.EncounterMethods.Land
+ If Screen.Level.WildPokemonFloor = True And Screen.Level.Surfing = False Then
+ minTileValue = 15
+ Else
+ minTileValue = 25
+ End If
+ Case Spawner.EncounterMethods.Surfing
+ minTileValue = 15
+ End Select
+ If Core.Player.IsRunning = True Then
+ encounterRate *= 1.5F
+ End If
If Core.Player.Pokemons.Count > 0 Then
Dim p As Pokemon = Core.Player.Pokemons(0)
' Arena Trap/Illuminate/No Guard/Swarm Ability:
If p.Ability.Name.ToLower() = "arena trap" Or p.Ability.Name.ToLower() = "illuminate" Or p.Ability.Name.ToLower() = "no guard" Or p.Ability.Name.ToLower() = "swarm" Then
- startRandomValue = 6
- minRandomValue = 3
+ encounterRate *= 2.0F
End If
' Intimidate/Keen Eye/Quick Feet/Stench/White Smoke Ability:
If p.Ability.Name.ToLower() = "intimidate" Or p.Ability.Name.ToLower() = "keen eye" Or p.Ability.Name.ToLower() = "quick feet" Or p.Ability.Name.ToLower() = "stench" Or p.Ability.Name.ToLower() = "white smoke" Then
- startRandomValue = 24
- minRandomValue = 10
+ encounterRate *= 0.5F
End If
'Sand Veil Ability:
@@ -76,10 +86,10 @@ Public Class PokemonEncounter
End If
' Determine if the wild Pokémon will be met or not:
- Dim randomValue As Integer = startRandomValue - .WalkedSteps
- randomValue = CInt(MathHelper.Clamp(randomValue, minRandomValue, startRandomValue))
+ Dim minEncounterValue As Integer = CInt(encounterRate * minTileValue)
+ Dim randomValue As Integer = Core.Random.Next(0, 255)
- If Core.Random.Next(0, randomValue * 2) = 0 Then
+ If randomValue <= minEncounterValue Then
' Don't encounter a Pokémon if the left control key is held down, for Debug or Sandbox Mode:
If GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
If KeyBoardHandler.KeyDown(Keys.LeftControl) = True Then
diff --git a/P3D/World/World.vb b/P3D/World/World.vb
index e680d88bf..23a415f04 100644
--- a/P3D/World/World.vb
+++ b/P3D/World/World.vb
@@ -572,19 +572,19 @@ endsub:
Case World.Weathers.Clear, Weathers.Sunny
v = New Vector3(1)
Case World.Weathers.Rain, Weathers.Thunderstorm
- v = New Vector3(0.4, 0.4, 0.7)
+ v = New Vector3(0.7)
Case World.Weathers.Snow
v = New Vector3(0.8)
Case World.Weathers.Underwater
v = New Vector3(0.1, 0.3, 0.9)
Case World.Weathers.Fog
- v = New Vector3(0.7, 0.7, 0.8)
+ v = New Vector3(0.7)
Case World.Weathers.Sandstorm
v = New Vector3(0.8, 0.5, 0.2)
- Case Weathers.Ash
- v = New Vector3(0.5, 0.5, 0.5)
- Case Weathers.Blizzard
- v = New Vector3(0.6, 0.6, 0.6)
+ Case World.Weathers.Ash
+ v = New Vector3(0.5)
+ Case World.Weathers.Blizzard
+ v = New Vector3(0.6)
End Select
Dim colorV As Vector3 = defaultColor.ToVector3 * Screen.SkyDome.GetWeatherColorMultiplier(v)
@@ -594,8 +594,26 @@ endsub:
Private Sub ChangeEnvironment()
Select Case Me.EnvironmentType
Case EnvironmentTypes.Outside
+ Dim _fogColor As Color
+ Dim v As Single = 1.0F
+ Dim nightFog As Integer = 64
+ Dim dayFog As Integer = 168
+ Select Case CurrentMapWeather
+ Case World.Weathers.Clear, Weathers.Sunny
+ v = 1.0F
+ Case World.Weathers.Rain, Weathers.Thunderstorm, World.Weathers.Fog
+ v = 0.7F
+ Case World.Weathers.Snow
+ v = 0.8F
+ End Select
+ Select Case Screen.Level.DayTime
+ Case 1, 3
+ _fogColor = New Color(CInt(v * dayFog), CInt(v * dayFog), CInt(v * dayFog))
+ Case 2, 4
+ _fogColor = New Color(CInt(v * nightFog), CInt(v * nightFog), CInt(v * nightFog))
+ End Select
Core.BackgroundColor = GetWeatherBackgroundColor(SkyDome.GetDaytimeColor(False))
- Screen.Effect.FogColor = Core.BackgroundColor.ToVector3()
+ Screen.Effect.FogColor = _fogColor.ToVector3()
Screen.SkyDome.TextureDown = TextureManager.GetTexture("SkyDomeResource\Stars")
Case EnvironmentTypes.Inside
Core.BackgroundColor = New Color(57, 57, 57)
@@ -727,7 +745,7 @@ endsub:
If Core.Random.Next(0, 250) = 0 Then
Dim pitch As Single = -(Core.Random.Next(8, 11) / 10.0F)
Debug.Print(pitch.ToString())
- SoundManager.PlaySound("Battle\Attacks\Thunderbolt", pitch, 0F, SoundManager.Volume, False)
+ SoundManager.PlaySound("Battle\Attacks\Electric\Thunderbolt", pitch, 0F, SoundManager.Volume, False)
End If
End If