Merge branch 'master' into newTokenTranslations

This commit is contained in:
Daniel S. Billing 2022-05-28 20:34:02 +02:00
commit 73cd41a992
3878 changed files with 18672 additions and 40283 deletions

2
.gitmodules vendored
View File

@ -4,5 +4,5 @@
branch = master
[submodule "lib/game-dev-common"]
path = lib/game-dev-common
url = https://github.com/nilllzz/Game-Dev-Common.git
url = https://github.com/P3D-Legacy/Game-Dev-Common.git
branch = master

76
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project leader at daniel@kilobyte.no. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,202 @@
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
Public SpinSpeedX As Single = 0.1F
Public SpinSpeedZ As Single = 0.1F
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
EaseInAndOut
Linear
End Enum
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
Me.SpinZ = SpinZ
Me.SpinSpeedX = SpinXSpeed
Me.SpinSpeedZ = SpinZSpeed
Me.Visible = False
Me.TargetEntity = Entity
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 Overrides Sub DoActionUpdate()
Spin()
End Sub
Public Overrides Sub DoActionActive()
Move()
End Sub
Private Sub Spin()
If Me.SpinX = True Then
TargetEntity.Rotation.X += SpinSpeedX
End If
If Me.SpinZ = True Then
TargetEntity.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 TargetEntity.Position.X < Me.Destination.X Then
TargetEntity.Position.X += Me.MoveSpeed
If TargetEntity.Position.X >= Me.Destination.X Then
TargetEntity.Position.X = Me.Destination.X
End If
ElseIf TargetEntity.Position.X > Me.Destination.X Then
TargetEntity.Position.X -= Me.MoveSpeed
If TargetEntity.Position.X <= Me.Destination.X Then
TargetEntity.Position.X = Me.Destination.X
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
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.MoveYSpeed
If TargetEntity.Position.Y <= Me.Destination.Y Then
TargetEntity.Position.Y = Me.Destination.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
TargetEntity.Position.Z += Me.MoveSpeed
If TargetEntity.Position.Z >= Me.Destination.Z Then
TargetEntity.Position.Z = Me.Destination.Z
End If
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
TargetEntity.Position.Z -= Me.MoveSpeed
If TargetEntity.Position.Z <= Me.Destination.Z Then
TargetEntity.Position.Z = Me.Destination.Z
End If
End If
Else
If TargetEntity.Position.X < Me.Destination.X Then
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If TargetEntity.Position.X > Me.Destination.X - 0.05 Then
TargetEntity.Position.X = Me.Destination.X
End If
ElseIf TargetEntity.Position.X > Me.Destination.X Then
TargetEntity.Position.X = MathHelper.Lerp(TargetEntity.Position.X, Me.Destination.X, Me.InterpolationSpeed)
If TargetEntity.Position.X < Me.Destination.X + 0.05 Then
TargetEntity.Position.X = Me.Destination.X
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y > Me.Destination.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y < Me.Destination.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If TargetEntity.Position.Z > Me.Destination.Z - 0.05 Then
TargetEntity.Position.Z = Me.Destination.Z
End If
ElseIf TargetEntity.Position.Z > Me.Destination.Z Then
TargetEntity.Position.Z = MathHelper.Lerp(TargetEntity.Position.Z, Me.Destination.Z, Me.InterpolationSpeed)
If TargetEntity.Position.Z < Me.Destination.Z + 0.05 Then
TargetEntity.Position.Z = Me.Destination.Z
End If
End If
End If
If TargetEntity.Position = Destination Then
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

View File

@ -0,0 +1,51 @@
Public Class BAEntityOpacity
Inherits BattleAnimation3D
Public TargetEntity As Entity
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 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
Me.TargetEntity = entity
Me.TargetEntity.Opacity = StartState
Me.Visible = False
Me.AnimationType = AnimationTypes.Transition
End Sub
Public Overrides Sub DoActionActive()
If Me.FadeIn = True Then
If Me.EndState > TargetEntity.Opacity Then
TargetEntity.Opacity += Me.TransitionSpeed
If TargetEntity.Opacity >= Me.EndState Then
TargetEntity.Opacity = Me.EndState
End If
End If
Else
If Me.EndState < TargetEntity.Opacity Then
TargetEntity.Opacity -= Me.TransitionSpeed
If TargetEntity.Opacity <= Me.EndState Then
TargetEntity.Opacity = Me.EndState
End If
End If
End If
If TargetEntity.Opacity = Me.EndState Then
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

View File

@ -0,0 +1,133 @@
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.TargetEntity = Entity
Me.ReturnVector = TargetEntity.Rotation
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
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

View File

