Models work better in battle now

This commit is contained in:
JappaWakka 2022-09-27 12:51:51 +02:00
parent 6bb3f596ca
commit d2860b15a8
29 changed files with 298 additions and 277 deletions

View File

@ -3,21 +3,19 @@
Inherits BattleAnimation3D
Dim TargetEntity As NPC
Dim TargetModel As Entity = Nothing
Dim EndFaceRotation As Integer
Dim TurnSteps As Integer = 0
Dim TurnSpeed As Integer = 1
Dim TurnTime As Single = 0.0F
Dim TurnDelay As Single = 0.0F
Public Sub New(ByVal TargetEntity As NPC, ByVal TurnSteps As Integer, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal EndFaceRotation As Integer = -1, Optional ByVal TurnSpeed As Integer = 1, Optional ByVal TurnDelay As Single = 0.25F, Optional TargetModel As Entity = Nothing)
Public Sub New(ByVal TargetEntity As NPC, ByVal TurnSteps As Integer, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal EndFaceRotation As Integer = -1, Optional ByVal TurnSpeed As Integer = 1, Optional ByVal TurnDelay As Single = 0.25F)
MyBase.New(New Vector3(0.0F), TextureManager.DefaultTexture, New Vector3(1.0F), startDelay, endDelay)
If EndFaceRotation = -1 Then
Me.EndFaceRotation = TargetEntity.faceRotation
Else
Me.EndFaceRotation = EndFaceRotation
End If
Me.TargetModel = TargetModel
Me.TurnSteps = TurnSteps
Me.TargetEntity = TargetEntity
Me.TurnSpeed = TurnSpeed
@ -34,9 +32,6 @@
If Me.TargetEntity.faceRotation < 0 Then
Me.TargetEntity.faceRotation += 4
End If
If Me.TargetModel IsNot Nothing Then
Me.TargetModel.Rotation = Entity.GetRotationFromInteger(Me.TargetEntity.faceRotation)
End If
Me.TurnSteps -= TurnSpeed.ToPositive()
Me.TurnTime = TurnDelay
Else
@ -45,9 +40,6 @@
Else
If Me.TargetEntity.faceRotation <> Me.EndFaceRotation Then
Me.TargetEntity.faceRotation = Me.EndFaceRotation
If Me.TargetModel IsNot Nothing Then
Me.TargetModel.Rotation = Entity.GetRotationFromInteger(Me.EndFaceRotation)
End If
End If
Me.Ready = True
End If

View File

@ -75,6 +75,12 @@
End Sub
Private Sub Move()
Dim DestinationOffset As Vector3 = New Vector3(0)
If TargetEntity.Model IsNot Nothing Then
DestinationOffset = New Vector3(0, -0.5, 0)
End If
Select Case MovementCurve
Case Curves.EaseIn
If EasedIn = False Then
@ -128,17 +134,17 @@
TargetEntity.Position.X = Me.Destination.X
End If
End If
If TargetEntity.Position.Y < Me.Destination.Y Then
If TargetEntity.Position.Y < Me.Destination.Y + DestinationOffset.Y Then
TargetEntity.Position.Y += Me.MoveYSpeed
If TargetEntity.Position.Y >= Me.Destination.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
If TargetEntity.Position.Y >= Me.Destination.Y + DestinationOffset.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
End If
ElseIf TargetEntity.Position.Y > Me.Destination.Y Then
ElseIf TargetEntity.Position.Y > Me.Destination.Y + DestinationOffset.Y Then
TargetEntity.Position.Y -= Me.MoveYSpeed
If TargetEntity.Position.Y <= Me.Destination.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y
If TargetEntity.Position.Y <= Me.Destination.Y + DestinationOffset.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
@ -166,15 +172,15 @@
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
If TargetEntity.Position.Y < Me.Destination.Y + DestinationOffset.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y + DestinationOffset.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y > Me.Destination.Y + DestinationOffset.Y - 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.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
ElseIf TargetEntity.Position.Y > Me.Destination.Y + DestinationOffset.Y Then
TargetEntity.Position.Y = MathHelper.Lerp(TargetEntity.Position.Y, Me.Destination.Y + DestinationOffset.Y, Me.InterpolationSpeed)
If TargetEntity.Position.Y < Me.Destination.Y + DestinationOffset.Y + 0.05 Then
TargetEntity.Position.Y = Me.Destination.Y + DestinationOffset.Y
End If
End If
If TargetEntity.Position.Z < Me.Destination.Z Then
@ -189,7 +195,7 @@
End If
End If
End If
If TargetEntity.Position = Destination Then
If TargetEntity.Position = Destination + DestinationOffset Then
Me.Ready = True
End If
End Sub

View File

@ -15,7 +15,6 @@
Me.FadeIn = FadeIn
Me.TransitionSpeed = TransitionSpeed
Me.TargetEntity = entity
Me.TargetEntity.NormalOpacity = StartState
Me.Visible = False

View File

