Pokédex form support progress
This commit is contained in:
parent
d2d937e336
commit
fad33eaa4a
|
@ -220,7 +220,15 @@
|
|||
End If
|
||||
|
||||
If DrawCaught = True Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, p.Number) > 1 Then
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) > 1 Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Battle\Interface"), New Rectangle(CInt(pos.X) + caughtX, CInt(pos.Y) + 22, 20, 20), New Rectangle(0, 46, 10, 10), New Color(255, 255, 255, _moveMenuAlpha))
|
||||
End If
|
||||
End If
|
||||
|
|
|
@ -556,8 +556,17 @@
|
|||
InsertCasualCameramove()
|
||||
Next
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, OppPokemon.Number) = 0 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, OppPokemon.Number, 1)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(OppPokemon.Number, OppPokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(OppPokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(OppPokemon.Number).Contains(OppPokemon.AdditionalData) Then
|
||||
dexID = OppPokemon.Number & ";" & OppPokemon.AdditionalData
|
||||
Else
|
||||
dexID = OppPokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) = 0 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 1)
|
||||
End If
|
||||
|
||||
Me.BattleMode = BattleModes.Standard
|
||||
|
@ -1461,8 +1470,17 @@ nextIndex:
|
|||
OppPokemonIndex = i
|
||||
OppPokemon = Trainer.Pokemons(i)
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, OppPokemon.Number) = 0 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, OppPokemon.Number, 1)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(OppPokemon.Number, OppPokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(OppPokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(OppPokemon.Number).Contains(OppPokemon.AdditionalData) Then
|
||||
dexID = OppPokemon.Number & ";" & OppPokemon.AdditionalData
|
||||
Else
|
||||
dexID = OppPokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) = 0 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 1)
|
||||
End If
|
||||
NextPokemonIndex = -1
|
||||
End Sub
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
Johto Pokédex|0|152-160,16-18,21,22,163,164,19,20,161,162,10-15,165-168,175,176,468,174,39,40,298,183,184,60-62,186,194,195,118,119,550,79,80,199,54,55,74-76,41,42,169,92-94,206,23,24,179-181,231,232,216,217,50,51,27,28,187-189,191,192,69-71,43-45,182,546-549,46-49,102,103,193,469,204,205,123,212,127,214,190,424,742,743,438,185,96,97,63-65,177,178,213,327,235,201,360,202,132,442,203,234,29-34,52,53,83,37,38,58,59,209,210,241,128-130,98,99,72,73,120,121,211,222,90,91,170,171,458,226,116,117,230,369,688-691,109,110,81,82,462,837-839,56,57,66-68,95,208,200,429,108,463,440,113,242,228,229,207,472,227,225,333,334,215,461,238,124,220,221,473,524-526,703,302,303,621,86,87,602-604,131,636,637,133-136,196,197,470,471,700,243-245,147-149,249-251,719|0
|
||||
Kanto Pokédex|pokedex_kanto|1-9,16-18,21,22,163,164,19,20,161,162,172,25,26,10-15,173,35,36,174,39,40,60-62,186,194,195,118,119,79,80,199,54,55,74-76,524-526,41,42,169,92-94,23,24,231,232,216,217,50,51,27,28,104,105,187-189,191,192,69-71,43-45,182,114,465,46-49,708,709,96,97,63-65,439,122,280-282,475,605,606,177,178,360,202,442,29-34,52,53,84,85,77,78,37,38,58,59,209,210,129,130,98,99,72,73,211,222,120,121,170,171,116,117,230,88,89,100,101,239,125,466,599-601,81,82,462,436,437,374-376,236,106,107,237,447,448,56,57,296,297,307,308,66-68,218,219,299,476,703,337,338,95,208,111,112,464,304-306,707,200,429,622,623,562,563,679-681,115,440,113,242,198,430,228,229,215,461,238,124,86,87,613,614,582-584,132,138-142,714,715,446,143-146,246-248,150,385|0
|
||||
Sevii Pokédex|pokedex_sevii|16-18,21,22,19,20,161,162,172,25,26,10-15,165-168,298,183,184,60-62,186,194,195,118,119,79,80,199,54,55,74-76,524-528,41,42,169,92-94,618,231,232,50,51,187-189,69-71,43-45,182,48,49,102,103,114,465,193,469,588,589,616,617,214,96,97,177,178,201,360,202,52,53,77,78,198,430,129,130,456,457,318,319,692,693,98,99,690,691,223,224,72,73,592,593,120,121,211,222,688,689,90,91,366-370,320,321,458,226,278,279,116,117,230,88,89,66-68,218,219,324,104,105,240,126,467,95,208,200,429,227,225,215,461,238,124,37,38,27,28,220,221,473,86,87,131,246-248,721,489,490,151|0
|
||||
Sevii Pokédex|pokedex_sevii|16-18,21,22,19_alola,20_alola,161,162,172,25,26_alola,10-15,165-168,298,183,184,60-62,186,194,195,118,119,79,80,199,54,55,74_alola,75_alola,76_alola,524-528,41,42,169,92-94,618,231,232,50_alola,51_alola,187-189,69-71,43-45,182,48,49,102,103_alola,114,465,193,469,588,589,616,617,214,96,97,177,178,201,360,202,52_alola,53_alola,77,78,198,430,129,130,456,457,318,319,692,693,98,99,690,691,223,224,72,73,592,593,120,121,211,222,688,689,90,91,366-370,320,321,458,226,278,279,116,117,230,88_alola,89_alola,66-68,218,219,324,104,105_alola,240,126,467,95,208,200,429,227,225,215,461,238,124,37_alola,38_alola,27_alola,28_alola,220,221,473,86,87,131,246-248,721,489,490,151|0
|
||||
Unown Pokédex|pokedex_unown|201;0,201;1,201;2,201;3,201;4,201;5,201;6,201;7,201;8,201;9,201;10,201;11,201;12,201;13,201;14,201;15,201;16,201;17,201;18,201;19,201;20,201;21,201;22,201;23,201;24,201;25,201;26,201;27|0
|
||||
National Pokédex|pokedex_national|1-[MAX]|1
|
|
@ -10,7 +10,7 @@ EggGroup1|Field
|
|||
EggGroup2|None
|
||||
BaseEggSteps|4080
|
||||
EggPokemon|19
|
||||
Devolution|19
|
||||
Devolution|19_alola
|
||||
IsGenderLess|0
|
||||
IsMale|50
|
||||
Ability1|82
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Field
|
|||
EggGroup2|None
|
||||
BaseEggSteps|5355
|
||||
EggPokemon|27
|
||||
Devolution|27
|
||||
Devolution|27_alola
|
||||
IsGenderLess|0
|
||||
IsMale|50
|
||||
Ability1|81
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Field
|
|||
EggGroup2|None
|
||||
BaseEggSteps|5355
|
||||
EggPokemon|37
|
||||
Devolution|37
|
||||
Devolution|37_alola
|
||||
IsGenderLess|0
|
||||
IsMale|25
|
||||
Ability1|81
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Field
|
|||
EggGroup2|None
|
||||
BaseEggSteps|5355
|
||||
EggPokemon|50
|
||||
Devolution|50
|
||||
Devolution|50_alola
|
||||
IsGenderLess|0
|
||||
IsMale|50
|
||||
Ability1|8
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Field
|
|||
EggGroup2|None
|
||||
BaseEggSteps|5355
|
||||
EggPokemon|52
|
||||
Devolution|52
|
||||
Devolution|52_alola
|
||||
IsGenderLess|0
|
||||
IsMale|50
|
||||
Ability1|169
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Mineral
|
|||
EggGroup2|None
|
||||
BaseEggSteps|4080
|
||||
EggPokemon|74
|
||||
Devolution|74
|
||||
Devolution|74_alola
|
||||
IsGenderLess|0
|
||||
CanBreed|1
|
||||
IsMale|50
|
||||
|
|
|
@ -10,7 +10,7 @@ EggGroup1|Mineral
|
|||
EggGroup2|None
|
||||
BaseEggSteps|4080
|
||||
EggPokemon|74
|
||||
Devolution|75
|
||||
Devolution|75_alola
|
||||
IsGenderLess|0
|
||||
CanBreed|1
|
||||
IsMale|50
|
||||
|
|
|
@ -12,7 +12,7 @@ BaseEggSteps|5355
|
|||
EggPokemon|88
|
||||
IsGenderLess|0
|
||||
CanBreed|1
|
||||
Devolution|88
|
||||
Devolution|88_alola
|
||||
IsMale|50
|
||||
Ability1|143
|
||||
Ability2|82
|
||||
|
|
|
@ -137,7 +137,15 @@
|
|||
End If
|
||||
|
||||
If InboxList(Selected).Pokemon.IsEgg() = False Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, InboxList(Selected).Pokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(InboxList(Selected).Pokemon.Number, InboxList(Selected).Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(InboxList(Selected).Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(InboxList(Selected).Pokemon.Number).Contains(InboxList(Selected).Pokemon.AdditionalData) Then
|
||||
dexID = InboxList(Selected).Pokemon.Number & ";" & InboxList(Selected).Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = InboxList(Selected).Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
End If
|
||||
|
||||
Core.Player.SaveGame(False)
|
||||
|
|
|
@ -357,10 +357,19 @@
|
|||
D.Pokemon.Friendship = D.Pokemon.BaseFriendship
|
||||
Core.Player.Pokemons.Add(D.Pokemon)
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(D.Pokemon.Number, D.Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(D.Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(D.Pokemon.Number).Contains(D.Pokemon.AdditionalData) Then
|
||||
dexID = D.Pokemon.Number & ";" & D.Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = D.Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If D.Pokemon.IsShiny = True Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, D.Pokemon.Number, 3)
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 3)
|
||||
Else
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, D.Pokemon.Number, 2)
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 2)
|
||||
End If
|
||||
|
||||
Dim v As Integer = P.TradeValue - D.Pokemon.TradeValue
|
||||
|
|
|
@ -725,11 +725,20 @@
|
|||
If Line.StartsWith("{") = True And Line.EndsWith("}") = True Then
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByData(Line)
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If p.IsEgg() = False Then
|
||||
If p.IsShiny = True Then
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 3)
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, dexID, 3)
|
||||
Else
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, p.Number, 2)
|
||||
PokedexData = Pokedex.ChangeEntry(PokedexData, dexID, 2)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
'3 = shiny + caught + seen
|
||||
|
||||
Public Shared AutoDetect As Boolean = True
|
||||
Public Const POKEMONCOUNT As Integer = 893
|
||||
Public Shared PokemonCount As Integer = 893
|
||||
Public Shared PokemonIDs As New List(Of String)
|
||||
|
||||
#Region "PlayerData"
|
||||
|
||||
|
@ -71,18 +72,11 @@
|
|||
Return counts
|
||||
End Function
|
||||
|
||||
Public Shared Function GetEntryType(ByVal Data As String, ByVal ID As Integer) As Integer
|
||||
Public Shared Function GetEntryType(ByVal Data As String, ByVal ID As String) As Integer
|
||||
Dim pData() As String = Data.Split(CChar(Environment.NewLine))
|
||||
|
||||
If pData.Count >= ID Then
|
||||
If pData(ID - 1).Contains(ID.ToString() & "|") = True Then
|
||||
Dim Entry As String = pData(ID - 1)
|
||||
Return CInt(Entry.Remove(Entry.Length - 1, 1).Remove(0, Entry.IndexOf("|") + 1))
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each Entry As String In pData
|
||||
If Entry.Contains(ID.ToString() & "|") = True Then
|
||||
If Entry.Contains(ID & "|") = True Then
|
||||
Return CInt(Entry.Remove(Entry.Length - 1, 1).Remove(0, Entry.IndexOf("|") + 1))
|
||||
End If
|
||||
Next
|
||||
|
@ -90,32 +84,88 @@
|
|||
Return 0
|
||||
End Function
|
||||
|
||||
Public Shared Function ChangeEntry(ByVal Data As String, ByVal ID As Integer, ByVal Type As Integer) As String
|
||||
Public Shared Function ChangeEntry(ByVal Data As String, ByVal ID As String, ByVal Type As Integer) As String
|
||||
If Type = 0 Or AutoDetect = True Then
|
||||
If Data.Contains("{" & ID & "|") = True Then
|
||||
Dim cOriginalEntry As String = ""
|
||||
If ID.Contains(";") Then
|
||||
cOriginalEntry = GetEntryType(Data, ID.GetSplit(0, ";")).ToString
|
||||
End If
|
||||
|
||||
Dim cEntry As Integer = GetEntryType(Data, ID)
|
||||
Dim cData As String = Data
|
||||
If cOriginalEntry <> "" Then
|
||||
If CInt(cOriginalEntry) < Type Then
|
||||
If Data.Contains("{" & ID.GetSplit(0, ";") & "|") = True Then
|
||||
cData = Data.Replace("{" & ID.GetSplit(0, ";") & "|" & cEntry & "}", "{" & ID.GetSplit(0, ";") & "|" & Type & "}")
|
||||
Else
|
||||
cData &= Environment.NewLine & "{" & ID.GetSplit(0, ";") & "|" & Type & "}"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If cEntry < Type Then
|
||||
Return Data.Replace("{" & ID & "|" & cEntry & "}", "{" & ID & "|" & Type & "}")
|
||||
Return cData.Replace("{" & ID & "|" & cEntry & "}", "{" & ID & "|" & Type & "}")
|
||||
Else
|
||||
Return Data
|
||||
Return cData
|
||||
End If
|
||||
Else
|
||||
If Data <> "" Then
|
||||
Data &= Environment.NewLine
|
||||
Dim cData As String = Data
|
||||
If cData <> "" Then
|
||||
cData &= Environment.NewLine
|
||||
End If
|
||||
Data &= "{" & ID & "|" & Type & "}"
|
||||
Return Data
|
||||
If ID.Contains(";") Then
|
||||
If cData.Contains("{" & ID.GetSplit(0, ";") & "|") = False Then
|
||||
cData &= "{" & ID.GetSplit(0, ";") & "|" & Type & "}" & Environment.NewLine
|
||||
End If
|
||||
End If
|
||||
cData &= "{" & ID & "|" & Type & "}"
|
||||
Return cData
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return Data
|
||||
End Function
|
||||
|
||||
Public Shared Function NewPokedex() As String
|
||||
Dim Data As String = ""
|
||||
Dim IDs As New List(Of String)
|
||||
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "Pokemon\Data\", "*.dat")
|
||||
Dim id As String = file.Remove(file.Length - 4, 4).Remove(0, CStr(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "Pokemon\Data\").Length)
|
||||
If id.Contains("_") Then
|
||||
While id.GetSplit(0, "_").Length < 3
|
||||
id = 0 & id
|
||||
End While
|
||||
End If
|
||||
IDs.Add(id)
|
||||
Next
|
||||
|
||||
For i = 1 To POKEMONCOUNT
|
||||
Data &= "{" & i & "|0}"
|
||||
If i <> POKEMONCOUNT Then
|
||||
For Each id As String In IDs
|
||||
If id.Contains("_") = False Then
|
||||
Dim baseID As String = id.GetSplit(0, "_")
|
||||
While baseID.StartsWith("0")
|
||||
baseID = baseID.Remove(0, 1)
|
||||
End While
|
||||
|
||||
Dim AdditionalDataForms As List(Of String) = PokemonForms.GetAdditionalDataForms(CInt(baseID))
|
||||
If AdditionalDataForms IsNot Nothing Then
|
||||
For i = 0 To AdditionalDataForms.Count
|
||||
IDs.Add(id & ";" & AdditionalDataForms(i))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
PokemonCount = IDs.Count
|
||||
PokemonIDs = (From id In IDs Order By CInt(id.GetSplit(0, "_"))).ToList()
|
||||
|
||||
For i = 0 To PokemonCount - 1
|
||||
Dim entry As String = PokemonIDs(i)
|
||||
While entry.StartsWith("0")
|
||||
entry = entry.Remove(0, 1)
|
||||
End While
|
||||
|
||||
Data &= "{" & entry & "|0}"
|
||||
If i <> PokemonCount - 1 Then
|
||||
Data &= Environment.NewLine
|
||||
End If
|
||||
Next
|
||||
|
@ -155,10 +205,19 @@
|
|||
End Sub
|
||||
|
||||
Public Shared Function RegisterPokemon(ByVal Data As String, ByVal Pokemon As Pokemon) As String
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Pokemon.IsShiny = True Then
|
||||
Return ChangeEntry(Data, Pokemon.Number, 3)
|
||||
Return ChangeEntry(Data, dexID, 3)
|
||||
Else
|
||||
Return ChangeEntry(Data, Pokemon.Number, 2)
|
||||
Return ChangeEntry(Data, dexID, 2)
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
@ -167,10 +226,10 @@
|
|||
#Region "PokedexHandler"
|
||||
|
||||
'The Pokedex screen changes the PokemonList array to add Pokémon not in the array, so this will get used to count things when focussing on the Pokémon in this dex.
|
||||
Private _originalPokemonList As New Dictionary(Of Integer, Integer)
|
||||
Private _originalPokemonList As New Dictionary(Of Integer, String)
|
||||
|
||||
'Fields:
|
||||
Public PokemonList As New Dictionary(Of Integer, Integer)
|
||||
Public PokemonList As New Dictionary(Of Integer, String)
|
||||
Public Name As String = ""
|
||||
Public Activation As String = ""
|
||||
Public OriginalCount As Integer = 0
|
||||
|
@ -189,20 +248,20 @@
|
|||
For Each l As String In pokemonData
|
||||
l = l.Replace("[MAX]", POKEMONCOUNT.ToString())
|
||||
|
||||
If l.Contains("-") = True Then
|
||||
If l.Contains("-") = True AndAlso l.Contains("_") = False Then
|
||||
Dim range() As String = l.Split(CChar("-"))
|
||||
Dim min As Integer = CInt(range(0))
|
||||
Dim max As Integer = CInt(range(1))
|
||||
|
||||
For j = min To max
|
||||
PokemonList.Add(Place, j)
|
||||
_originalPokemonList.Add(Place, j)
|
||||
PokemonList.Add(Place, j.ToString)
|
||||
_originalPokemonList.Add(Place, j.ToString)
|
||||
|
||||
Place += 1
|
||||
Next
|
||||
Else
|
||||
PokemonList.Add(Place, CInt(l))
|
||||
_originalPokemonList.Add(Place, CInt(l))
|
||||
PokemonList.Add(Place, l)
|
||||
_originalPokemonList.Add(Place, l)
|
||||
|
||||
Place += 1
|
||||
End If
|
||||
|
@ -215,9 +274,9 @@
|
|||
Me.OriginalCount = Me.PokemonList.Count
|
||||
End Sub
|
||||
|
||||
Dim TempPlaces As New Dictionary(Of Integer, Integer)
|
||||
Dim TempPlaces As New Dictionary(Of String, Integer)
|
||||
|
||||
Public Function GetPlace(ByVal PokemonNumber As Integer) As Integer
|
||||
Public Function GetPlace(ByVal PokemonNumber As String) As Integer
|
||||
If TempPlaces.ContainsKey(PokemonNumber) = True Then
|
||||
Return TempPlaces(PokemonNumber)
|
||||
End If
|
||||
|
@ -234,11 +293,11 @@
|
|||
Return -1
|
||||
End Function
|
||||
|
||||
Public Function GetPokemonNumber(ByVal Place As Integer) As Integer
|
||||
Public Function GetPokemonNumber(ByVal Place As Integer) As String
|
||||
If PokemonList.ContainsKey(Place) = True Then
|
||||
Return PokemonList(Place)
|
||||
End If
|
||||
Return -1
|
||||
Return "-1"
|
||||
End Function
|
||||
|
||||
Public ReadOnly Property IsActivated() As Boolean
|
||||
|
@ -257,7 +316,7 @@
|
|||
Public ReadOnly Property Obtained() As Integer
|
||||
Get
|
||||
Dim o As Integer = 0
|
||||
For Each v As Integer In _originalPokemonList.Values
|
||||
For Each v As String In _originalPokemonList.Values
|
||||
If GetEntryType(Core.Player.PokedexData, v) > 1 Then
|
||||
o += 1
|
||||
End If
|
||||
|
@ -269,7 +328,7 @@
|
|||
Public ReadOnly Property Seen() As Integer
|
||||
Get
|
||||
Dim o As Integer = 0
|
||||
For Each v As Integer In _originalPokemonList.Values
|
||||
For Each v As String In _originalPokemonList.Values
|
||||
If GetEntryType(Core.Player.PokedexData, v) = 1 Then
|
||||
o += 1
|
||||
End If
|
||||
|
@ -284,7 +343,7 @@
|
|||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property HasPokemon(ByVal pokemonNumber As Integer, ByVal originalList As Boolean) As Boolean
|
||||
Public ReadOnly Property HasPokemon(ByVal pokemonNumber As String, ByVal originalList As Boolean) As Boolean
|
||||
Get
|
||||
If originalList = True Then
|
||||
Return _originalPokemonList.ContainsValue(pokemonNumber)
|
||||
|
|
|
@ -142,7 +142,7 @@ Public Class GameModeItemLoader
|
|||
Dim PokemonList As New List(Of Integer)
|
||||
Dim valueSplit As String() = value.Split(CChar(","))
|
||||
For i = 0 To valueSplit.Count - 1
|
||||
If Pokemon.PokemonDataExists(CInt(valueSplit(i))) Then
|
||||
If Pokemon.PokemonDataExists(valueSplit(i)) Then
|
||||
PokemonList.Add(CInt(valueSplit(i)))
|
||||
End If
|
||||
Next
|
||||
|
|
|
@ -281,11 +281,11 @@ Public Class Pokemon
|
|||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Devolution() As Integer
|
||||
Public Property Devolution() As String
|
||||
Get
|
||||
Return Me._devolution
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As String)
|
||||
Me._devolution = value
|
||||
End Set
|
||||
End Property
|
||||
|
@ -317,11 +317,11 @@ Public Class Pokemon
|
|||
End Set
|
||||
End Property
|
||||
|
||||
Public Property EggPokemon() As Integer
|
||||
Public Property EggPokemon() As String
|
||||
Get
|
||||
Return Me._eggPokemon
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As String)
|
||||
Me._eggPokemon = value
|
||||
End Set
|
||||
End Property
|
||||
|
@ -644,11 +644,11 @@ Public Class Pokemon
|
|||
Private _baseEggSteps As Integer
|
||||
Private _isMale As Decimal
|
||||
Private _isGenderLess As Boolean
|
||||
Private _devolution As Integer = 0
|
||||
Private _devolution As String = "0"
|
||||
Private _canLearnAllMachines As Boolean = False
|
||||
Private _canSwim As Boolean
|
||||
Private _canFly As Boolean
|
||||
Private _eggPokemon As Integer = 0
|
||||
Private _eggPokemon As String = "0"
|
||||
Private _tradeValue As Integer = 10
|
||||
Private _canBreed As Boolean = True
|
||||
|
||||
|
@ -1299,18 +1299,22 @@ Public Class Pokemon
|
|||
Return GetPokemonByID(Number, "")
|
||||
End Function
|
||||
|
||||
Public Shared Function GetPokemonByID(ByVal Number As Integer, ByVal AdditionalData As String) As Pokemon
|
||||
Public Shared Function GetPokemonByID(ByVal Number As Integer, ByVal AdditionalData As String, Optional ByVal PreventFormGeneration As Boolean = False) As Pokemon
|
||||
Dim p As New Pokemon()
|
||||
p.LoadDefinitions(Number, AdditionalData)
|
||||
p.AdditionalData = AdditionalData
|
||||
If PreventFormGeneration = False Then
|
||||
p.AdditionalData = AdditionalData
|
||||
Else
|
||||
p._additionalData = AdditionalData
|
||||
End If
|
||||
Return p
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if a requested Pokémon data file exists.
|
||||
''' </summary>
|
||||
Public Shared Function PokemonDataExists(ByVal Number As Integer) As Boolean
|
||||
Return System.IO.File.Exists(GameModeManager.GetPokemonDataFilePath(Number.ToString() & ".dat"))
|
||||
Public Shared Function PokemonDataExists(ByVal DataID As String) As Boolean
|
||||
Return System.IO.File.Exists(GameModeManager.GetPokemonDataFilePath(DataID & ".dat"))
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
|
@ -1427,7 +1431,7 @@ Public Class Pokemon
|
|||
Case "isgenderless"
|
||||
Me.IsGenderless = CBool(Value)
|
||||
Case "devolution"
|
||||
Me.Devolution = CInt(Value)
|
||||
Me.Devolution = Value
|
||||
Case "ability1", "ability"
|
||||
If Value <> "Nothing" Then
|
||||
Me.NewAbilities.Add(Ability.GetAbilityByID(CInt(Value)))
|
||||
|
@ -1483,7 +1487,7 @@ Public Class Pokemon
|
|||
End If
|
||||
End If
|
||||
Case "eggpokemon"
|
||||
Me.EggPokemon = CInt(Value)
|
||||
Me.EggPokemon = Value
|
||||
Case "regionalforms"
|
||||
Me.RegionalForms = Value
|
||||
Case "canbreed"
|
||||
|
@ -1575,8 +1579,8 @@ Public Class Pokemon
|
|||
End Select
|
||||
Next
|
||||
|
||||
If Me.EggPokemon = 0 Then
|
||||
Me.EggPokemon = Me.Number
|
||||
If Me.EggPokemon = "" Then
|
||||
Me.EggPokemon = Me.Number.ToString
|
||||
End If
|
||||
|
||||
Dim pAttacks As New SortedDictionary(Of Integer, BattleSystem.Attack)
|
||||
|
@ -1588,12 +1592,12 @@ Public Class Pokemon
|
|||
AttackLearns.Add(pAttacks.Keys(i), pAttacks.Values(i))
|
||||
Next
|
||||
|
||||
If Me.Devolution = 0 Then
|
||||
If Me.EggPokemon > 0 And Me.EggPokemon <> Me.Number Then
|
||||
If Me.Number - Me.EggPokemon = 2 Then
|
||||
Me.Devolution = Me.Number - 1
|
||||
ElseIf Me.Number - Me.EggPokemon = 1 Then
|
||||
Me.Devolution = Me.EggPokemon
|
||||
If Me.Devolution = "0" Then
|
||||
If CInt(Me.EggPokemon.GetSplit(0, "_")) > 0 And CInt(Me.EggPokemon.GetSplit(0, "_")) <> Me.Number Then
|
||||
If Me.Number - CInt(Me.EggPokemon.GetSplit(0, "_")) = 2 Then
|
||||
Me.Devolution = CStr(Me.Number - 1)
|
||||
ElseIf Me.Number - CInt(Me.EggPokemon.GetSplit(0, "_")) = 1 Then
|
||||
Me.Devolution = CStr(Me.EggPokemon)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
|
|
@ -7,7 +7,7 @@ Public Class PokemonForms
|
|||
Public Shared Sub Initialize()
|
||||
_pokemonList.Clear()
|
||||
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False AndAlso GameModeManager.ContentFileExists(GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH) = True Then
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False AndAlso File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & PATH) = True Then
|
||||
LoadForm(GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & PATH)
|
||||
Else
|
||||
LoadForm(GameController.GamePath & GameMode.DefaultContentPath & PATH)
|
||||
|
@ -176,6 +176,7 @@ Public Class PokemonForms
|
|||
End If
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Public Shared Function GetGenderFormMatch(ByVal P As Pokemon) As String
|
||||
If _pokemonList.Count > 0 Then
|
||||
For Each listP In _pokemonList
|
||||
|
@ -398,7 +399,7 @@ Public Class PokemonForms
|
|||
|
||||
If _pokemonList.Count > 0 Then
|
||||
For Each listP In _pokemonList
|
||||
If listP.IsNumber(Number) = True Then
|
||||
If listP.IsNumber(Number) = True AndAlso listP.ValueMatch(AdditionalData) = True Then
|
||||
Addition = listP.GetDataFileAddition(AdditionalData)
|
||||
End If
|
||||
Next
|
||||
|
@ -415,6 +416,75 @@ Public Class PokemonForms
|
|||
Return FileName
|
||||
End Function
|
||||
|
||||
Public Shared Function GetPokemonDataFileName(ByVal Number As Integer, ByVal AdditionalData As String, Optional ByVal AlsoCheckNonDataForms As Boolean = False) As String
|
||||
Dim FileName As String = Number.ToString()
|
||||
Dim FilePath As String = GameModeManager.GetPokemonDataFilePath(FileName & ".dat")
|
||||
|
||||
Dim Addition As String = ""
|
||||
|
||||
If _pokemonList.Count > 0 Then
|
||||
For Each listP In _pokemonList
|
||||
If listP.IsNumber(Number) = True AndAlso listP.ValueMatch(AdditionalData) = True Then
|
||||
Addition = listP.GetDataFileAddition(AdditionalData)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Addition <> "" Then
|
||||
FilePath = FilePath.Remove(FilePath.Length - 4, 4) & Addition & ".dat"
|
||||
FileName &= Addition
|
||||
End If
|
||||
|
||||
If System.IO.File.Exists(FilePath) = False Then
|
||||
If System.IO.File.Exists(GameModeManager.GetPokemonDataFilePath(Number.ToString) & ".dat") = False Then
|
||||
FileName = "10"
|
||||
Else
|
||||
FileName = Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Addition = "" AndAlso AdditionalData <> "" AndAlso AlsoCheckNonDataForms = True Then
|
||||
If PokemonForms.GetAdditionalDataForms(Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Number).Contains(AdditionalData) Then
|
||||
FileName = Number.ToString & ";" & AdditionalData
|
||||
End If
|
||||
End If
|
||||
|
||||
Return FileName
|
||||
End Function
|
||||
|
||||
Public Shared Function GetAdditionalDataForms(ByVal Number As Integer) As List(Of String)
|
||||
Dim Forms As New List(Of String)
|
||||
|
||||
If _pokemonList.Count > 0 Then
|
||||
For Each listP In _pokemonList
|
||||
If listP.IsNumber(Number) = True AndAlso listP.AdditionalValue <> "" AndAlso listP.DataFileSuffix = "" Then
|
||||
Forms.Add(listP.AdditionalValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If Forms.Count > 0 Then
|
||||
Return Forms
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function GetAdditionalValueFromDataFile(ByVal DataFile As String) As String
|
||||
|
||||
Dim CompareNumber As Integer = CInt(DataFile.GetSplit(0, "_"))
|
||||
Dim CompareSuffix As String = DataFile.Remove(0, DataFile.IndexOf("_"))
|
||||
If _pokemonList.Count > 0 Then
|
||||
For Each listP In _pokemonList
|
||||
If listP.IsNumber(CompareNumber) = True AndAlso CompareSuffix = listP.DataFileSuffix Then
|
||||
Return listP.AdditionalValue
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Public Shared Function GetDefaultOverworldSpriteAddition(ByVal Number As Integer) As String
|
||||
Return ""
|
||||
End Function
|
||||
|
|
|
@ -105,7 +105,7 @@ nextIndex:
|
|||
End Sub
|
||||
|
||||
Private Sub SetCamera()
|
||||
Camera.Position = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 2.5F, BattleScreen.OppPokemonNPC.Position.Y + 0.25F, BattleScreen.OppPokemonNPC.Position.Z + 0.5F) - BattleScreen.BattleMapOffset
|
||||
Camera.Position = New Vector3(BattleScreen.OppPokemonNPC.Position.X - 2.5F, BattleScreen.OppPokemonNPC.Position.Y + 0.25F, BattleScreen.OppPokemonNPC.Position.Z + 0.5F) - BattleSystem.BattleScreen.BattleMapOffset
|
||||
Camera.Pitch = -0.25F
|
||||
Camera.Yaw = MathHelper.Pi * 1.5F + 0.25F
|
||||
End Sub
|
||||
|
@ -287,18 +287,27 @@ nextIndex:
|
|||
|
||||
Dim s As String = "Gotcha!~" & p.GetName() & " was caught!"
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Core.Player.HasPokedex = True Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, p.Number) < 2 Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) < 2 Then
|
||||
s &= "*" & p.GetName() & "'s data was~added to the Pokédex."
|
||||
showPokedexEntry = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If p.IsShiny = True Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, 3)
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 3)
|
||||
Else
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, p.Number) < 3 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, 2)
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) < 3 Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 2)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
@ -352,7 +361,15 @@ nextIndex:
|
|||
|
||||
Select Case Ball.Name.ToLower()
|
||||
Case "repeat ball"
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, cp.Number) > 1 Then
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(cp.Number, cp.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(cp.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(cp.Number).Contains(cp.AdditionalData) Then
|
||||
dexID = cp.Number & ";" & cp.AdditionalData
|
||||
Else
|
||||
dexID = cp.Number.ToString
|
||||
End If
|
||||
End If
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, dexID) > 1 Then
|
||||
BallRate = 2.5F
|
||||
End If
|
||||
Case "nest ball"
|
||||
|
|
|
@ -1766,20 +1766,31 @@
|
|||
Case "[pokedexentry]"
|
||||
Dim triedIDs As New List(Of Integer)
|
||||
Dim chosenID As Integer = -1
|
||||
Dim chosenAD As String = ""
|
||||
|
||||
While chosenID = -1 And triedIDs.Count < Pokedex.POKEMONCOUNT
|
||||
Dim ID As Integer = Core.Random.Next(1, Pokedex.POKEMONCOUNT + 1)
|
||||
While chosenID = -1 And triedIDs.Count < Pokedex.PokemonCount
|
||||
Dim ID As Integer = Core.Random.Next(1, Pokedex.PokemonCount + 1)
|
||||
If triedIDs.Contains(ID) = False Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, ID) < 2 Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, Pokedex.PokemonIDs(ID)) < 2 Then
|
||||
triedIDs.Add(ID)
|
||||
Else
|
||||
chosenID = ID
|
||||
If Pokedex.PokemonIDs(ID).Contains("_") Then
|
||||
chosenID = CInt(Pokedex.PokemonIDs(ID).GetSplit(0, "_"))
|
||||
chosenAD = PokemonForms.GetAdditionalValueFromDataFile(Pokedex.PokemonIDs(ID))
|
||||
ElseIf Pokedex.PokemonIDs(ID).Contains(";") Then
|
||||
chosenID = CInt(Pokedex.PokemonIDs(ID).GetSplit(0, ";"))
|
||||
chosenAD = Pokedex.PokemonIDs(ID).GetSplit(1, ";")
|
||||
Else
|
||||
chosenID = ID
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
|
||||
If chosenID > -1 Then
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByID(chosenID)
|
||||
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByID(chosenID, chosenAD)
|
||||
|
||||
output = "Welcome to the Pokédex Show! Today, we are going to look at the entry of " & p.GetName() & "! Its entry reads:~""" & p.PokedexEntry.Text & """~Wow, that is interesting! Also, " & p.GetName() & " is " & p.PokedexEntry.Height & "m high and weights " & p.PokedexEntry.Weight & "kg.~Isn't that amazing?~" & p.GetName() & " is part of the " & p.PokedexEntry.Species & " species.~That's all the information we have. Tune in next time!"
|
||||
End If
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
Dim eevee() As Integer = {134, 135, 136, 196, 197, 470, 471, 700}
|
||||
Dim hasEevee As Boolean = True
|
||||
For Each e As Integer In eevee
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, e) < 2 Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, e.ToString) < 2 Then
|
||||
hasEevee = False
|
||||
Exit For
|
||||
End If
|
||||
|
@ -398,34 +398,58 @@ Public Class PokedexScreen
|
|||
End If
|
||||
Next
|
||||
|
||||
Dim pokeSearchList As New List(Of Integer)
|
||||
Dim pokeSearchList As New List(Of String)
|
||||
|
||||
If CHabitat Is Nothing Then
|
||||
' Add any external Pokémon if specified to do so:
|
||||
If Profile.Pokedex.IncludeExternalPokemon = True Then
|
||||
For i = 1 To Pokedex.POKEMONCOUNT
|
||||
If Me.Profile.Pokedex.HasPokemon(i, False) = False Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, i) > 0 Then
|
||||
Profile.Pokedex.PokemonList.Add(Profile.Pokedex.PokemonList.Count + 1, i)
|
||||
For i = 0 To Pokedex.PokemonCount - 1
|
||||
If Me.Profile.Pokedex.HasPokemon(Pokedex.PokemonIDs(i), False) = False Then
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, Pokedex.PokemonIDs(i)) > 0 Then
|
||||
Profile.Pokedex.PokemonList.Add(Profile.Pokedex.PokemonList.Count + 1, Pokedex.PokemonIDs(i))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
For Each i As Integer In Profile.Pokedex.PokemonList.Values
|
||||
For Each i As String In Profile.Pokedex.PokemonList.Values
|
||||
pokeSearchList.Add(i)
|
||||
Next
|
||||
Else
|
||||
For Each i As Integer In CHabitat.PokemonList
|
||||
For Each i As String In CHabitat.PokemonList
|
||||
pokeSearchList.Add(i)
|
||||
Next
|
||||
End If
|
||||
|
||||
For i = 0 To pokeSearchList.Count - 1
|
||||
If Pokemon.PokemonDataExists(pokeSearchList(i)) = True Then
|
||||
Dim p As Pokemon = Pokemon.GetPokemonByID(pokeSearchList(i))
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, p.Number) >= neededEntryType Then
|
||||
If Pokemon.PokemonDataExists(pokeSearchList(i).GetSplit(0, "_")) = True OrElse Pokemon.PokemonDataExists(pokeSearchList(i).GetSplit(0, ";")) = True Then
|
||||
|
||||
Dim valid As Boolean = True
|
||||
Dim pID As Integer
|
||||
Dim pAD As String = ""
|
||||
|
||||
If pokeSearchList(i).Contains(";") Then
|
||||
pID = CInt(pokeSearchList(i).GetSplit(0, ";"))
|
||||
pAD = pokeSearchList(i).GetSplit(1, ";")
|
||||
ElseIf pokeSearchList(i).Contains("_") Then
|
||||
Dim additionalValue As String = PokemonForms.GetAdditionalValueFromDataFile(pokeSearchList(i))
|
||||
pID = CInt(pokeSearchList(i).GetSplit(0, "_"))
|
||||
If additionalValue <> "" Then
|
||||
pAD = additionalValue
|
||||
End If
|
||||
Else
|
||||
pID = CInt(pokeSearchList(i))
|
||||
End If
|
||||
|
||||
Dim p As Pokemon
|
||||
If pAD <> "" Then
|
||||
p = Pokemon.GetPokemonByID(pID, pAD)
|
||||
Else
|
||||
p = Pokemon.GetPokemonByID(pID, pAD, True)
|
||||
End If
|
||||
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, pokeSearchList(i)) >= neededEntryType Then
|
||||
|
||||
Dim valid As Boolean = True
|
||||
For Each F As Filter In Me.Filters
|
||||
Select Case F.FilterType
|
||||
Case FilterType.Name
|
||||
|
@ -447,7 +471,10 @@ Public Class PokedexScreen
|
|||
Next
|
||||
|
||||
If valid = True Then
|
||||
Me.PokemonList.Add(p)
|
||||
|
||||
If Profile.Pokedex.GetPlace(pokeSearchList(i)) <> -1 Then
|
||||
Me.PokemonList.Add(p)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -457,15 +484,15 @@ Public Class PokedexScreen
|
|||
Case OrderType.Numeric
|
||||
If CHabitat Is Nothing Then
|
||||
If Me.ReverseOrder = True Then
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By Profile.Pokedex.GetPlace(p.Number) Descending).ToList()
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By Profile.Pokedex.GetPlace(PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData, True)) Descending).ToList()
|
||||
Else
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By Profile.Pokedex.GetPlace(p.Number) Ascending).ToList()
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By Profile.Pokedex.GetPlace(PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData, True)) Ascending).ToList()
|
||||
End If
|
||||
Else
|
||||
If Me.ReverseOrder = True Then
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By p.Number Descending).ToList()
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData, True) Descending).ToList()
|
||||
Else
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By p.Number Ascending).ToList()
|
||||
Me.PokemonList = (From p As Pokemon In Me.PokemonList Order By PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData, True) Ascending).ToList()
|
||||
End If
|
||||
End If
|
||||
Case OrderType.Alphabetically
|
||||
|
@ -525,7 +552,16 @@ Public Class PokedexScreen
|
|||
Dim id As Integer = (y + Scroll) * 6 + x
|
||||
|
||||
If id <= Me.PokemonList.Count - 1 Then
|
||||
If Not CHabitat Is Nothing OrElse Me.Profile.Pokedex.OriginalCount >= Profile.Pokedex.GetPlace(Me.PokemonList(id).Number) Then
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Me.PokemonList(id).Number, Me.PokemonList(id).AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Me.PokemonList(id).Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Me.PokemonList(id).Number).Contains(Me.PokemonList(id).AdditionalData) Then
|
||||
dexID = Me.PokemonList(id).Number & ";" & Me.PokemonList(id).AdditionalData
|
||||
Else
|
||||
dexID = Me.PokemonList(id).Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not CHabitat Is Nothing OrElse Me.Profile.Pokedex.OriginalCount >= Profile.Pokedex.GetPlace(dexID) Then
|
||||
Canvas.DrawRectangle(New Rectangle(50 + x * 100, 140 + y * 100, 64, 92), New Color(42, 167, 198, 150))
|
||||
Else
|
||||
Canvas.DrawBorder(3, New Rectangle(50 + x * 100, 140 + y * 100, 64, 92), New Color(42, 167, 198, 150))
|
||||
|
@ -536,7 +572,7 @@ Public Class PokedexScreen
|
|||
|
||||
If TempPokemonStorage.ContainsKey(id + 1) = False Then
|
||||
TempPokemonStorage.Add(id + 1, Me.PokemonList(id))
|
||||
TempPokemonDexType.Add(id + 1, Pokedex.GetEntryType(Core.Player.PokedexData, Me.PokemonList(id).Number))
|
||||
TempPokemonDexType.Add(id + 1, Pokedex.GetEntryType(Core.Player.PokedexData, dexID))
|
||||
End If
|
||||
p = TempPokemonStorage(id + 1)
|
||||
entryType = TempPokemonDexType(id + 1)
|
||||
|
@ -556,8 +592,9 @@ Public Class PokedexScreen
|
|||
End If
|
||||
|
||||
Dim no As String = "000"
|
||||
|
||||
If CHabitat Is Nothing Then
|
||||
no = Profile.Pokedex.GetPlace(p.Number).ToString()
|
||||
no = Profile.Pokedex.GetPlace(dexID).ToString()
|
||||
Else
|
||||
no = p.Number.ToString()
|
||||
End If
|
||||
|
@ -626,7 +663,16 @@ Public Class PokedexScreen
|
|||
End Function
|
||||
|
||||
Private Sub DrawPokemonPreview(ByVal p As Pokemon)
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, p.Number)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, dexID)
|
||||
|
||||
For i = 0 To 4
|
||||
Canvas.DrawGradient(New Rectangle(650, 300 + i * 40, 50, 2), New Color(255, 255, 255, 10), New Color(255, 255, 255, 255), True, -1)
|
||||
|
@ -636,7 +682,7 @@ Public Class PokedexScreen
|
|||
|
||||
Dim no As String = "000"
|
||||
If CHabitat Is Nothing Then
|
||||
no = Profile.Pokedex.GetPlace(p.Number).ToString()
|
||||
no = Profile.Pokedex.GetPlace(dexID).ToString()
|
||||
Else
|
||||
no = p.Number.ToString()
|
||||
End If
|
||||
|
@ -660,7 +706,7 @@ Public Class PokedexScreen
|
|||
If Not CHabitat Is Nothing Then
|
||||
Dim encounterTypes As New List(Of Integer)
|
||||
For Each ec As PokedexScreen.Habitat.EncounterPokemon In CHabitat.ObtainTypeList
|
||||
If ec.PokemonID = p.Number Then
|
||||
If ec.PokemonID = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData) Then
|
||||
If encounterTypes.Contains(ec.EncounterType) = False Then
|
||||
encounterTypes.Add(ec.EncounterType)
|
||||
End If
|
||||
|
@ -1059,7 +1105,7 @@ Public Class PokedexScreen
|
|||
End Enum
|
||||
|
||||
Public Structure EncounterPokemon
|
||||
Public PokemonID As Integer
|
||||
Public PokemonID As String
|
||||
Public EncounterType As Integer
|
||||
Public Daytimes() As Integer
|
||||
End Structure
|
||||
|
@ -1070,7 +1116,7 @@ Public Class PokedexScreen
|
|||
Public Name As String = ""
|
||||
Public HabitatType As HabitatTypes = HabitatTypes.Grassland
|
||||
|
||||
Public PokemonList As New List(Of Integer)
|
||||
Public PokemonList As New List(Of String)
|
||||
Public ObtainTypeList As New List(Of EncounterPokemon)
|
||||
|
||||
Public PokemonCaught As Integer = 0
|
||||
|
@ -1108,10 +1154,10 @@ Public Class PokedexScreen
|
|||
ElseIf line.StartsWith("{") = True And line.EndsWith("}") = True Then
|
||||
Dim pokemonData() As String = line.Remove(line.Length - 1, 1).Remove(0, 1).Split(CChar("|"))
|
||||
|
||||
If Me.PokemonList.Contains(CInt(pokemonData(1))) = False Then
|
||||
Me.PokemonList.Add(CInt(pokemonData(1)))
|
||||
If Me.PokemonList.Contains(pokemonData(1)) = False Then
|
||||
Me.PokemonList.Add(pokemonData(1))
|
||||
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, CInt(pokemonData(1)))
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, pokemonData(1))
|
||||
|
||||
If entryType > 0 Then
|
||||
Me.PokemonSeen += 1
|
||||
|
@ -1136,7 +1182,7 @@ Public Class PokedexScreen
|
|||
End If
|
||||
Next
|
||||
|
||||
Me.ObtainTypeList.Add(New EncounterPokemon With {.PokemonID = CInt(pokemonData(1)), .EncounterType = CInt(pokemonData(0)), .Daytimes = dayTimes.ToArray()})
|
||||
Me.ObtainTypeList.Add(New EncounterPokemon With {.PokemonID = pokemonData(1), .EncounterType = CInt(pokemonData(0)), .Daytimes = dayTimes.ToArray()})
|
||||
End If
|
||||
Next
|
||||
|
||||
|
@ -1206,10 +1252,10 @@ Public Class PokedexScreen
|
|||
If line.StartsWith("{") = True And line.EndsWith("}") = True Then
|
||||
Dim pokemonData() As String = line.Remove(line.Length - 1, 1).Remove(0, 1).Split(CChar("|"))
|
||||
|
||||
If Me.PokemonList.Contains(CInt(pokemonData(1))) = False Then
|
||||
Me.PokemonList.Add(CInt(pokemonData(1)))
|
||||
If Me.PokemonList.Contains(pokemonData(1)) = False Then
|
||||
Me.PokemonList.Add(pokemonData(1))
|
||||
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, CInt(pokemonData(1)))
|
||||
Dim entryType As Integer = Pokedex.GetEntryType(Core.Player.PokedexData, pokemonData(1))
|
||||
|
||||
If entryType > 0 Then
|
||||
Me.PokemonSeen += 1
|
||||
|
@ -1219,12 +1265,12 @@ Public Class PokedexScreen
|
|||
End If
|
||||
End If
|
||||
|
||||
Me.ObtainTypeList.Add(New EncounterPokemon With {.PokemonID = CInt(pokemonData(1)), .EncounterType = CInt(pokemonData(0))})
|
||||
Me.ObtainTypeList.Add(New EncounterPokemon With {.PokemonID = pokemonData(1), .EncounterType = CInt(pokemonData(0))})
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function HasPokemon(ByVal pokemonNumber As Integer) As Boolean
|
||||
Public Function HasPokemon(ByVal pokemonNumber As String) As Boolean
|
||||
Return Me.PokemonList.Contains(pokemonNumber)
|
||||
End Function
|
||||
|
||||
|
@ -1255,29 +1301,33 @@ Public Class PokedexViewScreen
|
|||
Class EvolutionLinePokemon
|
||||
|
||||
Public Level As Integer = 0
|
||||
Public PokemonID As Integer = 0
|
||||
Public PokemonID As String = "0"
|
||||
Public PokemonAD As String = ""
|
||||
Public Evolutions 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 Integer, ByVal vS As PokedexViewScreen, ByVal fromEvolution As Integer)
|
||||
Public Sub New(ByVal Level As Integer, ByVal pokemonID As String, ByVal vS As PokedexViewScreen, ByVal fromEvolution As String)
|
||||
Me.Level = Level
|
||||
Me.PokemonID = pokemonID
|
||||
Me.Pokemon = Pokemon.GetPokemonByID(Me.PokemonID)
|
||||
If pokemonID.Contains("_") Then
|
||||
Me.PokemonAD = PokemonForms.GetAdditionalValueFromDataFile(pokemonID)
|
||||
End If
|
||||
Me.Pokemon = Pokemon.GetPokemonByID(CInt(Me.PokemonID.GetSplit(0, "_")), Me.PokemonAD)
|
||||
|
||||
If Me.Pokemon.EvolutionConditions.Count > 0 Then
|
||||
Dim evolutions As New List(Of Integer)
|
||||
Dim evolutions As New List(Of String)
|
||||
For Each ev As EvolutionCondition In Me.Pokemon.EvolutionConditions
|
||||
If evolutions.Contains(CInt(ev.Evolution.Split(CChar("_"))(0))) = False And fromEvolution <> CInt(ev.Evolution.Split(CChar("_"))(0)) Then
|
||||
evolutions.Add(CInt(ev.Evolution.Split(CChar("_"))(0)))
|
||||
If evolutions.Contains(ev.Evolution) = False And fromEvolution <> ev.Evolution Then
|
||||
evolutions.Add(ev.Evolution)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each ev As Integer In evolutions
|
||||
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, -1))
|
||||
Me.Evolutions.Add(New EvolutionLinePokemon(Me.Level + 1, ev, vS, ""))
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
@ -1301,7 +1351,17 @@ Public Class PokedexViewScreen
|
|||
Me._transitionOut = transitionOut
|
||||
|
||||
Me.Pokemon = Pokemon
|
||||
Me.EntryType = Pokedex.GetEntryType(Core.Player.PokedexData, Me.Pokemon.Number)
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Me.Pokemon.Number, Me.Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Me.Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Me.Pokemon.Number).Contains(Me.Pokemon.AdditionalData) Then
|
||||
dexID = Me.Pokemon.Number & ";" & Me.Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Me.Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Me.EntryType = Pokedex.GetEntryType(Core.Player.PokedexData, dexID)
|
||||
|
||||
Me.GetYOffset()
|
||||
Me.FillEvolutionLine()
|
||||
|
@ -1309,20 +1369,37 @@ Public Class PokedexViewScreen
|
|||
End Sub
|
||||
|
||||
Private Sub FillEvolutionLine()
|
||||
Dim p As New EvolutionLinePokemon(0, Me.Pokemon.Number, Me, -1)
|
||||
Dim evoID As String = Me.Pokemon.Number.ToString
|
||||
If Me.Pokemon.AdditionalData <> "" Then
|
||||
evoID = PokemonForms.GetPokemonDataFileName(Me.Pokemon.Number, Me.Pokemon.AdditionalData)
|
||||
End If
|
||||
Dim p As New EvolutionLinePokemon(0, evoID, Me, "")
|
||||
|
||||
If p.Pokemon.Devolution > 0 Then
|
||||
Dim devP As Pokemon = P3D.Pokemon.GetPokemonByID(p.Pokemon.Devolution)
|
||||
If CInt(p.Pokemon.Devolution.GetSplit(0, "_")) > 0 Then
|
||||
Dim devoID As String = p.Pokemon.Devolution
|
||||
Dim devoAD As String = ""
|
||||
If devoID.Contains("_") Then
|
||||
devoAD = PokemonForms.GetAdditionalValueFromDataFile(p.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
|
||||
p.Devolution = New EvolutionLinePokemon(level, devP.Number, Me, p.Pokemon.Number)
|
||||
p.Devolution = New EvolutionLinePokemon(level, devoID, Me, evoID)
|
||||
Logger.Debug("Add devolution level 1: " & devP.Number)
|
||||
|
||||
devR = p.Devolution
|
||||
|
||||
While devR.Pokemon.Devolution > 0
|
||||
devP = P3D.Pokemon.GetPokemonByID(devR.Pokemon.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, devP.Number, Me, devR.Pokemon.Number)
|
||||
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
|
||||
|
@ -1357,7 +1434,7 @@ Public Class PokedexViewScreen
|
|||
|
||||
For i = 0 To Me.HabitatList.Count - 1
|
||||
If i <= Me.HabitatList.Count - 1 Then
|
||||
If Me.HabitatList(i).HasPokemon(Me.Pokemon.Number) = False Then
|
||||
If Me.HabitatList(i).HasPokemon(PokemonForms.GetPokemonDataFileName(Me.Pokemon.Number, Me.Pokemon.AdditionalData)) = False Then
|
||||
Me.HabitatList.RemoveAt(i)
|
||||
i -= 1
|
||||
End If
|
||||
|
@ -1512,7 +1589,7 @@ Public Class PokedexViewScreen
|
|||
|
||||
Dim encounterTypes As New List(Of Integer)
|
||||
For j = 0 To HabitatList(i).ObtainTypeList.Count - 1
|
||||
If HabitatList(i).ObtainTypeList(j).PokemonID = Me.Pokemon.Number And encounterTypes.Contains(HabitatList(i).ObtainTypeList(j).EncounterType) = False Then
|
||||
If HabitatList(i).ObtainTypeList(j).PokemonID = PokemonForms.GetPokemonDataFileName(Me.Pokemon.Number, Me.Pokemon.AdditionalData) And encounterTypes.Contains(HabitatList(i).ObtainTypeList(j).EncounterType) = False Then
|
||||
encounterTypes.Add(HabitatList(i).ObtainTypeList(j).EncounterType)
|
||||
End If
|
||||
Next
|
||||
|
@ -1580,17 +1657,21 @@ Public Class PokedexViewScreen
|
|||
Next
|
||||
|
||||
Dim levelDraws As New Dictionary(Of Integer, Integer)
|
||||
Dim PokemonDraws As New Dictionary(Of Integer, Integer)
|
||||
Dim PokemonDraws As New Dictionary(Of String, Integer)
|
||||
|
||||
For i = 0 To connections.Count - 1
|
||||
Dim c As String = connections(i).Split(CChar("|"))(1)
|
||||
|
||||
Dim mv As Vector2 = Core.GetMiddlePosition(New Size(CInt(64 * scale), CInt(64 * scale)))
|
||||
|
||||
Dim p1 As Integer = CInt(c.Remove(c.IndexOf("-")))
|
||||
Dim p1 As String = c.Remove(c.IndexOf("-"))
|
||||
Dim level1 As Integer = CInt(connections(i).Split(CChar("|"))(0).Split(CChar("_"))(0))
|
||||
Dim level1Count As Integer = levels(level1)
|
||||
Dim pokemon1 As Pokemon = Pokemon.GetPokemonByID(p1)
|
||||
Dim p1ad As String = ""
|
||||
If p1.Contains("_") = True Then
|
||||
p1ad = PokemonForms.GetAdditionalValueFromDataFile(p1)
|
||||
End If
|
||||
Dim pokemon1 As Pokemon = Pokemon.GetPokemonByID(CInt(p1.GetSplit(0, "_")), p1ad, True)
|
||||
|
||||
If levelDraws.ContainsKey(level1) = False Then
|
||||
levelDraws.Add(level1, 0)
|
||||
|
@ -1603,10 +1684,14 @@ Public Class PokedexViewScreen
|
|||
|
||||
Dim level1Offset As Integer = CInt(GetOffset(level1Count, PokemonDraws(p1)) * (64 * scale))
|
||||
|
||||
Dim p2 As Integer = CInt(c.Remove(0, c.IndexOf("-") + 1))
|
||||
Dim p2 As String = c.Remove(0, c.IndexOf("-") + 1)
|
||||
Dim level2 As Integer = CInt(connections(i).Split(CChar("|"))(0).Split(CChar("_"))(1))
|
||||
Dim level2Count As Integer = levels(level2)
|
||||
Dim pokemon2 As Pokemon = Pokemon.GetPokemonByID(p2)
|
||||
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)
|
||||
|
@ -1621,7 +1706,25 @@ Public Class PokedexViewScreen
|
|||
|
||||
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)
|
||||
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, pokemon1.Number) = 0 Then
|
||||
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))
|
||||
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)
|
||||
|
@ -1631,7 +1734,7 @@ Public Class PokedexViewScreen
|
|||
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))), CInt(mv.Y + level1Offset + (72 * scale))), Color.Black, 0.0F, Vector2.Zero, CInt(scale / 2), SpriteEffects.None, 0.0F)
|
||||
End If
|
||||
If Pokedex.GetEntryType(Core.Player.PokedexData, pokemon2.Number) = 0 Then
|
||||
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)
|
||||
|
|
|
@ -242,7 +242,17 @@
|
|||
If evolvedPokemon.IsShiny = True Then
|
||||
type = 3
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, evolvedPokemon.Number, type)
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(evolvedPokemon.Number, evolvedPokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(evolvedPokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(evolvedPokemon.Number).Contains(evolvedPokemon.AdditionalData) Then
|
||||
dexID = evolvedPokemon.Number & ";" & evolvedPokemon.AdditionalData
|
||||
Else
|
||||
dexID = evolvedPokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, type)
|
||||
|
||||
evolvedPokemon.PlayCry()
|
||||
SoundManager.PlaySound("success", True)
|
||||
|
|
|
@ -28,10 +28,20 @@
|
|||
|
||||
Me.CanRename = CanRename
|
||||
Me.Message = Message
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(cPokemon.Number, cPokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(cPokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(cPokemon.Number).Contains(cPokemon.AdditionalData) Then
|
||||
dexID = cPokemon.Number & ";" & cPokemon.AdditionalData
|
||||
Else
|
||||
dexID = cPokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
If cPokemon.IsShiny = True Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, cPokemon.Number, 3)
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 3)
|
||||
Else
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, cPokemon.Number, 2)
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 2)
|
||||
End If
|
||||
|
||||
Me.Pokemons.Remove(cPokemon)
|
||||
|
|
|
@ -294,8 +294,16 @@
|
|||
'Get dex no:
|
||||
For Each pokedex In Core.Player.Pokedexes
|
||||
If pokedex.IsActivated = True Then
|
||||
If pokedex.HasPokemon(GetPokemon().Number, True) Then
|
||||
pokedexNo = pokedex.GetPlace(GetPokemon().Number).ToString()
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(GetPokemon().Number, GetPokemon().AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(GetPokemon().Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(GetPokemon().Number).Contains(GetPokemon().AdditionalData) Then
|
||||
dexID = GetPokemon().Number & ";" & GetPokemon().AdditionalData
|
||||
Else
|
||||
dexID = GetPokemon().Number.ToString
|
||||
End If
|
||||
End If
|
||||
If pokedex.HasPokemon(dexID, True) Then
|
||||
pokedexNo = pokedex.GetPlace(dexID).ToString()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
|
|
@ -301,7 +301,16 @@
|
|||
pokedexType = 3
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, oppPokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(oppPokemon.Number, oppPokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(oppPokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(oppPokemon.Number).Contains(oppPokemon.AdditionalData) Then
|
||||
dexID = oppPokemon.Number & ";" & oppPokemon.AdditionalData
|
||||
Else
|
||||
dexID = oppPokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
|
||||
If register <> "" Then
|
||||
ActionScript.RegisterID(register)
|
||||
|
|
|
@ -688,7 +688,16 @@
|
|||
pokedexType = 3
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, Pokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
Case Me.Value.ToLower().StartsWith("townmap,")
|
||||
Dim startRegion As String = Me.Value.GetSplit(1)
|
||||
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, startRegion, {"view"}), Color.Black, False))
|
||||
|
@ -701,7 +710,16 @@
|
|||
If p.IsShiny = True Then
|
||||
i = 3
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, i)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, i)
|
||||
Next
|
||||
Case Me.Value.ToLower() = "receivepokegear"
|
||||
Core.Player.HasPokegear = True
|
||||
|
@ -1006,7 +1024,15 @@
|
|||
Dim p As Pokemon = Pokemon.GetPokemonByID(ID)
|
||||
p.Generate(Level, True)
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, 1)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 1)
|
||||
|
||||
Dim b As New BattleSystem.BattleScreen(p, Core.CurrentScreen, 0)
|
||||
Core.SetScreen(New BattleIntroScreen(Core.CurrentScreen, b, Core.Random.Next(0, 10)))
|
||||
|
@ -1127,7 +1153,16 @@
|
|||
pokedexType = 3
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, Pokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
Case "setadditionalvalue"
|
||||
Dim Index As Integer = CInt(argument.GetSplit(0, ","))
|
||||
Dim AdditionalValue As String = argument.GetSplit(1, ",")
|
||||
|
|
|
@ -169,7 +169,16 @@
|
|||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, 1)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 1)
|
||||
Dim b As New BattleSystem.BattleScreen(p, Core.CurrentScreen, method)
|
||||
Core.SetScreen(New BattleIntroScreen(Core.CurrentScreen, b, introType, musicLoop))
|
||||
|
||||
|
|
|
@ -18,7 +18,17 @@
|
|||
If p.IsShiny = True Then
|
||||
i = 3
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, i)
|
||||
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, i)
|
||||
Next
|
||||
IsReady = True
|
||||
Case "receivepokegear"
|
||||
|
|
|
@ -43,7 +43,16 @@
|
|||
End If
|
||||
|
||||
If p.IsEgg() = False Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
End If
|
||||
Else
|
||||
Dim commas As Integer = 0
|
||||
|
@ -138,7 +147,16 @@
|
|||
End If
|
||||
|
||||
If Pokemon.IsEgg() = False Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, Pokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
End If
|
||||
End If
|
||||
Case "setadditionalvalue", "setadditionaldata"
|
||||
|
@ -873,7 +891,15 @@
|
|||
End If
|
||||
|
||||
If p.IsEgg() = False Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, p.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(p.Number, p.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(p.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(p.Number).Contains(p.AdditionalData) Then
|
||||
dexID = p.Number & ";" & p.AdditionalData
|
||||
Else
|
||||
dexID = p.Number.ToString
|
||||
End If
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
End If
|
||||
Else
|
||||
Dim commas As Integer = 0
|
||||
|
@ -968,7 +994,16 @@
|
|||
End If
|
||||
|
||||
If Pokemon.IsEgg() = False Then
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, Pokemon.Number, pokedexType)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, pokedexType)
|
||||
End If
|
||||
End If
|
||||
Case "addsteps"
|
||||
|
|
|
@ -24,47 +24,81 @@
|
|||
Dim dexIndex As Integer = int(argument)
|
||||
Return Core.Player.Pokedexes(dexIndex).Seen
|
||||
Case "getheight"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).PokedexEntry.Height
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).PokedexEntry.Height
|
||||
End If
|
||||
Case "getweight"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).PokedexEntry.Weight
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).PokedexEntry.Weight
|
||||
End If
|
||||
Case "getentry"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).PokedexEntry.Text
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).PokedexEntry.Text
|
||||
End If
|
||||
Case "getcolor"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).PokedexEntry.Color.ToString()
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).PokedexEntry.Color.ToString()
|
||||
End If
|
||||
Case "getspecies"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).PokedexEntry.Species
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).PokedexEntry.Species
|
||||
End If
|
||||
Case "getname"
|
||||
Dim number As Integer = int(argument)
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Return Pokemon.GetPokemonByID(number).GetName()
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Return Pokemon.GetPokemonByID(id, ad).GetName()
|
||||
End If
|
||||
Case "getability"
|
||||
Dim number As Integer = int(argument.GetSplit(0))
|
||||
If Pokemon.PokemonDataExists(number) Then
|
||||
Dim id As Integer = CInt(argument.GetSplit(0, "_"))
|
||||
Dim ad As String = ""
|
||||
If PokemonForms.GetAdditionalValueFromDataFile(argument) <> "" Then
|
||||
ad = PokemonForms.GetAdditionalValueFromDataFile(argument)
|
||||
End If
|
||||
If Pokemon.PokemonDataExists(argument) Then
|
||||
Select Case argument.GetSplit(1)
|
||||
Case "0"
|
||||
Return Pokemon.GetPokemonByID(number).NewAbilities(Core.Random.Next(0, Pokemon.GetPokemonByID(number).NewAbilities.Count)).ID
|
||||
Return Pokemon.GetPokemonByID(id, ad).NewAbilities(Core.Random.Next(0, Pokemon.GetPokemonByID(id, ad).NewAbilities.Count)).ID
|
||||
Case "1"
|
||||
Return Pokemon.GetPokemonByID(number).NewAbilities(0).ID
|
||||
Return Pokemon.GetPokemonByID(id, ad).NewAbilities(0).ID
|
||||
Case "2"
|
||||
Return Pokemon.GetPokemonByID(number).NewAbilities(Pokemon.GetPokemonByID(number).NewAbilities.Count - 1).ID
|
||||
Return Pokemon.GetPokemonByID(id, ad).NewAbilities(Pokemon.GetPokemonByID(id, ad).NewAbilities.Count - 1).ID
|
||||
Case "3"
|
||||
Return Pokemon.GetPokemonByID(number).HiddenAbility.ID
|
||||
Return Pokemon.GetPokemonByID(id, ad).HiddenAbility.ID
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
|
|
@ -166,7 +166,15 @@ Public Class PokemonEncounter
|
|||
End If
|
||||
|
||||
' Register the wild Pokémon as Seen in the Pokédex:
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, Pokemon.Number, 1)
|
||||
Dim dexID As String = PokemonForms.GetPokemonDataFileName(Pokemon.Number, Pokemon.AdditionalData)
|
||||
If dexID.Contains("_") = False Then
|
||||
If PokemonForms.GetAdditionalDataForms(Pokemon.Number) IsNot Nothing AndAlso PokemonForms.GetAdditionalDataForms(Pokemon.Number).Contains(Pokemon.AdditionalData) Then
|
||||
dexID = Pokemon.Number & ";" & Pokemon.AdditionalData
|
||||
Else
|
||||
dexID = Pokemon.Number.ToString
|
||||
End If
|
||||
End If
|
||||
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, dexID, 1)
|
||||
|
||||
' Determine wild Pokémon intro type. If it's a Roaming Pokémon battle, set to 12:
|
||||
Dim introType As Integer = Core.Random.Next(0, 10)
|
||||
|
|
Loading…
Reference in New Issue