Added Paralysis Animation
This commit is contained in:
parent
dc9ec6bd23
commit
71cdb5e0c0
|
@ -1122,14 +1122,20 @@
|
||||||
'p: the attacking pokemon
|
'p: the attacking pokemon
|
||||||
'op: the target pokemon
|
'op: the target pokemon
|
||||||
Dim p As Pokemon
|
Dim p As Pokemon
|
||||||
|
Dim pNPC As NPC
|
||||||
Dim op As Pokemon
|
Dim op As Pokemon
|
||||||
|
Dim opNPC As NPC
|
||||||
If own Then
|
If own Then
|
||||||
p = BattleScreen.OwnPokemon
|
p = BattleScreen.OwnPokemon
|
||||||
op = BattleScreen.OppPokemon
|
op = BattleScreen.OppPokemon
|
||||||
|
pNPC = BattleScreen.OwnPokemonNPC
|
||||||
|
opNPC = BattleScreen.OppPokemonNPC
|
||||||
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
BattleScreen.FieldEffects.OwnLastMove = moveUsed
|
||||||
Else
|
Else
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
op = BattleScreen.OwnPokemon
|
op = BattleScreen.OwnPokemon
|
||||||
|
pNPC = BattleScreen.OppPokemonNPC
|
||||||
|
opNPC = BattleScreen.OwnPokemonNPC
|
||||||
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
BattleScreen.FieldEffects.OppLastMove = moveUsed
|
||||||
End If
|
End If
|
||||||
If WildHasEscaped Then
|
If WildHasEscaped Then
|
||||||
|
@ -1405,7 +1411,36 @@
|
||||||
|
|
||||||
If p.Status = Pokemon.StatusProblems.Paralyzed Then
|
If p.Status = Pokemon.StatusProblems.Paralyzed Then
|
||||||
If Core.Random.Next(0, 4) = 0 Then
|
If Core.Random.Next(0, 4) = 0 Then
|
||||||
|
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||||
|
Dim ParalyzedAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
||||||
|
|
||||||
|
ParalyzedAnimation.AnimationPlaySound("Battle\Effects\Paralyzed", 0, 0)
|
||||||
|
Dim maxAmount As Integer = 4
|
||||||
|
Dim currentAmount As Integer = 0
|
||||||
|
While currentAmount <= maxAmount
|
||||||
|
Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(0, 0, 16, 16), "")
|
||||||
|
Dim xPos = CSng(Random.Next(-4, 4) / 8)
|
||||||
|
Dim zPos = CSng(Random.Next(-4, 4) / 8)
|
||||||
|
|
||||||
|
Dim Position As New Vector3(xPos, -0.25, zPos)
|
||||||
|
Dim Destination As New Vector3(xPos - xPos * 2, 0, zPos - zPos * 2)
|
||||||
|
Dim Scale As New Vector3(0.25F)
|
||||||
|
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||||
|
Dim ShockEntity = ParalyzedAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
|
||||||
|
ParalyzedAnimation.AnimationMove(ShockEntity, True, Destination.X, Destination.Y, Destination.Z, 0.025F, False, True, CSng(startDelay), 0.0F)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(16, 0, 16, 16), ""), CSng(startDelay + 1), 1)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(32, 0, 16, 16), ""), CSng(startDelay + 2), 1)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(48, 0, 16, 16), ""), CSng(startDelay + 3), 1)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(64, 0, 16, 16), ""), CSng(startDelay + 4), 1)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(72, 0, 16, 16), ""), CSng(startDelay + 5), 1)
|
||||||
|
|
||||||
|
Threading.Interlocked.Increment(currentAmount)
|
||||||
|
End While
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(ParalyzedAnimation)
|
||||||
|
Else
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
||||||
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is fully paralyzed!" & Environment.NewLine & "It cannot move!"))
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
@ -2873,7 +2908,9 @@
|
||||||
Public Function InflictParalysis(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
|
Public Function InflictParalysis(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal message As String, ByVal cause As String) As Boolean
|
||||||
Dim p As Pokemon = BattleScreen.OwnPokemon
|
Dim p As Pokemon = BattleScreen.OwnPokemon
|
||||||
Dim op As Pokemon = BattleScreen.OppPokemon
|
Dim op As Pokemon = BattleScreen.OppPokemon
|
||||||
|
Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
|
||||||
If own = False Then
|
If own = False Then
|
||||||
|
pNPC = BattleScreen.OppPokemonNPC
|
||||||
p = BattleScreen.OppPokemon
|
p = BattleScreen.OppPokemon
|
||||||
op = BattleScreen.OwnPokemon
|
op = BattleScreen.OwnPokemon
|
||||||
End If
|
End If
|
||||||
|
@ -2934,7 +2971,36 @@
|
||||||
'Works!
|
'Works!
|
||||||
p.Status = Pokemon.StatusProblems.Paralyzed
|
p.Status = Pokemon.StatusProblems.Paralyzed
|
||||||
ChangeCameraAngle(1, own, BattleScreen)
|
ChangeCameraAngle(1, own, BattleScreen)
|
||||||
|
If Core.Player.ShowBattleAnimations <> 0 Then
|
||||||
|
Dim ParalyzedAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, Not own)
|
||||||
|
|
||||||
|
ParalyzedAnimation.AnimationPlaySound("Battle\Effects\Paralyzed", 0, 0)
|
||||||
|
Dim maxAmount As Integer = 4
|
||||||
|
Dim currentAmount As Integer = 0
|
||||||
|
While currentAmount <= maxAmount
|
||||||
|
Dim Texture As Texture2D = TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(0, 0, 16, 16), "")
|
||||||
|
Dim xPos = CSng(Random.Next(-4, 4) / 8)
|
||||||
|
Dim zPos = CSng(Random.Next(-4, 4) / 8)
|
||||||
|
|
||||||
|
Dim Position As New Vector3(xPos, -0.25, zPos)
|
||||||
|
Dim Destination As New Vector3(xPos - xPos * 2, 0, zPos - zPos * 2)
|
||||||
|
Dim Scale As New Vector3(0.25F)
|
||||||
|
Dim startDelay As Double = 5.0 * Random.NextDouble()
|
||||||
|
Dim ShockEntity = ParalyzedAnimation.SpawnEntity(Position, Texture, Scale, 1.0F, CSng(startDelay))
|
||||||
|
ParalyzedAnimation.AnimationMove(ShockEntity, False, Destination.X, Destination.Y, Destination.Z, 0.025F, False, True, CSng(startDelay), 0.0F)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(16, 0, 16, 16), ""), CSng(startDelay + 1), 0)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(32, 0, 16, 16), ""), CSng(startDelay + 2), 0)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(48, 0, 16, 16), ""), CSng(startDelay + 3), 0)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, False, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(64, 0, 16, 16), ""), CSng(startDelay + 4), 0)
|
||||||
|
ParalyzedAnimation.AnimationChangeTexture(ShockEntity, True, TextureManager.GetTexture("Textures\Battle\Electric\Sparks", New Rectangle(72, 0, 16, 16), ""), CSng(startDelay + 5), 0)
|
||||||
|
|
||||||
|
Threading.Interlocked.Increment(currentAmount)
|
||||||
|
End While
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(ParalyzedAnimation)
|
||||||
|
Else
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\Paralyzed", False))
|
||||||
|
End If
|
||||||
Select Case message
|
Select Case message
|
||||||
Case "" 'Print default message only
|
Case "" 'Print default message only
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is paralyzed!" & Environment.NewLine & "It can't move!"))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(p.GetDisplayName() & " is paralyzed!" & Environment.NewLine & "It can't move!"))
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 395 B |
|
@ -15373,6 +15373,9 @@
|
||||||
<Content Include="Content\Sounds\Use_Repel.wav">
|
<Content Include="Content\Sounds\Use_Repel.wav">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="Content\Textures\Battle\Electric\Sparks.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Content\Textures\Battle\Fire\Ember.png">
|
<Content Include="Content\Textures\Battle\Fire\Ember.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
Loading…
Reference in New Issue