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:
JappaWakka 2022-03-26 11:47:07 +01:00
parent cc4203b150
commit 2bdd3a3468
2 changed files with 19 additions and 1 deletions

@ -19,7 +19,11 @@
Dim fSub As String = ""
If f.Contains(",") = True Then
fMain = f.GetSplit(0, ",")
fSub = f.GetSplit(1, ",")
Select Case fMain.ToLower()
Case "cameraangle"
Dim Direction As Integer = CInt(fSub)
BattleScreen.Battle.ChangeCameraAngle(Direction, own, BattleScreen)
Case "message"
fSub = Localization.GetString(f.GetSplit(1, ","), f.GetSplit(1, ","))
BattleScreen.BattleQuery.Add(New TextQueryObject(fSub))
@ -27,6 +31,7 @@
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
Dim Message As String = ""
Dim Target As Boolean = True
If fSub.Split(CChar(",")).Count > 1 Then
Target = CBool(fSub.GetSplit(1, ","))
If fSub.Split(CChar(",")).Count > 2 Then
@ -38,6 +43,7 @@
Dim HPAmount As Integer = CInt(fSub.GetSplit(0, ","))
Dim Message As String = ""
Dim Target As Boolean = True
If fSub.Split(CChar(",")).Count > 1 Then
Target = CBool(fSub.GetSplit(1, ","))
If fSub.Split(CChar(",")).Count > 2 Then
@ -47,10 +53,22 @@
BattleScreen.Battle.GainHP(HPAmount, Target, Target, BattleScreen, Message, Move.Name.ToLower)
Case "endbattle"
Dim Blackout As Boolean = False
If fSub.Split(CChar(",")).Count > 1 Then
Blackout = CBool(fSub.GetSplit(1, ","))
End If
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
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
End Select

@ -20,7 +20,7 @@
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False 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)
Next
End If