Made sure regular moves still work as expected

This commit is contained in:
Jasper "JappaWakka" Speelman 2022-06-10 10:13:23 +02:00
parent a40a44181b
commit 790afcdbbc
2 changed files with 46 additions and 4 deletions

View File

@ -3653,7 +3653,7 @@
End If End If
End Function End Function
Public Function RaiseStat(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal Stat As String, ByVal val As Integer, ByVal message As String, ByVal cause As String) As Boolean Public Function RaiseStat(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal Stat As String, ByVal val As Integer, ByVal message As String, ByVal cause As String, Optional IsGameModeMove As Boolean = False) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon Dim op As Pokemon = BattleScreen.OppPokemon
Dim pNPC As NPC = BattleScreen.OwnPokemonNPC Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
@ -3798,6 +3798,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3812,6 +3815,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3826,6 +3832,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3840,6 +3849,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3854,6 +3866,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3868,6 +3883,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3882,6 +3900,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -3891,7 +3912,7 @@
Return True Return True
End Function End Function
Public Function LowerStat(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal Stat As String, ByVal val As Integer, ByVal message As String, ByVal cause As String) As Boolean Public Function LowerStat(ByVal own As Boolean, ByVal from As Boolean, ByVal BattleScreen As BattleScreen, ByVal Stat As String, ByVal val As Integer, ByVal message As String, ByVal cause As String, Optional IsGameModeMove As Boolean = False) As Boolean
Dim p As Pokemon = BattleScreen.OwnPokemon Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon Dim op As Pokemon = BattleScreen.OppPokemon
Dim pNPC As NPC = BattleScreen.OwnPokemonNPC Dim pNPC As NPC = BattleScreen.OwnPokemonNPC
@ -4073,6 +4094,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4087,6 +4111,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4101,6 +4128,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4115,6 +4145,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4129,6 +4162,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4143,6 +4179,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
Return True Return True
@ -4157,6 +4196,9 @@
'Do nothing 'Do nothing
Case Else 'Print message given in 'message' Case Else 'Print message given in 'message'
BattleScreen.BattleQuery.Add(New TextQueryObject(message)) BattleScreen.BattleQuery.Add(New TextQueryObject(message))
If IsGameModeMove = False Then
BattleScreen.BattleQuery.Add(New TextQueryObject(printMessage))
End If
End Select End Select
If val > 0 Then If val > 0 Then

View File

@ -51,7 +51,7 @@
End If End If
End If End If
End If End If
BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name) BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name, True)
Case "lowerstat", "decreasestat" Case "lowerstat", "decreasestat"
Dim Stat As String = f.GetSplit(1, ",") Dim Stat As String = f.GetSplit(1, ",")
Dim Message As String = "" Dim Message As String = ""
@ -68,7 +68,7 @@
End If End If
End If End If
End If End If
BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name) BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name, True)
Case "reducehp", "drainhp", "damage" Case "reducehp", "drainhp", "damage"
Dim Target As Boolean = CBool(f.GetSplit(1, ",")) Dim Target As Boolean = CBool(f.GetSplit(1, ","))
Dim HPAmount As Integer = 0 Dim HPAmount As Integer = 0