diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb
index 058885f11..2b322aaa2 100644
--- a/P3D/Battle/BattleSystemV2/Battle.vb
+++ b/P3D/Battle/BattleSystemV2/Battle.vb
@@ -2707,13 +2707,12 @@
'Burn animation
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
- Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(pNPC.Position.X - 0.25), CSng(pNPC.Position.Y - 0.25), CSng(pNPC.Position.Z - 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 2)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
BattleScreen.BattleQuery.Add(BurnAnimation)
-
Select Case message
Case "" 'Print default message only
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " got burned!"))
@@ -3412,26 +3411,27 @@
End If
'***STAT INCREASE ANIMATION***
- Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
+ Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
Dim maxAmount As Integer = 20 * val
Dim currentAmount As Integer = 0
While currentAmount <= maxAmount
- Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatChange\statUp")
+ Dim Texture As String = "Textures\Battle\StatChange\statDown"
+ Dim Position As Vector3 = New Vector3(0, -0.4, 0)
+ Dim Destination As Vector3 = New Vector3(0, 0.8, 0)
+ Dim Scale As Vector3 = New Vector3(0.2F)
Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
- Dim Position As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y - 0.4), pNPC.Position.Z + zPos)
- Dim Destination As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y + 0.8), zPos + pNPC.Position.Z)
- Dim Scale As New Vector3(0.2F)
-
- Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
+ Position.X = xPos
+ Position.Z = zPos
+ Destination.X = xPos
+ Destination.Z = zPos
Dim startDelay As Double = 5.0 * Random.NextDouble()
-
- StatAnimation.AnimationMove(Nothing, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ MoveAnimation.AnimationSpawnMovingEntity(Position.X, Position.Y, Position.Z, Texture, Scale.X, Scale.Y, Scale.Z, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
Threading.Interlocked.Increment(currentAmount)
End While
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Stat_Raise", False))
- BattleScreen.BattleQuery.Add(StatAnimation)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
Select Case val
@@ -3693,26 +3693,27 @@
End If
End If
'***STAT DECREASE ANIMATION***
- Dim StatAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
+ Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
Dim maxAmount As Integer = 20 * val
Dim currentAmount As Integer = 0
While currentAmount <= maxAmount
- Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\StatChange\statDown")
+ Dim Texture As String = "Textures\Battle\StatChange\statDown"
+ Dim Position As Vector3 = New Vector3(0, 0.8, 0)
+ Dim Destination As Vector3 = New Vector3(0, -0.4, 0)
+ Dim Scale As Vector3 = New Vector3(0.2F)
Dim xPos = CSng((Random.NextDouble() - 0.5) * 1.2)
Dim zPos = CSng((Random.NextDouble() - 0.5) * 1.2)
- Dim Position As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y + 0.8), pNPC.Position.Z + zPos)
- Dim Destination As New Vector3(xPos + pNPC.Position.X, CSng(pNPC.Position.Y - 0.4), zPos + pNPC.Position.Z)
- Dim Scale As New Vector3(0.2F)
-
- Dim StatEntity As Entity = StatAnimation.SpawnEntity(Position, Texture, Scale, 1.0F)
+ Position.X = xPos
+ Position.Z = zPos
+ Destination.X = xPos
+ Destination.Z = zPos
Dim startDelay As Double = 5.0 * Random.NextDouble()
-
- StatAnimation.AnimationMove(Nothing, True, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
+ MoveAnimation.AnimationSpawnMovingEntity(Position.X, Position.Y, Position.Z, Texture, Scale.X, Scale.Y, Scale.Z, Destination.X, Destination.Y, Destination.Z, 0.05F, False, True, CSng(startDelay), 0.0F)
Threading.Interlocked.Increment(currentAmount)
End While
- StatAnimation.AnimationPlaySound("Battle\Effects\Stat_Lower", 0.0F, 10.0F)
- BattleScreen.BattleQuery.Add(StatAnimation)
+ MoveAnimation.AnimationPlaySound("Battle\Effects\Stat_Lower", 0.0F, 10.0F)
+ BattleScreen.BattleQuery.Add(MoveAnimation)
Dim printMessage As String = p.GetDisplayName() & "'s " & statString
Select Case val
@@ -3977,10 +3978,8 @@
Public Sub ReduceHP(ByVal HPAmount As Integer, ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String, ByVal sound As String)
Dim p As Pokemon = BattleScreen.OwnPokemon
- Dim pNPC As Entity = BattleScreen.OwnPokemonNPC
If own = False Then
p = BattleScreen.OppPokemon
- pNPC = BattleScreen.OppPokemonNPC
End If
If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
@@ -3997,13 +3996,6 @@
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
End If
- Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
- HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
- HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
- BattleScreen.BattleQuery.Add(HitAnimation)
-
If own = True Then
BattleScreen.BattleQuery.Add(New MathHPQueryObject(p.HP, p.MaxHP, HPAmount, New Vector2(200, 256)))
Else
@@ -4756,14 +4748,14 @@
#End Region
- '''
- ''' Switches camera to angle
- '''
- ''' 0=main battle/1=own pokemon/2=opp pokemon
- ''' If the code comes from the own player or not.
- ''' Battlescreen reference
- ''' If the call should get added the PVP list or the own queue.
- Public Sub ChangeCameraAngle(ByVal direction As Integer, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal AddPVP As Boolean = False)
+ '''
+ ''' Switches camera to angle
+ '''
+ ''' 0=main battle/1=own pokemon/2=opp pokemon
+ ''' If the code comes from the own player or not.
+ ''' Battlescreen reference
+ ''' If the call should get added the PVP list or the own queue.
+ Public Sub ChangeCameraAngle(ByVal direction As Integer, ByVal own As Boolean, ByVal BattleScreen As BattleScreen, Optional ByVal AddPVP As Boolean = False)
Dim q As CameraQueryObject = Nothing
Select Case direction
@@ -5357,22 +5349,20 @@
If .OwnPokemon.Status = Pokemon.StatusProblems.Poison Then 'Own Poison
'Poison animation
Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, True)
-
PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
- Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 0, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 1, 1)
- Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 2, 1)
- Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 3, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 3, 1)
-
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 4, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 2)
BattleScreen.BattleQuery.Add(PoisonAnimation)
'Actual damage
ReduceHP(CInt(.OwnPokemon.MaxHP / 8), True, True, BattleScreen, "The poison hurt " & .OwnPokemon.GetDisplayName() & ".", "poison")
@@ -5383,22 +5373,20 @@
Dim multiplier As Double = (.FieldEffects.OwnPoisonCounter / 16)
'Poison animation
Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, True)
-
PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
- Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 0, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 1, 1)
- Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 2, 1)
- Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 3, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 3, 1)
-
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 4, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 2)
BattleScreen.BattleQuery.Add(PoisonAnimation)
'Actual damage
ReduceHP(CInt(.OwnPokemon.MaxHP * multiplier), True, True, BattleScreen, "The toxic hurt " & .OwnPokemon.GetDisplayName() & ".", "badpoison")
@@ -5418,14 +5406,12 @@
'Burn animation
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False)
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
-
- Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(BattleScreen.OwnPokemonNPC.Position.X + 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Y - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Z + 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 2)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
BattleScreen.BattleQuery.Add(BurnAnimation)
-
'Actual damage
ReduceHP(reduceAmount, True, True, BattleScreen, .OwnPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
End If
@@ -6155,24 +6141,21 @@
If .OppPokemon.Status = Pokemon.StatusProblems.Poison Then 'Opp Poison
'Poison animation
Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
-
PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
- Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 0, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 1, 1)
- Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 2, 1)
- Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 3, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 3, 1)
-
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 4, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 2)
BattleScreen.BattleQuery.Add(PoisonAnimation)
-
'Actual damage
ReduceHP(CInt(.OppPokemon.MaxHP / 8), False, False, BattleScreen, "The poison hurt " & .OppPokemon.GetDisplayName() & ".", "poison")
End If
@@ -6182,22 +6165,20 @@
Dim multiplier As Double = (.FieldEffects.OppPoisonCounter / 16)
'Poison animation
Dim PoisonAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
-
PoisonAnimation.AnimationPlaySound("Battle\Effects\Poisoned", 0, 0)
- Dim BubbleEntity1 As Entity = PoisonAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 0, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 1, 1)
- Dim BubbleEntity2 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 2, 1)
- Dim BubbleEntity3 As Entity = PoisonAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 3, 1)
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 3, 1)
-
- PoisonAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 4, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ PoisonAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 2)
BattleScreen.BattleQuery.Add(PoisonAnimation)
'Actual damage
ReduceHP(CInt(.OppPokemon.MaxHP * multiplier), False, False, BattleScreen, "The toxic hurt " & .OppPokemon.GetDisplayName() & ".", "badpoison")
@@ -6216,14 +6197,12 @@
'Burn animation
Dim BurnAnimation As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, False)
BurnAnimation.AnimationPlaySound("Battle\Effects\Burned", 0, 0)
-
- Dim FlameEntity As Entity = BurnAnimation.SpawnEntity(New Vector3(CSng(BattleScreen.OppPokemonNPC.Position.X - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Y - 0.25), CSng(BattleScreen.OwnPokemonNPC.Position.Z - 0.25)), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32)), New Vector3(0.5, 0.5, 0.5), 1.0F)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
- BurnAnimation.AnimationChangeTexture(FlameEntity, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 2)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
BattleScreen.BattleQuery.Add(BurnAnimation)
-
'Actual damage
ReduceHP(reduceAmount, False, False, BattleScreen, .OppPokemon.GetDisplayName() & " is hurt by the burn.", "burn")
End If
@@ -6748,38 +6727,38 @@
End If
Else
If BattleScreen.IsTrainerBattle = True Then
- EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, False)
- If BattleScreen.IsRemoteBattle = True Then
- EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, True)
- End If
- Else
- EndBattle(EndBattleReasons.LoseWild, BattleScreen, False)
- End If
- End If
- End With
- End Sub
+ EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, False)
+ If BattleScreen.IsRemoteBattle = True Then
+ EndBattle(EndBattleReasons.LoseTrainer, BattleScreen, True)
+ End If
+ Else
+ EndBattle(EndBattleReasons.LoseWild, BattleScreen, False)
+ End If
+ End If
+ End With
+ End Sub
- Public Sub ApplyOwnBatonPass(ByVal BattleScreen As BattleScreen)
- If BattleScreen.FieldEffects.OwnUsedBatonPass = True Then
- BattleScreen.FieldEffects.OwnUsedBatonPass = False
+ Public Sub ApplyOwnBatonPass(ByVal BattleScreen As BattleScreen)
+ If BattleScreen.FieldEffects.OwnUsedBatonPass = True Then
+ BattleScreen.FieldEffects.OwnUsedBatonPass = False
- BattleScreen.OwnPokemon.StatAttack = BattleScreen.FieldEffects.OwnBatonPassStats(0)
- BattleScreen.OwnPokemon.StatDefense = BattleScreen.FieldEffects.OwnBatonPassStats(1)
- BattleScreen.OwnPokemon.StatSpAttack = BattleScreen.FieldEffects.OwnBatonPassStats(2)
- BattleScreen.OwnPokemon.StatSpDefense = BattleScreen.FieldEffects.OwnBatonPassStats(3)
- BattleScreen.OwnPokemon.StatSpeed = BattleScreen.FieldEffects.OwnBatonPassStats(4)
- BattleScreen.OwnPokemon.Evasion = BattleScreen.FieldEffects.OwnBatonPassStats(5)
- BattleScreen.OwnPokemon.Accuracy = BattleScreen.FieldEffects.OwnBatonPassStats(6)
+ BattleScreen.OwnPokemon.StatAttack = BattleScreen.FieldEffects.OwnBatonPassStats(0)
+ BattleScreen.OwnPokemon.StatDefense = BattleScreen.FieldEffects.OwnBatonPassStats(1)
+ BattleScreen.OwnPokemon.StatSpAttack = BattleScreen.FieldEffects.OwnBatonPassStats(2)
+ BattleScreen.OwnPokemon.StatSpDefense = BattleScreen.FieldEffects.OwnBatonPassStats(3)
+ BattleScreen.OwnPokemon.StatSpeed = BattleScreen.FieldEffects.OwnBatonPassStats(4)
+ BattleScreen.OwnPokemon.Evasion = BattleScreen.FieldEffects.OwnBatonPassStats(5)
+ BattleScreen.OwnPokemon.Accuracy = BattleScreen.FieldEffects.OwnBatonPassStats(6)
- If BattleScreen.FieldEffects.OwnBatonPassConfusion = True Then
- BattleScreen.FieldEffects.OwnBatonPassConfusion = False
- BattleScreen.OwnPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
- End If
- End If
- End Sub
+ If BattleScreen.FieldEffects.OwnBatonPassConfusion = True Then
+ BattleScreen.FieldEffects.OwnBatonPassConfusion = False
+ BattleScreen.OwnPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
+ End If
+ End If
+ End Sub
- Public Sub SwitchInOwn(ByVal BattleScreen As BattleScreen, ByVal NewPokemonIndex As Integer, ByVal FirstTime As Boolean, ByVal InsertIndex As Integer, Optional ByVal message As String = "")
- HasSwitchedInOwn = True
+ Public Sub SwitchInOwn(ByVal BattleScreen As BattleScreen, ByVal NewPokemonIndex As Integer, ByVal FirstTime As Boolean, ByVal InsertIndex As Integer, Optional ByVal message As String = "")
+ HasSwitchedInOwn = True
If FirstTime = False Then
Dim insertMessage As String = message
@@ -6796,28 +6775,24 @@
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 SmokeDestination = New Vector3(0, 0, 0)
- Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+ Dim SmokeTexture As String = "Textures\Battle\Cloud"
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
- Dim SmokeEntity As Entity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
-
- BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
-
+ BallReturn.AnimationSpawnMovingEntity(SmokePosition.X, SmokePosition.Y, SmokePosition.Z, SmokeTexture, SmokeScale.X, SmokeScale.Y, SmokeScale.Z, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
Threading.Interlocked.Increment(SmokeReturned)
Loop While SmokeReturned <= 38
' Pokemon disappears
- BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
- BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 3)
+ BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
+ BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
' Ball returns
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
- Dim BallReturnEntity As Entity = BallReturn.SpawnEntity(BattleScreen.OwnPokemonNPC.Position, TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
- BallReturn.AnimationMove(BallReturnEntity, True, BattleScreen.OwnPokemonNPC.Position.X - 2, BattleScreen.OwnPokemonNPC.Position.Y, BattleScreen.OwnPokemonNPC.Position.Z, 0.1, False, True, 1, 0,, 0.3)
+ BallReturn.AnimationSpawnMovingEntity(0, 0, 0, BattleScreen.OwnPokemon.CatchBall.TextureSource, 0.3F, 0.3F, 0.3F, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
BattleScreen.AddToQuery(InsertIndex, BallReturn)
@@ -6855,311 +6830,304 @@
' Ball is thrown
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OwnPokemonNPC, False, BattleScreen.OwnPokemonModel)
-
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
-
- Dim BallThrowEntity As Entity = BallReturn.SpawnEntity(BattleScreen.OwnPokemonNPC.Position + New Vector3(-2, -0.15, 0), TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
- BallThrow.AnimationMove(BallThrowEntity, True, BattleScreen.OwnPokemonNPC.Position.X, CSng(BattleScreen.OwnPokemonNPC.Position.Y + 0.35), BattleScreen.OwnPokemonNPC.Position.Z, 0.1, False, True, 0F, 0F,, 0.3)
+ BallThrow.AnimationSpawnMovingEntity(-2, -0.15, 0, BattleScreen.OwnPokemon.CatchBall.TextureSource, 0.3F, 0.3F, 0.3F, 0, 0.35, 0, 0.1, False, True, 0F, 0F,, 0.3)
' Ball Opens
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
-
Dim SmokeSpawned As Integer = 0
Do
Dim SmokePosition = New Vector3(0, 0.35, 0)
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
- Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+ Dim SmokeTexture As String = "Textures\Battle\Cloud"
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
- Dim SmokeEntity As Entity = BallThrow.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1.0F)
-
- BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
-
+ BallThrow.AnimationSpawnMovingEntity(SmokePosition.X, SmokePosition.Y, SmokePosition.Z, SmokeTexture, SmokeScale.X, SmokeScale.Y, SmokeScale.Z, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
Threading.Interlocked.Increment(SmokeSpawned)
Loop While SmokeSpawned <= 38
' Pokemon appears
- BallThrow.AnimationFade(Nothing, False, 1, True, 1, 4, 0)
+ BallThrow.AnimationFadePokemonEntity(1, True, 1, 4, 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, 4, 0,,, 3)
+ BallThrow.AnimationMovePokemonEntity(0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
BattleScreen.AddToQuery(InsertIndex, BallThrow)
End If
With BattleScreen
- If .FieldEffects.UsedPokemon.Contains(NewPokemonIndex) = False Then
- .FieldEffects.UsedPokemon.Add(NewPokemonIndex)
- End If
+ If .FieldEffects.UsedPokemon.Contains(NewPokemonIndex) = False Then
+ .FieldEffects.UsedPokemon.Add(NewPokemonIndex)
+ End If
- If Not .OwnPokemon.Item Is Nothing Then
- If .OwnPokemon.Item.Name.ToLower() = "amulet coin" Or .OwnPokemon.Item.Name.ToLower() = "luck incense" Then
- If .FieldEffects.CanUseItem(True) = True And .FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
- BattleScreen.FieldEffects.AmuletCoin += 1
- End If
- End If
- End If
+ If Not .OwnPokemon.Item Is Nothing Then
+ If .OwnPokemon.Item.Name.ToLower() = "amulet coin" Or .OwnPokemon.Item.Name.ToLower() = "luck incense" Then
+ If .FieldEffects.CanUseItem(True) = True And .FieldEffects.CanUseOwnItem(True, BattleScreen) = True Then
+ BattleScreen.FieldEffects.AmuletCoin += 1
+ End If
+ End If
+ End If
- Dim p As Pokemon = .OwnPokemon
- Dim op As Pokemon = .OppPokemon
+ Dim p As Pokemon = .OwnPokemon
+ Dim op As Pokemon = .OppPokemon
- Dim spikeAffected As Boolean = True
- Dim rockAffected As Boolean = True
+ Dim spikeAffected As Boolean = True
+ Dim rockAffected As Boolean = True
- spikeAffected = BattleScreen.FieldEffects.IsGrounded(True, BattleScreen)
+ spikeAffected = BattleScreen.FieldEffects.IsGrounded(True, BattleScreen)
- 'Spikes
- If spikeAffected = True Then
- If .FieldEffects.OppSpikes > 0 And (p.Ability.Name.ToLower() <> "magic guard" Or BattleScreen.FieldEffects.CanUseAbility(True, BattleScreen, 1) = False) Then
- Dim spikeDamage As Double = 1D
- Select Case .FieldEffects.OppSpikes
- Case 1
- spikeDamage = (p.MaxHP / 100) * 12.5D
- Case 2
- spikeDamage = (p.MaxHP / 100) * 16.7D
- Case 3
- spikeDamage = (p.MaxHP / 100) * 25D
- End Select
- ReduceHP(CInt(spikeDamage), True, False, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes")
- End If
- End If
+ 'Spikes
+ If spikeAffected = True Then
+ If .FieldEffects.OppSpikes > 0 And (p.Ability.Name.ToLower() <> "magic guard" Or BattleScreen.FieldEffects.CanUseAbility(True, BattleScreen, 1) = False) Then
+ Dim spikeDamage As Double = 1D
+ Select Case .FieldEffects.OppSpikes
+ Case 1
+ spikeDamage = (p.MaxHP / 100) * 12.5D
+ Case 2
+ spikeDamage = (p.MaxHP / 100) * 16.7D
+ Case 3
+ spikeDamage = (p.MaxHP / 100) * 25D
+ End Select
+ ReduceHP(CInt(spikeDamage), True, False, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes")
+ End If
+ End If
- 'Sticky Web
- If spikeAffected = True Then
- If .FieldEffects.OppStickyWeb > 0 Then
+ 'Sticky Web
+ If spikeAffected = True Then
+ If .FieldEffects.OppStickyWeb > 0 Then
- LowerStat(True, True, BattleScreen, "Speed", 1, "Your pokemon was caught in a Sticky Web!", "stickyweb")
+ LowerStat(True, True, BattleScreen, "Speed", 1, "Your pokemon was caught in a Sticky Web!", "stickyweb")
- End If
- End If
+ End If
+ End If
- 'Toxic Spikes
- If spikeAffected = True Then
- If .FieldEffects.OppToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then
- Select Case .FieldEffects.OppToxicSpikes
- Case 1
- InflictPoison(True, False, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
- Case 2
- InflictPoison(True, False, BattleScreen, True, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
- End Select
- End If
- If .FieldEffects.OppToxicSpikes > 0 Then
- If p.Type1.Type = Element.Types.Poison Or p.Type2.Type = Element.Types.Poison Then
- .AddToQuery(InsertIndex, New TextQueryObject(p.GetDisplayName() & " removed the Toxic Spikes!"))
- .FieldEffects.OppToxicSpikes = 0
- End If
- End If
- End If
+ 'Toxic Spikes
+ If spikeAffected = True Then
+ If .FieldEffects.OppToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then
+ Select Case .FieldEffects.OppToxicSpikes
+ Case 1
+ InflictPoison(True, False, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
+ Case 2
+ InflictPoison(True, False, BattleScreen, True, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
+ End Select
+ End If
+ If .FieldEffects.OppToxicSpikes > 0 Then
+ If p.Type1.Type = Element.Types.Poison Or p.Type2.Type = Element.Types.Poison Then
+ .AddToQuery(InsertIndex, New TextQueryObject(p.GetDisplayName() & " removed the Toxic Spikes!"))
+ .FieldEffects.OppToxicSpikes = 0
+ End If
+ End If
+ End If
- 'Stealth Rock
- If rockAffected = True Then
- If .FieldEffects.OppStealthRock > 0 And (p.Ability.Name.ToLower() <> "magic guard" Or BattleScreen.FieldEffects.CanUseAbility(True, BattleScreen, 1) = False) Then
- Dim rocksDamage As Double = 1D
+ 'Stealth Rock
+ If rockAffected = True Then
+ If .FieldEffects.OppStealthRock > 0 And (p.Ability.Name.ToLower() <> "magic guard" Or BattleScreen.FieldEffects.CanUseAbility(True, BattleScreen, 1) = False) Then
+ Dim rocksDamage As Double = 1D
- Dim effectiveness As Single = BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type1)) * BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type2))
- Select Case effectiveness
- Case 0.25F
- rocksDamage = (p.MaxHP / 100) * 3.125D
- Case 0.5F
- rocksDamage = (p.MaxHP / 100) * 6.25D
- Case 1.0F
- rocksDamage = (p.MaxHP / 100) * 12.5D
- Case 2.0F
- rocksDamage = (p.MaxHP / 100) * 25D
- Case 4.0F
- rocksDamage = (p.MaxHP / 100) * 50D
- End Select
+ Dim effectiveness As Single = BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type1)) * BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type2))
+ Select Case effectiveness
+ Case 0.25F
+ rocksDamage = (p.MaxHP / 100) * 3.125D
+ Case 0.5F
+ rocksDamage = (p.MaxHP / 100) * 6.25D
+ Case 1.0F
+ rocksDamage = (p.MaxHP / 100) * 12.5D
+ Case 2.0F
+ rocksDamage = (p.MaxHP / 100) * 25D
+ Case 4.0F
+ rocksDamage = (p.MaxHP / 100) * 50D
+ End Select
- ReduceHP(CInt(rocksDamage), True, False, BattleScreen, "The Stealth Rocks hurt " & p.GetDisplayName() & "!", "stealthrocks")
- End If
- End If
+ ReduceHP(CInt(rocksDamage), True, False, BattleScreen, "The Stealth Rocks hurt " & p.GetDisplayName() & "!", "stealthrocks")
+ End If
+ End If
- TriggerAbilityEffect(BattleScreen, True)
- TriggerItemEffect(BattleScreen, True)
+ TriggerAbilityEffect(BattleScreen, True)
+ TriggerItemEffect(BattleScreen, True)
- If .OwnPokemon.Status = Pokemon.StatusProblems.Sleep Then
- .FieldEffects.OwnSleepTurns = Core.Random.Next(1, 4)
- End If
+ If .OwnPokemon.Status = Pokemon.StatusProblems.Sleep Then
+ .FieldEffects.OwnSleepTurns = Core.Random.Next(1, 4)
+ End If
- If BattleScreen.FieldEffects.OwnHealingWish = True Then
- BattleScreen.FieldEffects.OwnHealingWish = False
+ If BattleScreen.FieldEffects.OwnHealingWish = True Then
+ BattleScreen.FieldEffects.OwnHealingWish = False
- If .OwnPokemon.HP < .OwnPokemon.MaxHP Or .OwnPokemon.Status <> Pokemon.StatusProblems.None Then
- GainHP(.OwnPokemon.MaxHP - .OwnPokemon.HP, True, True, BattleScreen, "The Healing Wish came true for " & .OwnPokemon.GetDisplayName() & "!", "move:healingwish")
- CureStatusProblem(True, True, BattleScreen, "", "move:healingwish")
- End If
- End If
- End With
- End Sub
+ If .OwnPokemon.HP < .OwnPokemon.MaxHP Or .OwnPokemon.Status <> Pokemon.StatusProblems.None Then
+ GainHP(.OwnPokemon.MaxHP - .OwnPokemon.HP, True, True, BattleScreen, "The Healing Wish came true for " & .OwnPokemon.GetDisplayName() & "!", "move:healingwish")
+ CureStatusProblem(True, True, BattleScreen, "", "move:healingwish")
+ End If
+ End If
+ End With
+ End Sub
- Public Sub SwitchOutOpp(ByVal BattleScreen As BattleScreen, ByVal index As Integer, Optional ByVal message As String = "")
- With BattleScreen
- 'Natural cure cures status problems
- If .OppPokemon.Ability.Name.ToLower() = "natural cure" Then
- If .OppPokemon.Status <> Pokemon.StatusProblems.Fainted And .OppPokemon.Status <> Pokemon.StatusProblems.None Then
- .OppPokemon.Status = Pokemon.StatusProblems.None
- .BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & "'s status problem got healed by Natural Cure"))
- End If
- End If
- 'Regenerator ability heals 1/3 of it's max HP
- If .OppPokemon.Ability.Name.ToLower() = "regenerator" Then
- If Not (.OppPokemon.Status = Pokemon.StatusProblems.Fainted Or .OppPokemon.HP = 0) Then
- Dim restoreHP = CInt(.OppPokemon.MaxHP / 3)
- If restoreHP > 0 And .OppPokemon.HP < .OppPokemon.MaxHP And .OppPokemon.HP > 0 Then
- BattleScreen.Battle.GainHP(restoreHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & "'s HP was restored!", "ability:regenerator")
- End If
- End If
- End If
- 'save baton pass stuff:
- If .FieldEffects.OppUsedBatonPass = True Then
- .FieldEffects.OppBatonPassStats = New List(Of Integer)
- With .OppPokemon
- BattleScreen.FieldEffects.OppBatonPassStats.AddRange({ .StatAttack, .StatDefense, .StatSpAttack, .StatSpDefense, .StatSpeed, .Evasion, .Accuracy})
- End With
- .FieldEffects.OppBatonPassConfusion = .OppPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True
- End If
+ Public Sub SwitchOutOpp(ByVal BattleScreen As BattleScreen, ByVal index As Integer, Optional ByVal message As String = "")
+ With BattleScreen
+ 'Natural cure cures status problems
+ If .OppPokemon.Ability.Name.ToLower() = "natural cure" Then
+ If .OppPokemon.Status <> Pokemon.StatusProblems.Fainted And .OppPokemon.Status <> Pokemon.StatusProblems.None Then
+ .OppPokemon.Status = Pokemon.StatusProblems.None
+ .BattleQuery.Add(New TextQueryObject(.OppPokemon.GetDisplayName() & "'s status problem got healed by Natural Cure"))
+ End If
+ End If
+ 'Regenerator ability heals 1/3 of it's max HP
+ If .OppPokemon.Ability.Name.ToLower() = "regenerator" Then
+ If Not (.OppPokemon.Status = Pokemon.StatusProblems.Fainted Or .OppPokemon.HP = 0) Then
+ Dim restoreHP = CInt(.OppPokemon.MaxHP / 3)
+ If restoreHP > 0 And .OppPokemon.HP < .OppPokemon.MaxHP And .OppPokemon.HP > 0 Then
+ BattleScreen.Battle.GainHP(restoreHP, False, True, BattleScreen, .OppPokemon.GetDisplayName() & "'s HP was restored!", "ability:regenerator")
+ End If
+ End If
+ End If
+ 'save baton pass stuff:
+ If .FieldEffects.OppUsedBatonPass = True Then
+ .FieldEffects.OppBatonPassStats = New List(Of Integer)
+ With .OppPokemon
+ BattleScreen.FieldEffects.OppBatonPassStats.AddRange({ .StatAttack, .StatDefense, .StatSpAttack, .StatSpDefense, .StatSpeed, .Evasion, .Accuracy})
+ End With
+ .FieldEffects.OppBatonPassConfusion = .OppPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True
+ End If
- 'Set the original objects of Pokemon
- .OppPokemon.ResetTemp()
+ 'Set the original objects of Pokemon
+ .OppPokemon.ResetTemp()
- 'Remove volatiles
- .OppPokemon.ClearAllVolatiles()
+ 'Remove volatiles
+ .OppPokemon.ClearAllVolatiles()
- 'Resetting FieldEffects
- With .FieldEffects
- .OppSleepTurns = 0
- .OppTruantRound = 0
- .OppTaunt = 0
- .OppSmacked = 0
- .OppRageCounter = 0
- .OppUproar = 0
- If .OppUsedBatonPass = False Then .OppFocusEnergy = 0
- .OppEndure = 0
- .OppProtectCounter = 0
- .OppDetectCounter = 0
- .OppKingsShieldCounter = 0
- .OppProtectMovesCount = 0
- If .OppUsedBatonPass = False Then .OppIngrain = 0
- If .OppUsedBatonPass = False Then .OppSubstitute = 0
- If .OppUsedBatonPass = False Then .OppMagnetRise = 0
- If .OppUsedBatonPass = False Then .OppAquaRing = 0
- .OppPoisonCounter = 0
- .OppNightmare = 0
- If .OppUsedBatonPass = False Then .OppCurse = 0
- .OppOutrage = 0
- .OppThrash = 0
- .OppPetalDance = 0
- .OppEncore = 0
- .OppEncoreMove = Nothing
- If .OppUsedBatonPass = False Then .OppEmbargo = 0
- .OppYawn = 0
- If .OppUsedBatonPass = False Then .OppPerishSongCount = 0
- .OppConfusionTurns = 0
- .OppTorment = 0
- .OppTormentMove = Nothing
- .OppChoiceMove = Nothing
- .OppRecharge = 0
- .OppRolloutCounter = 0
- .OppIceBallCounter = 0
- .OppDefenseCurl = 0
- .OppCharge = 0
- .OppSolarBeam = 0
- .OppSolarBlade = 0
- If .OppUsedBatonPass = False Then .OppLeechSeed = 0
- If .OppUsedBatonPass = False Then .OppLockOn = 0
- .OppLansatBerry = 0
- .OppCustapBerry = 0
- .OppTrappedCounter = 0
- .OppFuryCutter = 0
- .OppEchoedVoice = 0
- .OppPokemonTurns = 0
- .OppStockpileCount = 0
- .OppDestinyBond = False
- .OppGastroAcid = False
+ 'Resetting FieldEffects
+ With .FieldEffects
+ .OppSleepTurns = 0
+ .OppTruantRound = 0
+ .OppTaunt = 0
+ .OppSmacked = 0
+ .OppRageCounter = 0
+ .OppUproar = 0
+ If .OppUsedBatonPass = False Then .OppFocusEnergy = 0
+ .OppEndure = 0
+ .OppProtectCounter = 0
+ .OppDetectCounter = 0
+ .OppKingsShieldCounter = 0
+ .OppProtectMovesCount = 0
+ If .OppUsedBatonPass = False Then .OppIngrain = 0
+ If .OppUsedBatonPass = False Then .OppSubstitute = 0
+ If .OppUsedBatonPass = False Then .OppMagnetRise = 0
+ If .OppUsedBatonPass = False Then .OppAquaRing = 0
+ .OppPoisonCounter = 0
+ .OppNightmare = 0
+ If .OppUsedBatonPass = False Then .OppCurse = 0
+ .OppOutrage = 0
+ .OppThrash = 0
+ .OppPetalDance = 0
+ .OppEncore = 0
+ .OppEncoreMove = Nothing
+ If .OppUsedBatonPass = False Then .OppEmbargo = 0
+ .OppYawn = 0
+ If .OppUsedBatonPass = False Then .OppPerishSongCount = 0
+ .OppConfusionTurns = 0
+ .OppTorment = 0
+ .OppTormentMove = Nothing
+ .OppChoiceMove = Nothing
+ .OppRecharge = 0
+ .OppRolloutCounter = 0
+ .OppIceBallCounter = 0
+ .OppDefenseCurl = 0
+ .OppCharge = 0
+ .OppSolarBeam = 0
+ .OppSolarBlade = 0
+ If .OppUsedBatonPass = False Then .OppLeechSeed = 0
+ If .OppUsedBatonPass = False Then .OppLockOn = 0
+ .OppLansatBerry = 0
+ .OppCustapBerry = 0
+ .OppTrappedCounter = 0
+ .OppFuryCutter = 0
+ .OppEchoedVoice = 0
+ .OppPokemonTurns = 0
+ .OppStockpileCount = 0
+ .OppDestinyBond = False
+ .OppGastroAcid = False
- .OppFlyCounter = 0
- .OppDigCounter = 0
- .OppBounceCounter = 0
- .OppDiveCounter = 0
- .OppShadowForceCounter = 0
- .OppPhantomForceCounter = 0
- .OppSkyDropCounter = 0
- .OppGeomancyCounter = 0
- .OppSkyAttackCounter = 0
- .OppRazorWindCounter = 0
- .OppSkullBashCounter = 0
+ .OppFlyCounter = 0
+ .OppDigCounter = 0
+ .OppBounceCounter = 0
+ .OppDiveCounter = 0
+ .OppShadowForceCounter = 0
+ .OppPhantomForceCounter = 0
+ .OppSkyDropCounter = 0
+ .OppGeomancyCounter = 0
+ .OppSkyAttackCounter = 0
+ .OppRazorWindCounter = 0
+ .OppSkullBashCounter = 0
- .OppForesight = 0
- .OppOdorSleuth = 0
- .OppMiracleEye = 0
+ .OppForesight = 0
+ .OppOdorSleuth = 0
+ .OppMiracleEye = 0
- .OppWrap = 0
- .OppWhirlpool = 0
- .OppBind = 0
- .OppClamp = 0
- .OppFireSpin = 0
- .OppMagmaStorm = 0
- .OppSandTomb = 0
- .OppInfestation = 0
+ .OppWrap = 0
+ .OppWhirlpool = 0
+ .OppBind = 0
+ .OppClamp = 0
+ .OppFireSpin = 0
+ .OppMagmaStorm = 0
+ .OppSandTomb = 0
+ .OppInfestation = 0
- .OppBideCounter = 0
- .OppBideDamage = 0
+ .OppBideCounter = 0
+ .OppBideDamage = 0
- .OppRoostUsed = False
+ .OppRoostUsed = False
- 'Own stuff that depends on opp pokemon presence
- .OwnTrappedCounter = 0
- .OwnWrap = 0
- .OwnWhirlpool = 0
- .OwnBind = 0
- .OwnClamp = 0
- .OwnFireSpin = 0
- .OwnMagmaStorm = 0
- .OwnSandTomb = 0
- .OwnInfestation = 0
+ 'Own stuff that depends on opp pokemon presence
+ .OwnTrappedCounter = 0
+ .OwnWrap = 0
+ .OwnWhirlpool = 0
+ .OwnBind = 0
+ .OwnClamp = 0
+ .OwnFireSpin = 0
+ .OwnMagmaStorm = 0
+ .OwnSandTomb = 0
+ .OwnInfestation = 0
- If BattleScreen.OwnPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Infatuation) Then
- BattleScreen.OwnPokemon.RemoveVolatileStatus(Pokemon.VolatileStatus.Infatuation)
- End If
- End With
- End With
+ If BattleScreen.OwnPokemon.HasVolatileStatus(Pokemon.VolatileStatus.Infatuation) Then
+ BattleScreen.OwnPokemon.RemoveVolatileStatus(Pokemon.VolatileStatus.Infatuation)
+ End If
+ End With
+ End With
- BattleScreen.OppPokemon.Ability.SwitchOut(BattleScreen.OppPokemon)
+ BattleScreen.OppPokemon.Ability.SwitchOut(BattleScreen.OppPokemon)
- If BattleScreen.IsTrainerBattle = False Then
+ If BattleScreen.IsTrainerBattle = False Then
ChangeCameraAngle(1, False, BattleScreen)
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)
+ Faint.AnimationMovePokemonEntity(0, -1, 0, 0.1, False, False, 2, 0,,, 4)
BattleScreen.BattleQuery.Add(Faint)
BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 2, -1, -1, -1, -1))
- EndBattle(EndBattleReasons.WinWild, BattleScreen, False)
- Else
- If BattleScreen.TrainerHasFightablePokemon() = True Then
- If BattleScreen.OppPokemon.HP <= 0 Or BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Fainted Then
- GainEXP(BattleScreen)
- End If
+ EndBattle(EndBattleReasons.WinWild, BattleScreen, False)
+ Else
+ If BattleScreen.TrainerHasFightablePokemon() = True Then
+ If BattleScreen.OppPokemon.HP <= 0 Or BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Fainted Then
+ GainEXP(BattleScreen)
+ End If
If BattleScreen.IsRemoteBattle And BattleScreen.OppFaint Then
- 'Next pokemon is selected by the opponent.
- Else
- SwitchInOpp(BattleScreen, False, index)
- End If
- Else
- GainEXP(BattleScreen)
+ 'Next pokemon is selected by the opponent.
+ Else
+ SwitchInOpp(BattleScreen, False, index)
+ End If
+ Else
+ GainEXP(BattleScreen)
If message = "" Then
- message = BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""
- End If
+ message = BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""
+ End If
- BattleScreen.BattleQuery.Add(New TextQueryObject(message))
+ BattleScreen.BattleQuery.Add(New TextQueryObject(message))
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
@@ -7170,57 +7138,56 @@
Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination = New Vector3(0, 0, 0)
- Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+ Dim SmokeTexture As String = "Textures\Battle\Cloud"
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
- Dim SmokeEntity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1)
- BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ BallReturn.AnimationSpawnMovingEntity(SmokePosition.X, SmokePosition.Y, SmokePosition.Z, SmokeTexture, SmokeScale.X, SmokeScale.Y, SmokeScale.Z, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
Threading.Interlocked.Increment(SmokeReturned)
Loop While SmokeReturned <= 38
' Pokemon disappears
- BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
- BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
+ BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
+ BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
' Ball returns
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
- Dim BallReturnEntity = BallReturn.SpawnEntity(New Vector3(0, 0, 0), TextureManager.GetTexture(BattleScreen.OppPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
- BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 0F, 0F,, 0.3)
+ BallReturn.AnimationSpawnMovingEntity(0, 0, 0, BattleScreen.OppPokemon.CatchBall.TextureSource, 0.3F, 0.3F, 0.3F, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
BattleScreen.BattleQuery.Add(BallReturn)
EndBattle(EndBattleReasons.WinTrainer, BattleScreen, False)
- If BattleScreen.IsRemoteBattle = True Then
- EndBattle(EndBattleReasons.WinTrainer, BattleScreen, True)
- End If
- End If
- End If
- End Sub
+ If BattleScreen.IsRemoteBattle = True Then
+ EndBattle(EndBattleReasons.WinTrainer, BattleScreen, True)
+ End If
+ End If
+ End If
+ End Sub
- Public Sub ApplyOppBatonPass(ByVal BattleScreen As BattleScreen)
- If BattleScreen.FieldEffects.OppUsedBatonPass = True Then
- BattleScreen.FieldEffects.OppUsedBatonPass = False
+ Public Sub ApplyOppBatonPass(ByVal BattleScreen As BattleScreen)
+ If BattleScreen.FieldEffects.OppUsedBatonPass = True Then
+ BattleScreen.FieldEffects.OppUsedBatonPass = False
- BattleScreen.OppPokemon.StatAttack = BattleScreen.FieldEffects.OppBatonPassStats(0)
- BattleScreen.OppPokemon.StatDefense = BattleScreen.FieldEffects.OppBatonPassStats(1)
- BattleScreen.OppPokemon.StatSpAttack = BattleScreen.FieldEffects.OppBatonPassStats(2)
- BattleScreen.OppPokemon.StatSpDefense = BattleScreen.FieldEffects.OppBatonPassStats(3)
- BattleScreen.OppPokemon.StatSpeed = BattleScreen.FieldEffects.OppBatonPassStats(4)
- BattleScreen.OppPokemon.Evasion = BattleScreen.FieldEffects.OppBatonPassStats(5)
- BattleScreen.OppPokemon.Accuracy = BattleScreen.FieldEffects.OppBatonPassStats(6)
+ BattleScreen.OppPokemon.StatAttack = BattleScreen.FieldEffects.OppBatonPassStats(0)
+ BattleScreen.OppPokemon.StatDefense = BattleScreen.FieldEffects.OppBatonPassStats(1)
+ BattleScreen.OppPokemon.StatSpAttack = BattleScreen.FieldEffects.OppBatonPassStats(2)
+ BattleScreen.OppPokemon.StatSpDefense = BattleScreen.FieldEffects.OppBatonPassStats(3)
+ BattleScreen.OppPokemon.StatSpeed = BattleScreen.FieldEffects.OppBatonPassStats(4)
+ BattleScreen.OppPokemon.Evasion = BattleScreen.FieldEffects.OppBatonPassStats(5)
+ BattleScreen.OppPokemon.Accuracy = BattleScreen.FieldEffects.OppBatonPassStats(6)
- If BattleScreen.FieldEffects.OppBatonPassConfusion = True Then
- BattleScreen.FieldEffects.OppBatonPassConfusion = False
- BattleScreen.OppPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
- End If
- End If
- End Sub
+ If BattleScreen.FieldEffects.OppBatonPassConfusion = True Then
+ BattleScreen.FieldEffects.OppBatonPassConfusion = False
+ BattleScreen.OppPokemon.AddVolatileStatus(Pokemon.VolatileStatus.Confusion)
+ End If
+ End If
+ End Sub
- Public Sub SwitchInOpp(ByVal BattleScreen As BattleScreen, ByVal FirstTime As Boolean, ByVal index As Integer)
+ Public Sub SwitchInOpp(ByVal BattleScreen As BattleScreen, ByVal FirstTime As Boolean, ByVal index As Integer)
- If FirstTime = False Then
- HasSwitchedInOpp = True
+ If FirstTime = False Then
+ HasSwitchedInOpp = True
BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.Name & ": ""Come back, " & BattleScreen.OppPokemon.GetDisplayName() & "!"""))
Dim BallReturn As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
@@ -7232,249 +7199,246 @@
Dim SmokePosition = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
Dim SmokeDestination = New Vector3(0, 0, 0)
- Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+ Dim SmokeTexture As String = "Textures\Battle\Cloud"
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
- Dim SmokeEntity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1)
- BallReturn.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
+
+ BallReturn.AnimationSpawnMovingEntity(SmokePosition.X, SmokePosition.Y, SmokePosition.Z, SmokeTexture, SmokeScale.X, SmokeScale.Y, SmokeScale.Z, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 0.0F, 0.0F)
Threading.Interlocked.Increment(SmokeReturned)
Loop While SmokeReturned <= 38
' Pokemon disappears
- BallReturn.AnimationFade(Nothing, False, 1, False, 0, 1, 0)
- BallReturn.AnimationMove(Nothing, False, 0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
+ BallReturn.AnimationFadePokemonEntity(1, False, 0, 1, 0)
+ BallReturn.AnimationMovePokemonEntity(0, 0.5, 0, 0.5, False, False, 2, 0,,, 4)
' Ball returns
BallReturn.AnimationPlaySound("Battle\Pokeball\Throw", 1, 0)
- Dim BallReturnEntity = BallReturn.SpawnEntity(New Vector3(0, 0, 0), TextureManager.GetTexture(BattleScreen.OppPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
- BallReturn.AnimationMove(BallReturnEntity, True, -2, 0, 0, 0.1, False, True, 0F, 0F,, 0.3)
+ BallReturn.AnimationSpawnMovingEntity(0, 0, 0, BattleScreen.OppPokemon.CatchBall.TextureSource, 0.3F, 0.3F, 0.3F, -2, 0, 0, 0.1, False, True, 1, 0,, 0.3)
BattleScreen.BattleQuery.Add(BallReturn)
BattleScreen.SendInNewTrainerPokemon(index)
- Me.ApplyOppBatonPass(BattleScreen)
+ Me.ApplyOppBatonPass(BattleScreen)
- If BattleScreen.ParticipatedPokemon.Contains(BattleScreen.OwnPokemonIndex) = False Then
- BattleScreen.ParticipatedPokemon.Add(BattleScreen.OwnPokemonIndex)
- End If
+ If BattleScreen.ParticipatedPokemon.Contains(BattleScreen.OwnPokemonIndex) = False Then
+ BattleScreen.ParticipatedPokemon.Add(BattleScreen.OwnPokemonIndex)
+ End If
- Dim oppShiny As String = "N"
- If BattleScreen.OppPokemon.IsShiny = True Then
- oppShiny = "S"
- End If
+ Dim oppShiny As String = "N"
+ If BattleScreen.OppPokemon.IsShiny = True Then
+ oppShiny = "S"
+ End If
- Dim oppModel As String = BattleScreen.GetModelName(False)
+ Dim oppModel As String = BattleScreen.GetModelName(False)
- If oppModel = "" Then
- BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, PokemonForms.GetOverworldSpriteName(BattleScreen.OppPokemon), -1, -1, 0, 1))
- Else
- BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(False, oppModel, -1, -1, 1, 0))
- End If
+ If oppModel = "" Then
+ BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, PokemonForms.GetOverworldSpriteName(BattleScreen.OppPokemon), -1, -1, 0, 1))
+ Else
+ BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(False, oppModel, -1, -1, 1, 0))
+ End If
- BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(True, ToggleEntityQueryObject.BattleEntities.OppPokemon, 1, -1, -1, -1, -1))
+ 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() & "!"""))
' Ball is thrown
Dim BallThrow As AnimationQueryObject = New AnimationQueryObject(BattleScreen.OppPokemonNPC, True, BattleScreen.OppPokemonModel)
BallThrow.AnimationPlaySound("Battle\Pokeball\Throw", 0, 0)
- Dim BallThrowEntity = BallThrow.SpawnEntity(New Vector3(-2, -0.15, 0), TextureManager.GetTexture(BattleScreen.OwnPokemon.CatchBall.TextureSource), New Vector3(0.3F), 1.0F)
- BallThrow.AnimationMove(BallThrowEntity, True, 0, 0.35, 0, 0.1, False, True, 0F, 0F,, 0.3)
+ BallThrow.AnimationSpawnMovingEntity(-2, -0.15, 0, BattleScreen.OwnPokemon.CatchBall.TextureSource, 0.3F, 0.3F, 0.3F, 0, 0.35, 0, 0.1, False, True, 0F, 0F,, 0.3)
- ' Ball opens
+ ' Ball Opens
BallThrow.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
Dim SmokeSpawned As Integer = 0
Do
Dim SmokePosition = New Vector3(0, 0.35, 0)
Dim SmokeDestination = New Vector3(CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10), CSng(Random.Next(-10, 10) / 10))
- Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
+ Dim SmokeTexture As String = "Textures\Battle\Cloud"
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 10.0F)
- Dim SmokeEntity = BallReturn.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1)
- BallThrow.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
+ BallThrow.AnimationSpawnMovingEntity(SmokePosition.X, SmokePosition.Y, SmokePosition.Z, SmokeTexture, SmokeScale.X, SmokeScale.Y, SmokeScale.Z, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3.0F, 0.0F)
Threading.Interlocked.Increment(SmokeSpawned)
Loop While SmokeSpawned <= 38
' Pokemon appears
- BallThrow.AnimationFade(Nothing, False, 1, True, 1, 4, 0)
+ BallThrow.AnimationFadePokemonEntity(1, True, 1, 4, 0)
BallThrow.AnimationPlaySound(CStr(BattleScreen.OppPokemon.Number), 4, 0,, True)
' Pokémon falls down
- BallThrow.AnimationMove(Nothing, False, 0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
+ BallThrow.AnimationMovePokemonEntity(0, 0, 0, 0.05F, False, False, 4, 0,,, 4)
BattleScreen.BattleQuery.Add(BallThrow)
End If
- With BattleScreen
- Dim p As Pokemon = .OppPokemon
- Dim op As Pokemon = .OwnPokemon
+ With BattleScreen
+ Dim p As Pokemon = .OppPokemon
+ Dim op As Pokemon = .OwnPokemon
- Dim spikeAffected As Boolean = True
- Dim rockAffected As Boolean = True
+ Dim spikeAffected As Boolean = True
+ Dim rockAffected As Boolean = True
- spikeAffected = BattleScreen.FieldEffects.IsGrounded(False, BattleScreen)
+ spikeAffected = BattleScreen.FieldEffects.IsGrounded(False, BattleScreen)
- If spikeAffected = True Then
- If .FieldEffects.OwnSpikes > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
- Dim spikeDamage As Double = 1D
- Select Case .FieldEffects.OwnSpikes
- Case 1
- spikeDamage = (p.MaxHP / 100) * 12.5D
- Case 2
- spikeDamage = (p.MaxHP / 100) * 16.7D
- Case 3
- spikeDamage = (p.MaxHP / 100) * 25D
- End Select
- ReduceHP(CInt(spikeDamage), False, True, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes")
- End If
- End If
- 'Sticky Web
- If spikeAffected = True Then
- If .FieldEffects.OwnStickyWeb > 0 Then
+ If spikeAffected = True Then
+ If .FieldEffects.OwnSpikes > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
+ Dim spikeDamage As Double = 1D
+ Select Case .FieldEffects.OwnSpikes
+ Case 1
+ spikeDamage = (p.MaxHP / 100) * 12.5D
+ Case 2
+ spikeDamage = (p.MaxHP / 100) * 16.7D
+ Case 3
+ spikeDamage = (p.MaxHP / 100) * 25D
+ End Select
+ ReduceHP(CInt(spikeDamage), False, True, BattleScreen, "The Spikes hurt " & p.GetDisplayName() & "!", "spikes")
+ End If
+ End If
+ 'Sticky Web
+ If spikeAffected = True Then
+ If .FieldEffects.OwnStickyWeb > 0 Then
- LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a Sticky Web!", "stickyweb")
+ LowerStat(False, False, BattleScreen, "Speed", 1, "The opposing pokemon was caught in a Sticky Web!", "stickyweb")
- End If
- End If
- If spikeAffected = True Then
- If .FieldEffects.OwnToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then
- Select Case .FieldEffects.OwnToxicSpikes
- Case 1
- InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
- Case 2
- InflictPoison(False, True, BattleScreen, True, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
- End Select
- End If
- If .FieldEffects.OwnToxicSpikes > 0 Then
- If p.Type1.Type = Element.Types.Poison Or p.Type2.Type = Element.Types.Poison Then
- .BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " removed the Toxic Spikes!"))
- .FieldEffects.OwnToxicSpikes = 0
- End If
- End If
- End If
+ End If
+ End If
+ If spikeAffected = True Then
+ If .FieldEffects.OwnToxicSpikes > 0 And p.Status = Pokemon.StatusProblems.None And p.Type1.Type <> Element.Types.Poison And p.Type2.Type <> Element.Types.Poison Then
+ Select Case .FieldEffects.OwnToxicSpikes
+ Case 1
+ InflictPoison(False, True, BattleScreen, False, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
+ Case 2
+ InflictPoison(False, True, BattleScreen, True, "The Toxic Spikes hurt " & p.GetDisplayName() & "!", "toxicspikes")
+ End Select
+ End If
+ If .FieldEffects.OwnToxicSpikes > 0 Then
+ If p.Type1.Type = Element.Types.Poison Or p.Type2.Type = Element.Types.Poison Then
+ .BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " removed the Toxic Spikes!"))
+ .FieldEffects.OwnToxicSpikes = 0
+ End If
+ End If
+ End If
- If rockAffected = True Then
- If .FieldEffects.OwnStealthRock > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
- Dim rocksDamage As Double = 1D
+ If rockAffected = True Then
+ If .FieldEffects.OwnStealthRock > 0 And p.Ability.Name.ToLower() <> "magic guard" Then
+ Dim rocksDamage As Double = 1D
- Dim effectiveness As Single = BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type1)) * BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type2))
- Select Case effectiveness
- Case 0.25F
- rocksDamage = (p.MaxHP / 100) * 3.125D
- Case 0.5F
- rocksDamage = (p.MaxHP / 100) * 6.25D
- Case 1.0F
- rocksDamage = (p.MaxHP / 100) * 12.5D
- Case 2.0F
- rocksDamage = (p.MaxHP / 100) * 25D
- Case 4.0F
- rocksDamage = (p.MaxHP / 100) * 50D
- End Select
+ Dim effectiveness As Single = BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type1)) * BattleCalculation.ReverseTypeEffectiveness(Element.GetElementMultiplier(New Element(Element.Types.Rock), p.Type2))
+ Select Case effectiveness
+ Case 0.25F
+ rocksDamage = (p.MaxHP / 100) * 3.125D
+ Case 0.5F
+ rocksDamage = (p.MaxHP / 100) * 6.25D
+ Case 1.0F
+ rocksDamage = (p.MaxHP / 100) * 12.5D
+ Case 2.0F
+ rocksDamage = (p.MaxHP / 100) * 25D
+ Case 4.0F
+ rocksDamage = (p.MaxHP / 100) * 50D
+ End Select
- ReduceHP(CInt(rocksDamage), False, True, BattleScreen, "The Stealth Rocks hurt " & p.GetDisplayName() & "!", "stealthrocks")
- End If
- End If
+ ReduceHP(CInt(rocksDamage), False, True, BattleScreen, "The Stealth Rocks hurt " & p.GetDisplayName() & "!", "stealthrocks")
+ End If
+ End If
- TriggerAbilityEffect(BattleScreen, False)
- TriggerItemEffect(BattleScreen, False)
+ TriggerAbilityEffect(BattleScreen, False)
+ TriggerItemEffect(BattleScreen, False)
- If .OppPokemon.Status = Pokemon.StatusProblems.Sleep Then
- .FieldEffects.OppSleepTurns = Core.Random.Next(1, 4)
- End If
+ If .OppPokemon.Status = Pokemon.StatusProblems.Sleep Then
+ .FieldEffects.OppSleepTurns = Core.Random.Next(1, 4)
+ End If
- If BattleScreen.FieldEffects.OppHealingWish = True Then
- BattleScreen.FieldEffects.OppHealingWish = False
+ If BattleScreen.FieldEffects.OppHealingWish = True Then
+ BattleScreen.FieldEffects.OppHealingWish = False
- If .OppPokemon.HP < .OppPokemon.MaxHP Or .OppPokemon.Status <> Pokemon.StatusProblems.None Then
- GainHP(.OppPokemon.MaxHP - .OppPokemon.HP, False, False, BattleScreen, "The Healing Wish came true for " & .OppPokemon.GetDisplayName() & "!", "move:healingwish")
- CureStatusProblem(False, False, BattleScreen, "", "move:healingwish")
- End If
- End If
- End With
- End Sub
+ If .OppPokemon.HP < .OppPokemon.MaxHP Or .OppPokemon.Status <> Pokemon.StatusProblems.None Then
+ GainHP(.OppPokemon.MaxHP - .OppPokemon.HP, False, False, BattleScreen, "The Healing Wish came true for " & .OppPokemon.GetDisplayName() & "!", "move:healingwish")
+ CureStatusProblem(False, False, BattleScreen, "", "move:healingwish")
+ End If
+ End If
+ End With
+ End Sub
#End Region
#Region "EndBattle"
- Enum EndBattleReasons
- WinWild
- LoseWild
- WinTrainer
- LoseTrainer
- WinPvP
- LosePvP
- End Enum
+ Enum EndBattleReasons
+ WinWild
+ LoseWild
+ WinTrainer
+ LoseTrainer
+ WinPvP
+ LosePvP
+ End Enum
- Public Sub EndBattle(ByVal reason As EndBattleReasons, ByVal BattleScreen As BattleScreen, ByVal AddPVP As Boolean)
- BattleScreen.OwnFaint = False
- BattleScreen.OppFaint = False
- IsAfterFaint = False
- If AddPVP = True Then
- Select Case reason
- Case EndBattleReasons.WinTrainer 'Lost
- Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 5, q)
+ Public Sub EndBattle(ByVal reason As EndBattleReasons, ByVal BattleScreen As BattleScreen, ByVal AddPVP As Boolean)
+ BattleScreen.OwnFaint = False
+ BattleScreen.OppFaint = False
+ IsAfterFaint = False
+ If AddPVP = True Then
+ Select Case reason
+ Case EndBattleReasons.WinTrainer 'Lost
+ Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 5, q)
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 4, New TextQueryObject("You lost the battle!"))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, New TextQueryObject(""))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject(""))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 4, New TextQueryObject("You lost the battle!"))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, New TextQueryObject(""))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject(""))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
- Case EndBattleReasons.LoseTrainer 'Won
- Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, q)
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
+ Case EndBattleReasons.LoseTrainer 'Won
+ Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 3, q)
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject("Pokémon Trainer " & Core.Player.Name & " was defeated!"))
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 2, New TextQueryObject("Pokémon Trainer " & Core.Player.Name & " was defeated!"))
- BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
- End Select
- Else
- Select Case reason
- Case EndBattleReasons.WinWild
- Won = True
- Core.Player.AddPoints(1, "Won against wild Pokémon.")
+ BattleScreen.TempPVPBattleQuery.Add(BattleScreen.BattleQuery.Count - 1, New EndBattleQueryObject(True))
+ End Select
+ Else
+ Select Case reason
+ Case EndBattleReasons.WinWild
+ Won = True
+ Core.Player.AddPoints(1, "Won against wild Pokémon.")
- BattleScreen.BattleQuery.Add(New PlayMusicQueryObject("wild_defeat"))
- ChangeCameraAngle(1, True, BattleScreen)
+ BattleScreen.BattleQuery.Add(New PlayMusicQueryObject("wild_defeat"))
+ ChangeCameraAngle(1, True, BattleScreen)
- GainEXP(BattleScreen)
+ GainEXP(BattleScreen)
- If BattleScreen.FieldEffects.OwnPayDayCounter > 0 Then
- Core.Player.Money += BattleScreen.FieldEffects.OwnPayDayCounter
- BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " picked up $" & BattleScreen.FieldEffects.OwnPayDayCounter & "!"))
- End If
+ If BattleScreen.FieldEffects.OwnPayDayCounter > 0 Then
+ Core.Player.Money += BattleScreen.FieldEffects.OwnPayDayCounter
+ BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " picked up $" & BattleScreen.FieldEffects.OwnPayDayCounter & "!"))
+ End If
- BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
- Case EndBattleReasons.WinTrainer
- Won = True
- Core.Player.AddPoints(3, "Won against trainer.")
+ BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
+ Case EndBattleReasons.WinTrainer
+ Won = True
+ Core.Player.AddPoints(3, "Won against trainer.")
- Core.Player.Money += BattleScreen.GetTrainerMoney()
+ Core.Player.Money += BattleScreen.GetTrainerMoney()
- BattleScreen.BattleQuery.Add(New PlayMusicQueryObject(BattleScreen.Trainer.GetDefeatMusic()))
+ BattleScreen.BattleQuery.Add(New PlayMusicQueryObject(BattleScreen.Trainer.GetDefeatMusic()))
- Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.04F, 0.02F)
- q.ApplyCurrentCamera = True
- BattleScreen.BattleQuery.Add(q)
+ Dim q As New CameraQueryObject(New Vector3(15, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, -(MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.04F, 0.02F)
+ q.ApplyCurrentCamera = True
+ BattleScreen.BattleQuery.Add(q)
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.TrainerType & " " & BattleScreen.Trainer.Name & " was defeated!"))
- BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.OutroMessage))
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.TrainerType & " " & BattleScreen.Trainer.Name & " was defeated!"))
+ BattleScreen.BattleQuery.Add(New TextQueryObject(BattleScreen.Trainer.OutroMessage))
- If BattleScreen.GetTrainerMoney() > 0 Then
- BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " got $" & BattleScreen.GetTrainerMoney() & "!"))
- End If
+ If BattleScreen.GetTrainerMoney() > 0 Then
+ BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Name & " got $" & BattleScreen.GetTrainerMoney() & "!"))
+ End If
- BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
- Case EndBattleReasons.LoseTrainer, EndBattleReasons.LoseWild
- Won = False
+ BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
+ Case EndBattleReasons.LoseTrainer, EndBattleReasons.LoseWild
+ Won = False
Dim q As New CameraQueryObject(New Vector3(12, 0, 13), Screen.Camera.Position, 0.03F, 0.03F, (MathHelper.Pi * 0.5F), Screen.Camera.Yaw, 0.0F, Screen.Camera.Pitch, 0.02F, 0.02F)
q.ApplyCurrentCamera = True
BattleScreen.BattleQuery.Add(q)
diff --git a/P3D/Pokemon/Attacks/Fire/Ember.vb b/P3D/Pokemon/Attacks/Fire/Ember.vb
index 1356505d9..bb5fae6fe 100644
--- a/P3D/Pokemon/Attacks/Fire/Ember.vb
+++ b/P3D/Pokemon/Attacks/Fire/Ember.vb
@@ -65,14 +65,10 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
- Dim FireballEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(0.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F)
-
- MoveAnimation.AnimationMove(FireballEntity, True, 2.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5, 0)
- MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Start", 0, 0)
+ MoveAnimation.AnimationSpawnMovingEntity(0.0, 0, 0.0, "Textures\Battle\Fire\FireBall", 0.5, 0.5, 0.5, 2.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5, 0)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Ember_Start", 0, 0)
For i = 0 To 12
- Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1)
- MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
-
+ MoveAnimation.AnimationSpawnFadingEntity(CSng(i * 0.2), 0.0, 0.0, "Textures\Battle\Fire\Smoke", 0.2, 0.2, 0.2, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
i += 1
Next
BattleScreen.BattleQuery.Add(MoveAnimation)
@@ -80,37 +76,32 @@
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
- Dim FireballEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(2.0, 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\FireBall"), New Vector3(0.5F), 1.0F)
-
- MoveAnimation.AnimationMove(FireballEntity, True, 0.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0,, -0.5, 0)
+ MoveAnimation.AnimationSpawnMovingEntity(2.0, 0, 0.0, "Textures\Battle\Fire\FireBall", 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.05, False, True, 0.0, 0.0, 0.1, 0.5, 0)
For i = 0 To 12
- Dim SmokeEntity = MoveAnimation.SpawnEntity(New Vector3(CSng(3.0 - i * 0.2), 0.0, 0.0), TextureManager.GetTexture("Textures\Battle\Fire\Smoke"), New Vector3(0.2), 1)
- MoveAnimation.AnimationFade(SmokeEntity, True, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
-
+ MoveAnimation.AnimationSpawnFadingEntity(CSng(3.0 - i * 0.2), 0.0, 0.0, "Textures\Battle\Fire\Smoke", 0.2, 0.2, 0.2, 0.02, False, 0.0, CSng(i * 0.2), 0.0)
i += 1
Next
- MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Hit", 2, 0)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Ember_Hit", 2, 0)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- Dim FireEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
- Dim FireEntity2 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
- Dim FireEntity3 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 32, 32, 32)), 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 64, 32, 32)), 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,96,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity1, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity2, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity3, False, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 96, 32, 32)), 4, 1)
-
- MoveAnimation.AnimationChangeTexture(FireEntity1, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity2, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
- MoveAnimation.AnimationChangeTexture(FireEntity3, True, TextureManager.GetTexture("Textures\Battle\Fire\Ember", New Rectangle(0, 128, 32, 32)), 5, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Fire\Ember,0,128,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 1)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
diff --git a/P3D/Pokemon/Attacks/Normal/Growl.vb b/P3D/Pokemon/Attacks/Normal/Growl.vb
index 369515629..5c35961e3 100644
--- a/P3D/Pokemon/Attacks/Normal/Growl.vb
+++ b/P3D/Pokemon/Attacks/Normal/Growl.vb
@@ -64,14 +64,11 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
-
MoveAnimation.AnimationPlaySound(CStr(CurrentPokemon.Number), 0, 0,, True)
- Dim SoundwaveEntity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 1)
-
- MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 1, 1)
- MoveAnimation.AnimationChangeTexture(SoundwaveEntity, False, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), 2, 1)
- MoveAnimation.AnimationChangeTexture(SoundwaveEntity, True, TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 32, 32, 32), ""), 3, 1)
-
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Normal\Growl,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Normal\Growl,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Normal\Growl,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Normal\Growl,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
End Class
diff --git a/P3D/Pokemon/Attacks/Normal/Pound.vb b/P3D/Pokemon/Attacks/Normal/Pound.vb
index d14a3c279..467c5891d 100644
--- a/P3D/Pokemon/Attacks/Normal/Pound.vb
+++ b/P3D/Pokemon/Attacks/Normal/Pound.vb
@@ -55,11 +55,10 @@
Me.AIField2 = AIField.Nothing
End Sub
- Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
+ Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Pound", 0.5, 2.5)
- Dim PoundEntity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Normal\Growl", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1, 0, 3)
- MoveAnimation.AnimationFade(PoundEntity, True, 1.0F, False, 0.0F, 3, 0)
+ MoveAnimation.AnimationSpawnFadingEntity(0, -0.25, 0, "Textures\Battle\Normal\Pound", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 3)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
diff --git a/P3D/Pokemon/Attacks/Normal/Tackle.vb b/P3D/Pokemon/Attacks/Normal/Tackle.vb
index 668b4b545..6d8954700 100644
--- a/P3D/Pokemon/Attacks/Normal/Tackle.vb
+++ b/P3D/Pokemon/Attacks/Normal/Tackle.vb
@@ -54,16 +54,15 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own, CurrentModel)
- MoveAnimation.AnimationMove(Nothing, False, 0.5, 0, 0, 0.3, False, False, 0, 0,,, 2)
- MoveAnimation.AnimationMove(Nothing, False, 0, 0, 0, 0.3, False, False, 1, 0,,, 2)
+ MoveAnimation.AnimationMovePokemonEntity(0.5, 0, 0, 0.3, False, False, 0, 0,,, 2)
+ MoveAnimation.AnimationMovePokemonEntity(0, 0, 0, 0.3, False, False, 1, 0,,, 2)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
- MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\Tackle", 0, 2)
- Dim SpawnEntity = MoveAnimation.SpawnEntity(New Vector3(0, -0.25, 0), TextureManager.GetTexture("Textures\Battle\Normal\Tackle"), New Vector3(1.0F), 1.0F)
- MoveAnimation.AnimationFade(SpawnEntity, True, 0.02, False, 1.0F, 0, 2)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\Tackle", 0, 2)
+ MoveAnimation.AnimationSpawnFadingEntity(0, -0.25, 0, "Textures\Battle\Normal\Tackle", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 2)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
End Class
diff --git a/P3D/Pokemon/Attacks/Poison/PoisonSting.vb b/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
index fa0fb7abe..36622416b 100644
--- a/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
+++ b/P3D/Pokemon/Attacks/Poison/PoisonSting.vb
@@ -67,38 +67,30 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
- Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(CurrentEntity.Position, TextureManager.GetTexture("Textures\Battle\Poison\Stinger"), New Vector3(0.5F), 1.0F)
-
- MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Start", 0, 0)
- MoveAnimation.AnimationMove(StingerEntity, True, 2.0, 0.0, 0.0, 0.05, False, False, 0.0, 0.0,,, 0)
-
+ MoveAnimation.AnimationSpawnMovingEntity(0.0, 0, 0.0, "Textures\Battle\Poison\Stinger", 0.5, 0.5, 0.5, 2.0, 0.0, 0.0, 0.05, False, False, 0.0, 0.0,,, 0)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\PoisonSting_Start", 0, 0)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity)
Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
- Dim StingerEntity As Entity = MoveAnimation.SpawnEntity(New Vector3(2.0, 0, 0.0), TextureManager.GetTexture("Textures\Battle\Poison\Stinger"), New Vector3(0.5F), 1)
+ MoveAnimation.AnimationSpawnMovingEntity(2.0, 0, 0.0, "Textures\Battle\Poison\Stinger", 0.5, 0.5, 0.5, 0.0, 0.0, 0.0, 0.05, False, False, 0.0, 0.0,,, 0)
- MoveAnimation.AnimationMove(StingerEntity, True, 0.0, 0.0, 0.0, 0.05, False, False, 0.0, 0.0,,, 0)
+ MoveAnimation.AnimationPlaySound("Battle\Attacks\PoisonSting_Hit", 1, 0)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 1, 1)
- MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Hit", 1, 0)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)
- Dim BubbleEntity1 As Entity = MoveAnimation.SpawnEntity(New Vector3(-0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 1, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(-0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,0,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 3, 1)
- MoveAnimation.AnimationChangeTexture(BubbleEntity1, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 2, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, 0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 4, 1)
- Dim BubbleEntity2 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, 0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 2, 1)
-
- MoveAnimation.AnimationChangeTexture(BubbleEntity1, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 3, 1)
- MoveAnimation.AnimationChangeTexture(BubbleEntity2, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 3, 1)
-
- Dim BubbleEntity3 As Entity = MoveAnimation.SpawnEntity(New Vector3(0.25, -0.25, -0.25), TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 0, 32, 32)), New Vector3(0.5F), 1, 3, 1)
-
- MoveAnimation.AnimationChangeTexture(BubbleEntity2, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 4, 1)
- MoveAnimation.AnimationChangeTexture(BubbleEntity3, False, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 32, 32, 32)), 4, 1)
-
- MoveAnimation.AnimationChangeTexture(BubbleEntity3, True, TextureManager.GetTexture("Textures\Battle\Poison\Bubble", New Rectangle(0, 64, 32, 32)), 5, 1)
+ MoveAnimation.AnimationSpawnFadingEntity(0.25, -0.25, -0.25, "Textures\Battle\Poison\Bubble,0,64,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 5, 2)
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub