From 58eba766acd4f8d67fb5e75a127e55e13af3746c Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Mon, 11 Dec 2023 13:48:20 +0100 Subject: [PATCH] Added GM Move property to copy anims of other move --- P3D/Pokemon/Attacks/Attack.vb | 17 +++++++++++++++-- P3D/Pokemon/Attacks/GameModeAttackLoader.vb | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/P3D/Pokemon/Attacks/Attack.vb b/P3D/Pokemon/Attacks/Attack.vb index d5e5f0ee8..2cb1aa0e3 100644 --- a/P3D/Pokemon/Attacks/Attack.vb +++ b/P3D/Pokemon/Attacks/Attack.vb @@ -199,6 +199,7 @@ Public Priority As Integer = 0 Public TimesToAttack As Integer = 1 Public gmTimesToAttack As String = "1" + Public gmUseMoveAnims As Attack = Nothing Public EffectChances As New List(Of Integer) '#End @@ -2227,7 +2228,13 @@ End Sub Public Overridable Sub InternalUserPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC) - 'Override this method in the attack class to insert the move animation query objects into the queue. + If Me.IsGameModeMove = True Then + If gmUseMoveAnims IsNot Nothing Then + gmUseMoveAnims.InternalUserPokemonMoveAnimation(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 Public Sub OpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal own As Boolean) @@ -2245,7 +2252,13 @@ End Sub Public Overridable Sub InternalOpponentPokemonMoveAnimation(ByVal BattleScreen As BattleScreen, ByVal BattleFlip As Boolean, ByVal CurrentPokemon As Pokemon, ByVal CurrentEntity As NPC) - 'Override this method in the attack class to insert the move animation query objects into the queue. + If Me.IsGameModeMove = True Then + If gmUseMoveAnims IsNot Nothing Then + gmUseMoveAnims.InternalOpponentPokemonMoveAnimation(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 diff --git a/P3D/Pokemon/Attacks/GameModeAttackLoader.vb b/P3D/Pokemon/Attacks/GameModeAttackLoader.vb index 251573e9d..65ba69f27 100644 --- a/P3D/Pokemon/Attacks/GameModeAttackLoader.vb +++ b/P3D/Pokemon/Attacks/GameModeAttackLoader.vb @@ -324,7 +324,8 @@ move.AIField3 = AIFieldType End If End If - + Case "usemoveanims" + move.gmUseMoveAnims = Attack.GetAttackByID(CInt(value)) End Select End If Next