mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-26 15:24:52 +02:00
Dex Evo/Form Screen Progress + Pichu form fix
This commit is contained in:
parent
d80a9170c1
commit
dae28c537a
@ -50,7 +50,7 @@
|
|||||||
{150|mega_x||Mega | X|_mega_x|Megas,10,0|_mega_x|_mega_x|||}
|
{150|mega_x||Mega | X|_mega_x|Megas,10,0|_mega_x|_mega_x|||}
|
||||||
{150|mega_y||Mega | Y|_mega_y|Megas,11,0|_mega_y|_mega_y|||}
|
{150|mega_y||Mega | Y|_mega_y|Megas,11,0|_mega_y|_mega_y|||}
|
||||||
{157|hisui||Hisuian ||_hisui|Regional,4,4|_hisui|_hisui|||}
|
{157|hisui||Hisuian ||_hisui|Regional,4,4|_hisui|_hisui|||}
|
||||||
{172|spiky-eared||||_spiky-eared|OtherForms,0,2|_spiky-eared|_spiky-eared|||}
|
{172|spiky-eared||Spiky-Eared ||_spiky-eared|OtherForms,0,2|_spiky-eared|_spiky-eared|||}
|
||||||
{181|mega||Mega ||_mega|Megas,12,0|_mega|_mega|||}
|
{181|mega||Mega ||_mega|Megas,12,0|_mega|_mega|||}
|
||||||
{199|galar||Galarian ||_galar|Regional,11,2|_galar|_galar|||}
|
{199|galar||Galarian ||_galar|Regional,11,2|_galar|_galar|||}
|
||||||
{201||||||Unown,0,0|_a|-a||Random;0-27|}
|
{201||||||Unown,0,0|_a|-a||Random;0-27|}
|
||||||
|
@ -43,4 +43,7 @@ Move|13,86
|
|||||||
Move|18,417
|
Move|18,417
|
||||||
TradeValue|50
|
TradeValue|50
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
|
DexForms|spiky-eared
|
||||||
EvolutionCondition|25,friendship,220,Level
|
EvolutionCondition|25,friendship,220,Level
|
||||||
|
EvolutionLine|172\-1\0,25\0\0,26\1\0
|
||||||
|
EvolutionLine|25\0\0,26_alola\1\1
|
@ -1,4 +1,4 @@
|
|||||||
Name|Spiky-Eared Pichu
|
Name|Pichu
|
||||||
Number|172
|
Number|172
|
||||||
ExperienceType|1
|
ExperienceType|1
|
||||||
BaseExperience|41
|
BaseExperience|41
|
||||||
@ -43,3 +43,5 @@ Move|13,86
|
|||||||
Move|18,417
|
Move|18,417
|
||||||
TradeValue|100
|
TradeValue|100
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
|
EvolutionLine|172\-1\0,25\0\0,26\1\0
|
||||||
|
EvolutionLine|25\0\0,26_alola\1\1
|
@ -51,3 +51,5 @@ EvolutionCondition|20,Level,20,Level
|
|||||||
Item|5,2051
|
Item|5,2051
|
||||||
TradeValue|10
|
TradeValue|10
|
||||||
DexForms|Alola
|
DexForms|Alola
|
||||||
|
EvolutionLine|19\0\0,20\1\0
|
||||||
|
EvolutionLine|19_alola\0\1,20_alola\1\1
|
@ -58,3 +58,7 @@ Move|58,505
|
|||||||
TradeValue|50
|
TradeValue|50
|
||||||
Item|5,82
|
Item|5,82
|
||||||
DexForms|Galar
|
DexForms|Galar
|
||||||
|
EvolutionLine|79\0\0,80\1\-1
|
||||||
|
EvolutionLine|79\0\0,199\1\0
|
||||||
|
EvolutionLine|79_galar\0\1,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\1,199_galar\1\2
|
||||||
|
@ -60,3 +60,7 @@ Move|41,244
|
|||||||
Move|46,240
|
Move|46,240
|
||||||
Move|51,505
|
Move|51,505
|
||||||
TradeValue|50
|
TradeValue|50
|
||||||
|
EvolutionLine|79\0\0,80\1\-1
|
||||||
|
EvolutionLine|79\0\0,199\1\0
|
||||||
|
EvolutionLine|79_galar\0\1,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\1,199_galar\1\2
|
@ -51,3 +51,5 @@ EvolutionCondition|20_alola,Level,20,Level
|
|||||||
EvolutionCondition|20_alola,daytime,0;3,level
|
EvolutionCondition|20_alola,daytime,0;3,level
|
||||||
Item|5,2002
|
Item|5,2002
|
||||||
TradeValue|10
|
TradeValue|10
|
||||||
|
EvolutionLine|19\0\0,20\1\0
|
||||||
|
EvolutionLine|19_alola\0\1,20_alola\1\1
|
@ -54,3 +54,5 @@ Move|44,283
|
|||||||
Item|5,2051
|
Item|5,2051
|
||||||
TradeValue|20
|
TradeValue|20
|
||||||
DexForms|Alola
|
DexForms|Alola
|
||||||
|
EvolutionLine|19\0\0,20\1\0
|
||||||
|
EvolutionLine|19_alola\0\1,20_alola\1\1
|
@ -53,3 +53,5 @@ Move|39,38
|
|||||||
Move|44,283
|
Move|44,283
|
||||||
Item|5,2002
|
Item|5,2002
|
||||||
TradeValue|20
|
TradeValue|20
|
||||||
|
EvolutionLine|19\0\0,20\1\0
|
||||||
|
EvolutionLine|19_alola\0\1,20_alola\1\1
|
@ -57,3 +57,5 @@ EvolutionCondition|26_alola,item,23,item
|
|||||||
Item|5,163
|
Item|5,163
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
TradeValue|20
|
TradeValue|20
|
||||||
|
EvolutionLine|172\-1\0,25\0\0,26\1\0
|
||||||
|
EvolutionLine|25\0\0,26_alola\1\1
|
@ -41,3 +41,6 @@ Move|1,85
|
|||||||
Move|1,98
|
Move|1,98
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
TradeValue|40
|
TradeValue|40
|
||||||
|
DexForms|Alola
|
||||||
|
EvolutionLine|172\-1\0,25\0\0,26\1\0
|
||||||
|
EvolutionLine|25\0\0,26_alola\1\1
|
@ -56,3 +56,5 @@ TradeValue|5
|
|||||||
Item|5,2006
|
Item|5,2006
|
||||||
EvolutionCondition|264,Level,20,Level
|
EvolutionCondition|264,Level,20,Level
|
||||||
DexForms|Galar
|
DexForms|Galar
|
||||||
|
EvolutionLine|263\-1\0,264\0\0
|
||||||
|
EvolutionLine|263_galar\-1\1,264_galar\0\1,862\1\1
|
@ -55,3 +55,5 @@ Move|36,38
|
|||||||
TradeValue|5
|
TradeValue|5
|
||||||
Item|5,2006
|
Item|5,2006
|
||||||
EvolutionCondition|264_galar,Level,20,Level
|
EvolutionCondition|264_galar,Level,20,Level
|
||||||
|
EvolutionLine|263\-1\0,264\0\0
|
||||||
|
EvolutionLine|263_galar\-1\1,264_galar\0\1,862\1\1
|
@ -61,3 +61,5 @@ TradeValue|15
|
|||||||
Item|5,2009
|
Item|5,2009
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
DexForms|Galar
|
DexForms|Galar
|
||||||
|
EvolutionLine|263\-1\0,264\0\0
|
||||||
|
EvolutionLine|263_galar\-1\1,264_galar\0\1,862\1\1
|
||||||
|
@ -62,3 +62,5 @@ Item|5,2009
|
|||||||
Item|50,2006
|
Item|50,2006
|
||||||
EvolutionCondition|862,Level,35,Level
|
EvolutionCondition|862,Level,35,Level
|
||||||
EvolutionCondition|862,daytime,0;3,level
|
EvolutionCondition|862,daytime,0;3,level
|
||||||
|
EvolutionLine|263\-1\0,264\0\0
|
||||||
|
EvolutionLine|263_galar\-1\1,264_galar\0\1,862\1\1
|
@ -42,3 +42,5 @@ Move|1,98
|
|||||||
Move|1,85
|
Move|1,85
|
||||||
Item|50,2006
|
Item|50,2006
|
||||||
TradeValue|40
|
TradeValue|40
|
||||||
|
EvolutionLine|172\-1\0,25\0\0,26\1\0
|
||||||
|
EvolutionLine|25\0\0,26_alola\1\1
|
@ -50,3 +50,7 @@ Move|89,354
|
|||||||
Move|97,63
|
Move|97,63
|
||||||
TradeValue|120
|
TradeValue|120
|
||||||
DexForms|attack,defense,speed
|
DexForms|attack,defense,speed
|
||||||
|
EvolutionLine|386\0\0
|
||||||
|
EvolutionLine|386_attack\1\-1
|
||||||
|
EvolutionLine|386_defense\1\0
|
||||||
|
EvolutionLine|386_speed\1\1
|
||||||
|
@ -53,3 +53,6 @@ EvolutionCondition|53,Level,28,Level
|
|||||||
Item|5,73
|
Item|5,73
|
||||||
TradeValue|15
|
TradeValue|15
|
||||||
DexForms|Alola,Galar
|
DexForms|Alola,Galar
|
||||||
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
||||||
|
@ -52,3 +52,6 @@ Move|55,399
|
|||||||
EvolutionCondition|53_alola,friendship,220,level
|
EvolutionCondition|53_alola,friendship,220,level
|
||||||
Item|5,73
|
Item|5,73
|
||||||
TradeValue|15
|
TradeValue|15
|
||||||
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
@ -49,3 +49,6 @@ Move|44,37
|
|||||||
EvolutionCondition|863,level,28,level
|
EvolutionCondition|863,level,28,level
|
||||||
Item|5,73
|
Item|5,73
|
||||||
TradeValue|15
|
TradeValue|15
|
||||||
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
@ -57,3 +57,6 @@ Move|65,364
|
|||||||
Item|5,73
|
Item|5,73
|
||||||
TradeValue|25
|
TradeValue|25
|
||||||
DexForms|Alola
|
DexForms|Alola
|
||||||
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
@ -58,3 +58,6 @@ Move|65,364
|
|||||||
Move|69,399
|
Move|69,399
|
||||||
Item|5,73
|
Item|5,73
|
||||||
TradeValue|25
|
TradeValue|25
|
||||||
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
@ -57,3 +57,7 @@ Item|5,142
|
|||||||
EvolutionCondition|80,Level,37,Level
|
EvolutionCondition|80,Level,37,Level
|
||||||
EvolutionCondition|199,holditem,82,trade
|
EvolutionCondition|199,holditem,82,trade
|
||||||
DexForms|Galar
|
DexForms|Galar
|
||||||
|
EvolutionLine|79\0\-1,80\1\-3
|
||||||
|
EvolutionLine|79\0\-1,199\1\-1
|
||||||
|
EvolutionLine|79_galar\0\1,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\1,199_galar\1\3
|
@ -56,3 +56,7 @@ TradeValue|15
|
|||||||
Item|5,142
|
Item|5,142
|
||||||
EvolutionCondition|80_galar,Level,37,Level
|
EvolutionCondition|80_galar,Level,37,Level
|
||||||
EvolutionCondition|199_galar,holditem,82,trade
|
EvolutionCondition|199_galar,holditem,82,trade
|
||||||
|
EvolutionLine|79\0\-1,80\1\-3
|
||||||
|
EvolutionLine|79\0\-1,199\1\-1
|
||||||
|
EvolutionLine|79_galar\0\1,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\1,199_galar\1\3
|
@ -58,3 +58,7 @@ Move|68,505
|
|||||||
TradeValue|30
|
TradeValue|30
|
||||||
Item|5,82
|
Item|5,82
|
||||||
DexForms|Galar
|
DexForms|Galar
|
||||||
|
EvolutionLine|79\0\-1,80\1\-3
|
||||||
|
EvolutionLine|79\0\-1,199\1\-1
|
||||||
|
EvolutionLine|79_galar\0\1,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\1,199_galar\1\3
|
@ -55,3 +55,7 @@ Move|41,244
|
|||||||
Move|46,240
|
Move|46,240
|
||||||
Move|51,505
|
Move|51,505
|
||||||
TradeValue|30
|
TradeValue|30
|
||||||
|
EvolutionLine|79\0\-2,80\1\-3
|
||||||
|
EvolutionLine|79\0\-2,199\1\-1
|
||||||
|
EvolutionLine|79_galar\0\2,80_galar\1\1
|
||||||
|
EvolutionLine|79_galar\0\2,199_galar\1\3
|
@ -51,4 +51,6 @@ Move|42,163
|
|||||||
Move|48,319
|
Move|48,319
|
||||||
Move|54,37
|
Move|54,37
|
||||||
TradeValue|25
|
TradeValue|25
|
||||||
DexForms|53
|
EvolutionLine|52\0\-1,53\1\-1
|
||||||
|
EvolutionLine|52_alola\0\0,53_alola\1\0
|
||||||
|
EvolutionLine|52_galar\0\1,863\1\1
|
@ -633,6 +633,7 @@ Public Class Pokemon
|
|||||||
Public WildItems As New Dictionary(Of Integer, String)
|
Public WildItems As New Dictionary(Of Integer, String)
|
||||||
Public RegionalForms As String = ""
|
Public RegionalForms As String = ""
|
||||||
Public DexForms As New List(Of String)
|
Public DexForms As New List(Of String)
|
||||||
|
Public EvolutionLines As New List(Of String)
|
||||||
|
|
||||||
Private _name As String
|
Private _name As String
|
||||||
Private _number As Integer
|
Private _number As Integer
|
||||||
@ -1504,6 +1505,8 @@ Public Class Pokemon
|
|||||||
Else
|
Else
|
||||||
Me.DexForms.Add(" ".ToLower)
|
Me.DexForms.Add(" ".ToLower)
|
||||||
End If
|
End If
|
||||||
|
Case "evolutionline"
|
||||||
|
Me.EvolutionLines.Add(Value.ToLower)
|
||||||
Case "canbreed"
|
Case "canbreed"
|
||||||
Me.CanBreed = CBool(Value)
|
Me.CanBreed = CBool(Value)
|
||||||
Case "basehp"
|
Case "basehp"
|
||||||
|
@ -875,7 +875,7 @@ Public Class PokedexScreen
|
|||||||
TempPokemonStorage.Clear()
|
TempPokemonStorage.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Menus"
|
#Region "Menus"
|
||||||
|
|
||||||
Private Sub SelectMenu1(ByVal s As SelectMenu)
|
Private Sub SelectMenu1(ByVal s As SelectMenu)
|
||||||
Select Case s.SelectedItem.ToLower()
|
Select Case s.SelectedItem.ToLower()
|
||||||
@ -987,7 +987,7 @@ Public Class PokedexScreen
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Class SelectMenu
|
Private Class SelectMenu
|
||||||
|
|
||||||
@ -1278,7 +1278,7 @@ Public Class PokedexScreen
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class PokedexViewScreen
|
Public Class PokedexViewScreen
|
||||||
|
|
||||||
@ -1294,90 +1294,36 @@ Public Class PokedexViewScreen
|
|||||||
Dim yOffset As Integer = 0
|
Dim yOffset As Integer = 0
|
||||||
Dim FrontView As Boolean = True
|
Dim FrontView As Boolean = True
|
||||||
|
|
||||||
Dim EvolutionLines As new List(Of EvolutionLinePokemon)
|
Dim EvolutionLineConnections As New List(Of PokemonEvolutionLine)
|
||||||
Dim minimumLevel As Integer = 0
|
|
||||||
Dim maximumLevel As Integer = 0
|
Dim GridMinimum As New Vector2(0, 0)
|
||||||
|
Dim GridMaximum As New Vector2(0, 0)
|
||||||
|
|
||||||
Dim HabitatList As New List(Of PokedexScreen.Habitat)
|
Dim HabitatList As New List(Of PokedexScreen.Habitat)
|
||||||
|
|
||||||
Class EvolutionLinePokemon
|
Class PokemonEvolutionLine
|
||||||
|
|
||||||
Public Level As Integer = 0
|
Public ConnectionList As New List(Of Tuple(Of Integer, Integer, Pokemon))
|
||||||
Public PokemonID As String = "0"
|
|
||||||
Public PokemonAD As String = ""
|
|
||||||
Public Evolutions As New List(Of EvolutionLinePokemon)
|
|
||||||
Public Forms As New List(Of EvolutionLinePokemon)
|
|
||||||
Public Devolution As EvolutionLinePokemon = Nothing
|
|
||||||
Public Pokemon As Pokemon = Nothing
|
|
||||||
|
|
||||||
Public Sub New(ByVal Level As Integer, ByVal pokemonID As String, ByVal vS As PokedexViewScreen, ByVal fromEvolution As String)
|
Public Sub New(ByVal GridPositions As List(Of Vector2), ByVal PokemonIDs As List(Of String))
|
||||||
Me.Level = Level
|
If GridPositions.Count = PokemonIDs.Count Then
|
||||||
Me.PokemonID = pokemonID
|
For i = 0 To PokemonIDs.Count - 1
|
||||||
If pokemonID.Contains("_") Then
|
Dim DexID As Integer
|
||||||
Me.PokemonAD = PokemonForms.GetAdditionalValueFromDataFile(pokemonID)
|
Dim DexAD As String = ""
|
||||||
ElseIf pokemonID.Contains(";") Then
|
|
||||||
Me.PokemonID = pokemonID.GetSplit(0, ";")
|
|
||||||
Me.PokemonAD = pokemonID.GetSplit(1, ";")
|
|
||||||
End If
|
|
||||||
Me.Pokemon = Pokemon.GetPokemonByID(CInt(Me.PokemonID.GetSplit(0, "_")), Me.PokemonAD)
|
|
||||||
|
|
||||||
If Me.Pokemon.EvolutionConditions.Count > 0 Then
|
If PokemonIDs(i).Contains("_") Then
|
||||||
Dim evolutions As New List(Of String)
|
DexID = CInt(PokemonIDs(i).GetSplit(0, "_"))
|
||||||
For Each ev As EvolutionCondition In Me.Pokemon.EvolutionConditions
|
DexAD = PokemonForms.GetAdditionalValueFromDataFile(PokemonIDs(i))
|
||||||
If evolutions.Contains(ev.Evolution) = False And fromEvolution <> ev.Evolution Then
|
ElseIf PokemonIDs(i).Contains(";") Then
|
||||||
evolutions.Add(ev.Evolution)
|
DexID = CInt(PokemonIDs(i).GetSplit(0, ";"))
|
||||||
End If
|
DexAD = PokemonIDs(i).GetSplit(1, ";")
|
||||||
Next
|
|
||||||
|
|
||||||
For Each ev As String In evolutions
|
|
||||||
If vS.maximumLevel < Me.Level + 1 Then
|
|
||||||
vS.maximumLevel = Me.Level + 1
|
|
||||||
End If
|
|
||||||
Me.Evolutions.Add(New EvolutionLinePokemon(Me.Level + 1, ev, vS, ""))
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Me.Pokemon.DexForms.Count > 0 Then
|
|
||||||
For Each form As String In Me.Pokemon.DexForms
|
|
||||||
|
|
||||||
Dim formID As String = Me.Pokemon.Number.ToString
|
|
||||||
If form <> " " Then
|
|
||||||
If StringHelper.IsNumeric(form) = False Then
|
|
||||||
formID &= "_" & form
|
|
||||||
Else
|
Else
|
||||||
formID = form
|
DexID = CInt(PokemonIDs(i))
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim formAD As String = ""
|
Dim p As Pokemon = Pokemon.GetPokemonByID(DexID, DexAD)
|
||||||
If form <> " " AndAlso StringHelper.IsNumeric(form) = False Then
|
Dim entry As New Tuple(Of Integer, Integer, Pokemon)(CInt(GridPositions(i).X), CInt(GridPositions(i).Y), p)
|
||||||
formAD = PokemonForms.GetAdditionalValueFromDataFile(Me.PokemonID.GetSplit(0, "_") & "_" & form)
|
ConnectionList.Add(entry)
|
||||||
End If
|
|
||||||
|
|
||||||
Dim formpokemon As Pokemon = Pokemon.GetPokemonByID(CInt(Me.PokemonID.GetSplit(0, "_")), formAD, True)
|
|
||||||
If formpokemon.EvolutionConditions.Count > 0 Then
|
|
||||||
Dim evolutions As New List(Of String)
|
|
||||||
For Each ev As EvolutionCondition In formpokemon.EvolutionConditions
|
|
||||||
If evolutions.Contains(ev.Evolution) = False And fromEvolution <> ev.Evolution Then
|
|
||||||
evolutions.Add(ev.Evolution)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each ev As String In evolutions
|
|
||||||
If vS.maximumLevel < Me.Level + 1 Then
|
|
||||||
vS.maximumLevel = Me.Level + 1
|
|
||||||
End If
|
|
||||||
Me.Evolutions.Add(New EvolutionLinePokemon(Me.Level + 1, ev, vS, ""))
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
If vS.maximumLevel < Me.Level + 1 Then
|
|
||||||
vS.maximumLevel = Me.Level + 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Me.Forms.Add(New EvolutionLinePokemon(Me.Level + 1, formID, vS, ""))
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@ -1414,92 +1360,131 @@ Public Class PokedexViewScreen
|
|||||||
Me.EntryType = Pokedex.GetEntryType(Core.Player.PokedexData, dexID)
|
Me.EntryType = Pokedex.GetEntryType(Core.Player.PokedexData, dexID)
|
||||||
|
|
||||||
Me.GetYOffset()
|
Me.GetYOffset()
|
||||||
Me.FillEvolutionLine()
|
Me.FillEvolutionGrid()
|
||||||
Me.FillHabitats()
|
Me.FillHabitats()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FillEvolutionLine()
|
Private Sub FillEvolutionGrid()
|
||||||
Dim evoID As String = Me.Pokemon.Number.ToString
|
If Me.Pokemon.EvolutionLines.Count > 0 Then
|
||||||
Dim p As New EvolutionLinePokemon(0, evoID, Me, "")
|
For e = 0 To Me.Pokemon.EvolutionLines.Count - 1
|
||||||
|
Dim GridPositions As New List(Of Vector2)
|
||||||
If CInt(p.Pokemon.Devolution.GetSplit(0, "_")) > 0 Then
|
Dim PokemonIDs As New List(Of String)
|
||||||
Dim devoID As String = p.Pokemon.Devolution
|
Dim DataEntries As String() = Me.Pokemon.EvolutionLines(e).Split(",")
|
||||||
Dim devoAD As String = ""
|
For i = 0 To DataEntries.Count - 1
|
||||||
If devoID.Contains("_") Then
|
PokemonIDs.Add(DataEntries(i).GetSplit(0, "\"))
|
||||||
devoAD = PokemonForms.GetAdditionalValueFromDataFile(p.Pokemon.Devolution)
|
Dim Position As New Vector2(CInt(DataEntries(i).GetSplit(1, "\")))
|
||||||
|
If DataEntries(i).Split("\").Count > 2 Then
|
||||||
|
Position.Y = CInt(DataEntries(i).GetSplit(2, "\"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim devP As Pokemon = P3D.Pokemon.GetPokemonByID(CInt(devoID.GetSplit(0, "_")), devoAD)
|
If GridMinimum.X > Position.X Then
|
||||||
Dim devR As EvolutionLinePokemon = Nothing
|
GridMinimum.X = Position.X
|
||||||
Dim level As Integer = -1
|
End If
|
||||||
p.Devolution = New EvolutionLinePokemon(level, devoID, Me, evoID)
|
If GridMinimum.Y > Position.Y Then
|
||||||
Logger.Debug("Add devolution level 1: " & devP.Number)
|
GridMinimum.Y = Position.Y
|
||||||
|
|
||||||
devR = p.Devolution
|
|
||||||
|
|
||||||
While CInt(devR.Pokemon.Devolution.GetSplit(0, "_")) > 0
|
|
||||||
devoID = devR.Pokemon.Devolution
|
|
||||||
devoAD = ""
|
|
||||||
If devR.Pokemon.AdditionalData <> "" Then
|
|
||||||
devoAD = PokemonForms.GetAdditionalValueFromDataFile(devR.Pokemon.Devolution)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
devP = P3D.Pokemon.GetPokemonByID(CInt(devoID.GetSplit(0, "_")), devoAD)
|
If GridMaximum.X < Position.X Then
|
||||||
level -= 1
|
GridMaximum.X = Position.X
|
||||||
devR.Devolution = New EvolutionLinePokemon(level, devoID, Me, PokemonForms.GetPokemonDataFileName(devR.Pokemon.Number, devR.Pokemon.AdditionalData))
|
End If
|
||||||
devR = devR.Devolution
|
If GridMaximum.Y < Position.Y Then
|
||||||
Logger.Debug("Add devolution level " & (level * -1) & ": " & devP.Number)
|
GridMaximum.Y = Position.Y
|
||||||
End While
|
|
||||||
|
|
||||||
minimumLevel = level
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Debug("Minimum level: " & minimumLevel & "; maximum level: " & maximumLevel)
|
GridPositions.Add(Position)
|
||||||
|
|
||||||
Me.EvolutionLines.Add(p)
|
|
||||||
If p.Forms.Count > 0 Then
|
|
||||||
For Each formp As EvolutionLinePokemon In p.Forms
|
|
||||||
Dim formEvoID As String = formp.Pokemon.Number.ToString
|
|
||||||
If formp.Pokemon.AdditionalData <> "" Then
|
|
||||||
formEvoID = PokemonForms.GetPokemonDataFileName(formp.Pokemon.Number, formp.Pokemon.AdditionalData)
|
|
||||||
End If
|
|
||||||
If CInt(formp.Pokemon.Devolution.GetSplit(0, "_")) > 0 Then
|
|
||||||
Dim devoID As String = formp.Pokemon.Devolution
|
|
||||||
Dim devoAD As String = ""
|
|
||||||
If devoID.Contains("_") Then
|
|
||||||
devoAD = PokemonForms.GetAdditionalValueFromDataFile(formp.Pokemon.Devolution)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim devP As Pokemon = P3D.Pokemon.GetPokemonByID(CInt(devoID.GetSplit(0, "_")), devoAD)
|
|
||||||
Dim devR As EvolutionLinePokemon = Nothing
|
|
||||||
Dim level As Integer = -1
|
|
||||||
formp.Devolution = New EvolutionLinePokemon(level, devoID, Me, evoID)
|
|
||||||
Logger.Debug("Add devolution level 1: " & devP.Number)
|
|
||||||
|
|
||||||
devR = formp.Devolution
|
|
||||||
|
|
||||||
While CInt(devR.Pokemon.Devolution.GetSplit(0, "_")) > 0
|
|
||||||
devoID = devR.Pokemon.Devolution
|
|
||||||
devoAD = ""
|
|
||||||
If devR.Pokemon.AdditionalData <> "" Then
|
|
||||||
devoAD = PokemonForms.GetAdditionalValueFromDataFile(devR.Pokemon.Devolution)
|
|
||||||
End If
|
|
||||||
|
|
||||||
devP = P3D.Pokemon.GetPokemonByID(CInt(devoID.GetSplit(0, "_")), devoAD)
|
|
||||||
level -= 1
|
|
||||||
devR.Devolution = New EvolutionLinePokemon(level, devoID, Me, PokemonForms.GetPokemonDataFileName(devR.Pokemon.Number, devR.Pokemon.AdditionalData))
|
|
||||||
devR = devR.Devolution
|
|
||||||
Logger.Debug("Add devolution level " & (level * -1) & ": " & devP.Number)
|
|
||||||
End While
|
|
||||||
|
|
||||||
If minimumLevel > level Then
|
|
||||||
minimumLevel = level
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Me.EvolutionLines.Add(formp)
|
|
||||||
Next
|
Next
|
||||||
|
Dim evoline As New PokemonEvolutionLine(GridPositions, PokemonIDs)
|
||||||
|
EvolutionLineConnections.Add(evoline)
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
Dim GridPositions As New List(Of Vector2)
|
||||||
|
Dim PokemonIDs As New List(Of String)
|
||||||
|
|
||||||
|
If Me.Pokemon.Devolution <> "0" Then
|
||||||
|
Dim DevoID As Integer = CInt(Me.Pokemon.Devolution.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim DevoAD As String = ""
|
||||||
|
|
||||||
|
If Me.Pokemon.Devolution.Contains("_") Then
|
||||||
|
DevoAD = PokemonForms.GetAdditionalValueFromDataFile(Me.Pokemon.Devolution)
|
||||||
|
ElseIf Me.Pokemon.Devolution.Contains(";") Then
|
||||||
|
DevoAD = Me.Pokemon.Devolution.GetSplit(1, ";")
|
||||||
End If
|
End If
|
||||||
Logger.Debug("Minimum level: " & minimumLevel & "; maximum level: " & maximumLevel)
|
|
||||||
|
Dim DevoP As Pokemon = Pokemon.GetPokemonByID(DevoID, DevoAD, True)
|
||||||
|
|
||||||
|
If DevoP.Devolution <> "0" Then
|
||||||
|
PokemonIDs.Add(DevoP.Devolution)
|
||||||
|
End If
|
||||||
|
PokemonIDs.Add(Me.Pokemon.Devolution)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim DexData As String = PokemonForms.GetPokemonDataFileName(Me.Pokemon.Number, Me.Pokemon.AdditionalData, True)
|
||||||
|
|
||||||
|
PokemonIDs.Add(DexData)
|
||||||
|
|
||||||
|
If Me.Pokemon.EvolutionConditions.Count > 0 Then
|
||||||
|
PokemonIDs.Add(Me.Pokemon.EvolutionConditions(0).Evolution)
|
||||||
|
|
||||||
|
Dim EvoID As Integer = CInt(Me.Pokemon.EvolutionConditions(0).Evolution.GetSplit(0, "_").GetSplit(0, ";"))
|
||||||
|
Dim EvoAD As String = ""
|
||||||
|
|
||||||
|
If Me.Pokemon.EvolutionConditions(0).Evolution.Contains("_") Then
|
||||||
|
EvoAD = PokemonForms.GetAdditionalValueFromDataFile(Me.Pokemon.EvolutionConditions(0).Evolution)
|
||||||
|
ElseIf Me.Pokemon.EvolutionConditions(0).Evolution.Contains(";") Then
|
||||||
|
EvoAD = Me.Pokemon.EvolutionConditions(0).Evolution.GetSplit(1, ";")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim EvoP As Pokemon = Pokemon.GetPokemonByID(EvoID, EvoAD, True)
|
||||||
|
|
||||||
|
If EvoP.EvolutionConditions.Count > 0 Then
|
||||||
|
PokemonIDs.Add(EvoP.EvolutionConditions(0).Evolution)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Select Case PokemonIDs.Count
|
||||||
|
Case 1
|
||||||
|
GridMinimum = New Vector2(0)
|
||||||
|
GridMaximum = New Vector2(0)
|
||||||
|
|
||||||
|
GridPositions.Add(New Vector2(0, 0))
|
||||||
|
Case 2
|
||||||
|
GridMinimum = New Vector2(0)
|
||||||
|
GridMaximum = New Vector2(2, 0)
|
||||||
|
|
||||||
|
GridPositions.Add(New Vector2(0, 0))
|
||||||
|
GridPositions.Add(New Vector2(2, 0))
|
||||||
|
Case 3
|
||||||
|
GridMinimum = New Vector2(-2, 0)
|
||||||
|
GridMaximum = New Vector2(2, 0)
|
||||||
|
|
||||||
|
GridPositions.Add(New Vector2(-2, 0))
|
||||||
|
GridPositions.Add(New Vector2(0, 0))
|
||||||
|
GridPositions.Add(New Vector2(2, 0))
|
||||||
|
Case 4
|
||||||
|
GridMinimum = New Vector2(-2, 0)
|
||||||
|
GridMaximum = New Vector2(4, 0)
|
||||||
|
|
||||||
|
GridPositions.Add(New Vector2(-2, 0))
|
||||||
|
GridPositions.Add(New Vector2(0, 0))
|
||||||
|
GridPositions.Add(New Vector2(2, 0))
|
||||||
|
GridPositions.Add(New Vector2(4, 0))
|
||||||
|
Case 5
|
||||||
|
GridMinimum = New Vector2(-4, 0)
|
||||||
|
GridMaximum = New Vector2(4, 0)
|
||||||
|
|
||||||
|
GridPositions.Add(New Vector2(-4, 0))
|
||||||
|
GridPositions.Add(New Vector2(-2, 0))
|
||||||
|
GridPositions.Add(New Vector2(0, 0))
|
||||||
|
GridPositions.Add(New Vector2(2, 0))
|
||||||
|
GridPositions.Add(New Vector2(4, 0))
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim evoline As New PokemonEvolutionLine(GridPositions, PokemonIDs)
|
||||||
|
EvolutionLineConnections.Add(evoline)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Logger.Debug("Minimum level: " & GridMinimum.X & "x," & GridMinimum.Y & "y; Maximum level: " & GridMaximum.X & "x," & GridMaximum.Y & "y")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FillHabitats()
|
Private Sub FillHabitats()
|
||||||
@ -1704,178 +1689,85 @@ Public Class PokedexViewScreen
|
|||||||
Dim scale As Single = 2.0F
|
Dim scale As Single = 2.0F
|
||||||
|
|
||||||
Private Sub DrawPage3()
|
Private Sub DrawPage3()
|
||||||
If EvolutionLines.Count = 0 OrElse EvolutionLines.Count = 1 AndAlso EvolutionLines(0).Devolution Is Nothing AndAlso EvolutionLines(0).Evolutions.Count = 0 AndAlso EvolutionLines(0).Forms.Count = 0 Then
|
If EvolutionLineConnections Is Nothing OrElse EvolutionLineConnections.Count = 0 OrElse EvolutionLineConnections(0).ConnectionList.Count <= 1 Then
|
||||||
Canvas.DrawGradient(New Rectangle(CInt(Core.windowSize.Width / 2) - 282, CInt(Core.windowSize.Height / 2 - 45), 80, 90), New Color(84, 198, 216), New Color(42, 167, 198, 150), True, -1)
|
Canvas.DrawGradient(New Rectangle(CInt(Core.windowSize.Width / 2) - 282, CInt(Core.windowSize.Height / 2 - 45), 80, 90), New Color(84, 198, 216), New Color(42, 167, 198, 150), True, -1)
|
||||||
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 202, CInt(Core.windowSize.Height / 2 - 45), 404, 90), New Color(42, 167, 198, 150))
|
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 202, CInt(Core.windowSize.Height / 2 - 45), 404, 90), New Color(42, 167, 198, 150))
|
||||||
Canvas.DrawGradient(New Rectangle(CInt(Core.windowSize.Width / 2) + 202, CInt(Core.windowSize.Height / 2 - 45), 80, 90), New Color(42, 167, 198, 150), New Color(84, 198, 216), True, -1)
|
Canvas.DrawGradient(New Rectangle(CInt(Core.windowSize.Width / 2) + 202, CInt(Core.windowSize.Height / 2 - 45), 80, 90), New Color(42, 167, 198, 150), New Color(84, 198, 216), True, -1)
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Pokemon.GetName() & " doesn't evolve.", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.MainFont.MeasureString(Pokemon.GetName() & " doesn't evolve.").X / 2), CInt(Core.windowSize.Height / 2 - 15)), Color.White)
|
Core.SpriteBatch.DrawString(FontManager.MainFont, Pokemon.GetName() & " doesn't evolve.", New Vector2(CInt(Core.windowSize.Width / 2) - CInt(FontManager.MainFont.MeasureString(Pokemon.GetName() & " doesn't evolve.").X / 2), CInt(Core.windowSize.Height / 2 - 15)), Color.White)
|
||||||
Else
|
Else
|
||||||
Dim connections As New List(Of String)
|
Dim connectionLines As New List(Of String)
|
||||||
Dim levels As New Dictionary(Of Integer, Integer)
|
Dim centerVector As Vector2 = Core.GetMiddlePosition(New Size(CInt(64 * scale), CInt(64 * scale)))
|
||||||
Dim levelsOffset As New Dictionary(Of Integer, Integer)
|
|
||||||
|
|
||||||
For i = minimumLevel To maximumLevel
|
For e = 0 To EvolutionLineConnections.Count - 1
|
||||||
levels.Add(i, 0)
|
For l = 0 To EvolutionLineConnections(e).ConnectionList.Count - 1
|
||||||
levelsOffset.Add(i, 0)
|
If EvolutionLineConnections(e).ConnectionList.Count > 1 AndAlso l > 0 Then
|
||||||
Next
|
connectionLines.Add(CStr(EvolutionLineConnections(e).ConnectionList(l - 1).Item1 & "_" & EvolutionLineConnections(e).ConnectionList(l - 1).Item2 & "," & EvolutionLineConnections(e).ConnectionList(l).Item1 & "_" & EvolutionLineConnections(e).ConnectionList(l).Item2))
|
||||||
|
End If
|
||||||
For i = 0 To EvolutionLines.Count - 1
|
|
||||||
If Not EvolutionLines(i).Devolution Is Nothing Then
|
|
||||||
connections.Add("-1_0|" & EvolutionLines(i).Devolution.PokemonID.ToString() & "-" & EvolutionLines(i).PokemonID.ToString())
|
|
||||||
levels(-1) += 1
|
|
||||||
|
|
||||||
For Each evolution As EvolutionLinePokemon In EvolutionLines(i).Devolution.Evolutions
|
|
||||||
connections.Add("-1_0|" & EvolutionLines(i).Devolution.PokemonID.ToString() & "-" & evolution.PokemonID.ToString())
|
|
||||||
levels(0) += 1
|
|
||||||
For Each eevolution As EvolutionLinePokemon In evolution.Evolutions
|
|
||||||
connections.Add("0_1|" & evolution.PokemonID.ToString() & "-" & eevolution.PokemonID.ToString())
|
|
||||||
levels(1) += 1
|
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Not EvolutionLines(i).Devolution.Devolution Is Nothing Then
|
For i = 0 To connectionLines.Count - 1
|
||||||
connections.Add("-2_-1|" & EvolutionLines(i).Devolution.Devolution.PokemonID.ToString() & "-" & EvolutionLines(i).Devolution.PokemonID.ToString())
|
Dim LineStart As New Vector2(CInt(connectionLines(i).GetSplit(0, ",").GetSplit(0, "_")), CInt(connectionLines(i).GetSplit(0, ",").GetSplit(1, "_")))
|
||||||
levels(-2) += 1
|
Dim LineEnd As New Vector2(CInt(connectionLines(i).GetSplit(1, ",").GetSplit(0, "_")), CInt(connectionLines(i).GetSplit(1, ",").GetSplit(1, "_")))
|
||||||
End If
|
|
||||||
ElseIf EvolutionLines(i).Evolutions.Count > 0 Then
|
|
||||||
levels(0) += 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each evolution As EvolutionLinePokemon In EvolutionLines(i).Evolutions
|
|
||||||
connections.Add("0_1|" & EvolutionLines(i).PokemonID.ToString() & "-" & evolution.PokemonID.ToString())
|
|
||||||
levels(1) += 1
|
|
||||||
For Each eevolution As EvolutionLinePokemon In evolution.Evolutions
|
|
||||||
connections.Add("1_2|" & evolution.PokemonID.ToString() & "-" & eevolution.PokemonID.ToString())
|
|
||||||
levels(2) += 1
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
If EvolutionLines(i).Evolutions.Count = 0 AndAlso EvolutionLines(i).Devolution Is Nothing Then
|
|
||||||
connections.Add("0_0|" & EvolutionLines(i).PokemonID.ToString() & "-" & EvolutionLines(i).PokemonID.ToString())
|
|
||||||
levels(0) += 1
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
Canvas.DrawLine(Color.Black, New Vector2(centerVector.X + (LineStart.X * (64 * scale)) + (scale * 32), centerVector.Y + (scale * 32) + (LineStart.Y * (32 * scale))), New Vector2(centerVector.X + (LineEnd.X * (64 * scale)) + (scale * 32), centerVector.Y + (scale * 32) + (LineEnd.Y * (32 * scale))), 2)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim levelDraws As New Dictionary(Of Integer, Integer)
|
For x = CInt(GridMinimum.X) To CInt(GridMaximum.X)
|
||||||
Dim PokemonDraws As New Dictionary(Of String, Integer)
|
For y = CInt(GridMinimum.Y) To CInt(GridMaximum.Y)
|
||||||
|
Dim pokemon As Pokemon = Nothing
|
||||||
For i = 0 To connections.Count - 1
|
Dim position As Vector2 = New Vector2(0)
|
||||||
Dim c As String = connections(i).Split(CChar("|"))(1)
|
For c = 0 To EvolutionLineConnections.Count - 1
|
||||||
|
For i = 0 To EvolutionLineConnections(c).ConnectionList.Count - 1
|
||||||
Dim mv As Vector2 = Core.GetMiddlePosition(New Size(CInt(64 * scale), CInt(64 * scale)))
|
If EvolutionLineConnections(c).ConnectionList(i).Item1 = x AndAlso EvolutionLineConnections(c).ConnectionList(i).Item2 = y Then
|
||||||
|
position = New Vector2(EvolutionLineConnections(c).ConnectionList(i).Item1, EvolutionLineConnections(c).ConnectionList(i).Item2)
|
||||||
Dim p1 As String = c.Remove(c.IndexOf("-"))
|
pokemon = EvolutionLineConnections(c).ConnectionList(i).Item3
|
||||||
Dim level1 As Integer = CInt(connections(i).GetSplit(0, "|").GetSplit(0, "_"))
|
|
||||||
Dim level1Count As Integer = levels(level1)
|
|
||||||
Dim p1ad As String = ""
|
|
||||||
If p1.Contains("_") = True Then
|
|
||||||
p1ad = PokemonForms.GetAdditionalValueFromDataFile(p1)
|
|
||||||
End If
|
End If
|
||||||
Dim pokemon1 As Pokemon = Pokemon.GetPokemonByID(CInt(p1.GetSplit(0, "_")), p1ad, True)
|
Next
|
||||||
|
Next
|
||||||
If levelDraws.ContainsKey(level1) = False Then
|
If pokemon IsNot Nothing Then
|
||||||
levelDraws.Add(level1, 0)
|
Dim dexID As String = PokemonForms.GetPokemonDataFileName(pokemon.Number, pokemon.AdditionalData, True)
|
||||||
End If
|
Dim pokeTexture = pokemon.GetMenuTexture()
|
||||||
|
|
||||||
If PokemonDraws.ContainsKey(p1) = False Then
|
|
||||||
levelDraws(level1) += 1
|
|
||||||
PokemonDraws.Add(p1, levelDraws(level1))
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim level1Offset As Integer = CInt(GetOffset(level1Count, PokemonDraws(p1)) * (64 * scale))
|
|
||||||
|
|
||||||
Dim p2 As String = c.Remove(0, c.IndexOf("-") + 1)
|
|
||||||
Dim level2 As Integer = CInt(connections(i).GetSplit(0, "|").Split(CChar("_"))(1))
|
|
||||||
Dim level2Count As Integer = levels(level2)
|
|
||||||
Dim p2ad As String = ""
|
|
||||||
If p2.Contains("_") = True Then
|
|
||||||
p2ad = PokemonForms.GetAdditionalValueFromDataFile(p2)
|
|
||||||
End If
|
|
||||||
Dim pokemon2 As Pokemon = Pokemon.GetPokemonByID(CInt(p2.GetSplit(0, "_")), p2ad, True)
|
|
||||||
|
|
||||||
If levelDraws.ContainsKey(level2) = False Then
|
|
||||||
levelDraws.Add(level2, 0)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If PokemonDraws.ContainsKey(p2) = False Then
|
|
||||||
levelDraws(level2) += 1
|
|
||||||
PokemonDraws.Add(p2, levelDraws(level2))
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim level2Offset As Integer = CInt(GetOffset(level2Count, PokemonDraws(p2)) * (64 * scale))
|
|
||||||
|
|
||||||
If level1 <> level2 Then
|
|
||||||
If pokemon2.Devolution = PokemonForms.GetPokemonDataFileName(pokemon1.Number, pokemon1.AdditionalData) Then
|
|
||||||
Canvas.DrawLine(Color.Black, New Vector2(mv.X + (level1 * (128 * scale)) + (scale * 32), mv.Y + (scale * 32) + level1Offset), New Vector2(mv.X + (level2 * (128 * scale)) + (scale * 32), mv.Y + (scale * 32) + level2Offset), 2)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dexID1 As String = PokemonForms.GetPokemonDataFileName(pokemon1.Number, pokemon1.AdditionalData)
|
|
||||||
If dexID1.Contains("_") = False Then
|
|
||||||
If PokemonForms.GetAdditionalDataForms(pokemon1.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(pokemon1.Number).Contains(pokemon1.AdditionalData) Then
|
|
||||||
dexID1 = pokemon1.Number & ";" & pokemon1.AdditionalData
|
|
||||||
Else
|
|
||||||
dexID1 = pokemon1.Number.ToString
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim dexID2 As String = PokemonForms.GetPokemonDataFileName(pokemon2.Number, pokemon2.AdditionalData)
|
|
||||||
If dexID2.Contains("_") = False Then
|
|
||||||
If PokemonForms.GetAdditionalDataForms(pokemon2.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(pokemon2.Number).Contains(pokemon2.AdditionalData) Then
|
|
||||||
dexID2 = pokemon2.Number & ";" & pokemon2.AdditionalData
|
|
||||||
Else
|
|
||||||
dexID2 = pokemon2.Number.ToString
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID1) = 0 Then
|
|
||||||
Dim pokeTexture = pokemon1.GetMenuTexture()
|
|
||||||
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(mv.X + (level1 * CInt(128 * scale))), CInt(mv.Y + level1Offset), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.Y * scale)), Color.Black)
|
|
||||||
|
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) = 0 Then
|
||||||
|
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(centerVector.X + (position.X * CInt(64 * scale))), CInt(centerVector.Y + (position.Y * (32 * scale))), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.Y * scale)), Color.Black)
|
||||||
Else
|
Else
|
||||||
Dim pokeTexture = pokemon1.GetMenuTexture()
|
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(centerVector.X + (position.X * CInt(64 * scale))), CInt(centerVector.Y + (position.Y * (32 * scale))), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.Y * scale)), Color.White)
|
||||||
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(mv.X + (level1 * (128 * scale))), CInt(mv.Y + level1Offset), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.Y * scale)), Color.White)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon1.GetName(), New Vector2(CInt(mv.X + (level1 * (128 * scale)) + CInt(pokeTexture.Width * pokeTextureScale.X / 2 * scale) - (FontManager.MainFont.MeasureString(pokemon1.GetName()).X / 2 * CSng(scale / 2)) + 2), CInt(mv.Y + level1Offset + (64 * scale)) + 2), Color.Black, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon1.GetName(), New Vector2(CInt(mv.X + (level1 * (128 * scale)) + CInt(pokeTexture.Width * pokeTextureScale.X / 2 * scale) - (FontManager.MainFont.MeasureString(pokemon1.GetName()).X / 2 * CSng(scale / 2))), CInt(mv.Y + level1Offset + (64 * scale))), Color.White, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
|
||||||
End If
|
End If
|
||||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID2) = 0 Then
|
|
||||||
Dim pokeTexture = pokemon2.GetMenuTexture()
|
|
||||||
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(mv.X + (level2 * CInt(128 * scale))), CInt(mv.Y + level2Offset), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.X * scale)), Color.Black)
|
|
||||||
Else
|
|
||||||
Dim pokeTexture = pokemon2.GetMenuTexture()
|
|
||||||
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
|
||||||
Core.SpriteBatch.Draw(pokeTexture, New Rectangle(CInt(mv.X + (level2 * CInt(128 * scale))), CInt(mv.Y + level2Offset), CInt(pokeTexture.Width * pokeTextureScale.X * scale), CInt(pokeTexture.Height * pokeTextureScale.Y * scale)), Color.White)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon2.GetName(), New Vector2(CInt(mv.X + (level2 * (128 * scale)) + (32 * scale) - (FontManager.MainFont.MeasureString(pokemon2.GetName()).X / 2 * CSng(scale / 2)) + 2), CInt(mv.Y + level2Offset + (64 * scale)) + 2), Color.Black, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon2.GetName(), New Vector2(CInt(mv.X + (level2 * (128 * scale)) + (32 * scale) - (FontManager.MainFont.MeasureString(pokemon2.GetName()).X / 2 * CSng(scale / 2))), CInt(mv.Y + level2Offset + (64 * scale))), Color.White, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
For x = CInt(GridMinimum.X) To CInt(GridMaximum.X)
|
||||||
|
For y = CInt(GridMinimum.Y) To CInt(GridMaximum.Y)
|
||||||
|
Dim pokemon As Pokemon = Nothing
|
||||||
|
Dim position As Vector2 = New Vector2(0)
|
||||||
|
For c = 0 To EvolutionLineConnections.Count - 1
|
||||||
|
For i = 0 To EvolutionLineConnections(c).ConnectionList.Count - 1
|
||||||
|
If EvolutionLineConnections(c).ConnectionList(i).Item1 = x AndAlso EvolutionLineConnections(c).ConnectionList(i).Item2 = y Then
|
||||||
|
position = New Vector2(EvolutionLineConnections(c).ConnectionList(i).Item1, EvolutionLineConnections(c).ConnectionList(i).Item2)
|
||||||
|
pokemon = EvolutionLineConnections(c).ConnectionList(i).Item3
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If pokemon IsNot Nothing Then
|
||||||
|
Dim dexID As String = PokemonForms.GetPokemonDataFileName(pokemon.Number, pokemon.AdditionalData, True)
|
||||||
|
Dim pokeTexture = pokemon.GetMenuTexture()
|
||||||
|
Dim pokeTextureScale As Vector2 = New Vector2(CSng(32 / pokeTexture.Width * 2), CSng(32 / pokeTexture.Height * 2))
|
||||||
|
|
||||||
|
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) <> 0 Then
|
||||||
|
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon.GetName(), New Vector2(CInt(centerVector.X + (position.X * (64 * scale)) + CInt(pokeTexture.Width * pokeTextureScale.X / 2 * scale) - (FontManager.MainFont.MeasureString(pokemon.GetName()).X / 2 * CSng(scale / 2)) + 2), CInt(centerVector.Y + position.Y * (32 * scale) + (64 * scale)) + 2), Color.Black, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
||||||
|
Core.SpriteBatch.DrawString(FontManager.MainFont, pokemon.GetName(), New Vector2(CInt(centerVector.X + (position.X * (64 * scale)) + CInt(pokeTexture.Width * pokeTextureScale.X / 2 * scale) - (FontManager.MainFont.MeasureString(pokemon.GetName()).X / 2 * CSng(scale / 2))), CInt(centerVector.Y + position.Y * (32 * scale) + (64 * scale))), Color.White, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetOffset(ByVal count As Integer, ByVal c As Integer) As Double
|
|
||||||
If count = 0 Then
|
|
||||||
Return 0
|
|
||||||
End If
|
|
||||||
If count Mod 2 = 1 Then
|
|
||||||
' count = 7, c = 7
|
|
||||||
Dim middle As Integer = CInt(Math.Ceiling(count / 2))
|
|
||||||
' middle = 4
|
|
||||||
Dim stat As Integer = c - middle
|
|
||||||
' stat = 3
|
|
||||||
Return stat
|
|
||||||
Else
|
|
||||||
' count = 4, c = 1
|
|
||||||
Dim middle As Double = count / 2
|
|
||||||
' middle = 2
|
|
||||||
Dim stat As Double = c - middle - 0.5D
|
|
||||||
' stat = -1.5
|
|
||||||
Return stat
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Overrides Sub Update()
|
Public Overrides Sub Update()
|
||||||
If Controls.Dismiss(True, True, True) = True Then
|
If Controls.Dismiss(True, True, True) = True Then
|
||||||
If Me._transitionOut = True Then
|
If Me._transitionOut = True Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user