Implemented GameMode Item Use, needs testing

This commit is contained in:
JappaWakka 2023-05-30 11:38:59 +02:00
parent a5a8162f5f
commit e30d5b017d
5 changed files with 554 additions and 29 deletions

View File

@ -25,7 +25,7 @@ Public Class GameModeItem
'Medicine Item
Public gmIsHealingItem As Boolean = False
Public gmHealHPAmount As Integer = 0
Public gmCureStatusEffects As List(Of Pokemon.StatusProblems)
Public gmCureStatusEffects As List(Of String)
'Evolution Item
Public gmIsEvolutionItem As Boolean = False
Public gmEvolutionPokemon As List(Of Integer)
@ -128,7 +128,28 @@ Public Class GameModeItem
''' The item gets used from the bag.
''' </summary>
Public Overrides Sub Use()
Logger.Debug("PLACEHOLDER FOR GAMEMODE ITEM USE")
If gmIsHealingItem = True Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItems", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
Core.SetScreen(selScreen)
ElseIf gmCureStatusEffects IsNot Nothing AndAlso gmCureStatusEffects.Count > 0 Then
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
Core.SetScreen(selScreen)
ElseIf gmIsEvolutionItem = True AndAlso gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me, AddressOf Me.UseOnPokemon, "Use " & Me.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
Core.SetScreen(selScreen)
CType(CurrentScreen, PartyScreen).EvolutionItemID = Me.gmID
End If
End Sub
@ -141,9 +162,509 @@ Public Class GameModeItem
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Logger.Debug("PLACEHOLDER FOR GAMEMODE ITEM USE ON POKEMON")
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Fainted AndAlso (gmCureStatusEffects Is Nothing OrElse gmCureStatusEffects.Count = 0 OrElse gmCureStatusEffects.Contains("fnt") = False) Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & "~is fainted!", {})
Return False
Else
Dim healsuccess As Boolean = False
If gmCureStatusEffects Is Nothing OrElse gmCureStatusEffects.Count = 0 Then
If gmIsHealingItem = True AndAlso gmHealHPAmount > 0 Then
Return HealPokemon(PokeIndex, gmHealHPAmount)
End If
ElseIf gmCureStatusEffects.Contains("all") = False AndAlso gmCureStatusEffects.Contains("allwithoutfnt") = False Then
If gmIsHealingItem = True AndAlso gmHealHPAmount > 0 Then
If HealPokemon(PokeIndex, gmHealHPAmount, True) Then
healsuccess = True
End If
End If
End If
If gmCureStatusEffects IsNot Nothing AndAlso gmCureStatusEffects.Count > 0 Then
If gmCureStatusEffects.Contains("allwithoutfnt") Then
Dim success1 As Boolean = False
Dim success2 As Boolean = False
If gmIsHealingItem = True AndAlso gmHealHPAmount > 0 Then
If HealPokemon(PokeIndex, gmHealHPAmount, True) = True Then
success1 = True
End If
End If
If Pokemon.Status <> Pokemon.StatusProblems.Fainted AndAlso Pokemon.Status <> Pokemon.StatusProblems.None Or Pokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
If Pokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
Pokemon.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
End If
Pokemon.Status = Pokemon.StatusProblems.None
success2 = True
End If
Dim t As String = ""
If success1 = True AndAlso success2 = False Then
t &= "Healed " & Pokemon.GetDisplayName() & "!"
End If
If success1 = False AndAlso success2 = True Then
t &= "Cured " & Pokemon.GetDisplayName() & "!"
End If
If success1 = True AndAlso success2 = True Then
t &= "Healed and cured~" & Pokemon.GetDisplayName() & "!"
End If
If success1 = True Or success2 = True Then
Screen.TextBox.reDelay = 0.0F
t &= RemoveItem()
PlayerStatistics.Track("[17]Medicine Items used", 1)
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
Return True
Else
Screen.TextBox.Show("Cannot use" & Me.gmName & "~on " & Pokemon.GetDisplayName() & ".", {}, False, False)
Return False
End If
ElseIf gmCureStatusEffects.Contains("all") Then
Dim success1 As Boolean = False
Dim success2 As Boolean = False
If gmIsHealingItem = True AndAlso gmHealHPAmount > 0 Then
If HealPokemon(PokeIndex, gmHealHPAmount, True) = True Then
success1 = True
End If
End If
If Pokemon.Status <> Pokemon.StatusProblems.None Or Pokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
If Pokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
Pokemon.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
End If
Pokemon.Status = Pokemon.StatusProblems.None
success2 = True
End If
Dim t As String = ""
If success1 = True AndAlso success2 = False Then
t &= "Healed " & Pokemon.GetDisplayName() & "!"
End If
If success1 = False AndAlso success2 = True Then
t &= "Cured " & Pokemon.GetDisplayName() & "!"
End If
If success1 = True AndAlso success2 = True Then
t &= "Healed and cured~" & Pokemon.GetDisplayName() & "!"
End If
If success1 = True Or success2 = True Then
Screen.TextBox.reDelay = 0.0F
t &= RemoveItem()
PlayerStatistics.Track("[17]Medicine Items used", 1)
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
Return True
Else
Screen.TextBox.Show("Cannot use" & Me.gmName & "~on " & Pokemon.GetDisplayName() & ".", {}, False, False)
Return False
End If
Else
If gmCureStatusEffects.Count = 1 Then
If gmCureStatusEffects.Contains("brn") Then
Return HealBurn(PokeIndex)
End If
If gmCureStatusEffects.Contains("frz") Then
Return HealIce(PokeIndex)
End If
If gmCureStatusEffects.Contains("prz") Then
Return HealParalyze(PokeIndex)
End If
If gmCureStatusEffects.Contains("psn") OrElse gmCureStatusEffects.Contains("bpsn") Then
Return CurePoison(PokeIndex)
End If
If gmCureStatusEffects.Contains("slp") Then
Return WakeUp(PokeIndex)
End If
If gmCureStatusEffects.Contains("cfs") Then
Return CureConfusion(PokeIndex)
End If
If gmCureStatusEffects.Contains("fnt") Then
Return Revive(PokeIndex)
End If
Else
Dim success As Boolean = False
If gmCureStatusEffects.Contains("brn") Then
If HealBurn(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("frz") Then
If HealIce(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("prz") Then
If HealParalyze(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("psn") OrElse gmCureStatusEffects.Contains("bpsn") Then
If CurePoison(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("slp") Then
If WakeUp(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("cfs") Then
If CureConfusion(PokeIndex, True) Then
success = True
End If
End If
If gmCureStatusEffects.Contains("fnt") Then
If Revive(PokeIndex, True) Then
success = True
End If
End If
Dim t As String = ""
If healsuccess = True AndAlso success = False Then
t &= "Healed " & Pokemon.GetDisplayName() & "!"
End If
If healsuccess = False AndAlso success = True Then
t &= "Cured " & Pokemon.GetDisplayName() & "!"
End If
If healsuccess = True AndAlso success = True Then
t &= "Healed and cured~" & Pokemon.GetDisplayName() & "!"
End If
If healsuccess = True Or success = True Then
Screen.TextBox.reDelay = 0.0F
t &= RemoveItem()
PlayerStatistics.Track("[17]Medicine Items used", 1)
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
Return True
Else
Screen.TextBox.Show("Cannot use" & Me.gmName & "~on " & Pokemon.GetDisplayName() & ".", {}, False, False)
Return False
End If
End If
End If
End If
End If
If gmIsEvolutionItem = True AndAlso gmEvolutionPokemon IsNot Nothing AndAlso gmEvolutionPokemon.Count > 0 Then
Return Me.UseEvolutionItem(PokeIndex)
End If
Return False
End Function
Public Function UseEvolutionItem(ByVal PokeIndex As Integer) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim p As Pokemon = Core.Player.Pokemons(PokeIndex)
If p.IsEgg() = False And p.CanEvolve(EvolutionCondition.EvolutionTrigger.ItemUse, Me.gmID) = True Then
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New EvolutionScreen(Core.CurrentScreen, {PokeIndex}.ToList(), Me.gmID, EvolutionCondition.EvolutionTrigger.ItemUse), Color.Black, False))
RemoveItem()
Return True
Else
Screen.TextBox.Show("Cannot use on~" & p.GetDisplayName(), {}, False, False)
Return False
End If
End Function
''' <summary>
''' Tries to heal a Pokémon from the player's party. If this succeeds, the method returns True.
''' </summary>
''' <param name="PokeIndex">The index of the Pokémon in the player's party.</param>
''' <param name="HP">The HP that should be healed.</param>
Public Function HealPokemon(ByVal PokeIndex As Integer, ByVal HP As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If HP < 0 Then
HP = CInt(Pokemon.MaxHP / (100 / (HP * (-1))))
End If
If Pokemon.Status = P3D.Pokemon.StatusProblems.Fainted Then
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & "~is fainted!", {})
End If
Return False
Else
If Pokemon.HP = Pokemon.MaxHP Then
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " has full~HP already.", {})
End If
Return False
Else
Dim diff As Integer = Pokemon.MaxHP - Pokemon.HP
diff = CInt(MathHelper.Clamp(diff, 1, HP))
Pokemon.Heal(HP)
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Restored " & Pokemon.GetDisplayName() & "'s~HP by " & diff & "."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
End If
End If
Return True
End Function
''' <summary>
''' Revives a Pokemon.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function Revive(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Fainted Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = Pokemon.GetDisplayName() & "~is revitalized."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {}, False, False)
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
Else
If NoTextOrSound = False Then
Screen.TextBox.Show("Cannot use" & Me.gmName & "~on " & Pokemon.GetDisplayName() & ".", {}, False, False)
End If
Return False
End If
End Function
''' <summary>
''' Tries to cure a Pokémon from Poison.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function CurePoison(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Poison Or Pokemon.Status = P3D.Pokemon.StatusProblems.BadPoison Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Cures the poison~of " & Pokemon.GetDisplayName() & "."
t &= RemoveItem()
PlayerStatistics.Track("[17]Medicine Items used", 1)
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
End If
Return True
ElseIf NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is not poisoned.", {})
End If
Return False
End Function
''' <summary>
''' Tries to cure a Pokémon from Confusion.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function CureConfusion(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.HasVolatileStatus(Pokemon.VolatileStatus.Confusion) = True Then
Pokemon.RemoveVolatileStatus(Pokemon.VolatileStatus.Confusion)
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = Pokemon.GetDisplayName() & "~is no longer confused."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {}, False, False)
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
Else
If NoTextOrSound = False Then
Screen.TextBox.Show(Pokemon.GetDisplayName() & "~is not confused.", {}, False, False)
End If
Return False
End If
End Function
''' <summary>
''' Tries to wake a Pokémon up from Sleep.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function WakeUp(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Sleep Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Cures the sleep~of " & Pokemon.GetDisplayName() & "."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
ElseIf NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is not asleep.", {})
End If
Return False
End Function
''' <summary>
''' Tries to heal a Pokémon from Burn.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function HealBurn(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Burn Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Cures the burn~of " & Pokemon.GetDisplayName() & "."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
ElseIf NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is not burned.", {})
End If
Return False
End Function
''' <summary>
''' Tries to heal a Pokémon from Ice.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function HealIce(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Freeze Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
Core.Player.Inventory.RemoveItem(Me.ID.ToString, 1)
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Cures the ice~of " & Pokemon.GetDisplayName() & "."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
ElseIf NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is not frozen.", {})
End If
Return False
End Function
''' <summary>
''' Tries to heal a Pokémon from Paralysis.
''' </summary>
''' <param name="PokeIndex">The index of a Pokémon in the player's party.</param>
Public Function HealParalyze(ByVal PokeIndex As Integer, Optional NoTextOrSound As Boolean = False) As Boolean
If PokeIndex < 0 Or PokeIndex > 5 Then
Throw New ArgumentOutOfRangeException("PokeIndex", PokeIndex, "The index for a Pokémon in a player's party can only be between 0 and 5.")
End If
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Status = P3D.Pokemon.StatusProblems.Paralyzed Then
Pokemon.Status = P3D.Pokemon.StatusProblems.None
Core.Player.Inventory.RemoveItem(Me.ID.ToString, 1)
If NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Dim t As String = "Cures the paralysis~of " & Pokemon.GetDisplayName() & "."
t &= RemoveItem()
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show(t, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
End If
Return True
ElseIf NoTextOrSound = False Then
Screen.TextBox.reDelay = 0.0F
Screen.TextBox.Show(Pokemon.GetDisplayName() & " is not~paralyzed.", {})
End If
Return False
End Function
End Class

View File

@ -119,24 +119,12 @@ Public Class GameModeItemLoader
Case "healhpamount"
item.gmHealHPAmount = CInt(value)
Case "curestatuseffects"
Dim StatusEffectList As New List(Of Pokemon.StatusProblems)
Dim StatusEffectList As New List(Of String)
Dim valueSplit As String() = value.Split(",")
For i = 0 To valueSplit.Count - 1
Select Case valueSplit(i).ToLower
Case "brn"
StatusEffectList.Add(Pokemon.StatusProblems.Burn)
Case "frz"
StatusEffectList.Add(Pokemon.StatusProblems.Freeze)
Case "prz"
StatusEffectList.Add(Pokemon.StatusProblems.Paralyzed)
Case "psn"
StatusEffectList.Add(Pokemon.StatusProblems.Poison)
Case "bpsn"
StatusEffectList.Add(Pokemon.StatusProblems.BadPoison)
Case "slp"
StatusEffectList.Add(Pokemon.StatusProblems.Sleep)
Case "fnt"
StatusEffectList.Add(Pokemon.StatusProblems.Fainted)
Case "brn", "frz", "prz", "psn", "bpsn", "slp", "fnt", "cfs", "allwithoutfnt", "all"
StatusEffectList.Add(valueSplit(i))
End Select
Next
If item.gmCureStatusEffects Is Nothing Then

View File

@ -12,7 +12,7 @@ Namespace Items
AddHandler selScreen.SelectedObject, AddressOf UseItemhandler
Core.SetScreen(selScreen)
CType(CurrentScreen, PartyScreen).EvolutionItemID = Me.ID
CType(CurrentScreen, PartyScreen).EvolutionItemID = Me.ID.ToString
End Sub
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean

View File

@ -117,8 +117,10 @@ Public Class EvolutionCondition
Public Shared Function GetEvolutionCondition(ByVal p As Pokemon, ByVal trigger As EvolutionTrigger, ByVal arg As String) As EvolutionCondition
If trigger = EvolutionTrigger.LevelUp Or trigger = EvolutionTrigger.Trading Then
If Not p.Item Is Nothing Then
If p.Item.ID = 112 Then
Return Nothing
If p.Item.IsGameModeItem = False Then
If p.Item.ID = 112 Then
Return Nothing
End If
End If
End If
End If
@ -165,10 +167,18 @@ Public Class EvolutionCondition
If p.Item Is Nothing Then
canEvolve = False
Else
If p.Item.ID <> CInt(c.Argument) Then
canEvolve = False
'ElseIf c.Trigger = EvolutionTrigger.Trading Then
'REMOVE HELD ITEM CHECK
If p.Item.IsGameModeItem = True Then
If p.Item.gmID <> c.Argument Then
canEvolve = False
'ElseIf c.Trigger = EvolutionTrigger.Trading Then
'REMOVE HELD ITEM CHECK
End If
Else
If p.Item.ID <> CInt(c.Argument) Then
canEvolve = False
'ElseIf c.Trigger = EvolutionTrigger.Trading Then
'REMOVE HELD ITEM CHECK
End If
End If
End If
Case ConditionTypes.InParty
@ -194,8 +204,14 @@ Public Class EvolutionCondition
canEvolve = False
End If
Case ConditionTypes.Item
If CInt(arg) <> CInt(c.Argument) Then
canEvolve = False
If p.Item.IsGameModeItem = True Then
If arg <> c.Argument Then
canEvolve = False
End If
Else
If CInt(arg) <> CInt(c.Argument) Then
canEvolve = False
End If
End If
Case ConditionTypes.Level
If p.Level < CInt(c.Argument) Then

View File

@ -75,7 +75,7 @@ Public Class PartyScreen
Public LearnType As Integer = 0
Dim moveLearnArg As Object = Nothing
Public EvolutionItemID As Integer = -1
Public EvolutionItemID As String = CInt(-1).ToString
'Stuff related to blurred PreScreens
Private _preScreenTexture As RenderTarget2D
Private _preScreenTarget As RenderTarget2D
@ -376,7 +376,7 @@ Public Class PartyScreen
'Able/unable display (when using an Evolution Item)
Dim ItemLabel As String = ""
If EvolutionItemID <> -1 Then
If EvolutionItemID <> CInt(-1).ToString Then
ItemLabel = "Unable!"
If p.IsEgg() = False And p.CanEvolve(EvolutionCondition.EvolutionTrigger.ItemUse, EvolutionItemID.ToString()) = True Then
ItemLabel = "Able!"