@ -0,0 +1,36 @@
Public Class BAEntitySetPosition
Inherits BattleAnimation3D
Public TargetEntity As Entity
Public SetPosition As Vector3
Public RemoveEntityAfter As Boolean
Public Sub New(ByRef Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal SetPosition 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.SetPosition = SetPosition
Me.Visible = False
Me.TargetEntity = Entity
Me.AnimationType = AnimationTypes.Move
End Sub
Public Overrides Sub DoActionActive()
Dim SetPositionOffset As Vector3 = New Vector3(0)
If TargetEntity.Model IsNot Nothing Then
SetPositionOffset = New Vector3(0, -0.5, 0)
End If
TargetEntity.Position = Me.SetPosition + SetPositionOffset
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

@ -1434,8 +1434,8 @@
ConfusedAnimation.AnimationPlaySound("Battle\Effects\Confused", 0, 0)
Dim DuckEntity1 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(-0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
@ -2716,7 +2716,7 @@
If BattleScreen.IsTrainerBattle = False AndAlso Core.Player.ShowBattleAnimations <> 0 Then
If own = False Then
Dim FaintAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
Dim FaintAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True)
FaintAnimation.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
FaintAnimation.AnimationMove(Nothing, False, 0, -1, 0, 0.05, False, False, 2, 2)
BattleScreen.BattleQuery.Add(FaintAnimation)
@ -3570,12 +3570,12 @@
Me.ChangeCameraAngle(1, own, BattleScreen)
'Confused Animation
If Core.Player.ShowBattleAnimations <> 0 Then
Dim ConfusedAnimation As New AnimationQueryObject(pNPC, Not own)
Dim ConfusedAnimation As New AnimationQueryObject(pNPC, own)
ConfusedAnimation.AnimationPlaySound("Battle\Effects\Confused", 0, 0)
Dim DuckEntity1 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(-0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, -0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity2 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0, 0.25, 0), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
Dim DuckEntity3 As Entity = ConfusedAnimation.SpawnEntity(New Vector3(0.25, 0.25, 0.25), TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.25F), 1, 0, 0)
ConfusedAnimation.AnimationChangeTexture(DuckEntity1, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
ConfusedAnimation.AnimationChangeTexture(DuckEntity2, False, TextureManager.GetTexture("Textures\Battle\StatusEffect\Confused", New Rectangle(0, 16, 16, 16), ""), 0.75F, 0)
@ -4049,6 +4049,7 @@
val = 6 + statC
End If
End If
Me.ChangeCameraAngle(1, own, BattleScreen)
'***STAT DECREASE ANIMATION***
If Core.Player.ShowBattleAnimations <> 0 Then
Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(Nothing, False)
@ -4084,13 +4085,10 @@
printMessage &= " slightly fell."
End Select
Select Case statString
Case "attack"
p.StatAttack -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4107,7 +4105,6 @@
Case "defense"
p.StatDefense -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4124,7 +4121,6 @@
Case "special attack"
p.StatSpAttack -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4141,7 +4137,6 @@
Case "special defense"
p.StatSpDefense -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4158,7 +4153,6 @@
Case "speed"
p.StatSpeed -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4175,7 +4169,6 @@
Case "evasion"
p.Evasion -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4192,7 +4185,6 @@
Case "accuracy"
p.Accuracy -= val
Me.ChangeCameraAngle(1, own, BattleScreen)
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
@ -4377,11 +4369,9 @@
Public Sub ReduceHP(ByVal HPAmount As Integer, ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String, ByVal sound As String)
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim pNPC As Entity = BattleScreen.OwnPokemonNPC
Dim pModel As Entity = BattleScreen.OwnPokemonModel
If own = False Then
p = BattleScreen.OppPokemon
pNPC = BattleScreen.OppPokemonNPC
pModel = BattleScreen.OppPokemonModel
End If
If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
@ -4398,7 +4388,7 @@
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
End If
If Core.Player.ShowBattleAnimations <> 0 Then
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own, pModel)
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
@ -5929,7 +5919,7 @@
'Whirlpool Animation
If Core.Player.ShowBattleAnimations <> 0 Then
Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, False,, True)
Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OwnPokemonNPC, False, True)
WhirlpoolAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
Dim WhirlpoolEntity As Entity = WhirlpoolAnimation.SpawnEntity(New Vector3(0, -0.3, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)
@ -6806,7 +6796,7 @@
ChangeCameraAngle(1, False, BattleScreen)
'Whirlpool Animation
If Core.Player.ShowBattleAnimations <> 0 Then
Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, True,, True)
Dim WhirlpoolAnimation As AnimationQueryObject = New AnimationQueryObject(.OppPokemonNPC, True, True)
WhirlpoolAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
Dim WhirlpoolEntity As Entity = WhirlpoolAnimation.SpawnEntity(New Vector3(0, -0.3, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
WhirlpoolAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)
@ -7352,14 +7342,20 @@
BattleScreen.AddToQuery(InsertIndex, New TextQueryObject(insertMessage))
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False, BattleScreen.OwnPokemonModel)
Dim PositionOffsetY As Single = 0.0F
If BattleScreen.OwnPokemonNPC.Model IsNot Nothing Then
PositionOffsetY = 0.5F
End If
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
If Core.Player.ShowBattleAnimations <> 0 Then
' Ball Closes
BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
Dim SmokeReturned As Integer = 0
Do
Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination As Vector3 = New Vector3(0, 0, 0)
Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10) + PositionOffsetY, CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination As Vector3 = New Vector3(0, PositionOffsetY, 0)
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
@ -7376,12 +7372,11 @@
' Pokemon disappears
BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
If Core.Player.ShowBattleAnimations <> 0 Then
BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
' Ball returns
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(Nothing, BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(New Vector3(0, 0 + PositionOffsetY, 0), BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
BallReturn.AnimationMove(BallReturnEntity, True, -2, 0 + PositionOffsetY, 0, 0.1, False, True, 1, 0,, 0.3)
End If
BattleScreen.AddToQuery(InsertIndex, BallReturn)
@ -7408,6 +7403,7 @@
ownShiny = "S"
End If
Dim FallOffset = 0.0F
Dim ownModel As String = BattleScreen.GetModelName(True)
If ownModel = "" Then
BattleScreen.AddToQuery(InsertIndex, New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OwnPokemon, PokemonForms.GetOverworldSpriteName(BattleScreen.OwnPokemon), 0, 1, -1, -1))
@ -7418,27 +7414,27 @@
BattleScreen.AddToQuery(InsertIndex, New TextQueryObject("Go, " & BattleScreen.OwnPokemon.GetDisplayName() & "!"))
' Ball is thrown
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False, BattleScreen.OwnPokemonModel)
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
If Core.Player.ShowBattleAnimations <> 0 Then
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
Dim BallThrowEntity As Entity = BallThrow.SpawnEntity(New Vector3(-2, -0.15, 0), BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, -0.3,, 0.025F)
Dim BallThrowEntity As Entity = BallThrow.SpawnEntity(New Vector3(-2, CSng(-0.15 + PositionOffsetY), 0), BattleScreen.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
BallThrow.AnimationMove(BallThrowEntity, True, 0, CSng(0.35 + PositionOffsetY), 0, 0.1, False, True, 0F, 0.5F,, -0.3,, 0.025F)
' Ball Opens
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
Dim SmokeSpawned As Integer = 0
Do
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10) + PositionOffsetY, CSng(Random.Next(-10, 10) / 10))
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
Dim SmokeEntity As Entity = BallThrow.SpawnEntity(Nothing, SmokeTexture, SmokeScale, 1.0F, 3)
Dim SmokeEntity As Entity = BallThrow.SpawnEntity(New Vector3(0, PositionOffsetY, 0), SmokeTexture, SmokeScale, 1.0F, 3)
BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
Threading.Interlocked.Increment(SmokeSpawned)
@ -7447,10 +7443,11 @@
If Core.Player.ShowBattleAnimations <> 0 Then
' Pokemon appears
BallThrow.AnimationSetPosition(Nothing, False, 12, CSng(0.5), 13, 0, 0)
BallThrow.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
BallThrow.AnimationPlaySound(CStr(BattleScreen.OwnPokemon.Number), 4, 0,, True)
' Pokémon falls down
BallThrow.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0,,, 3)
BallThrow.AnimationMove(Nothing, False, 0, 0 + PositionOffsetY, 0, 0.05F, False, False, 5, 0,,, 3)
Else
' Pokemon appears
BallThrow.AnimationFade(Nothing, False, 1, True, 1, 0, 0)
@ -7728,7 +7725,7 @@
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If Core.Player.ShowBattleAnimations <> 0 Then
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True)
' Ball Closes
BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
Dim SmokeReturned As Integer = 0
@ -7794,7 +7791,7 @@
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
If Core.Player.ShowBattleAnimations <> 0 Then
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True)
' Ball Closes
BallReturn.AnimationPlaySound("Battle\Pokeball\Open", 0, 0)
@ -7852,7 +7849,7 @@
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 1, -1, -1, -1, -1))
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Go, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False, BattleScreen.OppPokemonModel)
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
If Core.Player.ShowBattleAnimations <> 0 Then
' Ball is thrown

