Added new Level Action tag "SurfingBattleMap". More info below:
{"SurfingBattleMap"{str[MapName]}} {"SurfingBattleMap"{str[MapName,x,y,z]}} <= x,y,z is the offset of the map.
This commit is contained in:
parent
220cac3a26
commit
9709404c56
|
@ -725,6 +725,7 @@
|
||||||
Dim levelfile As String = SavedOverworld.Level.LevelFile
|
Dim levelfile As String = SavedOverworld.Level.LevelFile
|
||||||
Dim cRegion As String = SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0)
|
Dim cRegion As String = SavedOverworld.Level.CurrentRegion.Split(CChar(","))(0)
|
||||||
Dim battleMapData() As String = SavedOverworld.Level.BattleMapData.Split(CChar(","))
|
Dim battleMapData() As String = SavedOverworld.Level.BattleMapData.Split(CChar(","))
|
||||||
|
Dim surfingBattleMapData() As String = SavedOverworld.Level.SurfingBattleMapData.Split(CChar(","))
|
||||||
|
|
||||||
If Me.IsPVPBattle = True Then
|
If Me.IsPVPBattle = True Then
|
||||||
levelfile = "pvp.dat"
|
levelfile = "pvp.dat"
|
||||||
|
@ -741,7 +742,7 @@
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If System.IO.File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And System.IO.File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
|
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
|
||||||
Select Case Me.defaultMapType
|
Select Case Me.defaultMapType
|
||||||
Case 0
|
Case 0
|
||||||
levelfile = cRegion & "0.dat"
|
levelfile = cRegion & "0.dat"
|
||||||
|
@ -754,13 +755,27 @@
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SavedOverworld.Level.Surfing = True Then
|
If SavedOverworld.Level.Surfing = True Then
|
||||||
levelfile = cRegion & "1.dat"
|
If SavedOverworld.Level.SurfingBattleMapData <> "" Then
|
||||||
DiveBattle = True
|
Select Case surfingBattleMapData.Length
|
||||||
BattleMapOffset = New Vector3(0)
|
Case 1
|
||||||
|
levelfile = surfingBattleMapData(0)
|
||||||
|
Case 4
|
||||||
|
levelfile = surfingBattleMapData(0)
|
||||||
|
BattleMapOffset = New Vector3(CSng(surfingBattleMapData(1).Replace(".", GameController.DecSeparator)), CSng(surfingBattleMapData(2).Replace(".", GameController.DecSeparator)), CSng(surfingBattleMapData(3).Replace(".", GameController.DecSeparator)))
|
||||||
|
Case Else
|
||||||
|
levelfile = cRegion & "1.dat"
|
||||||
|
BattleMapOffset = New Vector3(0)
|
||||||
|
End Select
|
||||||
|
DiveBattle = True
|
||||||
|
Else
|
||||||
|
levelfile = cRegion & "1.dat"
|
||||||
|
DiveBattle = True
|
||||||
|
BattleMapOffset = New Vector3(0)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If System.IO.File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And System.IO.File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
|
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
|
||||||
Select Case Me.defaultMapType
|
Select Case Me.defaultMapType
|
||||||
Case 0
|
Case 0
|
||||||
levelfile = "battle0.dat"
|
levelfile = "battle0.dat"
|
||||||
|
@ -1119,22 +1134,22 @@ nextIndex:
|
||||||
|
|
||||||
Public Sub SendInNewTrainerPokemon(ByVal index As Integer)
|
Public Sub SendInNewTrainerPokemon(ByVal index As Integer)
|
||||||
Dim i As Integer = index
|
Dim i As Integer = index
|
||||||
|
|
||||||
If i = -1 Then
|
If i = -1 Then
|
||||||
If IsPvPBattle Then
|
If IsPVPBattle Then
|
||||||
i = 0
|
i = 0
|
||||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
||||||
i += 1
|
i += 1
|
||||||
End While
|
End While
|
||||||
|
|
||||||
Else
|
Else
|
||||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||||
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
While Trainer.Pokemons(i).Status = Pokemon.StatusProblems.Fainted OrElse OppPokemonIndex = i OrElse Trainer.Pokemons(i).HP <= 0
|
||||||
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
i = Core.Random.Next(0, Trainer.Pokemons.count)
|
||||||
End While
|
End While
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
OppPokemonIndex = i
|
OppPokemonIndex = i
|
||||||
OppPokemon = Trainer.Pokemons(i)
|
OppPokemon = Trainer.Pokemons(i)
|
||||||
|
|
|
@ -513,6 +513,12 @@ Public Class Level
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Used to modify the Battle Map.
|
||||||
|
''' </summary>
|
||||||
|
''' <remarks>Data: MapName,x,y,z OR Mapname OR empty</remarks>
|
||||||
|
Public Property SurfingBattleMapData As String
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' The instance of the World class, handling time, season and weather based operations.
|
''' The instance of the World class, handling time, season and weather based operations.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
|
|
@ -1040,6 +1040,12 @@
|
||||||
Screen.Level.BattleMapData = ""
|
Screen.Level.BattleMapData = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TagExists(Tags, "SurfingBattleMap") = True Then
|
||||||
|
Screen.Level.SurfingBattleMapData = CStr(GetTag(Tags, "SurfingBattleMap"))
|
||||||
|
Else
|
||||||
|
Screen.Level.SurfingBattleMapData = ""
|
||||||
|
End If
|
||||||
|
|
||||||
Screen.Level.World = New World(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
|
Screen.Level.World = New World(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue