Various Battle Improvements and Fixes
* Improved timing BlockIn & BlockOut BattleIntro animations * Removed player ball throw animations at the start of the battle for battles that are not pvp * Fixed absorb animation * Improved the faint animation and removed the unnecessary camera angle changes when a pokémon faints
This commit is contained in:
parent
4b3b900e40
commit
c1ec08fe7f
|
@ -2543,13 +2543,19 @@
|
|||
p.HP = 0
|
||||
p.Status = Pokemon.StatusProblems.Fainted
|
||||
Me.ChangeCameraAngle(1, own, BattleScreen)
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(p.Number.ToString(), True))
|
||||
|
||||
If message = "" Then
|
||||
message = p.GetDisplayName() & " fainted!"
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(New TextQueryObject(message))
|
||||
|
||||
If BattleScreen.IsTrainerBattle = False AndAlso Core.Player.ShowBattleAnimations <> 0 Then
|
||||
Dim FaintAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
|
||||
FaintAnimation.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
|
||||
FaintAnimation.AnimationMove(Nothing, False, 0, -1, 0, 0.05, False, False, 2, 0,,, 3)
|
||||
BattleScreen.BattleQuery.Add(FaintAnimation)
|
||||
End If
|
||||
|
||||
Dim str = p.AdditionalData.ToLower()
|
||||
Select Case str
|
||||
Case "mega", "mega_x", "mega_y", "primal", "blade"
|
||||
|
@ -3424,9 +3430,9 @@
|
|||
Dim Position As New Vector3(xPos, -0.4, zPos)
|
||||
Dim Destination As New Vector3(xPos, 0.8, zPos)
|
||||
Dim Scale As New Vector3(0.2F)
|
||||
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
|
||||
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
|
||||
|
||||
|
||||
StatAnimation.AnimationMove(Nothing, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
||||
Threading.Interlocked.Increment(currentAmount)
|
||||
|
@ -3707,9 +3713,9 @@
|
|||
Dim Position As New Vector3(xPos, 0.8, zPos)
|
||||
Dim Destination As New Vector3(xPos, -0.4, zPos)
|
||||
Dim Scale As New Vector3(0.2F)
|
||||
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
|
||||
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
|
||||
|
||||
|
||||
StatAnimation.AnimationMove(Nothing, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
||||
Threading.Interlocked.Increment(currentAmount)
|
||||
|
@ -3969,7 +3975,7 @@
|
|||
|
||||
'***HP INCREASE ANIMATION***
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
||||
Dim HealAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
||||
Dim maxAmount As Integer = 20
|
||||
Dim currentAmount As Integer = 0
|
||||
While currentAmount <= maxAmount
|
||||
|
@ -3980,14 +3986,14 @@
|
|||
Dim Position As New Vector3(xPos, -0.4, zPos)
|
||||
Dim Destination As New Vector3(xPos, 0.8, zPos)
|
||||
Dim Scale As New Vector3(0.2F)
|
||||
|
||||
Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
|
||||
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||
Dim HealEntity As Entity = HealAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
|
||||
|
||||
StatAnimation.AnimationMove(Nothing, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
||||
|
||||
HealAnimation.AnimationMove(HealEntity, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
|
||||
Threading.Interlocked.Increment(currentAmount)
|
||||
End While
|
||||
BattleScreen.BattleQuery.Add(StatAnimation)
|
||||
BattleScreen.BattleQuery.Add(HealAnimation)
|
||||
End If
|
||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Heal", False))
|
||||
|
||||
|
@ -6847,18 +6853,18 @@
|
|||
Threading.Interlocked.Increment(SmokeReturned)
|
||||
Loop While SmokeReturned <= 38
|
||||
End If
|
||||
' Pokemon disappears
|
||||
|
||||
BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
' Pokemon disappears
|
||||
BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
|
||||
BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
|
||||
|
||||
' Ball returns
|
||||
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
|
||||
Dim BallReturnEntity 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)
|
||||
BattleScreen.AddToQuery(InsertIndex, BallReturn)
|
||||
End If
|
||||
BattleScreen.AddToQuery(InsertIndex, BallReturn)
|
||||
|
||||
Dim index As Integer = NewPokemonIndex
|
||||
If index <= -1 Then
|
||||
|
@ -7173,13 +7179,6 @@
|
|||
BattleScreen.OppPokemon.Ability.SwitchOut(BattleScreen.OppPokemon)
|
||||
|
||||
If BattleScreen.IsTrainerBattle = False Then
|
||||
ChangeCameraAngle(1, False, BattleScreen)
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
Dim Faint As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
|
||||
Faint.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 0, 2, False, True)
|
||||
Faint.AnimationMove(Nothing, False, 0, -1, 0, 0.1, False, False, 2, 0,,, 3)
|
||||
BattleScreen.BattleQuery.Add(Faint)
|
||||
End If
|
||||
|
||||
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
|
||||
|
||||
|
|
|
@ -225,17 +225,12 @@
|
|||
Dim ownModel As String = GetModelName(True)
|
||||
Dim oppModel As String = GetModelName(False)
|
||||
|
||||
Dim InitiallyVisibleOwn As Integer = 1
|
||||
If 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, WildPokemon.GetDisplayName(), 0, True, "Still", New List(Of Rectangle)}, InitiallyVisibleOwn), 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, InitiallyVisibleOwn), 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)
|
||||
|
@ -281,49 +276,10 @@
|
|||
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() & "!")
|
||||
|
||||
Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q4})
|
||||
|
||||
' Ball is thrown
|
||||
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
|
||||
BallThrow.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
|
||||
|
||||
Dim BallThrowEntity As Entity = BallThrow.SpawnEntity(New Vector3(-2, -0.15, 0), Me.OwnPokemon.CatchBall.Texture, New Vector3(0.3F), 1.0F)
|
||||
BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0.5F,, 0.3,, 0.025F)
|
||||
|
||||
' Ball Opens
|
||||
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
|
||||
|
||||
Dim SmokeSpawned As Integer = 0
|
||||
Do
|
||||
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
|
||||
|
||||
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
|
||||
|
||||
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
|
||||
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 20.0F)
|
||||
|
||||
Dim SmokeEntity As Entity = BallThrow.SpawnEntity(Nothing, SmokeTexture, SmokeScale, 1.0F, 3)
|
||||
BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
|
||||
|
||||
Threading.Interlocked.Increment(SmokeSpawned)
|
||||
Loop While SmokeSpawned <= 38
|
||||
End If
|
||||
|
||||
' Pokemon appears
|
||||
BallThrow.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BallThrow.AnimationPlaySound(CStr(Me.OwnPokemon.Number), 4, 0,, True)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
' Pokémon falls down
|
||||
BallThrow.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0,,, 3)
|
||||
End If
|
||||
|
||||
Me.BattleQuery.Add(BallThrow)
|
||||
Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q31, q4})
|
||||
|
||||
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
|
||||
|
||||
|
@ -404,7 +360,7 @@
|
|||
Dim oppModel As String = GetModelName(False)
|
||||
|
||||
Dim InitiallyVisibleOwn As Integer = 1
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
|
||||
InitiallyVisibleOwn = 0
|
||||
End If
|
||||
|
||||
|
@ -420,7 +376,7 @@
|
|||
Screen.Level.Entities.Add(OwnPokemonModel)
|
||||
|
||||
Dim InitiallyVisibleOpp As Integer = 1
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
|
||||
InitiallyVisibleOpp = 0
|
||||
End If
|
||||
|
||||
|
@ -500,12 +456,17 @@
|
|||
|
||||
Dim q4 As TextQueryObject = New TextQueryObject("Go, " & Me.OwnPokemon.GetDisplayName() & "!")
|
||||
|
||||
Me.BattleQuery.AddRange({cq, q, q1, BallThrowOpp, q2, q3, q4})
|
||||
If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations = 0 Then
|
||||
Dim q31 As New PlaySoundQueryObject(OwnPokemon.Number.ToString(), True, 3.0F)
|
||||
Me.BattleQuery.AddRange({cq, q, q1, BallThrowOpp, q2, q3, q31, q4})
|
||||
Else
|
||||
Me.BattleQuery.AddRange({cq, q, q1, BallThrowOpp, q2, q3, q4})
|
||||
End If
|
||||
|
||||
' Ball is thrown
|
||||
Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
|
||||
If IsPVPBattle = True AndAlso Core.Player.ShowBattleAnimations <> 0 Then
|
||||
' Ball is thrown
|
||||
Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
BallThrowOwn.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
|
||||
BallThrowOwn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
|
||||
|
||||
|
@ -529,19 +490,17 @@
|
|||
|
||||
Threading.Interlocked.Increment(SmokeSpawned)
|
||||
Loop While SmokeSpawned <= 38
|
||||
End If
|
||||
|
||||
' Pokemon appears
|
||||
BallThrowOwn.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BallThrowOwn.AnimationPlaySound(CStr(Me.OwnPokemon.Number), 4, 0,, True)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
' 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
|
||||
|
||||
Me.BattleQuery.Add(BallThrowOwn)
|
||||
|
||||
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
|
||||
|
||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||
|
@ -730,17 +689,12 @@
|
|||
Dim ownModel As String = GetModelName(True)
|
||||
Dim oppModel As String = GetModelName(False)
|
||||
|
||||
Dim InitiallyVisibleOwn As Integer = 1
|
||||
If 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)
|
||||
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, 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)
|
||||
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)
|
||||
|
@ -787,46 +741,6 @@
|
|||
|
||||
Me.BattleQuery.AddRange({cq, q1, q, q2, q22, q3, q4})
|
||||
|
||||
' Ball is thrown
|
||||
Dim BallThrowOwn As AnimationQueryObject = New AnimationQueryObject(Me.OwnPokemonNPC, False, Me.OwnPokemonModel)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
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
|
||||
End If
|
||||
|
||||
' Pokemon appears
|
||||
BallThrowOwn.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||
BallThrowOwn.AnimationPlaySound(CStr(Me.OwnPokemon.Number), 4, 0,, True)
|
||||
|
||||
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||
' Pokémon falls down
|
||||
BallThrowOwn.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 5, 0,,, 3)
|
||||
End If
|
||||
|
||||
Me.BattleQuery.Add(BallThrowOwn)
|
||||
|
||||
Dim q5 As ToggleMenuQueryObject = New ToggleMenuQueryObject(Me.BattleMenu.Visible)
|
||||
|
||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||
|
|
|
@ -94,14 +94,14 @@
|
|||
|
||||
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
|
||||
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, BattleFlip)
|
||||
Dim maxAmount As Integer = 8
|
||||
Dim maxAmount As Integer = 12
|
||||
Dim currentAmount As Integer = 0
|
||||
MoveAnimation.AnimationPlaySound("Battle\Attacks\Grass\Absorb", 0, 0)
|
||||
While currentAmount <= maxAmount
|
||||
Dim yPos As Single = CSng(Random.NextDouble() * 0.5)
|
||||
Dim zPos As Single = CSng(Random.Next(-5, 5) * 0.15)
|
||||
Dim AbsorbEntity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Grass\Absorb"), New Vector3(0.35F), 1)
|
||||
MoveAnimation.AnimationMove(AbsorbEntity, True, -1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount), 0.0, 0.1, 0.5)
|
||||
Dim yPos As Single = CSng(Random.Next(-1, 3) * 0.15)
|
||||
Dim zPos As Single = CSng(Random.Next(-3, 3) * 0.15)
|
||||
Dim AbsorbEntity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Grass\Absorb"), New Vector3(0.35F), 1, CSng(currentAmount * 0.8))
|
||||
MoveAnimation.AnimationMove(AbsorbEntity, True, -1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount * 0.8), 0.0, 0.1, 0.5,, 0.005F)
|
||||
|
||||
Threading.Interlocked.Increment(currentAmount)
|
||||
End While
|
||||
|
|
|
@ -455,7 +455,7 @@
|
|||
If Animations.Count = 0 Then
|
||||
Animations.Add(New Rectangle(CInt(Core.windowSize.Width / 2 - (Core.windowSize.Width / 100 / 2)), CInt(Core.windowSize.Height / 2 - (Core.windowSize.Height / 100 / 2)), CInt(Core.windowSize.Width / 100), CInt(Core.windowSize.Height / 100)))
|
||||
Else
|
||||
Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 6)
|
||||
Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3)
|
||||
If Animations(0).Height >= Core.windowSize.Height + 128 Then
|
||||
ready = True
|
||||
End If
|
||||
|
@ -476,10 +476,10 @@
|
|||
If Animations.Count = 0 Then
|
||||
Animations.Add(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height))
|
||||
Else
|
||||
If value >= Core.windowSize.Height / 2 - 4 Then
|
||||
If value >= Core.windowSize.Height / 2 + 4 Then
|
||||
ready = True
|
||||
Else
|
||||
value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3))
|
||||
value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
|
Loading…
Reference in New Issue