mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 16:24:45 +02:00
Experimental work about PartyScreen replacing ChoosePokemonScreen.
This commit is contained in:
parent
e9619b4ffd
commit
410ed4a91c
@ -25,7 +25,10 @@ Namespace Items.Berries
|
|||||||
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
|
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Core.SetScreen(New ChoosePokemonScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True))
|
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
|
||||||
|
AddHandler selScreen.SelectedObject, AddressOf UseItemHandler
|
||||||
|
|
||||||
|
Core.SetScreen(selScreen)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
|
||||||
|
@ -238,6 +238,11 @@ Public MustInherit Class Item
|
|||||||
Logger.Debug("PLACEHOLDER FOR ITEM USE")
|
Logger.Debug("PLACEHOLDER FOR ITEM USE")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub UseItemhandler(ByVal params As Object())
|
||||||
|
UseOnPokemon(CInt(params(0)))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' A method that gets used when the item is applied to a Pokémon. Returns True if the action was successful.
|
''' A method that gets used when the item is applied to a Pokémon. Returns True if the action was successful.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
@ -32,8 +32,7 @@ Namespace Items
|
|||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
If Pokemon.HP = Pokemon.MaxHP Then
|
If Pokemon.HP = Pokemon.MaxHP Then
|
||||||
Screen.TextBox.reDelay = 0.0F
|
CType(CurrentScreen, PartyScreen).ShowMessage(Pokemon.GetDisplayName() & " has full HP already.")
|
||||||
Screen.TextBox.Show(Pokemon.GetDisplayName() & " has full~HP already.", {})
|
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
Case OldLocalization.GetString("game_menu_pokedex")
|
Case OldLocalization.GetString("game_menu_pokedex")
|
||||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexSelectScreen(Me), Color.White, False))
|
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New PokedexSelectScreen(Me), Color.White, False))
|
||||||
Case OldLocalization.GetString("game_menu_party")
|
Case OldLocalization.GetString("game_menu_party")
|
||||||
Core.SetScreen(New PartyScreen(Me, Player.Temp.PokemonScreenIndex))
|
Core.SetScreen(New PartyScreen(Me))
|
||||||
Case OldLocalization.GetString("game_menu_bag")
|
Case OldLocalization.GetString("game_menu_bag")
|
||||||
Core.SetScreen(New NewInventoryScreen(Me))
|
Core.SetScreen(New NewInventoryScreen(Me))
|
||||||
Case OldLocalization.GetString("game_menu_trainer_card")
|
Case OldLocalization.GetString("game_menu_trainer_card")
|
||||||
|
@ -4,7 +4,7 @@ Public Class PartyScreen
|
|||||||
Inherits Screen
|
Inherits Screen
|
||||||
Implements ISelectionScreen
|
Implements ISelectionScreen
|
||||||
|
|
||||||
Private Const POKEMON_TITLE As String = "Pokémon"
|
Dim POKEMON_TITLE As String = "Pokémon"
|
||||||
|
|
||||||
Private _translation As Globalization.Classes.LOCAL_PartyScreen
|
Private _translation As Globalization.Classes.LOCAL_PartyScreen
|
||||||
|
|
||||||
@ -41,53 +41,74 @@ Public Class PartyScreen
|
|||||||
'Message display:
|
'Message display:
|
||||||
Private _messageDelay As Single = 0F
|
Private _messageDelay As Single = 0F
|
||||||
Private _messageText As String = ""
|
Private _messageText As String = ""
|
||||||
|
Private _messageShowing As Boolean = False
|
||||||
|
|
||||||
Public Sub New(ByVal currentScreen As Screen, ByVal PokeIndex As Integer)
|
'Choose Mode
|
||||||
Identification = Identifications.PartyScreen
|
Private ChooseMode As Boolean = True
|
||||||
PreScreen = currentScreen
|
Private PokemonList As New List(Of Pokemon)
|
||||||
IsDrawingGradients = True
|
Private AltPokemonList As New List(Of Pokemon)
|
||||||
|
|
||||||
_translation = New Globalization.Classes.LOCAL_PartyScreen()
|
Public Shared Selected As Integer = -1
|
||||||
|
Public Shared Exited As Boolean = False
|
||||||
|
|
||||||
_index = PokeIndex
|
''Public index As Integer = 0
|
||||||
_texture = TextureManager.GetTexture("GUI\Menus\General")
|
''Dim MainTexture As Texture2D
|
||||||
_menuTexture = TextureManager.GetTexture("GUI\Menus\PokemonInfo")
|
''Dim Texture As Texture2D
|
||||||
|
'' Dim yOffset As Single = 0
|
||||||
|
|
||||||
If _index >= Core.Player.Pokemons.Count Then
|
Dim Item As Item
|
||||||
_index = 0
|
''Dim Title As String = ""
|
||||||
|
|
||||||
|
Dim used As Boolean = False
|
||||||
|
''Dim canExit As Boolean = True
|
||||||
|
|
||||||
|
Public CanChooseFainted As Boolean = True
|
||||||
|
Public CanChooseEgg As Boolean = True
|
||||||
|
Public CanChooseHMPokemon As Boolean = True
|
||||||
|
|
||||||
|
Public Delegate Sub DoStuff(ByVal PokeIndex As Integer)
|
||||||
|
Dim ChoosePokemon As DoStuff
|
||||||
|
Public ExitedSub As DoStuff
|
||||||
|
|
||||||
|
Public LearnAttack As BattleSystem.Attack
|
||||||
|
Public LearnType As Integer = 0
|
||||||
|
|
||||||
|
Public Sub New(ByVal currentScreen As Screen, ByVal Item As Item, ByVal ChoosePokemon As DoStuff, ByVal Title As String, ByVal canExit As Boolean, ByVal canChooseFainted As Boolean, ByVal canChooseEgg As Boolean, Optional ByVal _pokemonList As List(Of Pokemon) = Nothing, Optional ByVal ChooseMode As Boolean = True)
|
||||||
|
Me.Item = Item
|
||||||
|
Me.POKEMON_TITLE = Title
|
||||||
|
Me.CanExit = canExit
|
||||||
|
|
||||||
|
Me.ChooseMode = ChooseMode
|
||||||
|
Me.CanChooseEgg = canChooseEgg
|
||||||
|
Me.CanChooseFainted = canChooseFainted
|
||||||
|
If ChoosePokemon IsNot Nothing Then
|
||||||
|
Me.ChoosePokemon = ChoosePokemon
|
||||||
End If
|
End If
|
||||||
_cursorDest = GetBoxPosition(_index)
|
Me.AltPokemonList = _pokemonList
|
||||||
_cursorPosition = _cursorDest
|
|
||||||
|
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
|
||||||
_pokemonAnimations.Add(New PokemonAnimation())
|
|
||||||
Next
|
|
||||||
|
|
||||||
CheckForLegendaryEmblem()
|
|
||||||
CheckForOverkillEmblem()
|
|
||||||
|
|
||||||
_menu = New UI.SelectMenu({""}.ToList(), 0, Nothing, 0)
|
|
||||||
_menu.Visible = False
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub New(ByVal currentScreen As Screen)
|
|
||||||
Identification = Identifications.PartyScreen
|
Identification = Identifications.PartyScreen
|
||||||
PreScreen = currentScreen
|
PreScreen = currentScreen
|
||||||
IsDrawingGradients = True
|
IsDrawingGradients = True
|
||||||
|
|
||||||
|
Me.MouseVisible = False
|
||||||
|
Me.CanChat = Me.PreScreen.CanChat
|
||||||
|
Me.CanBePaused = Me.PreScreen.CanBePaused
|
||||||
|
|
||||||
_translation = New Globalization.Classes.LOCAL_PartyScreen()
|
_translation = New Globalization.Classes.LOCAL_PartyScreen()
|
||||||
|
|
||||||
_index = Player.Temp.PokemonScreenIndex
|
_index = Player.Temp.PokemonScreenIndex
|
||||||
_texture = TextureManager.GetTexture("GUI\Menus\General")
|
_texture = TextureManager.GetTexture("GUI\Menus\General")
|
||||||
_menuTexture = TextureManager.GetTexture("GUI\Menus\PokemonInfo")
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\PokemonInfo")
|
||||||
|
|
||||||
If _index >= Core.Player.Pokemons.Count Then
|
GetPokemonList()
|
||||||
|
|
||||||
|
If _index >= PokemonList.Count - 1 Then
|
||||||
_index = 0
|
_index = 0
|
||||||
End If
|
End If
|
||||||
_cursorDest = GetBoxPosition(_index)
|
_cursorDest = GetBoxPosition(_index)
|
||||||
_cursorPosition = _cursorDest
|
_cursorPosition = _cursorDest
|
||||||
|
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
For i = 0 To PokemonList.Count - 1
|
||||||
_pokemonAnimations.Add(New PokemonAnimation())
|
_pokemonAnimations.Add(New PokemonAnimation())
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@ -96,8 +117,31 @@ Public Class PartyScreen
|
|||||||
|
|
||||||
_menu = New UI.SelectMenu({""}.ToList(), 0, Nothing, 0)
|
_menu = New UI.SelectMenu({""}.ToList(), 0, Nothing, 0)
|
||||||
_menu.Visible = False
|
_menu.Visible = False
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Public Sub New(ByVal currentScreen As Screen, ByVal Item As Item, ByVal ChoosePokemon As DoStuff, ByVal Title As String, ByVal canExit As Boolean)
|
||||||
|
Me.New(currentScreen, Item, ChoosePokemon, Title, canExit, True, True)
|
||||||
|
End Sub
|
||||||
|
Public Sub New(ByVal currentScreen As Screen)
|
||||||
|
Me.New(currentScreen, New Items.Balls.Pokeball, Nothing, "Pokémon", True, True, True, Nothing, False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GetPokemonList()
|
||||||
|
If ChooseMode Then
|
||||||
|
Me.PokemonList.Clear()
|
||||||
|
If AltPokemonList IsNot Nothing Then
|
||||||
|
For Each p As Pokemon In AltPokemonList
|
||||||
|
Me.PokemonList.Add(Pokemon.GetPokemonByData(p.GetSaveData()))
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
For Each p As Pokemon In Core.Player.Pokemons
|
||||||
|
Me.PokemonList.Add(Pokemon.GetPokemonByData(p.GetSaveData()))
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Me.PokemonList = Core.Player.Pokemons
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Draw()
|
Public Overrides Sub Draw()
|
||||||
PreScreen.Draw()
|
PreScreen.Draw()
|
||||||
@ -153,7 +197,7 @@ Public Class PartyScreen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DrawPokemonArea()
|
Private Sub DrawPokemonArea()
|
||||||
For i = 0 To Core.Player.Pokemons.Count - 1
|
For i = 0 To PokemonList.Count - 1
|
||||||
DrawPokemon(i)
|
DrawPokemon(i)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@ -169,7 +213,7 @@ Public Class PartyScreen
|
|||||||
Private Sub DrawPokemon(ByVal index As Integer)
|
Private Sub DrawPokemon(ByVal index As Integer)
|
||||||
Dim position As Vector2 = GetBoxPosition(index)
|
Dim position As Vector2 = GetBoxPosition(index)
|
||||||
|
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(index)
|
Dim p As Pokemon = PokemonList(index)
|
||||||
|
|
||||||
Dim backColor As Color = New Color(0, 0, 0, CInt(100 * _interfaceFade))
|
Dim backColor As Color = New Color(0, 0, 0, CInt(100 * _interfaceFade))
|
||||||
If p.IsShiny And p.IsEgg() = False Then
|
If p.IsShiny And p.IsEgg() = False Then
|
||||||
@ -311,7 +355,7 @@ Public Class PartyScreen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If _closing Then
|
If _closing And _messageDelay = 0 Then
|
||||||
If _interfaceFade > 0F Then
|
If _interfaceFade > 0F Then
|
||||||
_interfaceFade = MathHelper.Lerp(0, _interfaceFade, 0.8F)
|
_interfaceFade = MathHelper.Lerp(0, _interfaceFade, 0.8F)
|
||||||
If _interfaceFade < 0F Then
|
If _interfaceFade < 0F Then
|
||||||
@ -328,6 +372,9 @@ Public Class PartyScreen
|
|||||||
SetScreen(PreScreen)
|
SetScreen(PreScreen)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
If _closing And (Controls.Dismiss() Or Controls.Accept) Then
|
||||||
|
_messageDelay = 0
|
||||||
|
End If
|
||||||
Dim maxWindowHeight As Integer = 400
|
Dim maxWindowHeight As Integer = 400
|
||||||
If _enrollY < maxWindowHeight Then
|
If _enrollY < maxWindowHeight Then
|
||||||
_enrollY = MathHelper.Lerp(maxWindowHeight, _enrollY, 0.8F)
|
_enrollY = MathHelper.Lerp(maxWindowHeight, _enrollY, 0.8F)
|
||||||
@ -345,7 +392,7 @@ Public Class PartyScreen
|
|||||||
If _menu.Visible Then
|
If _menu.Visible Then
|
||||||
_menu.Update()
|
_menu.Update()
|
||||||
Else
|
Else
|
||||||
If Controls.Down(True, True, False, True, True, True) And _index < Core.Player.Pokemons.Count - 2 Then
|
If Controls.Down(True, True, False, True, True, True) And _index < PokemonList.Count - 2 Then
|
||||||
_index += 2
|
_index += 2
|
||||||
_cursorDest = GetBoxPosition(_index)
|
_cursorDest = GetBoxPosition(_index)
|
||||||
End If
|
End If
|
||||||
@ -357,7 +404,7 @@ Public Class PartyScreen
|
|||||||
_index -= 1
|
_index -= 1
|
||||||
_cursorDest = GetBoxPosition(_index)
|
_cursorDest = GetBoxPosition(_index)
|
||||||
End If
|
End If
|
||||||
If Controls.Right(True) And _index < Core.Player.Pokemons.Count - 1 Then
|
If Controls.Right(True) And _index < PokemonList.Count - 1 Then
|
||||||
_index += 1
|
_index += 1
|
||||||
_cursorDest = GetBoxPosition(_index)
|
_cursorDest = GetBoxPosition(_index)
|
||||||
End If
|
End If
|
||||||
@ -372,11 +419,11 @@ Public Class PartyScreen
|
|||||||
_isSwitching = False
|
_isSwitching = False
|
||||||
|
|
||||||
If _switchIndex <> _index Then
|
If _switchIndex <> _index Then
|
||||||
Dim p1 As Pokemon = Core.Player.Pokemons(_switchIndex)
|
Dim p1 As Pokemon = PokemonList(_switchIndex)
|
||||||
Dim p2 As Pokemon = Core.Player.Pokemons(_index)
|
Dim p2 As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
Core.Player.Pokemons(_switchIndex) = p2
|
PokemonList(_switchIndex) = p2
|
||||||
Core.Player.Pokemons(_index) = p1
|
PokemonList(_index) = p1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
_cursorPosition = _cursorDest
|
_cursorPosition = _cursorDest
|
||||||
@ -393,6 +440,7 @@ Public Class PartyScreen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateMainMenu()
|
Private Sub CreateMainMenu()
|
||||||
@ -419,12 +467,12 @@ Public Class PartyScreen
|
|||||||
FireSelectionEvent(_index)
|
FireSelectionEvent(_index)
|
||||||
_closing = True
|
_closing = True
|
||||||
Case _translation.MENU_SUMMARY
|
Case _translation.MENU_SUMMARY
|
||||||
SetScreen(New SummaryScreen(Me, Core.Player.Pokemons.ToArray(), _index))
|
SetScreen(New SummaryScreen(Me, PokemonList.ToArray(), _index))
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateNormalMenu(ByVal selectedItem As String)
|
Private Sub CreateNormalMenu(ByVal selectedItem As String)
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(_index)
|
Dim p As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
Dim items As New List(Of String)
|
Dim items As New List(Of String)
|
||||||
items.Add(_translation.MENU_SUMMARY)
|
items.Add(_translation.MENU_SUMMARY)
|
||||||
@ -453,7 +501,7 @@ Public Class PartyScreen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateFieldMoveMenu()
|
Private Sub CreateFieldMoveMenu()
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(_index)
|
Dim p As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
Dim items As New List(Of String)
|
Dim items As New List(Of String)
|
||||||
If CanUseMove(p, "Fly", Badge.HMMoves.Fly) Then
|
If CanUseMove(p, "Fly", Badge.HMMoves.Fly) Then
|
||||||
@ -481,7 +529,7 @@ Public Class PartyScreen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateItemMenu()
|
Private Sub CreateItemMenu()
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(_index)
|
Dim p As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
Dim items As New List(Of String)
|
Dim items As New List(Of String)
|
||||||
|
|
||||||
@ -521,7 +569,7 @@ Public Class PartyScreen
|
|||||||
Private Sub SelectedMainMenuItem(ByVal selectMenu As UI.SelectMenu)
|
Private Sub SelectedMainMenuItem(ByVal selectMenu As UI.SelectMenu)
|
||||||
Select Case selectMenu.SelectedItem
|
Select Case selectMenu.SelectedItem
|
||||||
Case _translation.MENU_SUMMARY
|
Case _translation.MENU_SUMMARY
|
||||||
SetScreen(New SummaryScreen(Me, Core.Player.Pokemons.ToArray(), _index))
|
SetScreen(New SummaryScreen(Me, PokemonList.ToArray(), _index))
|
||||||
Case _translation.MENU_FIELDMOVE
|
Case _translation.MENU_FIELDMOVE
|
||||||
CreateFieldMoveMenu()
|
CreateFieldMoveMenu()
|
||||||
Case _translation.MENU_SWITCH
|
Case _translation.MENU_SWITCH
|
||||||
@ -563,7 +611,7 @@ Public Class PartyScreen
|
|||||||
|
|
||||||
Core.SetScreen(selScreen)
|
Core.SetScreen(selScreen)
|
||||||
Case _translation.MENU_ITEM_TAKE
|
Case _translation.MENU_ITEM_TAKE
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(_index)
|
Dim p As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
If p.Item.IsMail And p.Item.AdditionalData <> "" Then
|
If p.Item.IsMail And p.Item.AdditionalData <> "" Then
|
||||||
ShowMessage(_translation.MESSAGE_MAILTAKEN)
|
ShowMessage(_translation.MESSAGE_MAILTAKEN)
|
||||||
@ -593,7 +641,7 @@ Public Class PartyScreen
|
|||||||
Dim i As Item = Item.GetItemByID(itemID)
|
Dim i As Item = Item.GetItemByID(itemID)
|
||||||
|
|
||||||
If i.CanBeHold Then
|
If i.CanBeHold Then
|
||||||
Dim p As Pokemon = Core.Player.Pokemons(_index)
|
Dim p As Pokemon = PokemonList(_index)
|
||||||
|
|
||||||
Core.Player.Inventory.RemoveItem(itemID, 1)
|
Core.Player.Inventory.RemoveItem(itemID, 1)
|
||||||
|
|
||||||
@ -622,7 +670,7 @@ Public Class PartyScreen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ShowMessage(ByVal text As String)
|
Public Sub ShowMessage(ByVal text As String)
|
||||||
_messageDelay = CSng(text.Length / 1.75)
|
_messageDelay = CSng(text.Length / 1.75)
|
||||||
_messageText = text
|
_messageText = text
|
||||||
End Sub
|
End Sub
|
||||||
@ -640,7 +688,7 @@ Public Class PartyScreen
|
|||||||
Dim hasLugia As Boolean = False
|
Dim hasLugia As Boolean = False
|
||||||
Dim hasSuicune As Boolean = False
|
Dim hasSuicune As Boolean = False
|
||||||
|
|
||||||
For Each p As Pokemon In Core.Player.Pokemons
|
For Each p As Pokemon In PokemonList
|
||||||
Select Case p.Number
|
Select Case p.Number
|
||||||
Case 245
|
Case 245
|
||||||
hasSuicune = True
|
hasSuicune = True
|
||||||
@ -657,10 +705,10 @@ Public Class PartyScreen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CheckForOverkillEmblem()
|
Private Sub CheckForOverkillEmblem()
|
||||||
If Core.Player.Pokemons.Count = 6 Then
|
If PokemonList.Count = 6 Then
|
||||||
Dim has100 As Boolean = True
|
Dim has100 As Boolean = True
|
||||||
For i = 0 To 5
|
For i = 0 To 5
|
||||||
If Core.Player.Pokemons(i).Level < 100 Then
|
If PokemonList(i).Level < 100 Then
|
||||||
has100 = False
|
has100 = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@ -684,7 +732,7 @@ Public Class PartyScreen
|
|||||||
End If
|
End If
|
||||||
If Screen.Level.IsDark = True Then
|
If Screen.Level.IsDark = True Then
|
||||||
Dim s As String = "version=2" & vbNewLine &
|
Dim s As String = "version=2" & vbNewLine &
|
||||||
"@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
|
"@text.show(" & PokemonList(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
|
||||||
"@environment.toggledarkness" & vbNewLine &
|
"@environment.toggledarkness" & vbNewLine &
|
||||||
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
|
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
|
||||||
"@text.show(The area got lit up!)" & vbNewLine &
|
"@text.show(The area got lit up!)" & vbNewLine &
|
||||||
@ -693,7 +741,7 @@ Public Class PartyScreen
|
|||||||
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
|
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
|
||||||
Else
|
Else
|
||||||
Dim s As String = "version=2" & vbNewLine &
|
Dim s As String = "version=2" & vbNewLine &
|
||||||
"@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
|
"@text.show(" & PokemonList(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
|
||||||
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
|
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
|
||||||
"@text.show(The area is already~lit up!)" & vbNewLine &
|
"@text.show(The area is already~lit up!)" & vbNewLine &
|
||||||
":end"
|
":end"
|
||||||
@ -711,10 +759,10 @@ Public Class PartyScreen
|
|||||||
|
|
||||||
If Screen.Level.CurrentRegion.Contains(",") = True Then
|
If Screen.Level.CurrentRegion.Contains(",") = True Then
|
||||||
Dim regions As List(Of String) = Screen.Level.CurrentRegion.Split(CChar(",")).ToList()
|
Dim regions As List(Of String) = Screen.Level.CurrentRegion.Split(CChar(",")).ToList()
|
||||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, regions, 0, {"Fly", Core.Player.Pokemons(_index)}), Color.White, False))
|
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, regions, 0, {"Fly", PokemonList(_index)}), Color.White, False))
|
||||||
Else
|
Else
|
||||||
Dim startRegion As String = Screen.Level.CurrentRegion
|
Dim startRegion As String = Screen.Level.CurrentRegion
|
||||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, startRegion, {"Fly", Core.Player.Pokemons(_index)}), Color.White, False))
|
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, startRegion, {"Fly", PokemonList(_index)}), Color.White, False))
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
TextBox.Show("You cannot Fly~from here!", {}, True, False)
|
TextBox.Show("You cannot Fly~from here!", {}, True, False)
|
||||||
@ -731,8 +779,8 @@ Public Class PartyScreen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
PlayerStatistics.Track("Cut used", 1)
|
PlayerStatistics.Track("Cut used", 1)
|
||||||
TextBox.Show(Core.Player.Pokemons(_index).GetDisplayName() & "~used Cut!", {}, True, False)
|
TextBox.Show(PokemonList(_index).GetDisplayName() & "~used Cut!", {}, True, False)
|
||||||
Core.Player.Pokemons(_index).PlayCry()
|
PokemonList(_index).PlayCry()
|
||||||
For Each e As Entity In grassEntities
|
For Each e As Entity In grassEntities
|
||||||
Screen.Level.Entities.Remove(e)
|
Screen.Level.Entities.Remove(e)
|
||||||
Next
|
Next
|
||||||
@ -768,18 +816,18 @@ Public Class PartyScreen
|
|||||||
Core.Player.TempRideSkin = Core.Player.Skin
|
Core.Player.TempRideSkin = Core.Player.Skin
|
||||||
|
|
||||||
Dim skin As String = "[POKEMON|"
|
Dim skin As String = "[POKEMON|"
|
||||||
If Core.Player.Pokemons(_index).IsShiny = True Then
|
If PokemonList(_index).IsShiny = True Then
|
||||||
skin &= "S]"
|
skin &= "S]"
|
||||||
Else
|
Else
|
||||||
skin &= "N]"
|
skin &= "N]"
|
||||||
End If
|
End If
|
||||||
skin &= Core.Player.Pokemons(_index).Number & PokemonForms.GetOverworldAddition(Core.Player.Pokemons(_index))
|
skin &= PokemonList(_index).Number & PokemonForms.GetOverworldAddition(PokemonList(_index))
|
||||||
|
|
||||||
Screen.Level.OwnPlayer.SetTexture(skin, False)
|
Screen.Level.OwnPlayer.SetTexture(skin, False)
|
||||||
|
|
||||||
SoundManager.PlayPokemonCry(Core.Player.Pokemons(_index).Number)
|
SoundManager.PlayPokemonCry(PokemonList(_index).Number)
|
||||||
|
|
||||||
TextBox.Show(Core.Player.Pokemons(_index).GetDisplayName() & " used~Ride!", {}, True, False)
|
TextBox.Show(PokemonList(_index).GetDisplayName() & " used~Ride!", {}, True, False)
|
||||||
PlayerStatistics.Track("Ride used", 1)
|
PlayerStatistics.Track("Ride used", 1)
|
||||||
|
|
||||||
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
|
||||||
@ -802,7 +850,7 @@ Public Class PartyScreen
|
|||||||
Dim setToFirstPerson As Boolean = Not CType(Screen.Camera, OverworldCamera).ThirdPerson
|
Dim setToFirstPerson As Boolean = Not CType(Screen.Camera, OverworldCamera).ThirdPerson
|
||||||
|
|
||||||
Dim s As String = "version=2
|
Dim s As String = "version=2
|
||||||
@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used Dig!)
|
@text.show(" & PokemonList(_index).GetDisplayName() & " used Dig!)
|
||||||
@level.wait(20)
|
@level.wait(20)
|
||||||
@camera.activatethirdperson
|
@camera.activatethirdperson
|
||||||
@camera.reset
|
@camera.reset
|
||||||
@ -847,7 +895,7 @@ Public Class PartyScreen
|
|||||||
Dim yFinish As String = (Screen.Camera.Position.Y + 2.9F).ToString().ReplaceDecSeparator()
|
Dim yFinish As String = (Screen.Camera.Position.Y + 2.9F).ToString().ReplaceDecSeparator()
|
||||||
|
|
||||||
Dim s As String = "version=2
|
Dim s As String = "version=2
|
||||||
@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & "~used Teleport!)
|
@text.show(" & PokemonList(_index).GetDisplayName() & "~used Teleport!)
|
||||||
@level.wait(20)
|
@level.wait(20)
|
||||||
@camera.activatethirdperson
|
@camera.activatethirdperson
|
||||||
@camera.reset
|
@camera.reset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user