View File

@ -60,9 +60,6 @@
Public OwnTrainerNPC As NPC
Public OppTrainerNPC As NPC
Public OwnPokemonModel As Entity
Public OppPokemonModel As Entity
Public OwnPokemonIndex As Integer = 0
Public OppPokemonIndex As Integer = 0
@ -85,7 +82,7 @@
Public DrawColoredScreen As Boolean = True
Public ColorOverlay As Color = Color.Black
Public BattleMapOffset As New Vector3(0)
Public Shared BattleMapOffset As New Vector3(0)
Public Overrides Function GetScreenStatus() As String
Dim pokemonString As String = "OwnPokemon=OWNEMPTY" & Environment.NewLine &
@ -223,29 +220,29 @@
End If
Dim ownModel As String = GetModelName(True)
Dim OwnEntityOffsetY As Single = 0.0F
Dim oppModel As String = GetModelName(False)
Dim OppEntityOffsetY As Single = 0.0F
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)}, 1), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("WallBlock", New Vector3(12, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Models\Pokemon\Bulbasaur\Normal"), WallBlock)
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("WallBlock", New Vector3(12, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, 1,,, ownModel), WallBlock)
If ownModel <> "" Then
OwnEntityOffsetY = -0.5F
End If
If oppModel <> "" Then
OppEntityOffsetY = -0.5F
End If
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, OwnEntityOffsetY, 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,,, ownModel), NPC)
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 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)},,,, oppModel), NPC)
If ownModel <> "" Then
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
If oppModel <> "" Then
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OwnPokemonModel)
If oppModel = "" Then
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("WallBlock", New Vector3(15, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Models\Pokemon\Bulbasaur\Normal"), WallBlock)
Else
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("WallBlock", New Vector3(15, -0.5F, 13) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, oppModel), WallBlock)
End If
Screen.Level.Entities.Add(OppPokemonNPC)
Screen.Level.Entities.Add(OppPokemonModel)
Dim ownSkin As String = Core.Player.Skin
If SavedOverworld.Level.Surfing = True Then
@ -356,40 +353,42 @@
oppShiny = "S"
End If
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, 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("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Pokemon\Models\Bulbasaur\Normal"), WallBlock)
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, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, InitiallyVisibleOwn,,, ownModel), WallBlock)
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, 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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Models\Bulbasaur\Normal"), WallBlock)
Else
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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, InitiallyVisibleOpp,,, oppModel), WallBlock)
Dim ownModel As String = GetModelName(True)
Dim oppModel As String = GetModelName(False)
Dim OwnEntityOffsetY As Single = 0.0F
Dim OppEntityOffsetY As Single = 0.0F
If ownModel <> "" Then
OwnEntityOffsetY = -0.5F
End If
If oppModel <> "" Then
OppEntityOffsetY = -0.5F
End If
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, OwnEntityOffsetY, 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)}, InitiallyVisibleOwn,,, ownModel), NPC)
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, OppEntityOffsetY, 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)}, InitiallyVisibleOpp,,, oppModel), NPC)
If ownModel <> "" Then
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
If oppModel <> "" Then
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OppPokemonNPC)
Screen.Level.Entities.Add(OppPokemonModel)
Dim ownSkin As String = Core.Player.Skin
If SavedOverworld.Level.Surfing = True Then
@ -414,27 +413,38 @@
Dim q1 As TextQueryObject = New TextQueryObject(Trainer.Name & " " & "wants to battle!")
Dim q11 As TextQueryObject = New TextQueryObject(Trainer.Name & ": """ & "Go," & " " & OppPokemon.GetDisplayName() & "!""")
Dim OppAnimationOffsetY As Single = 0.0F
If OppPokemonNPC.Model IsNot Nothing Then
OppAnimationOffsetY = 0.5F
End If
Dim OwnAnimationOffsetY As Single = 0.0F
If OwnPokemonNPC.Model IsNot Nothing Then
OwnAnimationOffsetY = 0.5F
End If
' Ball is thrown
Dim BallThrowOpp As AnimationQueryObject = New AnimationQueryObject(OppPokemonNPC, False, OppPokemonModel)
Dim BallThrowOpp As AnimationQueryObject = New AnimationQueryObject(OppPokemonNPC, False)
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)
BallThrowOpp.AnimationSetPosition(Nothing, False, 15, CSng(0.5 + OppEntityOffsetY), 13, 0, 0)
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)
BallThrowOpp.AnimationMove(BallThrowEntity, True, 0, CSng(0.35 + OppAnimationOffsetY), 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 SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10) + OppAnimationOffsetY, 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)
Dim SmokeEntity As Entity = BallThrowOpp.SpawnEntity(New Vector3(0, OppAnimationOffsetY, 0), 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)
@ -466,27 +476,27 @@
If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
' Ball is thrown
Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False)
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)
BallThrowOwn.AnimationMove(BallThrowEntity, True, 0, CSng(0.35 + OwnAnimationOffsetY), 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 SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10) + OwnAnimationOffsetY, 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)
Dim SmokeEntity As Entity = BallThrowOwn.SpawnEntity(New Vector3(0, OwnAnimationOffsetY, 0), 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)
@ -576,29 +586,31 @@
End If
Dim ownModel As String = GetModelName(True)
Dim oppModel As String = GetModelName(False)
Dim OwnEntityOffsetY As Single = 0.0F
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, "", 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("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Models\Bulbasaur\Normal"), WallBlock)
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("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, ownModel), WallBlock)
Dim oppModel As String = GetModelName(False)
Dim OppEntityOffsetY As Single = 0.0F
If ownModel <> "" Then
OwnEntityOffsetY = -0.5F
End If
If oppModel <> "" Then
OppEntityOffsetY = -0.5F
End If
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0 + OwnEntityOffsetY, 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,,, ownModel), NPC)
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 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)},,,, oppModel), NPC)
If ownModel <> "" Then
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
If oppModel <> "" Then
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OwnPokemonModel)
If oppModel = "" Then
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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Models\Bulbasaur\Normal"), WallBlock)
Else
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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, oppModel), WallBlock)
End If
Screen.Level.Entities.Add(OppPokemonNPC)
Screen.Level.Entities.Add(OppPokemonModel)
Dim ownSkin As String = Core.Player.Skin
If SavedOverworld.Level.Surfing = True Then
@ -688,29 +700,31 @@
End If
Dim ownModel As String = GetModelName(True)
Dim oppModel As String = GetModelName(False)
Dim OwnEntityOffsetY As Single = 0.0F
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, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, 1), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Pokemon\Models\Bulbasaur\Normal"), WallBlock)
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, OwnPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}), NPC)
OwnPokemonModel = CType(Entity.GetNewEntity("WallBlock", New Vector3(12, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 0.5F, 0), New Vector3(OwnPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing, 1,,, ownModel), WallBlock)
Dim oppModel As String = GetModelName(False)
Dim OppEntityOffsetY As Single = 0.0F
If ownModel <> "" Then
OwnEntityOffsetY = -0.5F
End If
If oppModel <> "" Then
OppEntityOffsetY = -0.5F
End If
OwnPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(12, 0 + OwnEntityOffsetY, 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,,, ownModel), NPC)
OppPokemonNPC = CType(Entity.GetNewEntity("NPC", New Vector3(15, 0 + OppEntityOffsetY, 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)},,,, oppModel), NPC)
If ownModel <> "" Then
OwnPokemonNPC.Scale = New Vector3(OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
If oppModel <> "" Then
OppPokemonNPC.Scale = New Vector3(OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
End If
Screen.Level.Entities.Add(OwnPokemonNPC)
Screen.Level.Entities.Add(OwnPokemonModel)
If oppModel = "" Then
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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 0, "", False, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, "Pokemon\Models\Bulbasaur\Normal"), WallBlock)
Else
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("WallBlock", New Vector3(15, -0.5F, 12.5F) + BattleMapOffset, {}, {}, False, New Vector3(0, MathHelper.Pi * 1.5F, 0), New Vector3(OppPokemon.GetModelProperties().Item1), BaseModel.BlockModel, 1, "", True, New Vector3(1), 0, "", "", New Vector3(0), Nothing,,,, oppModel), WallBlock)
End If
Screen.Level.Entities.Add(OppPokemonNPC)
Screen.Level.Entities.Add(OppPokemonModel)
Dim ownSkin As String = Core.Player.Skin
If SavedOverworld.Level.Surfing = True Then
@ -866,12 +880,6 @@
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()
@ -1097,12 +1105,20 @@ nextIndex:
End Sub
Public Function FocusOwnPokemon() As QueryObject
Dim q As New CameraQueryObject(New Vector3(Me.OwnPokemonNPC.Position.X + 1.0F, Me.OwnPokemonNPC.Position.Y + 0.5F, Me.OwnPokemonNPC.Position.Z + 1.0F) - BattleMapOffset, Screen.Camera.Position, 0.06F, 0.06F, CSng(MathHelper.PiOver4) + 0.05F, Screen.Camera.Yaw, -0.3F, Screen.Camera.Pitch, 0.04F, 0.04F)
Dim PositionOffsetY As Single = 0.0F
If Me.OwnPokemonNPC.Model IsNot Nothing Then
PositionOffsetY = 0.5
End If
Dim q As New CameraQueryObject(New Vector3(Me.OwnPokemonNPC.Position.X + 1.0F, Me.OwnPokemonNPC.Position.Y + 0.5F + PositionOffsetY, Me.OwnPokemonNPC.Position.Z + 1.0F) - BattleMapOffset, Screen.Camera.Position, 0.06F, 0.06F, CSng(MathHelper.PiOver4) + 0.05F, Screen.Camera.Yaw, -0.3F, Screen.Camera.Pitch, 0.04F, 0.04F)
Return q
End Function
Public Function FocusOppPokemon() As QueryObject
Dim q As New CameraQueryObject(New Vector3(Me.OppPokemonNPC.Position.X - 1.0F, Me.OppPokemonNPC.Position.Y + 0.5F, Me.OppPokemonNPC.Position.Z + 1.0F) - BattleMapOffset, Screen.Camera.Position, 0.06F, 0.06F, -CSng(MathHelper.PiOver4) - 0.05F, Screen.Camera.Yaw, -0.3F, Screen.Camera.Pitch, 0.04F, 0.04F)
Dim PositionOffsetY As Single = 0.0F
If Me.OppPokemonNPC.Model IsNot Nothing Then
PositionOffsetY = 0.5
End If
Dim q As New CameraQueryObject(New Vector3(Me.OppPokemonNPC.Position.X - 1.0F, Me.OppPokemonNPC.Position.Y + 0.5F + PositionOffsetY, Me.OppPokemonNPC.Position.Z + 1.0F) - BattleMapOffset, Screen.Camera.Position, 0.06F, 0.06F, -CSng(MathHelper.PiOver4) - 0.05F, Screen.Camera.Yaw, -0.3F, Screen.Camera.Pitch, 0.04F, 0.04F)
Return q
End Function