@ -0,0 +1,114 @@
Public Class BAEntityScale
Inherits BattleAnimation3D
Public Grow As Boolean = False
Public EndSize As Vector3
Public SizeSpeed As Single = 0.01F
Public TargetEntity As Entity
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 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
Me.SizeSpeed = SizeSpeed
Me.TargetEntity = Entity
Me.AnimationType = AnimationTypes.Size
End Sub
Public Overrides Sub DoActionActive()
Dim saveScale As Vector3 = TargetEntity.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 TargetEntity.Scale.X < Me.EndSize.X Then
TargetEntity.Scale.X += changeX
If TargetEntity.Scale.X >= Me.EndSize.X Then
TargetEntity.Scale.X = Me.EndSize.X
End If
End If
If TargetEntity.Scale.Y < Me.EndSize.Y Then
TargetEntity.Scale.Y += changeY
If TargetEntity.Scale.Y >= Me.EndSize.Y Then
TargetEntity.Scale.Y = Me.EndSize.Y
End If
End If
If TargetEntity.Scale.Z < Me.EndSize.Z Then
TargetEntity.Scale.Z += changeZ
If TargetEntity.Scale.Z >= Me.EndSize.Z Then
TargetEntity.Scale.Z = Me.EndSize.Z
End If
End If
Else
If TargetEntity.Scale.X > Me.EndSize.X Then
TargetEntity.Scale.X -= changeX
If TargetEntity.Scale.X <= Me.EndSize.X Then
TargetEntity.Scale.X = Me.EndSize.X
End If
End If
If TargetEntity.Scale.Y > Me.EndSize.Y Then
TargetEntity.Scale.Y -= changeY
If TargetEntity.Scale.Y <= Me.EndSize.Y Then
TargetEntity.Scale.Y = Me.EndSize.Y
End If
End If
If TargetEntity.Scale.Z > Me.EndSize.Z Then
TargetEntity.Scale.Z -= changeZ
If TargetEntity.Scale.Z <= Me.EndSize.Z Then
TargetEntity.Scale.Z = Me.EndSize.Z
End If
End If
End If
'Bottom
If Anchors.Contains("1") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
TargetEntity.Position.Y -= diffY / 2
End If
'Top
If Anchors.Contains("2") = True Then
Dim diffY As Single = saveScale.Y - TargetEntity.Scale.Y
TargetEntity.Position.Y += diffY / 2
End If
'Left
If Anchors.Contains("3") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
TargetEntity.Position.X -= diffX / 2
End If
'Right
If Anchors.Contains("4") = True Then
Dim diffX As Single = saveScale.X - TargetEntity.Scale.X
TargetEntity.Position.X += diffX / 2
End If
If Me.EndSize = TargetEntity.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
Public Overrides Sub DoRemoveEntity()
If Me.RemoveEntityAfter = True Then
TargetEntity.CanBeRemoved = True
End If
End Sub
End Class

View File

@ -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

View File

@ -1,134 +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 SpinSpeedX As Single = 0.1F
Public SpinSpeedZ As Single = 0.1F
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)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
Me.Destination = Destination
Me.MoveSpeed = Speed
Me.Scale = Scale
Me.SpinX = SpinX
Me.SpinZ = SpinZ
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)
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()
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
'Dim x As Integer = 0
'Dim y As Integer = 0
'Dim z As Integer = 0
'If Destination.X < Me.Position.X Then
' x = -1
'ElseIf Destination.X > Me.Position.X Then
' x = 1
'End If
'If Destination.Y < Me.Position.Y Then
' y = -1
'ElseIf Destination.X > Me.Position.Y Then
' y = 1
'End If
'If Destination.Z < Me.Position.Z Then
' z = -1
'ElseIf Destination.Z > Me.Position.Z Then
' z = 1
'End If
'Dim v As Vector3 = New Vector3(x, y, z) * Speed
'Position.X += v.X
'Position.Z += v.Z
'Position.Y += v.Y
'If CInt(Destination.X) = CInt(Me.Position.X) Then
' If Functions.ToPositive(Me.Position.X - Destination.X) <= Me.Speed Then
' Me.Position.X = CInt(Me.Position.X)
' End If
'End If
'If CInt(Destination.Y) = CInt(Me.Position.Y) Then
' If Functions.ToPositive(Me.Position.Y - Destination.Y) <= Me.Speed + 0.01F Then
' Me.Position.Y = CInt(Me.Position.Y)
' End If
'End If
'If CInt(Destination.Z) = CInt(Me.Position.Z) Then
' If Functions.ToPositive(Me.Position.Z - Destination.Z) <= Me.Speed Then
' Me.Position.Z = CInt(Me.Position.Z)
' End If
'End If
If Me.Position = Destination Then
Me.Ready = True
End If
End Sub
End Class

View File

@ -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)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
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

View File

@ -0,0 +1,28 @@
Public Class BAPlaySound
Inherits BattleAnimation3D
Private soundfile As String
Private stopMusic As Boolean
Private IsPokemon As Boolean
Public Sub New(ByVal sound As String, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal stopMusic As Boolean = False, Optional ByVal IsPokemon As Boolean = False)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
Me.Scale = New Vector3(1.0F)
soundfile = sound
Me.Visible = False
Me.stopMusic = stopMusic
Me.IsPokemon = IsPokemon
AnimationType = AnimationTypes.Sound
End Sub
Public Overrides Sub DoActionActive()
If IsPokemon = True Then
SoundManager.PlayPokemonCry(CInt(soundfile))
Else
SoundManager.PlaySound(soundfile, stopMusic)
End If
Me.Ready = True
End Sub
End Class

View File

@ -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

View File

