P3D-Legacy/P3D/Pokemon/Items/Repels/RepelItem.vb

28 lines
875 B
VB.net
Raw Normal View History

2016-09-20 06:29:17 +02:00
Namespace Items.Repels
Public MustInherit Class RepelItem
Inherits Item
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False
Public MustOverride ReadOnly Property RepelSteps As Integer
Public Overrides Sub Use()
If Core.Player.RepelSteps <= 0 Then
Player.Temp.LastUsedRepel = ID
SoundManager.PlaySound("Use_Repel", False)
2016-09-20 06:29:17 +02:00
Core.Player.RepelSteps = RepelSteps
PlayerStatistics.Track("[42]Repels used", 1)
2023-01-23 11:15:54 +01:00
Dim t As String = Core.Player.Name & " used a~" & Name & "."
t &= RemoveItem()
Screen.TextBox.Show(t, {}, True, True)
2016-09-20 06:29:17 +02:00
Else
Screen.TextBox.Show("The Repel is still~in effect.", {}, True, True)
End If
End Sub
End Class
End Namespace