mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-09-23 09:59:09 +02:00
GameMode Attack functionality update
* Fixed bug with GameModeAttackLoader not loading the right path * Added functionality for custom moves to change the camera angle * Added functionality for custom moves to faint a pokémon
This commit is contained in:
parent
cc4203b150
commit
2bdd3a3468
@ -19,7 +19,11 @@
|
|||||||
Dim fSub As String = ""
|
Dim fSub As String = ""
|
||||||
If f.Contains(",") = True Then
|
If f.Contains(",") = True Then
|
||||||
fMain = f.GetSplit(0, ",")
|
fMain = f.GetSplit(0, ",")
|
||||||
|
fSub = f.GetSplit(1, ",")
|
||||||
Select Case fMain.ToLower()
|
Select Case fMain.ToLower()
|
||||||
|
Case "cameraangle"
|
||||||
|
Dim Direction As Integer = CInt(fSub)
|
||||||
|
BattleScreen.Battle.ChangeCameraAngle(Direction, own, BattleScreen)
|
||||||
Case "message"
|
Case "message"
|
||||||
fSub = Localization.GetString(f.GetSplit(1, ","), f.GetSplit(1, ","))
|
fSub = Localization.GetString(f.GetSplit(1, ","), f.GetSplit(1, ","))
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(fSub))
|
BattleScreen.BattleQuery.Add(New TextQueryObject(fSub))
|
||||||
@ -27,6 +31,7 @@
|
|||||||
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
|
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
|
||||||
Dim Message As String = ""
|
Dim Message As String = ""
|
||||||
Dim Target As Boolean = True
|
Dim Target As Boolean = True
|
||||||
|
|
||||||
If fSub.Split(CChar(",")).Count > 1 Then
|
If fSub.Split(CChar(",")).Count > 1 Then
|
||||||
Target = CBool(fSub.GetSplit(1, ","))
|
Target = CBool(fSub.GetSplit(1, ","))
|
||||||
If fSub.Split(CChar(",")).Count > 2 Then
|
If fSub.Split(CChar(",")).Count > 2 Then
|
||||||
@ -38,6 +43,7 @@
|
|||||||
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
|
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
|
||||||
Dim Message As String = ""
|
Dim Message As String = ""
|
||||||
Dim Target As Boolean = True
|
Dim Target As Boolean = True
|
||||||
|
|
||||||
If fSub.Split(CChar(",")).Count > 1 Then
|
If fSub.Split(CChar(",")).Count > 1 Then
|
||||||
Target = CBool(fSub.GetSplit(1, ","))
|
Target = CBool(fSub.GetSplit(1, ","))
|
||||||
If fSub.Split(CChar(",")).Count > 2 Then
|
If fSub.Split(CChar(",")).Count > 2 Then
|
||||||
@ -47,10 +53,22 @@
|
|||||||
BattleScreen.Battle.GainHP(HPAmount, Target, Target, BattleScreen, Message, Move.Name.ToLower)
|
BattleScreen.Battle.GainHP(HPAmount, Target, Target, BattleScreen, Message, Move.Name.ToLower)
|
||||||
Case "endbattle"
|
Case "endbattle"
|
||||||
Dim Blackout As Boolean = False
|
Dim Blackout As Boolean = False
|
||||||
|
|
||||||
If fSub.Split(CChar(",")).Count > 1 Then
|
If fSub.Split(CChar(",")).Count > 1 Then
|
||||||
Blackout = CBool(fSub.GetSplit(1, ","))
|
Blackout = CBool(fSub.GetSplit(1, ","))
|
||||||
End If
|
End If
|
||||||
BattleScreen.EndBattle(Blackout)
|
BattleScreen.EndBattle(Blackout)
|
||||||
|
Case "faint"
|
||||||
|
Dim Target As Boolean = Not own
|
||||||
|
Dim Message As String = ""
|
||||||
|
|
||||||
|
If fSub.Split(CChar(",")).Count > 1 Then
|
||||||
|
Target = Not CBool(fSub.GetSplit(1, ","))
|
||||||
|
End If
|
||||||
|
If fSub.Split(CChar(",")).Count > 2 Then
|
||||||
|
Message = fSub.GetSplit(2, ",")
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.FaintPokemon(Target, BattleScreen, Message)
|
||||||
Case Else
|
Case Else
|
||||||
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
||||||
End Select
|
End Select
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
|
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
|
||||||
If System.IO.Directory.Exists(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH) = True Then
|
If System.IO.Directory.Exists(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH) = True Then
|
||||||
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH, "*.dat")
|
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & PATH, "*.dat")
|
||||||
LoadMove(file)
|
LoadMove(file)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
Loading…
x
Reference in New Issue
Block a user