@ -1,108 +0,0 @@
Public Class BASize
Inherits BattleAnimation3D
Public Enum Anchors
Top
Left
Right
Bottom
End Enum
Public Grow As Boolean = False
Public EndSize As Vector3
Public SizeSpeed As Single = 0.01F
Public Anchor() As Anchors = {Anchors.Bottom}
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)
MyBase.New(Position, Texture, Scale, startDelay, endDelay)
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
If Anchor.Contains(Anchors.Bottom) = True Then
Dim diffY As Single = saveScale.Y - Me.Scale.Y
Me.Position.Y -= diffY / 2
End If
If Anchor.Contains(Anchors.Top) = True Then
Dim diffY As Single = saveScale.Y - Me.Scale.Y
Me.Position.Y += diffY / 2
End If
If Anchor.Contains(Anchors.Left) = True Then
Dim diffX As Single = saveScale.X - Me.Scale.X
Me.Position.X -= diffX / 2
End If
If Anchor.Contains(Anchors.Right) = 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

View File

@ -1,35 +1,40 @@
Public Class BattleAnimation3D
Inherits Entity
Public Enum AnchorTypes
Top
Left
Right
Bottom
End Enum
Public Enum AnimationTypes
[Nothing]
Move
Transition
Size
Opacity
Rotation
Texture
Wait
ViewPokeBill
BillMove
Sound
Background
End Enum
Public AnimationType As AnimationTypes = AnimationTypes.Nothing
Public CanRemove As Boolean = False
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
@ -45,6 +50,7 @@
End If
Else
CanRemove = True
DoRemoveEntity()
End If
Else
If startDelay > 0.0F Then
@ -54,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
@ -79,10 +90,15 @@
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
Draw(Me.Model, Me.Textures, True)
If CanRemove = False Then
Draw(Me.Model, Me.Textures, True)
End If
End If
End Sub

File diff suppressed because it is too large Load Diff

View File

@ -955,6 +955,20 @@
End If
End If
With BattleScreen.FieldEffects
If move.GetAttackType(own, BattleScreen).Type = Element.Types.Fire Then
If own = True Then
If .OppTarShot = True Then
effectiveness *= 2
End If
Else
If .OwnTarShot = True Then
effectiveness *= 2
End If
End If
End If
End With
If move.UseEffectiveness = False And effectiveness <> 0.0F Then
Return 1.0F
End If

View File

@ -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))

View File

@ -144,11 +144,12 @@
Me.MouseVisible = True
Me.CanChat = True
Me.CanDrawDebug = True
Me.CanMuteMusic = True
Me.CanMuteAudio = True
Me.CanTakeScreenshot = True
Screen.TextBox.Showing = False
Screen.PokemonImageView.Showing = False
Screen.ImageView.Showing = False
Screen.ChooseBox.Showing = False
Effect = New BasicEffect(Core.GraphicsDevice)
@ -188,20 +189,6 @@
PlayerStatistics.Track("Wild battles", 1)
If CustomBattleMusic = "" OrElse MusicManager.SongExists(CustomBattleMusic) = False Then
If RoamingBattle = True AndAlso RoamingPokemonStorage.MusicLoop <> "" AndAlso MusicManager.SongExists(RoamingPokemonStorage.MusicLoop) = True Then
MusicManager.Play(RoamingPokemonStorage.MusicLoop, True, 0.0F)
Else
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
MusicManager.Play(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F)
Else
MusicManager.Play("johto_wild", True, 0.0F)
End If
End If
Else
MusicManager.Play(CustomBattleMusic, True, 0.0F)
End If
Me.defaultMapType = defaultMapType
Me.OppPokemon = WildPokemon
@ -239,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)
@ -292,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)
@ -299,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)
@ -330,12 +317,6 @@
PlayerStatistics.Track("Trainer battles", 1)
End If
If IsPVPBattle = True Then
MusicManager.Play("pvp", True, 0.0F)
Else
MusicManager.Play(Trainer.GetBattleMusicName(), True, 0.0F)
End If
Me.defaultMapType = defaultMapType
Me.OppPokemon = Trainer.Pokemons(0)
@ -378,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)
@ -420,21 +411,96 @@
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)
BallThrowOpp.AnimationPlaySound(CStr(Me.OppPokemon.Number), 4, 0,, True)
Else
BallThrowOpp.AnimationPlaySound(CStr(Me.OppPokemon.Number), 0, 0,, True)
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)
' 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 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)
@ -443,8 +509,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()
@ -478,12 +542,6 @@
PlayerStatistics.Track("Safari battles", 1)
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
MusicManager.Play(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F)
Else
MusicManager.Play("johto_wild", True, 0.0F)
End If
Me.defaultMapType = defaultMapType
Me.OppPokemon = WildPokemon
@ -521,10 +579,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
@ -532,10 +590,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
@ -595,12 +653,6 @@
PlayerStatistics.Track("Bug-Catching contest battles", 1)
If MusicManager.SongExists(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild") = True Then
MusicManager.Play(SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0) & "_wild", True, 0.0F)
Else
MusicManager.Play("johto_wild", True, 0.0F)
End If
Me.defaultMapType = defaultMapType
Me.OppPokemon = WildPokemon
@ -639,21 +691,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
@ -688,6 +740,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)
@ -695,8 +749,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)
@ -799,7 +851,33 @@
Public Overrides Sub Draw()
SkyDome.Draw(45.0F)
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
@ -812,13 +890,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
@ -826,13 +919,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()
@ -1036,8 +1174,6 @@ nextIndex:
End If
TempPokeFile = ""
OwnPokemon.ResetTemp()
If IsRemoteBattle = False Then
If ConnectScreen.Connected = True Then
If Battle.Won = False Then
@ -1081,9 +1217,19 @@ nextIndex:
If p.hasLeveledUp = True Then
hasLevelUp = True
End If
If IsRemoteBattle = True Or IsTrainerBattle = True Then
If p.OriginalItem IsNot Nothing Then
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
p.Item.AdditionalData = p.OriginalItem.AdditionalData
Screen.TextBox.Show(Core.Player.Name & " received" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
End If
End If
p.ResetTemp()
Next
If hasLevelUp = False Then
MusicManager._afterBattleIntroSong = Nothing
MusicManager.Play(SavedOverworld.Level.MusicLoop)
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, New Color(255, 255, 254), False, AddressOf ChangeSavedScreen))
Else
Dim EvolvePokeList As New List(Of Integer)
@ -1100,6 +1246,8 @@ nextIndex:
Next
If EvolvePokeList.Count = 0 Then
MusicManager._afterBattleIntroSong = Nothing
MusicManager.Play(SavedOverworld.Level.MusicLoop)
Core.SetScreen(New TransitionScreen(Me, SavedOverworld.OverworldScreen, New Color(255, 255, 254), False, AddressOf ChangeSavedScreen))
Else
Core.SetScreen(New TransitionScreen(Me, New EvolutionScreen(Core.CurrentScreen, EvolvePokeList, "", EvolutionCondition.EvolutionTrigger.LevelUp, True), Color.Black, False))
@ -1118,6 +1266,16 @@ nextIndex:
End If
Next
Else
For Each p As Pokemon In Core.Player.Pokemons
If IsRemoteBattle = True Or IsTrainerBattle = True Then
If p.OriginalItem IsNot Nothing Then
p.Item = P3D.Item.GetItemByID(p.OriginalItem.ID)
p.Item.AdditionalData = p.OriginalItem.AdditionalData
Screen.TextBox.Show(Core.Player.Name & " received~" & p.OriginalItem.Name & "*and gave it back to~" & p.GetDisplayName)
End If
End If
p.ResetTemp()
Next
ResetVars()
Core.SetScreen(New TransitionScreen(Me, New BlackOutScreen(Me), Color.Black, False))
End If
@ -1178,14 +1336,14 @@ nextIndex:
poke = OppPokemon
End If
Dim n As String = poke.AnimationName
Dim n As String = PokemonForms.GetAnimationName(poke)
Dim s As String = "Normal"
If poke.IsShiny = True Then
s = "Shiny"
End If
Dim p As String = "Models\" & n & "\" & s
Dim p As String = "Models\Pokemon\" & n & "\" & s
If ModelManager.ModelExist(p) = True Then
Return p

