P3D-Legacy/P3D/Pokemon/Items/Medicine/SacredAsh.vb

45 lines
1.5 KiB
VB.net
Raw Normal View History

Namespace Items.Medicine
2016-09-07 18:50:38 +02:00
<Item(156, "Sacred Ash")>
2016-09-07 18:50:38 +02:00
Public Class SacredAsh
Inherits MedicineItem
2016-09-07 18:50:38 +02:00
2016-09-20 05:11:31 +02:00
Public Overrides ReadOnly Property Description As String = "It revives all fainted Pokémon. In doing so, it also fully restores their HP."
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 200
2022-05-07 00:45:59 +02:00
Public Overrides ReadOnly Property PluralName As String = "Sacred Ashes"
2016-09-07 18:50:38 +02:00
2016-09-20 05:11:31 +02:00
Public Sub New()
_textureRectangle = New Rectangle(24, 144, 24, 24)
2016-09-07 18:50:38 +02:00
End Sub
Public Overrides Sub Use()
Dim hasFainted As Boolean = False
For Each p As Pokemon In Core.Player.Pokemons
If p.Status = Pokemon.StatusProblems.Fainted Then
hasFainted = True
Exit For
End If
Next
If hasFainted = True Then
For Each p As Pokemon In Core.Player.Pokemons
If p.Status = Pokemon.StatusProblems.Fainted Then
p.Status = Pokemon.StatusProblems.None
p.HP = p.MaxHP
End If
Next
SoundManager.PlaySound("Use_Item", False)
2016-09-07 18:50:38 +02:00
Screen.TextBox.Show("Your team has been~fully healed." & RemoveItem(), {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
Else
Screen.TextBox.Show("Cannot be used.", {})
End If
End Sub
End Class
End Namespace