Hit Animation + Restructure of attack sound effects + Absorb animation

Attack sound effects are now in the folder of the type of their attack

Pokémon flicker briefly when hit
This commit is contained in:
JappaWakka 2021-10-03 11:02:18 +02:00 committed by JappaWakkaP3D
parent 09e5661729
commit b95d4d1c69
20 changed files with 48 additions and 17 deletions

View File

@ -3978,8 +3978,10 @@
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) 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 p As Pokemon = BattleScreen.OwnPokemon
Dim pNPC As Entity = BattleScreen.OwnPokemonNPC
If own = False Then If own = False Then
p = BattleScreen.OppPokemon p = BattleScreen.OppPokemon
pNPC = BattleScreen.OppPokemonNPC
End If End If
If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then If p.HP > 0 And p.Status <> Pokemon.StatusProblems.Fainted Then
@ -3996,6 +3998,13 @@
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F)) BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
End If End If
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(CType(pNPC, NPC), own)
HitAnimation.AnimationFadePokemonEntity(1, False, 0, 0, 0)
HitAnimation.AnimationFadePokemonEntity(1, True, 1, 1, 0)
HitAnimation.AnimationFadePokemonEntity(1, False, 0, 2, 0)
HitAnimation.AnimationFadePokemonEntity(1, True, 1, 3, 0)
BattleScreen.BattleQuery.Add(HitAnimation)
If own = True Then If own = True Then
BattleScreen.BattleQuery.Add(New MathHPQueryObject(p.HP, p.MaxHP, HPAmount, New Vector2(200, 256))) BattleScreen.BattleQuery.Add(New MathHPQueryObject(p.HP, p.MaxHP, HPAmount, New Vector2(200, 256)))
Else Else

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

View File

@ -14665,31 +14665,34 @@
<Content Include="Content\Songs\wind.ogg"> <Content Include="Content\Songs\wind.ogg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Ember_Hit.wav"> <Content Include="Content\Sounds\Battle\Attacks\Electric\Thunderbolt.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Ember_Start.wav"> <Content Include="Content\Sounds\Battle\Attacks\Fire\Ember_Hit.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Fly_Hit.wav"> <Content Include="Content\Sounds\Battle\Attacks\Fire\Ember_Start.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Fly_Start.wav"> <Content Include="Content\Sounds\Battle\Attacks\Flying\Fly_Hit.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\PoisonSting_Hit.wav"> <Content Include="Content\Sounds\Battle\Attacks\Flying\Fly_Start.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\PoisonSting_Start.wav"> <Content Include="Content\Sounds\Battle\Attacks\Grass\Absorb.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Pound.wav"> <Content Include="Content\Sounds\Battle\Attacks\Normal\Pound.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Tackle.wav"> <Content Include="Content\Sounds\Battle\Attacks\Normal\Tackle.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Attacks\Thunderbolt.wav"> <Content Include="Content\Sounds\Battle\Attacks\Poison\PoisonSting_Hit.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Sounds\Battle\Attacks\Poison\PoisonSting_Start.wav">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Sounds\Battle\Damage\Effective.wav"> <Content Include="Content\Sounds\Battle\Damage\Effective.wav">
@ -15379,6 +15382,9 @@
<Content Include="Content\Textures\Battle\Fire\Smoke.png"> <Content Include="Content\Textures\Battle\Fire\Smoke.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\Textures\Battle\Grass\Absorb.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\Textures\Battle\Normal\Growl.png"> <Content Include="Content\Textures\Battle\Normal\Growl.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@ -66,7 +66,7 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(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) Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
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.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) MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\Ember_Start", 0, 0)
For i = 0 To 12 For i = 0 To 12
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) 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 i += 1
@ -82,7 +82,7 @@
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) 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 i += 1
Next Next
MoveAnimation.AnimationPlaySound("Battle\Attacks\Ember_Hit", 2, 0) MoveAnimation.AnimationPlaySound("Battle\Attacks\Fire\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) 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)

View File

@ -92,6 +92,22 @@
End If End If
End Sub 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 maxAmount As Integer = 8
Dim currentAmount As Integer = 0
MoveAnimation.AnimationPlaySound("Battle\Attacks\Grass\Absorb", 0, 0)
While currentAmount <= maxAmount
Dim yPos As Single = CSng(Random.NextDouble() * 0.5)
Dim zPos As Single = CSng(Random.Next(-5, 5) * 0.15)
MoveAnimation.AnimationSpawnMovingEntity(0.0, 0, 0.0, "Textures\Battle\Grass\Absorb", 0.35, 0.35, 0.35, 1.5, yPos, zPos, 0.03, False, True, CSng(currentAmount), 0.0, 0.1, 0.5)
Threading.Interlocked.Increment(currentAmount)
End While
BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub
End Class End Class
End Namespace End Namespace

View File

@ -55,7 +55,7 @@
Me.AIField2 = AIField.Nothing Me.AIField2 = AIField.Nothing
End Sub End Sub
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC, ByVal CurrentModel As ModelEntity) 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 MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Pound", 0.5, 2.5) MoveAnimation.AnimationPlaySound("Battle\Attacks\Pound", 0.5, 2.5)
MoveAnimation.AnimationSpawnFadingEntity(0, -0.25, 0, "Textures\Battle\Normal\Pound", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 3) MoveAnimation.AnimationSpawnFadingEntity(0, -0.25, 0, "Textures\Battle\Normal\Pound", 0.5, 0.5, 0.5, 0.02, False, 1.0, 0, 3)

View File

@ -61,7 +61,7 @@
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 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 MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
MoveAnimation.AnimationPlaySound("Battle\Attacks\Tackle", 0, 2) MoveAnimation.AnimationPlaySound("Battle\Attacks\Normal\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) 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) BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub End Sub

View File

@ -68,7 +68,7 @@
Public Overrides Sub InternalUserPokemonMoveAnimation(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) Dim MoveAnimation As AnimationQueryObject = New AnimationQueryObject(CurrentEntity, own)
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.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) MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\PoisonSting_Start", 0, 0)
BattleScreen.BattleQuery.Add(MoveAnimation) BattleScreen.BattleQuery.Add(MoveAnimation)
End Sub End Sub
@ -77,7 +77,7 @@
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.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.AnimationPlaySound("Battle\Attacks\PoisonSting_Hit", 1, 0) MoveAnimation.AnimationPlaySound("Battle\Attacks\Poison\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.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.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,32,32,32", 0.5, 0.5, 0.5, 0.02, False, 1.0, 2, 1)

View File

@ -72,7 +72,7 @@
If Stage = 6 Then If Stage = 6 Then
SoundManager.PlaySound("egg_hatch") SoundManager.PlaySound("egg_hatch")
Else Else
SoundManager.PlaySound("Battle\Attacks\Pound") SoundManager.PlaySound("Battle\Attacks\Normal\Pound")
End If End If
Egg = GetEggTexture() Egg = GetEggTexture()

View File

@ -717,7 +717,7 @@ endsub:
If Core.Random.Next(0, 250) = 0 Then If Core.Random.Next(0, 250) = 0 Then
Dim pitch As Single = -(Core.Random.Next(8, 11) / 10.0F) Dim pitch As Single = -(Core.Random.Next(8, 11) / 10.0F)
Debug.Print(pitch.ToString()) Debug.Print(pitch.ToString())
SoundManager.PlaySound("Battle\Attacks\Thunderbolt", pitch, 0F, SoundManager.Volume, False) SoundManager.PlaySound("Battle\Attacks\Electric\Thunderbolt", pitch, 0F, SoundManager.Volume, False)
End If End If
End If End If