View File

@ -107,6 +107,7 @@
Public OwnDestinyBond As Boolean = False 'If own Pokémon used destiny bond, this is true. If the opponent knocks the own Pokémon out, it will faint as well.
Public OwnHealingWish As Boolean = False 'True, if healing wish got used. Heals the next switched in Pokémon.
Public OwnGastroAcid As Boolean = False 'If own Pokémon is affected by Gastro Acid
Public OwnTarShot As Boolean = False 'If own Pokémon is affected by Tar Shot
Public OwnLastMove As Attack = Nothing 'Last move used
Public OwnSpikes As Integer = 0 'Trap move counter
@ -228,6 +229,7 @@
Public OppDestinyBond As Boolean = False
Public OppHealingWish As Boolean = False
Public OppGastroAcid As Boolean = False
Public OppTarShot As Boolean = False 'If opponent Pokémon is affected by Tar Shot
Public OppFlyCounter As Integer = 0
Public OppDigCounter As Integer = 0

View File

@ -0,0 +1,268 @@
Namespace BattleSystem
Public Class AnimationQueryObject
Inherits QueryObject
Public AnimationStarted As Boolean = False
Public AnimationEnded As Boolean = False
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
Return AnimationEnded
End Get
End Property
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.SpawnedEntities = New List(Of Entity)
Me.DrawBeforeEntities = DrawBeforeEntities
Me.BattleFlipped = BattleFlipped
If entity IsNot Nothing Then
Me.CurrentEntity = entity
End If
If model IsNot Nothing Then
Me.CurrentModel = model
End If
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
If a.AnimationType = BattleAnimation3D.AnimationTypes.Background Then
Backgrounds.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
End Sub
Public Overrides Sub Update(BV2Screen As BattleScreen)
If AnimationStarted = True Then
For i = 0 To AnimationSequence.Count - 1
If i <= AnimationSequence.Count - 1 Then
Dim a As BattleAnimation3D = AnimationSequence(i)
If a.CanRemove = True Then
i -= 1
AnimationSequence.Remove(a)
Else
a.Update()
End If
End If
Next
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()
AnimationStarted = True
End Sub
Public Sub AnimationSequenceEnd()
AnimationEnded = True
End Sub
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.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
End If
Else
If CurrentEntity IsNot Nothing Then
NewPosition = CurrentEntity.Position
Else
NewPosition = New Vector3(0, 0, 0)
End If
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 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
MoveEntity = Entity
End If
If Not BattleFlipped = Nothing Then
If BattleFlipped = True Then
DestinationX -= DestinationX * 2.0F
DestinationZ -= DestinationZ * 2.0F
End If
End If
If CurrentEntity Is Nothing Then
Destination = MoveEntity.Position + New Vector3(DestinationX, DestinationY, DestinationZ)
Else
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
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)
Dim baSound As BAPlaySound = New BAPlaySound(sound, startDelay, endDelay, stopMusic, IsPokemon)
AnimationSequence.Add(baSound)
End Sub
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
End Class
End Namespace

