From f1ccba7e4569ea87a590817b349aa41480cc78db Mon Sep 17 00:00:00 2001 From: JappaWakkaP3D <31563291+JappaWakka@users.noreply.github.com> Date: Tue, 28 Dec 2021 13:55:30 +0100 Subject: [PATCH] Improved Mega Evolution animation and slightly tweaked the speed of some of the battle intros Battle intros need testing still --- P3D/Battle/BattleSystemV2/Battle.vb | 14 ++++---------- P3D/Screens/BattleIntroScreen.vb | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/P3D/Battle/BattleSystemV2/Battle.vb b/P3D/Battle/BattleSystemV2/Battle.vb index 3800a3759..64673f565 100644 --- a/P3D/Battle/BattleSystemV2/Battle.vb +++ b/P3D/Battle/BattleSystemV2/Battle.vb @@ -529,20 +529,14 @@ Threading.Interlocked.Increment(currentAmount) End While - Dim Phase2Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position, TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase2"), New Vector3(0.0F), 1.0F, 2.0F, 0.0F) - MegaAnimation.AnimationRotate(Phase2Entity, False, 0, 0, 0.25F, 0, 0, 10.0F, 2, 0F, False, False, True, False) - MegaAnimation.AnimationScale(Phase2Entity, False, True, 1.0F, 1.0F, 1.0F, 0.05F, 2.0F, 0.0F) + Dim Phase2Entity As Entity = MegaAnimation.SpawnEntity(pNPC.Position, TextureManager.GetTexture("Textures\Battle\MegaEvolution\Mega_Phase2"), New Vector3(0.0F), 1.0F, 4.0F, 0.0F) + MegaAnimation.AnimationRotate(Phase2Entity, False, 0, 0, 0.1F, 0, 0, 10.0F, 4, 0F, False, False, True, False) + MegaAnimation.AnimationScale(Phase2Entity, False, True, 1.25F, 1.25F, 1.25F, 0.02F, 4.0F, 0.0F) BattleScreen.BattleQuery.Add(MegaAnimation) - If pNPC Is BattleScreen.OwnPokemonNPC Then - BattleScreen.OwnPokemonNPC.SetupSprite(PokemonForms.GetOverworldSpriteName(p), "", False) - Else - BattleScreen.OppPokemonNPC.SetupSprite(PokemonForms.GetOverworldSpriteName(p), "", False) - End If Else BattleScreen.BattleQuery.Add(New PlaySoundQueryObject("Battle\Effects\MegaEvolution", False)) - BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(own, ToggleEntityQueryObject.BattleEntities.OwnPokemon, PokemonForms.GetOverworldSpriteName(p), 0, 1, -1, -1)) End If - + BattleScreen.BattleQuery.Add(New ToggleEntityQueryObject(own, ToggleEntityQueryObject.BattleEntities.OwnPokemon, PokemonForms.GetOverworldSpriteName(p), 0, 1, -1, -1)) BattleScreen.BattleQuery.Add(New TextQueryObject(_base & " has Mega Evolved!")) TriggerAbilityEffect(BattleScreen, own) End If diff --git a/P3D/Screens/BattleIntroScreen.vb b/P3D/Screens/BattleIntroScreen.vb index 121fdaeb2..bf53de80d 100644 --- a/P3D/Screens/BattleIntroScreen.vb +++ b/P3D/Screens/BattleIntroScreen.vb @@ -455,7 +455,7 @@ If Animations.Count = 0 Then Animations.Add(New Rectangle(CInt(Core.windowSize.Width / 2 - (Core.windowSize.Width / 100 / 2)), CInt(Core.windowSize.Height / 2 - (Core.windowSize.Height / 100 / 2)), CInt(Core.windowSize.Width / 100), CInt(Core.windowSize.Height / 100))) Else - Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3) + Dim Speed As Integer = CInt(Me.duration.TotalMilliseconds / Core.windowSize.Height * 4) If Animations(0).Height >= Core.windowSize.Height + 128 Then ready = True End If @@ -479,7 +479,7 @@ If value >= Core.windowSize.Height / 2 + 4 Then ready = True Else - value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height)) + value += CInt(Math.Ceiling(Me.duration.TotalMilliseconds / Core.windowSize.Height * 3)) End If End If End Sub