View File

@ -9,7 +9,6 @@
Public AnimationSequence As List(Of BattleAnimation3D)
Public SpawnedEntities As List(Of Entity)
Public CurrentEntity As Entity
Public CurrentModel As Entity
Public DrawBeforeEntities As Boolean
Public Overrides ReadOnly Property IsReady As Boolean
@ -18,7 +17,7 @@
End Get
End Property
Public Sub New(ByVal entity As Entity, ByVal BattleFlipped As Boolean, Optional ByVal model As Entity = Nothing, Optional DrawBeforeEntities As Boolean = False)
Public Sub New(ByVal entity As Entity, ByVal BattleFlipped As Boolean, Optional DrawBeforeEntities As Boolean = False)
MyBase.New(QueryTypes.MoveAnimation)
Me.AnimationSequence = New List(Of BattleAnimation3D)
Me.SpawnedEntities = New List(Of Entity)
@ -27,9 +26,6 @@
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)
@ -101,7 +97,7 @@
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
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, Optional ModelPath As String = "") As Entity
Dim NewPosition As Vector3
If Not Position = Nothing Then
If BattleFlipped = True Then
@ -123,6 +119,19 @@
SpawnedEntity.Opacity = Opacity
SpawnedEntity.Visible = False
If ModelPath <> "" Then
SpawnedEntity.ModelPath = ModelPath
SpawnedEntity.Model = ModelManager.GetModel(SpawnedEntity.ModelPath)
SpawnedEntity.Scale *= ModelManager.MODELSCALE
If BattleFlipped = True Then
Dim FlipRotation As Integer = Entity.GetRotationFromVector(SpawnedEntity.Rotation)
FlipRotation += 2
If FlipRotation > 3 Then
FlipRotation -= 4
End If
SpawnedEntity.Rotation.Y = Entity.GetRotationFromInteger(FlipRotation).Y
End If
End If
SpawnedEntities.Add(SpawnedEntity)
Return SpawnedEntity
@ -146,22 +155,19 @@
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 *= -1.0F
DestinationZ *= -1.0F
If SpinZ = True Then
SpinXSpeed *= -1.0F
SpinZSpeed *= -1.0F
@ -177,21 +183,29 @@
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 Sub
Public Sub AnimationSetPosition(ByVal Entity As Entity, ByVal RemoveEntityAfter As Boolean, ByVal PositionX As Single, ByVal PositionY As Single, ByVal PositionZ As Single, ByVal startDelay As Single, ByVal endDelay As Single)
Dim SetEntity As Entity
Dim SetPosition As Vector3
If Entity Is Nothing Then
SetEntity = CurrentEntity
Else
SetEntity = Entity
End If
SetPosition = New Vector3(PositionX, PositionY, PositionZ) + BattleScreen.BattleMapOffset
Dim baEntitySetPosition As BAEntitySetPosition = New BAEntitySetPosition(SetEntity, RemoveEntityAfter, SetPosition, startDelay, endDelay)
AnimationSequence.Add(baEntitySetPosition)
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
@ -199,20 +213,11 @@
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
@ -222,21 +227,13 @@
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 baModelRotate As BAEntityRotate = New BAEntityRotate(CType(RotateModel, Entity), False, RotationSpeedVector, EndRotation, startDelay, endDelay, DoXRotation, DoYRotation, DoZRotation, DoReturn)
AnimationSequence.Add(baModelRotate)
End If
End Sub
Public Sub AnimationTurnNPC(ByVal TurnSteps As Integer, ByVal startDelay As Single, ByVal endDelay As Single, Optional ByVal EndFaceRotation As Integer = -1, Optional ByVal TurnSpeed As Integer = 1, Optional ByVal TurnDelay As Single = 0.25F)
Dim TurnNPC As NPC = Nothing
Dim TurnModel As Entity = Nothing
If CurrentEntity IsNot Nothing Then
TurnNPC = CType(CurrentEntity, NPC)
If Me.CurrentModel IsNot Nothing Then
TurnModel = Me.CurrentModel
End If
End If
If Not BattleFlipped = Nothing AndAlso BattleFlipped = True Then
@ -244,17 +241,19 @@
TurnSpeed *= -1
End If
Dim BAEntityFaceRotate As BAEntityFaceRotate = New BAEntityFaceRotate(TurnNPC, TurnSteps, startDelay, endDelay, EndFaceRotation, TurnSpeed, TurnDelay, TurnModel)
Dim BAEntityFaceRotate As BAEntityFaceRotate = New BAEntityFaceRotate(TurnNPC, TurnSteps, startDelay, endDelay, EndFaceRotation, TurnSpeed, TurnDelay)
AnimationSequence.Add(BAEntityFaceRotate)
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
If ScaleEntity.Model IsNot Nothing Then
EndSizeX *= ModelManager.MODELSCALE
EndSizeY *= ModelManager.MODELSCALE
EndSizeZ *= ModelManager.MODELSCALE
SizeSpeed *= ModelManager.MODELSCALE
End If
Else
ScaleEntity = Entity
@ -264,10 +263,6 @@
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)