View File

@ -1,3 +0,0 @@
Public Class MoveAnimationQueryObject
End Class

View File

@ -10,7 +10,6 @@
Dim _text As String = ""
Dim _textColor As Color = Color.White
Dim _TextReady As Boolean = False
Dim _textIndex As Integer = 0
Dim _textDelay As Single = 0.015F
@ -31,6 +30,7 @@
Me._text = Me._text.Replace("~", " ")
Me._text = Me._text.Replace("<player.name>", Core.Player.Name)
Me._text = Me._text.Replace("<playername>", Core.Player.Name)
Me._text = Me._text.Replace("<rival.name>", Core.Player.RivalName)
Me._text = Me._text.Replace("<rivalname>", Core.Player.RivalName)
Me._text = Me._text.Replace("[POKE]", "Poké")
End Sub
@ -45,10 +45,6 @@
If Controls.Accept(True, True) = True And Me._textIndex > 2 Then
Me._textIndex = Me._text.Length
End If
Else
If Controls.Accept(True, True) = True Then
Me._TextReady = True
End If
End If
End Sub
@ -80,7 +76,17 @@
Dim _chooseIndex As Integer = 0
Private Sub UpdateChoose()
If Controls.Accept(True, True, True) = True Then
If _chooseIndex = 0 Then
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, Localization.GetString("battle_main_choose_pokemon"), False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
SoundManager.PlaySound("select")
Core.SetScreen(selScreen)
Else
SoundManager.PlaySound("select")
_ready = True
End If
End If
End Sub
Private Sub DrawChoose()
@ -99,25 +105,14 @@
If _chooseIndex = 0 Then
Canvas.DrawRectangle(New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 438, 80, 50), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Yes", New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.Black)
Core.SpriteBatch.DrawString(FontManager.InGameFont, "No", New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.Black)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.White)
Else
Canvas.DrawRectangle(New Rectangle(Core.windowSize.Width - 213, Core.windowSize.Height - 378, 80, 50), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Yes", New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, "No", New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.Black)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_yes"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 430), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("global_no"), New Vector2(Core.windowSize.Width - 200, Core.windowSize.Height - 370), Color.Black)
End If
If Controls.Accept(True, True, True) = True Then
If _chooseIndex = 0 Then
Dim selScreen = New PartyScreen(Core.CurrentScreen, Item.GetItemByID(5), AddressOf ChoosePokemon, "Choose Pokémon to battle!", False) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf ChoosePokemonHandler
SoundManager.PlaySound("select")
Core.SetScreen(selScreen)
Else
SoundManager.PlaySound("select")
_ready = True
End If
End If
End Sub
Dim TempScreen As BattleScreen
@ -127,20 +122,49 @@
End Sub
Private Sub ChoosePokemon(ByVal PokeIndex As Integer)
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, insertIndex)
Me._ready = True
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If PokeIndex = TempScreen.OwnPokemonIndex Then
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is already~in battle!", {}, True, False)
Else
If Pokemon.IsEgg() = False Then
If Pokemon.Status <> P3D.Pokemon.StatusProblems.Fainted Then
If BattleCalculation.CanSwitch(TempScreen, True) = False Then
Screen.TextBox.Show("Cannot switch out.", {}, True, False)
Else
Dim TempQuery = TempScreen.BattleQuery.ToArray
If TempScreen.OwnPokemonIndex <> PokeIndex Then
If TempScreen.IsRemoteBattle = True And TempScreen.IsHost = False Then
TempScreen.OppFaint = False
TempScreen.OwnStatistics.Switches += 1
TempScreen.BattleQuery.Clear()
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
TempScreen.BattleQuery.Reverse()
TempScreen.BattleQuery.AddRange(TempQuery)
Else
TempScreen.BattleQuery.Clear()
TempScreen.Battle.SwitchOutOwn(TempScreen, PokeIndex, TempScreen.BattleQuery.Count)
TempScreen.BattleQuery.Reverse()
TempScreen.BattleQuery.AddRange(TempQuery)
End If
Me._ready = True
End If
End If
Else
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is fainted!", {}, True, False)
End If
Else
Screen.TextBox.Show("Cannot switch in~the egg!", {}, True, False)
End If
End If
End Sub
#End Region
Dim insertIndex As Integer = 0
Public Sub New(ByVal BattleScreen As BattleScreen, ByVal NewPokemon As Pokemon)
MyBase.New(QueryTypes.SwitchPokemon)
Me.insertIndex = BattleScreen.BattleQuery.Count
Me.TempScreen = BattleScreen
TransformText(BattleScreen.Trainer.Name & " is about to send out a " & NewPokemon.GetDisplayName() & "! Do you want to switch your Pokémon?")
TransformText(BattleScreen.Trainer.Name & " " & Localization.GetString("battle_main_trainer_sent_out_3") & " " & NewPokemon.GetDisplayName() & Localization.GetString("battle_main_trainer_sent_out_4"))
End Sub
Dim delay As Single = 3.0F
@ -161,9 +185,11 @@
End Sub
Public Overrides Sub Draw(BV2Screen As BattleScreen)
DrawText(BV2Screen)
If TextReady = True Then
DrawChoose()
If Me._ready = False Then
DrawText(BV2Screen)
If TextReady = True Then
DrawChoose()
End If
End If
End Sub

