prevent using shiny candy on a shiny

This commit is contained in:
darkfire006 2022-04-24 16:12:55 -05:00
parent b1b98d0fbf
commit 024306c62b
1 changed files with 12 additions and 5 deletions

View File

@ -24,13 +24,20 @@ Namespace Items.Medicine
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
Dim p As Pokemon = Core.Player.Pokemons(PokeIndex)
p.IsShiny = Not p.IsShiny
If Not p.IsShiny Then
p.IsShiny = True
SoundManager.PlaySound("Use_Item", False)
Screen.TextBox.Show("The Pokémon sparkled." & RemoveItem())
PlayerStatistics.Track("[17]Medicine Items used", 1)
Return True
Else
Screen.TextBox.Show("Cannot use shiny candy~on this Pokémon.", {}, False, False)
Return False
End If
End Function
End Class