View File

@ -79,16 +79,9 @@
Public Overrides Sub Update(BV2Screen As BattleScreen)
If changedIDs = False Then
changedIDs = True
If Me.ownModelID > -1 Then
BV2Screen.OwnPokemonModel.ID = ownModelID
End If
If Me.ownNPCID > -1 Then
BV2Screen.OwnPokemonNPC.ID = ownNPCID
End If
If Me.oppModelID > -1 Then
BV2Screen.OppPokemonModel.ID = oppModelID
End If
If Me.oppNPCID > -1 Then
BV2Screen.OppPokemonNPC.ID = oppNPCID
End If
@ -98,37 +91,34 @@
Case 0
Select Case Me._entity
Case BattleEntities.OwnPokemon
If BV2Screen.OwnPokemonNPC.ID = 1 Then
BV2Screen.OwnPokemonNPC.Visible = GetVisible(BV2Screen.OwnPokemonNPC.Visible)
BV2Screen.OwnPokemonModel.Visible = False
Else
BV2Screen.OwnPokemonModel.Visible = GetVisible(BV2Screen.OwnPokemonModel.Visible)
BV2Screen.OwnPokemonNPC.Visible = False
End If
BV2Screen.OwnPokemonNPC.Visible = GetVisible(BV2Screen.OwnPokemonNPC.Visible)
Case BattleEntities.OppPokemon
If BV2Screen.OppPokemonNPC.ID = 1 Then
BV2Screen.OppPokemonNPC.Visible = GetVisible(BV2Screen.OppPokemonNPC.Visible)
BV2Screen.OppPokemonModel.Visible = False
Else
BV2Screen.OppPokemonModel.Visible = GetVisible(BV2Screen.OppPokemonModel.Visible)
BV2Screen.OppPokemonNPC.Visible = False
End If
BV2Screen.OppPokemonNPC.Visible = GetVisible(BV2Screen.OppPokemonNPC.Visible)
End Select
Case 1
Select Case Me._entity
Case BattleEntities.OwnPokemon
BV2Screen.OwnPokemonNPC.ModelPath = ""
BV2Screen.OwnPokemonNPC.Model = Nothing
BV2Screen.OwnPokemonNPC.Scale = New Vector3(1)
BV2Screen.OwnPokemonNPC.SetupSprite(_newTexture, "", False)
Case BattleEntities.OppPokemon
BV2Screen.OppPokemonNPC.ModelPath = ""
BV2Screen.OppPokemonNPC.Model = Nothing
BV2Screen.OppPokemonNPC.Scale = New Vector3(1)
BV2Screen.OppPokemonNPC.SetupSprite(_newTexture, "", False)
End Select
Case 2
Select Case Me._entity
Case BattleEntities.OwnPokemon
BV2Screen.OwnPokemonModel.ModelPath = _newTexture
BV2Screen.OwnPokemonModel.Model = ModelManager.GetModel(BV2Screen.OwnPokemonModel.ModelPath)
BV2Screen.OwnPokemonNPC.Scale = New Vector3(BV2Screen.OwnPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
BV2Screen.OwnPokemonNPC.ModelPath = _newTexture
BV2Screen.OwnPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OwnPokemonNPC.ModelPath)
Case BattleEntities.OppPokemon
BV2Screen.OppPokemonModel.ModelPath = _newTexture
BV2Screen.OppPokemonModel.Model = ModelManager.GetModel(BV2Screen.OppPokemonModel.ModelPath)
BV2Screen.OppPokemonNPC.Scale = New Vector3(BV2Screen.OppPokemon.GetModelProperties().Item1) * ModelManager.MODELSCALE
BV2Screen.OppPokemonNPC.ModelPath = _newTexture
BV2Screen.OppPokemonNPC.Model = ModelManager.GetModel(BV2Screen.OppPokemonNPC.ModelPath)
End Select
End Select
_done = True