View File

@ -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)

View File

@ -299,6 +299,8 @@ Public Class Trainer
End Select
End If
p.IsShiny = False
Pokemons.Add(p)
End If
End If

View File

@ -2,7 +2,7 @@
@text.show(Yeah, I am the designated healer.*Let me heal your Pokémon!)
@screen.fadeout
@pokemon.heal
@sound.play(pokemon_heal,true)
@sound.play(Heal_Party,true)
@level.wait(200)
@screen.fadein
@text.show(There you go!*The boss said there should~be someone trying to stop us,~so we need to be in~tip-top shape!*Let me know if you~need to be healed up!)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,10 +15,14 @@ version=2
@Register.register(clubregisters,int,0)
@player.move(0)
@player.turnto(1)
:if:<player.gender>=0
:if:<player.gender>=1
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Miss <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
:else
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Mister <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
:if:<player.gender>=0
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~Mister <player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
:else
@text.show(I'm sorry this club is for mem-*Wait.~Are you perhaps~<player.name>?*I am so sorry~for my rudeness.*Any trainer who is good~enough to be champion is~welcome at this club.*This club is intended~to be a place for powerful~trainers to hangout,~relax, and engage in~friendly battles.*Currently all of the~Gym Leaders of Kanto~and Johto are members,~but they rarely come by.*I am sure if a trainer~as strong as you told~them about this club and~asked them to join you~here they would do so.*They might even come~here willing to battle!)
:endif
:endif
@register.register(clubintro)
:endif

View File

@ -22,7 +22,7 @@ version=2
@options.show(Yes,No)
:when:Yes
@camera.reset
:if:<system.random(1,2048)>=1
:if:<system.random(1,<math.floor(<pokemon.mastershinyrate>/2)>)>=1
@register.register(shinycelebi)
:else
@register.unregister(shinycelebi)
@ -100,7 +100,7 @@ version=2
@level.wait(15)
@screen.fadeout
@sound.play(teleport)
@player.warp(routes\route22.dat,14,0.1,12,0)
@player.warp(routes\route22.dat,46,0.1,5,0)
@level.update
@camera.set(0,0.4,3,1,0)
@ -109,10 +109,10 @@ version=2
@level.update
:endif
@npc.warp(3,8,0,10)
@npc.warp(2,5,0,10)
@npc.warp(1,14,0,13)
@npc.warp(0,15,0,12)
@npc.warp(3,40,0,3)
@npc.warp(2,35,0,3)
@npc.warp(1,46,0,6)
@npc.warp(0,47,0,5)
@player.turnto(3)
@music.play(RouteMusic7)
@screen.fadein
@ -121,7 +121,7 @@ version=2
@level.wait(60)
@player.turnto(2)
@level.wait(15)
@entity.showmessagebulb(1|14|1|13)
@entity.showmessagebulb(1|46|1|6)
@npc.turn(1,3)
@level.wait(15)
@npc.turn(1,1)
@ -134,7 +134,7 @@ version=2
@text.show(Akemi: Legend has it that~Celebi isn't just a forest~guardian, as it also has~mystical powers to travel~across time.*Let me check your Pokégear~for a second.)
@level.wait(15)
@text.show(Akemi: That's it. We're three~years in the past!*But why would Celebi do this?)
@entity.showmessagebulb(1|14|1|13)
@entity.showmessagebulb(1|46|1|6)
@npc.turn(1,1)
@text.show(Wait, it seems we're not alone.~What's going on over there?)
@npc.move(1,2)
@ -156,13 +156,12 @@ version=2
@text.show(<player.rival>: I don't~understand you!*You don't make any sense!)
@npc.turn(2,1)
@text.show(.................~One day, you will understand.)
@npc.move(2,3)
@npc.turn(2,0)
@npc.move(2,5)
@npc.turn(2,2)
@npc.move(2,4)
@npc.turn(2,1)
@npc.move(2,1)
@npc.turn(2,0)
@npc.move(2,3)
@npc.warp(2,0,0,0)
@sound.play(enter)
@level.wait(30)
@text.show(<player.rival>: I don't want~to understand you!*I will never become~someone like you.*A coward when you're alone~and acting like a tyrant~when you're in front of~other cowards!*I will become strong!*I will become a stronger~man all by myself!)
@ -172,12 +171,12 @@ version=2
@camera.set(0,0.4,3,1,0)
@music.play(johto_rival_encounter)
@npc.turn(3,3)
@npc.move(3,5)
@entity.showmessagebulb(1|10|1|10)
@npc.move(3,6)
@entity.showmessagebulb(1|43|1|3)
@npc.turn(3,2)
@npc.move(3,2)
@npc.turn(3,3)
@npc.move(3,3)
@npc.move(3,2)
@npc.turn(1,3)
@text.show(<player.rival>: ...~What are you staring at?)
@npc.move(3,1)
@ -185,10 +184,11 @@ version=2
@player.move(1)
@npc.move(0,-1)
@npc.turn(3,2)
@npc.move(3,1)
@npc.move(3,2)
@player.turnto(2)
@npc.move(3,8)
@npc.turn(1,3)
@npc.turn(3,3)
@player.turnto(2)
@npc.move(3,5)
@npc.warp(3,8,-3,10)

View File

@ -47,10 +47,9 @@ version=2
@register.register(spiky)
@pokemon.cry(172)
@pokemon.add(172,50,Obtained at,161,Ilex Forest)
@pokemon.add(172,50,Obtained at,161,Ilex Forest,0,<player.name>,0,0)
@pokemon.setadditionalvalue(<pokemon.count>-1,spiky-eared)
@pokemon.setshiny(<pokemon.count>-1,0)
@pokemon.setgender(<pokemon.count>-1,1)
@pokemon.clearattacks(<pokemon.count>-1)
@pokemon.addattack(<pokemon.count>-1,231)

View File

@ -3,9 +3,10 @@ version=2
@player.move(1)
@player.turnto(2)
@text.show(Which floor would~you like to go to?)
@Options.show(1 - Pkmn Center,2 - Lounge,3 - Staff Offices,4 - Ass. Offices,5 - Dev. Offices,B6 - Basement)
:when:1 - Pkmn Center
@Options.show(1 - Pokémon Center,2 - Lounge,3 - Staff Offices,4 - Assistant Offices,5 - Developer Offices,B6 - Basement)
:when:1 - Pokémon Center
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\center.dat,12,0.1,-1,0)
@level.update
@ -13,6 +14,7 @@ version=2
:end
:when:2 - Lounge
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\lounge.dat,9,0.1,-1,0)
@level.update
@ -20,20 +22,23 @@ version=2
:end
:when:3 - Staff Offices
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\servers.dat,9,0.1,-1,0)
@level.update
@player.move(1)
:end
:when:4 - Ass. Offices
:when:4 - Assistant Offices
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\assoffices.dat,9,0.1,-1,0)
@level.update
@player.move(1)
:end
:when:5 - Dev. Offices
:when:5 - Developer Offices
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\devoffices.dat,9,0.1,-1,0)
@level.update
@ -41,6 +46,7 @@ version=2
:end
:when:B6 - Basement
@text.show(...)
@sound.play(ElevatorEnd)
@player.move(1)
@player.warp(kolben\basement.dat,9,0.1,-1,0)
@level.update

