mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Pokémon rename after catch fix + select menu fix
This commit is contained in:
parent
ebcdc26092
commit
cb9e810b9d
@ -61,12 +61,12 @@
|
|||||||
Index = 0
|
Index = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
If CurrentScreen.MouseVisible = True Then
|
||||||
For i = Scroll To Me.Scroll + 8
|
For i = Scroll To Me.Scroll + 8
|
||||||
If i <= Me.Items.Count - 1 Then
|
If i <= Me.Items.Count - 1 Then
|
||||||
If Controls.Accept(True, False, False) = True And i = Me.Index And New Rectangle(Core.windowSize.Width - 270, 72 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True Or
|
If Controls.Accept(True, False, False) = True And i = Me.Index And New Rectangle(Core.windowSize.Width - 270, 72 * ((i + 1) - Scroll), 256, 64).Contains(MouseHandler.MousePosition) = True Or
|
||||||
Controls.Accept(False, True, True) = True And i = Me.Index Or Controls.Dismiss(True, True, True) = True And Me.BackIndex = Me.Index Then
|
Controls.Accept(False, True, True) = True And i = Me.Index Or Controls.Dismiss(True, True, True) = True And Me.BackIndex = Me.Index Then
|
||||||
|
SoundManager.PlaySound("select")
|
||||||
If Not ClickHandler Is Nothing Then
|
If Not ClickHandler Is Nothing Then
|
||||||
ClickHandler(Me)
|
ClickHandler(Me)
|
||||||
End If
|
End If
|
||||||
@ -74,6 +74,7 @@
|
|||||||
End If
|
End If
|
||||||
If Controls.Dismiss(True, True, True) = True Then
|
If Controls.Dismiss(True, True, True) = True Then
|
||||||
Me.Index = Me.BackIndex
|
Me.Index = Me.BackIndex
|
||||||
|
SoundManager.PlaySound("select")
|
||||||
If Not ClickHandler Is Nothing Then
|
If Not ClickHandler Is Nothing Then
|
||||||
ClickHandler(Me)
|
ClickHandler(Me)
|
||||||
End If
|
End If
|
||||||
@ -84,7 +85,26 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Else
|
||||||
|
For i = Scroll To Me.Scroll + 8
|
||||||
|
If Controls.Accept(True, True, True) = True And i = Me.Index Then
|
||||||
|
SoundManager.PlaySound("select")
|
||||||
|
If Not ClickHandler Is Nothing Then
|
||||||
|
ClickHandler(Me)
|
||||||
|
End If
|
||||||
|
Me.Visible = False
|
||||||
|
End If
|
||||||
|
If Controls.Dismiss(True, True, True) = True Then
|
||||||
|
Me.Index = Me.BackIndex
|
||||||
|
SoundManager.PlaySound("select")
|
||||||
|
If Not ClickHandler Is Nothing Then
|
||||||
|
ClickHandler(Me)
|
||||||
|
End If
|
||||||
|
Me.Visible = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
If Index - Scroll > 8 Then
|
If Index - Scroll > 8 Then
|
||||||
Scroll = Index - 8
|
Scroll = Index - 8
|
||||||
End If
|
End If
|
||||||
@ -92,7 +112,6 @@
|
|||||||
Scroll = Index
|
Scroll = Index
|
||||||
End If
|
End If
|
||||||
SetCursorDest()
|
SetCursorDest()
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private cursorPos As Vector2
|
Private cursorPos As Vector2
|
||||||
|
@ -156,7 +156,7 @@ nextIndex:
|
|||||||
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
|
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Open", 3, 0)
|
||||||
Dim SmokeParticlesClose As Integer = 0
|
Dim SmokeParticlesClose As Integer = 0
|
||||||
Do
|
Do
|
||||||
Dim SmokePosition = New Vector3(BattleScreen.OppPokemonNPC.Position.X + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Y + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Z + CSng(Random.Next(-10, 10) / 10))
|
Dim SmokePosition = New Vector3(BattleScreen.OppPokemonNPC.Position.X + CSng(Random.Next(-10, 10) / 10), BattleScreen.OppPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z + CSng(Random.Next(-10, 10) / 10))
|
||||||
|
|
||||||
|
|
||||||
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
|
Dim SmokeTexture As Texture2D = TextureManager.GetTexture("Textures\Battle\Smoke")
|
||||||
@ -164,7 +164,7 @@ nextIndex:
|
|||||||
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
|
Dim SmokeScale = New Vector3(CSng(Random.Next(2, 6) / 10))
|
||||||
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 25.0F)
|
Dim SmokeSpeed = CSng(Random.Next(1, 3) / 25.0F)
|
||||||
Dim SmokeEntity = CatchAnimation.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3, 0)
|
Dim SmokeEntity = CatchAnimation.SpawnEntity(SmokePosition, SmokeTexture, SmokeScale, 1, 3, 0)
|
||||||
Dim SmokeDestination = New Vector3(BallEntity.Position.X - SmokePosition.X + 3, BallEntity.Position.Y - SmokePosition.Y, BallEntity.Position.Z - SmokePosition.Z)
|
Dim SmokeDestination = New Vector3(BallEntity.Position.X - SmokePosition.X + 3, BallEntity.Position.Y - SmokePosition.Y, BallEntity.Position.Z - SmokePosition.Z - 0.05F)
|
||||||
CatchAnimation.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3, 0)
|
CatchAnimation.AnimationMove(SmokeEntity, True, SmokeDestination.X, SmokeDestination.Y, SmokeDestination.Z, SmokeSpeed, False, False, 3, 0)
|
||||||
|
|
||||||
Threading.Interlocked.Increment(SmokeParticlesClose)
|
Threading.Interlocked.Increment(SmokeParticlesClose)
|
||||||
@ -208,11 +208,12 @@ nextIndex:
|
|||||||
|
|
||||||
If InBall = True Then
|
If InBall = True Then
|
||||||
For i = 0 To 2
|
For i = 0 To 2
|
||||||
Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X + 0.05F, BattleScreen.OppPokemonNPC.Position.Y - 0.35F, BattleScreen.OppPokemonNPC.Position.Z + 0.05F)
|
Dim StarPosition As Vector3 = New Vector3(BattleScreen.OppPokemonNPC.Position.X + 0.05F, BattleScreen.OppPokemonNPC.Position.Y, BattleScreen.OppPokemonNPC.Position.Z)
|
||||||
Dim StarDestination As Vector3 = New Vector3(0.05F, 0.4F, 0 - ((1 - i) * 0.4F) + 0.05F)
|
Dim StarDestination As Vector3 = New Vector3(0.05F, 0.65F, 0 - ((1 - i) * 0.4F))
|
||||||
Dim StarEntity As Entity = CatchAnimation.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.35F), 1.0F, 12 + Shakes.Count * 10)
|
Dim StarEntity As Entity = CatchAnimation.SpawnEntity(StarPosition, TextureManager.GetTexture("Textures\Battle\BallCatchStar"), New Vector3(0.35F), 1.0F, 12 + Shakes.Count * 10)
|
||||||
CatchAnimation.AnimationMove(StarEntity, True, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 12 + Shakes.Count * 10, 0.0F,,, 3, 0.02F)
|
CatchAnimation.AnimationMove(StarEntity, True, StarDestination.X, StarDestination.Y, StarDestination.Z, 0.01F, False, False, 12 + Shakes.Count * 10, 0.0F,,, 3, 0.015F)
|
||||||
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Catch", 12 + Shakes.Count * 10, 4)
|
CatchAnimation.AnimationPlaySound("Battle\Pokeball\Catch", 12 + Shakes.Count * 10, 4)
|
||||||
|
CatchAnimation.AnimationFade(BallEntity, True, 0.01F, False, 0.0F, 12 + Shakes.Count * 10 + 3, 2)
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
CatchAnimation.AnimationFade(BallEntity, True, 1.0F, False, 0.0F, 12 + Shakes.Count * 10, 0)
|
CatchAnimation.AnimationFade(BallEntity, True, 1.0F, False, 0.0F, 12 + Shakes.Count * 10, 0)
|
||||||
@ -255,25 +256,33 @@ nextIndex:
|
|||||||
'Caught Pokémon
|
'Caught Pokémon
|
||||||
CatchPokemon()
|
CatchPokemon()
|
||||||
BattleSystem.Battle.Caught = True
|
BattleSystem.Battle.Caught = True
|
||||||
|
AnimationIndex = 2
|
||||||
|
Else
|
||||||
|
'Pokémon broke free
|
||||||
|
Core.SetScreen(Me.PreScreen)
|
||||||
|
CType(Core.CurrentScreen, BattleSystem.BattleScreen).Battle.InitializeRound(CType(Core.CurrentScreen, BattleSystem.BattleScreen), New BattleSystem.Battle.RoundConst() With {.StepType = BattleSystem.Battle.RoundConst.StepTypes.Text, .Argument = "It broke free!"})
|
||||||
|
End If
|
||||||
|
Case 2
|
||||||
If showPokedexEntry = True Then
|
If showPokedexEntry = True Then
|
||||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexViewScreen(Core.CurrentScreen, p, True), Color.White, False))
|
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexViewScreen(Core.CurrentScreen, p, True), Color.White, False))
|
||||||
End If
|
End If
|
||||||
|
AnimationIndex = 3
|
||||||
|
Case 3
|
||||||
Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, p))
|
Core.SetScreen(New NameObjectScreen(Core.CurrentScreen, p))
|
||||||
|
AnimationIndex = 4
|
||||||
|
Case 4
|
||||||
If p.CatchBall.ID = 186 Then
|
If p.CatchBall.ID = 186 Then
|
||||||
p.FullRestore() ' Heal Ball
|
p.FullRestore() ' Heal Ball
|
||||||
End If
|
End If
|
||||||
|
|
||||||
PlayerStatistics.Track("Caught Pokemon", 1)
|
PlayerStatistics.Track("Caught Pokemon", 1)
|
||||||
StorePokemon()
|
StorePokemon()
|
||||||
|
AnimationIndex = 5
|
||||||
|
Case 5
|
||||||
Core.SetScreen(Me.PreScreen)
|
Core.SetScreen(Me.PreScreen)
|
||||||
BattleSystem.Battle.Won = True
|
BattleSystem.Battle.Won = True
|
||||||
CType(Core.CurrentScreen, BattleSystem.BattleScreen).EndBattle(False)
|
CType(Core.CurrentScreen, BattleSystem.BattleScreen).EndBattle(False)
|
||||||
Else
|
|
||||||
'Pokémon broke free
|
|
||||||
Core.SetScreen(Me.PreScreen)
|
|
||||||
CType(Core.CurrentScreen, BattleSystem.BattleScreen).Battle.InitializeRound(CType(Core.CurrentScreen, BattleSystem.BattleScreen), New BattleSystem.Battle.RoundConst() With {.StepType = BattleSystem.Battle.RoundConst.StepTypes.Text, .Argument = "It broke free!"})
|
|
||||||
End If
|
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -39,7 +39,7 @@ Public Class NameObjectScreen
|
|||||||
Me.CanChat = False
|
Me.CanChat = False
|
||||||
Me.CanMuteAudio = False
|
Me.CanMuteAudio = False
|
||||||
Me.CanBePaused = False
|
Me.CanBePaused = False
|
||||||
|
Me._canChooseNo = True
|
||||||
Me._pokemon = Pokemon
|
Me._pokemon = Pokemon
|
||||||
Me._defaultName = Pokemon.GetDisplayName()
|
Me._defaultName = Pokemon.GetDisplayName()
|
||||||
Me._renamePokemon = True
|
Me._renamePokemon = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user