View File

@ -651,7 +651,7 @@
If part.Effect.GetType().Name.ToLower() = Screen.Effect.GetType().Name.ToLower() Then
With CType(part.Effect, BasicEffect)
Lighting.UpdateLighting(CType(part.Effect, BasicEffect), True)
.Alpha = Me.Opacity
.DiffuseColor = Screen.Effect.DiffuseColor
If Not Screen.Level.World Is Nothing Then

View File

@ -481,8 +481,12 @@
Me.Rotation.Y = Screen.Camera.Yaw
End If
Else
If Me.Rotation.Y <> faceRotation Then
Me.Rotation.Y = GetRotationFromInteger(faceRotation).Y
Dim ChangeRotation As Integer = faceRotation + 2
If ChangeRotation > 3 Then
ChangeRotation -= 4
End If
If Me.Rotation.Y <> ChangeRotation Then
Me.Rotation.Y = GetRotationFromInteger(ChangeRotation).Y
End If
End If

View File

@ -28207,6 +28207,7 @@
<Compile Include="Battle\BattleAnimations\BAEntityColor.vb" />
<Compile Include="Battle\BattleAnimations\BABackground.vb" />
<Compile Include="Battle\BattleAnimations\BAEntityFaceRotate.vb" />
<Compile Include="Battle\BattleAnimations\BAEntitySetPosition.vb" />
<Compile Include="Battle\BattleAnimations\BAEntityRotate.vb" />
<Compile Include="Battle\BattleAnimations\BAEntityMove.vb" />
<Compile Include="Battle\BattleAnimations\BAEntityOpacity.vb" />