View File

@ -0,0 +1,61 @@
version=2
:if:<register.registered(Birdfact)>=false
@text.show(Oh hello there,~welcome to Kolben tower!*We may have met already,~either in Violet city or on~the discord server.~The name is Falkner~and I am known around~these parts as quite the~flying type connoisseur.)
@text.show(Say, while you are here~would you like to hear about~one of my amazing bird facts?)
@options.show(Yes,No)
:when:Yes
@register.registertime(Birdfact,1,day)
:select:<system.random(1,18)>
:when:1
@text.show(Well then listen to this.*Did you know that a~Pidgeot is not only known for~its beautiful plumage but also~for the ability to fly~at a speed of mach 2.*That is over twice~the speed of sound!)
:when:2
@text.show(Someone has found several~steel-like feathers around~Route 45.*It looks like several Skarmory~have settled on this route~as a nesting ground.*If you have any spare time~it would be worth catching one.)
:when:3
@text.show(Apparently Murkrow flocks~have been associated with omens~of bad luck since ancient times.*Heh...~If they only knew.~These birds have a strong~affection towards anything~sparkly.*Once you manage to~befriend a murkrow~it will keep bringing all sorts~of treasures to its trainer!)
:when:4
@text.show(Great!~Did you know that although a~Dodrio does not have wings~it is still capable~of short flights.*Additionally it is considered~one of the faster running~pokémon in existence,~even able to keep up with~the likes of Arcanine.)
:when:5
@text.show(Rumor has it that in faraway~lands the trio of legendary birds~have appeared in other forms.*It must be magnifiscent to see!* I wonder if they might eventually~migrate to our region...)
:when:6
@text.show(Sooo,~have you ever walked through~the tall grass at night?*If you're lucky you might~spot a Hoothoot or Noctowl.*They are supposed to~have superior vision that allows~them to see in the dark.*Don't be scared if~you encounter one though.~They only hunt small rodents.)
:when:7
@text.show(Xatu Xatu Xatu...*Apparently these birds~are always standing still~because they can see the past,~present,~and future at the same time.*To be completely honest~I don't know whether that would~be exciting or terrifying.)
:when:8
@text.show(If a Delibird ever gives~you a present I would think~twice before opening it.*Especially from the kinds~in the Johto region these~packages have been known~to explode for unknown reason.*Though during christmas~a special Delibird has been~seen flying around the region~to hand out actual presents.)
:when:9
@text.show(If you ever want to~annoy Darkfire, just tell him~that his Charizard is not~a real dragon.*Mega stones don't count man.)
:when:10
@text.show(Did you know that the~beak of a pelipper is~able to almost double in size~whenever it gulps up water?*It does not only catch~prey with that beak but can also~use it to protect young Wingull~from nature.)
:when:11
@text.show(Did I ever tell you~my favorite bird?*Well to be honest there~are too many to choose from.~If I had to pick one~however it would be either~Pidgeot,~Altaria,~or Rowlet.)
:when:12
@text.show(It is quite strange that~the classification system~within our Pokédex~miscategorizes several~birds as non-flying types.*In my opinion there should~be the posibillity to~add a third typing.*Perhaps you should~take that up with~Professor Oak?)
:when:13
@text.show(Ah Talonflame,~the scorching wind.*Did you know this pokémon~got its nickname because~whenever it flies fast enough~literal embers will drop~from between the gaps~in its feathers?)
:when:14
@text.show(Apparently wild Togekiss~are such a rare sight because~it will only appear in regions~where peace is able to thrive~without conflict.*Only a select number of~trainers are able to train~this majestic creature.)
:when:15
@text.show(Vullaby and Mandibuzz are~an extremely rare sight in both~Johto and Kanto.*But just between you and me...*On very rare occassions~you are able to spot~them behind the Violet gym.)
:when:16
@text.show(The two large tailfeathers~on a Swellow are an indication~of its health.*When they are standing up~a Swellow is perfectly healthy.*You may want to avoid~a sick one though,~as they become extremely~agressive once exposed to~any status condition.)
:when:17
@text.show(In the old days there~used to be flying dinosaurs~roaming the skies.*Apparently here on the~Sevii islands there are still~places where you can find~the fossils of these~ancient Pokémon.)
:when:18
@text.show(Ever heard of Mega Evolution?*Apparently it exists in~these regions as well~and allows for some birds~to display their true potential.*I really need to get~my hands on one~of those stones...)
:endwhen:
@text.show(Please have this beautiful~feather as a personal keepsake.)
@item.give(260,1)
@Item.messagegive(260,1)
:end
:when:No
@text.show(Ahw, what a bummer...)
:end
:endwhen
:else
@text.show(Groan... someone managed~to get trapped in a wall again.*Darkfire is gonna kill me...)
:endif
:end

View File

@ -0,0 +1,9 @@
version=2
:if:<register.registered(jappamet)>=false
@text.show(Jappa: Hiya! I'm Jasper,~but you can call me Jappa.*Did you know?~I'm a real magician!*Hehe, a code magician~to be exact!)
@register.register(jappamet)
:else
@text.show(Jappa: I hope you're enjoying~Pokémon 3D so far!*Feel free to explore~the rest of the tower!)
:endif
:end

Binary file not shown.

Binary file not shown.

View File

@ -9,10 +9,9 @@ version=2
:if:<pokemon.count>>5
@text.show(Oh, your party is full.~Go open some space to claim~your Pokémon!)
:else
@pokemon.add(172,40,A gift from Omega,45,at Kolben Tower,0,Omega)
@pokemon.add(172,40,A gift from Omega,45,at Kolben Tower,0,Omega,0,1)
@text.show(Ah yes, your prize.*This Pichu is special:~I heard it was found~near the shrine in~Ilex Forest.*I wonder what happens if~you take it back there.*Anyway, here it is!)
@pokemon.setshiny(<pokemon.count>-1,1)
@pokemon.setgender(<pokemon.count>-1,0)
@pokemon.clearattacks(<pokemon.count>-1)
@pokemon.addattack(<pokemon.count>-1,344)

View File

@ -22,9 +22,8 @@ version=2
@text.show(Oh, your party is full.~Go open some space to claim~your Pokémon!)
:end
:else
@pokemon.add(172,50,A gift from Omega,45,at Kolben Tower,0,Omega)
@pokemon.add(172,50,A gift from Omega,45,at Kolben Tower,0,Omega,0,1)
@text.show(Ah yes, your prize.*This Pichu is special:~I found it near the Ilex~Forest shrine.*I wonder what happens if~you take it back there.*Anyway, here it is!)
@pokemon.setshiny(<pokemon.count>-1,1)
@pokemon.setgender(<pokemon.count>-1,0)
@pokemon.clearattacks(<pokemon.count>-1)
@pokemon.addattack(<pokemon.count>-1,344)
@ -57,9 +56,8 @@ version=2
@text.show(Oh, your party is full.~Go open some space to claim~your Pokémon!)
:end
:else
@pokemon.add(172,50,A gift from Omega,45,at Kolben Tower,0,Omega)
@pokemon.add(172,50,A gift from Omega,45,at Kolben Tower,0,Omega,0,1)
@text.show(Ah yes, your prize.*This Pichu is special:~I found it near the Ilex~Forest shrine.*I wonder what happens if~you take it back there.*Anyway, here it is!)
@pokemon.setshiny(<pokemon.count>-1,1)
@pokemon.setgender(<pokemon.count>-1,0)
@pokemon.clearattacks(<pokemon.count>-1)
@pokemon.addattack(<pokemon.count>-1,344)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More