Make Fly attack animation possible
This commit is contained in:
parent
a0fd0f061a
commit
82fee7a434
|
@ -2113,6 +2113,14 @@
|
||||||
'Opp Pokémon move animation! This displays the move effects that target the other Pokémon and appear after the camera switched around.
|
'Opp Pokémon move animation! This displays the move effects that target the other Pokémon and appear after the camera switched around.
|
||||||
moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
|
moveUsed.OpponentPokemonMoveAnimation(BattleScreen, own)
|
||||||
|
|
||||||
|
'Reset Fly if needed after the animation definition
|
||||||
|
If own = True And BattleScreen.FieldEffects.OwnFlyCounter = 2 Then
|
||||||
|
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
||||||
|
End If
|
||||||
|
If own = False And BattleScreen.FieldEffects.OppFlyCounter = 2 Then
|
||||||
|
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
||||||
|
End If
|
||||||
|
|
||||||
If moveUsed.IsDamagingMove = True Then
|
If moveUsed.IsDamagingMove = True Then
|
||||||
ChangeCameraAngle(2, own, BattleScreen)
|
ChangeCameraAngle(2, own, BattleScreen)
|
||||||
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
|
If op.Ability.Name.ToLower() = "wonder guard" And effectiveness <= 1.0F And BattleScreen.FieldEffects.CanUseAbility(Not own, BattleScreen) = True And moveUsed.IsWonderGuardAffected = True Then
|
||||||
|
@ -4553,13 +4561,21 @@
|
||||||
End If
|
End If
|
||||||
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
BattleScreen.BattleQuery.Add(New PlaySoundQueryObject(sound, False, 0.0F))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If own = False Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
|
||||||
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||||
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
If fly = 0 Then
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
Dim HitAnimation As AnimationQueryObject = New AnimationQueryObject(pNPC, own)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 0, 0)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 1, 0)
|
||||||
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
HitAnimation.AnimationFade(Nothing, False, 1, False, 0, 2, 0)
|
||||||
BattleScreen.BattleQuery.Add(HitAnimation)
|
HitAnimation.AnimationFade(Nothing, False, 1, True, 1, 3, 0)
|
||||||
|
BattleScreen.BattleQuery.Add(HitAnimation)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If own = True Then
|
If own = True Then
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 925 B |
|
@ -18437,6 +18437,9 @@
|
||||||
<Content Include="Content\Textures\Battle\Electric\FlashBackground.png">
|
<Content Include="Content\Textures\Battle\Electric\FlashBackground.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="Content\Textures\Battle\Flying\Fly.png">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="Content\Textures\Battle\Flying\Gust.png">
|
<Content Include="Content\Textures\Battle\Flying\Gust.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|
|
@ -2361,6 +2361,30 @@
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub FailPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean)
|
||||||
|
If Core.Player.ShowBattleAnimations <> 0 AndAlso BattleScreen.IsPVPBattle = False Then
|
||||||
|
Dim BattleFlip As Boolean = False
|
||||||
|
Dim CurrentPokemon As Pokemon = BattleScreen.OwnPokemon
|
||||||
|
Dim CurrentEntity As NPC = BattleScreen.OwnPokemonNPC
|
||||||
|
If own = False Then
|
||||||
|
BattleFlip = True
|
||||||
|
CurrentPokemon = BattleScreen.OppPokemon
|
||||||
|
CurrentEntity = BattleScreen.OppPokemonNPC
|
||||||
|
End If
|
||||||
|
Me.InternalFailPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overridable Sub InternalFailPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
|
||||||
|
If Me.IsGameModeMove = True Then
|
||||||
|
If gmUseMoveAnims IsNot Nothing Then
|
||||||
|
gmUseMoveAnims.InternalFailPokemonMoveAnimation(BattleScreen, BattleFlip, CurrentPokemon, CurrentEntity)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'Override this method in the attack class to insert the move animation query objects into the queue.
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
|
|
@ -110,14 +110,15 @@
|
||||||
BattleScreen.FieldEffects.OppFlyCounter = 1
|
BattleScreen.FieldEffects.OppFlyCounter = 1
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
Else
|
ElseIf fly = 1 Then
|
||||||
If Own = True Then
|
If Own = True Then
|
||||||
BattleScreen.FieldEffects.OwnFlyCounter = 0
|
BattleScreen.FieldEffects.OwnFlyCounter = 2
|
||||||
Else
|
Else
|
||||||
BattleScreen.FieldEffects.OppFlyCounter = 0
|
BattleScreen.FieldEffects.OppFlyCounter = 2
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveSelected(own As Boolean, BattleScreen As BattleScreen)
|
||||||
If own = True Then
|
If own = True Then
|
||||||
|
@ -145,6 +146,7 @@
|
||||||
Else
|
Else
|
||||||
BattleScreen.FieldEffects.OppFlyCounter = 0
|
BattleScreen.FieldEffects.OppFlyCounter = 0
|
||||||
End If
|
End If
|
||||||
|
Me.FailPokemonMoveAnimation(BattleScreen, own)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub MoveMisses(own As Boolean, BattleScreen As BattleScreen)
|
||||||
|
@ -174,6 +176,85 @@
|
||||||
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
Public Overrides Sub IsAttracted(own As Boolean, BattleScreen As BattleScreen)
|
||||||
MoveFails(own, BattleScreen)
|
MoveFails(own, BattleScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
Public Overrides Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If BattleFlip = True Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
|
||||||
|
|
||||||
|
If fly = 0 Then
|
||||||
|
MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Start", 0, 0)
|
||||||
|
MoveAnimation.AnimationFade(Nothing, False, 0.2F, False, 0.0F, 0, 0)
|
||||||
|
Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 0.0F)
|
||||||
|
MoveAnimation.AnimationFade(FlyEntity, False, 0.2F, True, 1.0F, 0, 0)
|
||||||
|
MoveAnimation.AnimationMove(FlyEntity, True, 0.0, 2.0, 0.0, 0.06, False, False, 1.4F, 0.0,,, 0.06, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 32, 32, 32), ""), 1.3F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 64, 32, 32), ""), 1.4F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 96, 32, 32), ""), 1.5F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 128, 32, 32), ""), 1.6F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 160, 32, 32), ""), 1.7F, 0)
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||||
|
Else
|
||||||
|
MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Start", 0, 0)
|
||||||
|
Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0, 0.9, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1.0F)
|
||||||
|
MoveAnimation.AnimationMove(FlyEntity, True, 2.0, 0.5, 0, 0.07, False, False, 0.0F, 0.0,,, 0.035, 0)
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public Overrides Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC)
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If BattleFlip = True Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
|
||||||
|
If fly = 2 Then
|
||||||
|
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
|
||||||
|
|
||||||
|
MoveAnimation.AnimationPlaySound("Battle\Attacks\Flying\Fly_Hit", 0, 0)
|
||||||
|
Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(-2, 0.9, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), New Vector3(0.5F), 1.0F)
|
||||||
|
MoveAnimation.AnimationMove(FlyEntity, True, 0.0, 0.0, 0.0, 0.07, False, False, 0.0, 0.0,,, 0.035, 3)
|
||||||
|
|
||||||
|
If BattleFlip = False Then
|
||||||
|
MoveAnimation.AnimationFade(BattleScreen.OwnPokemonNPC, False, 1, True, 1.0F, 0, 0)
|
||||||
|
Else
|
||||||
|
MoveAnimation.AnimationFade(BattleScreen.OppPokemonNPC, False, 1, True, 1.0F, 0, 0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public Overrides Sub InternalFailPokemonMoveAnimation(BattleScreen As BattleScreen, BattleFlip As Boolean, CurrentPokemon As Pokemon, CurrentEntity As NPC)
|
||||||
|
Dim MoveAnimation = New AnimationQueryObject(CurrentEntity, BattleFlip)
|
||||||
|
Dim FadeDelay As Single = 0.0F
|
||||||
|
Dim FadeSpeed As Single = 1.0F
|
||||||
|
|
||||||
|
Dim fly As Integer = BattleScreen.FieldEffects.OwnFlyCounter
|
||||||
|
If BattleFlip = True Then
|
||||||
|
fly = BattleScreen.FieldEffects.OppFlyCounter
|
||||||
|
End If
|
||||||
|
|
||||||
|
If BattleScreen.FieldEffects.Gravity > 0 Then
|
||||||
|
FadeDelay = 2.3F
|
||||||
|
FadeSpeed = 0.2F
|
||||||
|
Dim FlyEntity = MoveAnimation.SpawnEntity(New Vector3(0, 2, 0), TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 160, 32, 32), ""), New Vector3(0.5F), 1.0F)
|
||||||
|
MoveAnimation.AnimationMove(FlyEntity, False, 0.0, 0.0, 0.0, 0.1F, False, False, 0.0F, 0.0,,, 0.1F, 1)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 128, 32, 32), ""), 0.0F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 96, 32, 32), ""), 0.1F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 64, 32, 32), ""), 0.2F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 32, 32, 32), ""), 0.3F, 0)
|
||||||
|
MoveAnimation.AnimationChangeTexture(FlyEntity, False, TextureManager.GetTexture("Textures\Battle\Flying\Fly", New Rectangle(0, 0, 32, 32), ""), 0.4F, 0)
|
||||||
|
MoveAnimation.AnimationFade(FlyEntity, True, FadeSpeed, False, 0.0F, FadeDelay + 0.1F, 0, 1)
|
||||||
|
End If
|
||||||
|
If BattleFlip = False Then
|
||||||
|
MoveAnimation.AnimationFade(BattleScreen.OwnPokemonNPC, False, FadeSpeed, True, 1.0F, FadeDelay, 0)
|
||||||
|
Else
|
||||||
|
MoveAnimation.AnimationFade(BattleScreen.OppPokemonNPC, False, FadeSpeed, True, 1.0F, FadeDelay, 0)
|
||||||
|
End If
|
||||||
|
BattleScreen.BattleQuery.Add(MoveAnimation)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
Loading…
Reference in New Issue