View File

@ -2168,18 +2168,16 @@
Dim BattleFlip As Boolean = False
Dim CurrentPokemon As Pokemon = BattleScreen.OwnPokemon
Dim CurrentEntity As NPC = BattleScreen.OwnPokemonNPC
Dim CurrentModel As Entity = BattleScreen.OwnPokemonModel
If own = False Then
BattleFlip = True
CurrentPokemon = BattleScreen.OppPokemon
CurrentEntity = BattleScreen.OppPokemonNPC
CurrentModel = BattleScreen.OppPokemonModel
End If
Me.InternalUserPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity, CurrentModel)
Me.InternalUserPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
End If
End Sub
Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
'Override this method in the attack class to insert the move animation query objects into the queue.
End Sub
@ -2188,18 +2186,16 @@
Dim BattleFlip As Boolean = False
Dim CurrentPokemon As Pokemon = BattleScreen.OppPokemon
Dim CurrentEntity As NPC = BattleScreen.OppPokemonNPC
Dim CurrentModel As Entity = BattleScreen.OppPokemonModel
If own = False Then
BattleFlip = True
CurrentPokemon = BattleScreen.OwnPokemon
CurrentEntity = BattleScreen.OwnPokemonNPC
CurrentModel = BattleScreen.OwnPokemonModel
End If
Me.InternalOpponentPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity, CurrentModel)
Me.InternalOpponentPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
End If
End Sub
Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
'Override this method in the attack class to insert the move animation query objects into the queue.
End Sub

View File

@ -63,7 +63,7 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim TextureYOffset As Integer = 0
If BattleFlip = True Then
@ -80,7 +80,7 @@
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim TextureYOffset As Integer = 0
If BattleFlip = True Then

View File

@ -92,7 +92,7 @@
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim maxAmount As Integer = 12
Dim currentAmount As Integer = 0

View File

@ -51,15 +51,15 @@
Me.IsWonderGuardAffected = True
'#End
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip, CurrentModel)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Grass\VineWhip_Start", 0.5, 2.5)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, -0.1, 0.025, False, False, 0, 0.5)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.025, False, False, 0.75, 0)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Grass\VineWhip_Hit", 0, 2.5)
Dim TextureXOffset As Integer = 0

View File

@ -76,7 +76,7 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
For i = 0 To 6
Dim HeartEntity = MoveAnimation.SpawnEntity(Nothing, TextureManager.GetTexture("Textures\Battle\Normal\Attract"), New Vector3(0.25F), 1.0F, CSng(i * 0.2))
@ -89,7 +89,7 @@
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
For i = 0 To 6

View File

@ -87,7 +87,7 @@ Namespace BattleSystem.Moves.Normal
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Bind", 5.0F, 0)
Dim BindEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Bind", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)

View File

@ -62,7 +62,7 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound(CStr(CurrentPokemon.Number), 0, 0,, True)

View File

@ -63,7 +63,7 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Leer", 0, 0)
Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, 0.1, 0.1), TextureManager.GetTexture("Textures\Battle\Normal\Leer"), New Vector3(0.5F), 1.0F, 0, 2)
@ -74,8 +74,8 @@
MoveAnimation.AnimationFade(SpawnEntity, True, 1.0F, False, 0.0F, 2, 0)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip, CurrentModel)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, -0.1, 0.025, False, False, 0, 0.5)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0.1, 0.025, False, False, 0.75, 0.5)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, -0.1, 0.025, False, False, 1.75, 0.5)

View File

@ -55,7 +55,7 @@
Me.AIField2 = AIField.Nothing
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Pound", 0.5, 2.5)
Dim PoundEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Pound"), New Vector3(0.5F), 1, 0, 3)

View File

@ -52,7 +52,7 @@
'#End
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Scratch", 0.5, 2.5)
Dim TextureXOffset As Integer = 0

View File

