mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-19 20:04:46 +02:00
Added a GameMode Move property and 2 functions
* Fixed an issue with GameMode Items in battles * Updated the example files for GameMode Items and GameMode Moves * Maybe fixed something audio volume related * Made it possible to disable the reduction of PP using the DeductPP (bool) property for GameModeMoves * Added the new functions "SetTrigger" and "RemoveTrigger" for GameModeMoves: Function "SetTrigger" checks if a Pokémon does or does not have a certain Status and prevents functions after it from executing if the Pokémon does not have the desired Status. The function is formatted like this: Function|SetTrigger,Target,Triggers * "Target" determines which Pokémon's Status is checked and has to be either 0 or 1 (0 = check own Pokémon, 1 = check opponent's Pokémon) * "Triggers" determines the status effect(s) that should or should not be on the target Pokémon. You can add multiple possible status effects to check for by separating them with a semicolon (;), the values can be: "burn", "freeze", "paralyze", "poison", "badpoison", "anypoison", "sleep", "noburn", "nofreeze", "noparalyze", "nopoison", "nobadpoison", "nopoison", "nosleep" Function "RemoveTrigger" removes such a trigger so that functions after it are executed
This commit is contained in:
parent
7bffd5df72
commit
a0aa947c5c
@ -1059,10 +1059,10 @@
|
|||||||
#Region "UseItem"
|
#Region "UseItem"
|
||||||
|
|
||||||
Private Shared Sub SelectedItemHandler(ByVal params As Object())
|
Private Shared Sub SelectedItemHandler(ByVal params As Object())
|
||||||
SelectedItem(CInt(params(0)))
|
SelectedItem(CStr(params(0)))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub SelectedItem(ByVal itemID As Integer)
|
Private Shared Sub SelectedItem(ByVal itemID As String)
|
||||||
Dim Item As Item = Item.GetItemByID(itemID.ToString)
|
Dim Item As Item = Item.GetItemByID(itemID.ToString)
|
||||||
|
|
||||||
If Item.CanBeUsedInBattle = True Then
|
If Item.CanBeUsedInBattle = True Then
|
||||||
@ -1103,9 +1103,9 @@
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Shared TempItemID As Integer = -1
|
Shared TempItemID As String = "-1"
|
||||||
|
|
||||||
Private Shared Sub UseItemhandler(ByVal params As Object())
|
Private Shared Sub UseItemHandler(ByVal params As Object())
|
||||||
UseItem(CInt(params(0)))
|
UseItem(CInt(params(0)))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -37,12 +37,12 @@
|
|||||||
|
|
||||||
Select Case name.ToLower()
|
Select Case name.ToLower()
|
||||||
Case "volume"
|
Case "volume"
|
||||||
MusicManager.MasterVolume = CSng(CDbl(value) / 100)
|
MusicManager.MasterVolume = CSng(CInt(value) / 100)
|
||||||
SoundManager.Volume = CSng(CDbl(value) / 100)
|
SoundManager.Volume = CSng(CInt(value) / 100)
|
||||||
Case "music"
|
Case "music"
|
||||||
MusicManager.MasterVolume = CSng(CDbl(value) / 100)
|
MusicManager.MasterVolume = CSng(CInt(value) / 100)
|
||||||
Case "sound"
|
Case "sound"
|
||||||
SoundManager.Volume = CSng(CDbl(value) / 100)
|
SoundManager.Volume = CSng(CInt(value) / 100)
|
||||||
Case "muted"
|
Case "muted"
|
||||||
SoundManager.Muted = CBool(value)
|
SoundManager.Muted = CBool(value)
|
||||||
MusicManager.Muted = CBool(value)
|
MusicManager.Muted = CBool(value)
|
||||||
|
@ -170,6 +170,7 @@
|
|||||||
|
|
||||||
Public GameModeFunction As String = "" 'A GameMode can specify a pre defined function for a move.
|
Public GameModeFunction As String = "" 'A GameMode can specify a pre defined function for a move.
|
||||||
Public IsGameModeMove As Boolean = False
|
Public IsGameModeMove As Boolean = False
|
||||||
|
Public gmDeductPP As Boolean = True
|
||||||
|
|
||||||
Private _power As Integer = 40
|
Private _power As Integer = 40
|
||||||
Private _accuracy As Integer = 100
|
Private _accuracy As Integer = 100
|
||||||
@ -187,6 +188,8 @@
|
|||||||
Public EffectChances As New List(Of Integer)
|
Public EffectChances As New List(Of Integer)
|
||||||
'#End
|
'#End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'#SpecialDefinitions
|
'#SpecialDefinitions
|
||||||
'Damage and effect types
|
'Damage and effect types
|
||||||
Public MakesContact As Boolean = True
|
Public MakesContact As Boolean = True
|
||||||
@ -2057,7 +2060,11 @@
|
|||||||
''' <param name="Own">If the own Pokémon used the move.</param>
|
''' <param name="Own">If the own Pokémon used the move.</param>
|
||||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||||
Public Overridable Function DeductPP(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
Public Overridable Function DeductPP(ByVal own As Boolean, ByVal BattleScreen As BattleScreen) As Boolean
|
||||||
Return True
|
If Me.IsGameModeMove = True Then
|
||||||
|
Return gmDeductPP
|
||||||
|
Else
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
|
@ -13,189 +13,351 @@
|
|||||||
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
''' <param name="BattleScreen">Reference to the BattleScreen.</param>
|
||||||
Public Shared Sub ExecuteMoveHitsFunction(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
Public Shared Sub ExecuteMoveHitsFunction(ByVal Move As Attack, ByVal own As Boolean, ByVal BattleScreen As BattleScreen)
|
||||||
Dim functions() As String = Move.GameModeFunction.Split("|")
|
Dim functions() As String = Move.GameModeFunction.Split("|")
|
||||||
|
Dim Trigger As String = ""
|
||||||
For i = 0 To functions.Count - 1
|
For i = 0 To functions.Count - 1
|
||||||
Dim f As String = functions(i)
|
Dim f As String = functions(i)
|
||||||
Dim fMain As String = f
|
Dim fMain As String = f
|
||||||
Dim fSub As String = ""
|
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)
|
|
||||||
Select Case Direction
|
|
||||||
Case 0
|
|
||||||
BattleScreen.Battle.ChangeCameraAngle(0, own, BattleScreen)
|
|
||||||
Case 1
|
|
||||||
BattleScreen.Battle.ChangeCameraAngle(1, True, BattleScreen)
|
|
||||||
Case 2
|
|
||||||
BattleScreen.Battle.ChangeCameraAngle(2, True, BattleScreen)
|
|
||||||
End Select
|
|
||||||
Case "message", "text"
|
|
||||||
Dim OppPokemon As Pokemon = BattleScreen.OppPokemon
|
|
||||||
Dim OwnPokemon As Pokemon = BattleScreen.OwnPokemon
|
|
||||||
If own = False Then
|
|
||||||
OwnPokemon = BattleScreen.OppPokemon
|
|
||||||
OppPokemon = BattleScreen.OwnPokemon
|
|
||||||
End If
|
|
||||||
|
|
||||||
fSub = Localization.GetString(fSub, fSub).Replace("[OPPNAME]", OppPokemon.GetDisplayName).Replace("[OWNNAME]", OwnPokemon.GetDisplayName)
|
Select Case f.GetSplit(0, ",").ToLower
|
||||||
BattleScreen.BattleQuery.Add(New TextQueryObject(fSub))
|
Case "settrigger"
|
||||||
Case "raisestat", "increasestat"
|
Trigger = f.GetSplit(1, ",") & "," & f.GetSplit(2, ",")
|
||||||
Dim Stat As String = f.GetSplit(1, ",")
|
Case "removetrigger"
|
||||||
Dim Target As Boolean = own
|
Trigger = ""
|
||||||
Dim Message As String = ""
|
End Select
|
||||||
Dim RaiseAmount As Integer = 1
|
|
||||||
|
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
If Trigger <> "" Then
|
||||||
Target = CBool(f.GetSplit(2, ","))
|
Dim Target As Boolean = CBool(Trigger.GetSplit(0, ","))
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
Dim Triggers() As String = Trigger.GetSplit(1, ",").Split(";")
|
||||||
Message = f.GetSplit(3, ",")
|
Dim Success As Boolean = False
|
||||||
If f.Split(CChar(",")).Count > 4 Then
|
For t = 0 To Triggers.Count - 1
|
||||||
If CInt(f.GetSplit(4, ",")) > 0 Then
|
Select Case Triggers(t).ToLower()
|
||||||
RaiseAmount = CInt(f.GetSplit(4, ","))
|
Case "burn"
|
||||||
End If
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Burn Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Burn Then
|
||||||
|
Success = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Case "freeze"
|
||||||
BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name, True)
|
If Target = True Then
|
||||||
Case "lowerstat", "decreasestat"
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Freeze Then
|
||||||
Dim Stat As String = f.GetSplit(1, ",")
|
Success = True
|
||||||
Dim Message As String = ""
|
End If
|
||||||
Dim Target As Boolean = own
|
Else
|
||||||
Dim LowerAmount As Integer = 1
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Freeze Then
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
Success = True
|
||||||
Target = CBool(f.GetSplit(2, ","))
|
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
|
||||||
Message = f.GetSplit(3, ",")
|
|
||||||
If f.Split(CChar(",")).Count > 4 Then
|
|
||||||
If CInt(f.GetSplit(4, ",")) > 0 Then
|
|
||||||
LowerAmount = CInt(f.GetSplit(4, ","))
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Case "paralyze"
|
||||||
BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name, True)
|
If Target = True Then
|
||||||
Case "reducehp", "drainhp", "damage"
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Paralyzed Then
|
||||||
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
Success = True
|
||||||
Dim HPAmount As Integer = 0
|
|
||||||
Dim Message As String = ""
|
|
||||||
|
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
|
||||||
HPAmount = CInt(f.GetSplit(2, ","))
|
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
|
||||||
Message = f.GetSplit(3, ",")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
BattleScreen.Battle.ReduceHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower)
|
|
||||||
Case "gainhp", "increasehp", "heal"
|
|
||||||
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
|
||||||
Dim HPAmount As Integer = 0
|
|
||||||
Dim Message As String = ""
|
|
||||||
|
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
|
||||||
HPAmount = CInt(f.GetSplit(2, ","))
|
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
|
||||||
Message = f.GetSplit(3, ",")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
BattleScreen.Battle.GainHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower)
|
|
||||||
Case "endbattle"
|
|
||||||
Dim Blackout As Boolean = False
|
|
||||||
|
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
|
||||||
Blackout = CBool(fSub)
|
|
||||||
End If
|
|
||||||
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(Blackout))
|
|
||||||
Case "faint"
|
|
||||||
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
|
||||||
Dim Message As String = ""
|
|
||||||
Dim NextPokemonIndex As Integer = -1
|
|
||||||
|
|
||||||
Dim OppPokemon As Pokemon = BattleScreen.OppPokemon
|
|
||||||
Dim OwnPokemon As Pokemon = BattleScreen.OwnPokemon
|
|
||||||
If Target = False Then
|
|
||||||
OwnPokemon = BattleScreen.OppPokemon
|
|
||||||
OppPokemon = BattleScreen.OwnPokemon
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Target = True Then
|
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
|
||||||
If f.GetSplit(3, ",").StartsWith("~+") Then
|
|
||||||
NextPokemonIndex = BattleScreen.OppPokemonIndex + CInt(f.GetSplit(3, ",").Remove(0, 2))
|
|
||||||
End If
|
End If
|
||||||
If f.GetSplit(3, ",").StartsWith("~-") Then
|
Else
|
||||||
NextPokemonIndex = BattleScreen.OppPokemonIndex - CInt(f.GetSplit(3, ",").Remove(0, 2))
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Paralyzed Then
|
||||||
|
Success = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Case "poison"
|
||||||
BattleScreen.NextPokemonIndex = NextPokemonIndex
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Poison Then
|
||||||
If f.Split(CChar(",")).Count > 2 Then
|
Success = True
|
||||||
Message = f.GetSplit(2, ",").Replace("[OPPNAME]", OppPokemon.GetDisplayName).Replace("[OWNNAME]", OwnPokemon.GetDisplayName)
|
End If
|
||||||
End If
|
Else
|
||||||
BattleScreen.Battle.FaintPokemon(Not Target, BattleScreen, Message)
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Poison Then
|
||||||
Case "switch"
|
Success = True
|
||||||
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
End If
|
||||||
Dim SwitchTo As Integer = 0
|
|
||||||
Dim Message As String = ""
|
|
||||||
|
|
||||||
If f.Split(CChar(",")).Count > 3 Then
|
|
||||||
Message = f.GetSplit(3, ",")
|
|
||||||
End If
|
|
||||||
If Target = True Then
|
|
||||||
If f.GetSplit(2, ",").StartsWith("~+") Then
|
|
||||||
SwitchTo = BattleScreen.OppPokemonIndex + CInt(f.GetSplit(2, ",").Remove(0, 2))
|
|
||||||
End If
|
End If
|
||||||
If f.GetSplit(2, ",").StartsWith("~-") Then
|
Case "toxic", "badpoison"
|
||||||
SwitchTo = BattleScreen.OppPokemonIndex - CInt(f.GetSplit(2, ",").Remove(0, 2))
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
BattleScreen.Battle.SwitchOutOpp(BattleScreen, SwitchTo, Message)
|
Case "anypoison"
|
||||||
Else
|
If Target = True Then
|
||||||
If f.GetSplit(2, ",").StartsWith("~+") Then
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Poison OrElse BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
SwitchTo = BattleScreen.OwnPokemonIndex + CInt(f.GetSplit(2, ",").Remove(0, 2))
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Poison OrElse BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
If f.GetSplit(2, ",").StartsWith("~-") Then
|
Case "sleep"
|
||||||
SwitchTo = BattleScreen.OwnPokemonIndex - CInt(f.GetSplit(2, ",").Remove(0, 2))
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status = Pokemon.StatusProblems.Sleep Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status = Pokemon.StatusProblems.Sleep Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
BattleScreen.Battle.SwitchOutOwn(BattleScreen, SwitchTo, -1, Message)
|
Case "noburn"
|
||||||
End If
|
If Target = True Then
|
||||||
Case Else
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Burn Then
|
||||||
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
Success = True
|
||||||
End Select
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Burn Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "nofreeze"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Freeze Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Freeze Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "noparalyze"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Paralyzed Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Paralyzed Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "nopoison"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Poison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Poison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "notoxic", "nobadpoison"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "nopoison"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Poison AndAlso BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Poison AndAlso BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.BadPoison Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "nosleep"
|
||||||
|
If Target = True Then
|
||||||
|
If BattleScreen.OppPokemon.Status <> Pokemon.StatusProblems.Sleep Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If BattleScreen.OwnPokemon.Status <> Pokemon.StatusProblems.Sleep Then
|
||||||
|
Success = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
If Success = True Then
|
||||||
|
Trigger = ""
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Select Case f.ToLower()
|
If f.Contains(",") = True Then
|
||||||
Case "endround"
|
fMain = f.GetSplit(0, ",")
|
||||||
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
fSub = f.GetSplit(1, ",")
|
||||||
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
Select Case fMain.ToLower()
|
||||||
cq2.PassThis = True
|
Case "cameraangle"
|
||||||
BattleScreen.BattleQuery.AddRange({cq1, cq2})
|
Dim Direction As Integer = CInt(fSub)
|
||||||
BattleScreen.Battle.StartRound(BattleScreen)
|
Select Case Direction
|
||||||
Case "freeze"
|
Case 0
|
||||||
fSub = "15"
|
BattleScreen.Battle.ChangeCameraAngle(0, own, BattleScreen)
|
||||||
|
Case 1
|
||||||
|
BattleScreen.Battle.ChangeCameraAngle(1, True, BattleScreen)
|
||||||
|
Case 2
|
||||||
|
BattleScreen.Battle.ChangeCameraAngle(2, True, BattleScreen)
|
||||||
|
End Select
|
||||||
|
Case "message", "text"
|
||||||
|
Dim OppPokemon As Pokemon = BattleScreen.OppPokemon
|
||||||
|
Dim OwnPokemon As Pokemon = BattleScreen.OwnPokemon
|
||||||
|
If own = False Then
|
||||||
|
OwnPokemon = BattleScreen.OppPokemon
|
||||||
|
OppPokemon = BattleScreen.OwnPokemon
|
||||||
|
End If
|
||||||
|
|
||||||
|
fSub = Localization.GetString(fSub, fSub).Replace("[OPPNAME]", OppPokemon.GetDisplayName).Replace("[OWNNAME]", OwnPokemon.GetDisplayName)
|
||||||
|
BattleScreen.BattleQuery.Add(New TextQueryObject(fSub))
|
||||||
|
Case "raisestat", "increasestat"
|
||||||
|
Dim Stat As String = f.GetSplit(1, ",")
|
||||||
|
Dim Target As Boolean = own
|
||||||
|
Dim Message As String = ""
|
||||||
|
Dim RaiseAmount As Integer = 1
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
Target = CBool(f.GetSplit(2, ","))
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
Message = f.GetSplit(3, ",")
|
||||||
|
If f.Split(CChar(",")).Count > 4 Then
|
||||||
|
If CInt(f.GetSplit(4, ",")) > 0 Then
|
||||||
|
RaiseAmount = CInt(f.GetSplit(4, ","))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.RaiseStat(Target, own, BattleScreen, Stat, RaiseAmount, Message, "move:" & Move.Name, True)
|
||||||
|
Case "lowerstat", "decreasestat"
|
||||||
|
Dim Stat As String = f.GetSplit(1, ",")
|
||||||
|
Dim Message As String = ""
|
||||||
|
Dim Target As Boolean = own
|
||||||
|
Dim LowerAmount As Integer = 1
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
Target = CBool(f.GetSplit(2, ","))
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
Message = f.GetSplit(3, ",")
|
||||||
|
If f.Split(CChar(",")).Count > 4 Then
|
||||||
|
If CInt(f.GetSplit(4, ",")) > 0 Then
|
||||||
|
LowerAmount = CInt(f.GetSplit(4, ","))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.LowerStat(Target, own, BattleScreen, Stat, LowerAmount, Message, "move:" & Move.Name, True)
|
||||||
|
Case "reducehp", "drainhp", "damage"
|
||||||
|
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
||||||
|
Dim HPAmount As Integer = 0
|
||||||
|
Dim Message As String = ""
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
HPAmount = CInt(f.GetSplit(2, ","))
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
Message = f.GetSplit(3, ",")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.ReduceHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower)
|
||||||
|
Case "gainhp", "increasehp", "heal"
|
||||||
|
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
||||||
|
Dim HPAmount As Integer = 0
|
||||||
|
Dim Message As String = ""
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
HPAmount = CInt(f.GetSplit(2, ","))
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
Message = f.GetSplit(3, ",")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.GainHP(HPAmount, Target, own, BattleScreen, Message, "move:" & Move.Name.ToLower)
|
||||||
|
Case "endbattle"
|
||||||
|
Dim Blackout As Boolean = False
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
Blackout = CBool(fSub)
|
||||||
|
End If
|
||||||
|
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(Blackout))
|
||||||
|
Case "faint"
|
||||||
|
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
||||||
|
Dim Message As String = ""
|
||||||
|
Dim NextPokemonIndex As Integer = -1
|
||||||
|
|
||||||
|
Dim OppPokemon As Pokemon = BattleScreen.OppPokemon
|
||||||
|
Dim OwnPokemon As Pokemon = BattleScreen.OwnPokemon
|
||||||
|
If Target = False Then
|
||||||
|
OwnPokemon = BattleScreen.OppPokemon
|
||||||
|
OppPokemon = BattleScreen.OwnPokemon
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Target = True Then
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
If f.GetSplit(3, ",").StartsWith("~+") Then
|
||||||
|
NextPokemonIndex = BattleScreen.OppPokemonIndex + CInt(f.GetSplit(3, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
If f.GetSplit(3, ",").StartsWith("~-") Then
|
||||||
|
NextPokemonIndex = BattleScreen.OppPokemonIndex - CInt(f.GetSplit(3, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
BattleScreen.NextPokemonIndex = NextPokemonIndex
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 2 Then
|
||||||
|
Message = f.GetSplit(2, ",").Replace("[OPPNAME]", OppPokemon.GetDisplayName).Replace("[OWNNAME]", OwnPokemon.GetDisplayName)
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.FaintPokemon(Not Target, BattleScreen, Message)
|
||||||
|
Case "switch"
|
||||||
|
Dim Target As Boolean = CBool(f.GetSplit(1, ","))
|
||||||
|
Dim SwitchTo As Integer = 0
|
||||||
|
Dim Message As String = ""
|
||||||
|
|
||||||
|
If f.Split(CChar(",")).Count > 3 Then
|
||||||
|
Message = f.GetSplit(3, ",")
|
||||||
|
End If
|
||||||
|
If Target = True Then
|
||||||
|
If f.GetSplit(2, ",").StartsWith("~+") Then
|
||||||
|
SwitchTo = BattleScreen.OppPokemonIndex + CInt(f.GetSplit(2, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
If f.GetSplit(2, ",").StartsWith("~-") Then
|
||||||
|
SwitchTo = BattleScreen.OppPokemonIndex - CInt(f.GetSplit(2, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.SwitchOutOpp(BattleScreen, SwitchTo, Message)
|
||||||
|
Else
|
||||||
|
If f.GetSplit(2, ",").StartsWith("~+") Then
|
||||||
|
SwitchTo = BattleScreen.OwnPokemonIndex + CInt(f.GetSplit(2, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
If f.GetSplit(2, ",").StartsWith("~-") Then
|
||||||
|
SwitchTo = BattleScreen.OwnPokemonIndex - CInt(f.GetSplit(2, ",").Remove(0, 2))
|
||||||
|
End If
|
||||||
|
BattleScreen.Battle.SwitchOutOwn(BattleScreen, SwitchTo, -1, Message)
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
fSub = CInt(f.GetSplit(1, ",")).Clamp(0, 100).ToString
|
||||||
|
End Select
|
||||||
|
Else
|
||||||
|
Select Case f.ToLower()
|
||||||
|
Case "endround"
|
||||||
|
Dim cq1 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, True, 16)
|
||||||
|
Dim cq2 As ScreenFadeQueryObject = New ScreenFadeQueryObject(ScreenFadeQueryObject.FadeTypes.Vertical, Color.Black, False, 16)
|
||||||
|
cq2.PassThis = True
|
||||||
|
BattleScreen.BattleQuery.AddRange({cq1, cq2})
|
||||||
|
BattleScreen.Battle.StartRound(BattleScreen)
|
||||||
|
Case "freeze"
|
||||||
|
fSub = "15"
|
||||||
|
Case "poison"
|
||||||
|
fSub = "40"
|
||||||
|
Case "toxic", "badpoison"
|
||||||
|
fSub = "25"
|
||||||
|
Case Else
|
||||||
|
fSub = "30"
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
Select Case fMain.ToLower()
|
||||||
|
Case "paralyze"
|
||||||
|
Paralyze(Move, own, BattleScreen, CInt(fSub))
|
||||||
Case "poison"
|
Case "poison"
|
||||||
fSub = "40"
|
Poison(Move, own, BattleScreen, CInt(fSub))
|
||||||
Case "toxic", "badpoison"
|
Case "toxic", "badpoison"
|
||||||
fSub = "25"
|
BadPoison(Move, own, BattleScreen, CInt(fSub))
|
||||||
Case Else
|
Case "burn"
|
||||||
fSub = "30"
|
Burn(Move, own, BattleScreen, CInt(fSub))
|
||||||
|
Case "freeze"
|
||||||
|
Freeze(Move, own, BattleScreen, CInt(fSub))
|
||||||
|
Case "sleep"
|
||||||
|
Sleep(Move, own, BattleScreen, CInt(fSub))
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Select Case fMain.ToLower()
|
|
||||||
Case "paralyze"
|
|
||||||
Paralyze(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
Case "poison"
|
|
||||||
Poison(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
Case "toxic", "badpoison"
|
|
||||||
BadPoison(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
Case "burn"
|
|
||||||
Burn(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
Case "freeze"
|
|
||||||
Freeze(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
Case "sleep"
|
|
||||||
Sleep(Move, own, BattleScreen, CInt(fSub))
|
|
||||||
End Select
|
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -178,6 +178,8 @@
|
|||||||
move.UseOppDefense = CBool(value)
|
move.UseOppDefense = CBool(value)
|
||||||
Case "useoppevasion"
|
Case "useoppevasion"
|
||||||
move.UseOppEvasion = CBool(value)
|
move.UseOppEvasion = CBool(value)
|
||||||
|
Case "deductpp"
|
||||||
|
move.gmDeductPP = CBool(value)
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
@ -120,7 +120,7 @@ Public Class GameModeItemLoader
|
|||||||
item.gmIsHealingItem = CBool(value)
|
item.gmIsHealingItem = CBool(value)
|
||||||
Case "healhpamount"
|
Case "healhpamount"
|
||||||
item.gmHealHPAmount = CInt(value)
|
item.gmHealHPAmount = CInt(value)
|
||||||
Case "curestatuseffects"
|
Case "curestatus"
|
||||||
Dim StatusEffectList As New List(Of String)
|
Dim StatusEffectList As New List(Of String)
|
||||||
Dim valueSplit As String() = value.Split(",")
|
Dim valueSplit As String() = value.Split(",")
|
||||||
For i = 0 To valueSplit.Count - 1
|
For i = 0 To valueSplit.Count - 1
|
||||||
|
@ -984,7 +984,11 @@ Public Class NewInventoryScreen
|
|||||||
Case INFO_ITEM_OPTION_TOSS
|
Case INFO_ITEM_OPTION_TOSS
|
||||||
TossItem(cItem)
|
TossItem(cItem)
|
||||||
Case INFO_ITEM_OPTION_SELECT
|
Case INFO_ITEM_OPTION_SELECT
|
||||||
FireSelectionEvent(cItem.ID)
|
If cItem.IsGameModeItem = True Then
|
||||||
|
FireSelectionEvent(cItem.gmID)
|
||||||
|
Else
|
||||||
|
FireSelectionEvent(cItem.ID.ToString)
|
||||||
|
End If
|
||||||
CloseInfoScreen()
|
CloseInfoScreen()
|
||||||
_closing = True
|
_closing = True
|
||||||
End Select
|
End Select
|
||||||
@ -1268,7 +1272,7 @@ Public Class NewInventoryScreen
|
|||||||
|
|
||||||
Public Event SelectedObject(params() As Object) Implements ISelectionScreen.SelectedObject
|
Public Event SelectedObject(params() As Object) Implements ISelectionScreen.SelectedObject
|
||||||
|
|
||||||
Private Sub FireSelectionEvent(ByVal itemId As Integer)
|
Private Sub FireSelectionEvent(ByVal itemId As String)
|
||||||
RaiseEvent SelectedObject(New Object() {itemId})
|
RaiseEvent SelectedObject(New Object() {itemId})
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user