@ -52,14 +52,14 @@
'#End
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip, CurrentModel)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationMove(Nothing, False, -0.5F, 0, 0, 0.3F, False, False, 0, 0,,, 2)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.3F, False, False, 1, 0,,, 2)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Tackle", 0, 0)
Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(0.5F), 1.0F, 0, 2)

View File

@ -62,8 +62,8 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip, CurrentModel)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationTurnNPC(2, 0, 0, 1, -1)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\TailWhip", 1, 0)
MoveAnimation.AnimationMove(Nothing, False, 0, 0, -0.1, 0.025, False, False, 1, 0.5)

View File

@ -87,7 +87,7 @@
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Wrap", 5.0F, 0)
Dim WrapEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Normal\Wrap", New Rectangle(0, 0, 80, 40), ""), New Vector3(1.0F, 0.5F, 1.0F), 1, 0, 0.75)

View File

@ -65,7 +65,7 @@
End If
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim TextureYOffset As Integer = 0
@ -80,7 +80,7 @@
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim TextureYOffset As Integer = 0

View File

@ -87,7 +87,7 @@ Namespace BattleSystem.Moves.Water
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim offsetLeft As Single = -0.35
Dim offsetRight As Single = 0.35

View File

@ -52,20 +52,20 @@
'#End
End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim WaterEntity = MoveAnimation.SpawnEntity(New Vector3(0), TextureManager.GetTexture("Textures\Battle\Water\WaterGun", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 0.75F)
MoveAnimation.AnimationMove(WaterEntity, True, 2, 0.5, 0, 0.075, False, False, 0, 0,,,, 0.05)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Water\Watergun_Start", 0, 0)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
Dim WaterEntity = MoveAnimation.SpawnEntity(New Vector3(-2, 1, 0), TextureManager.GetTexture("Textures\Battle\Water\WaterGun", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 0.75F)
Dim WaterEntity = MoveAnimation.SpawnEntity(New Vector3(-2, 1, 0), TextureManager.GetTexture("Textures\Battle\Water\WaterGun", New Rectangle(0, 0, 16, 16), ""), New Vector3(0.5F), 0.5F)
MoveAnimation.AnimationMove(WaterEntity, True, 0, 0, 0, 0.075, False, False, 0, 0,,,, 0.035)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Water\Watergun_Hit", 3, 0)
Dim HitEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Water\WaterGun", New Rectangle(0, 16, 16, 16), ""), New Vector3(0.5F), 0.75F, 3, 1)
Dim HitEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.2, 0), TextureManager.GetTexture("Textures\Battle\Water\WaterGun", New Rectangle(0, 16, 16, 16), ""), New Vector3(0.5F), 0.5F, 3, 1)
MoveAnimation.AnimationFade(HitEntity, True, 1.0F, False, 0.0F, 5, 0)
Dim WaterDrop1Position As Vector3 = New Vector3(-0.25, 0.25, -0.25)

View File

@ -99,8 +99,8 @@ Namespace BattleSystem.Moves.Water
End If
End If
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As Entity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip,, True)
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip, True)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Water\Whirlpool", 0.0F, 0)
Dim WhirlpoolEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(0, -0.3F, 0), TextureManager.GetTexture("Textures\Battle\Water\Whirlpool"), New Vector3(0.0F), 1.0F, 0.0F, 0.0F)
MoveAnimation.AnimationRotate(WhirlpoolEntity, False, CSng(MathHelper.Pi * 1.5), 0, 0, CSng(MathHelper.Pi * 1.5), 0, 0, 0, 0, True, False, False, False)

View File

@ -17,7 +17,6 @@
Dim p As Pokemon
Dim ModelVisible As Boolean = True
Dim SpriteVisible As Boolean = False
Dim BattleScreen As BattleSystem.BattleScreen
@ -34,7 +33,6 @@
Me.BattleScreen = BattleScreen
p = BattleScreen.OppPokemon
Me.ModelVisible = BattleScreen.OppPokemonModel.Visible
Me.SpriteVisible = BattleScreen.OppPokemonNPC.Visible
SetCamera()
@ -47,11 +45,7 @@
Dim RenderObjects As New List(Of Entity)
If BattleScreen.OppPokemonModel IsNot Nothing Then
RenderObjects.Add(BattleScreen.OppPokemonModel)
Else
RenderObjects.Add(BattleScreen.OppPokemonNPC)
End If
RenderObjects.Add(BattleScreen.OppPokemonNPC)
If RenderObjects.Count > 0 Then
RenderObjects = (From r In RenderObjects Order By r.CameraDistance Descending).ToList()
@ -192,9 +186,6 @@ nextIndex:
Loop While SmokeParticlesClose <= 38
' Pokémon Shrinks
CatchAnimation.AnimationScale(BattleScreen.OppPokemonNPC, False, False, 0.0F, 0.0F, 0.0F, 0.035F, 3, 0)
If BattleScreen.OppPokemonModel IsNot Nothing Then
CatchAnimation.AnimationScale(BattleScreen.OppPokemonModel, False, False, 0.0F, 0.0F, 0.0F, 0.035F, 3, 0)
End If
' Ball falls
CatchAnimation.AnimationMove(BallEntity, False, 3, -0.35, 0, 0.1F, False, False, 8, 0)
@ -242,9 +233,7 @@ nextIndex:
' Pokemon appears
CatchAnimation.AnimationScale(BattleScreen.OppPokemonNPC, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.035F, 12 + Shakes.Count * 10, 0)
If BattleScreen.OppPokemonModel IsNot Nothing Then
CatchAnimation.AnimationScale(BattleScreen.OppPokemonModel, False, True, PokemonScale.X, PokemonScale.Y, PokemonScale.Z, 0.035F, 12 + Shakes.Count * 10, 0)
End If
End If
AnimationList.Add(CatchAnimation)