P3D-Legacy/P3D/Pokemon/Items/Wings/CleverWing.vb

37 lines
1.2 KiB
VB.net
Raw Normal View History

Namespace Items.Wings
2016-09-07 18:50:38 +02:00
<Item(258, "Clever Wing")>
2016-09-07 18:50:38 +02:00
Public Class CleverWing
Inherits WingItem
2016-09-21 00:15:51 +02:00
Public Overrides ReadOnly Property Description As String = "An item for use on a Pokémon. It slightly increases the base Sp. Def. stat of a single Pokémon."
2016-09-07 18:50:38 +02:00
Public Sub New()
2016-09-21 00:15:51 +02:00
_textureRectangle = New Rectangle(384, 240, 24, 24)
2016-09-07 18:50:38 +02:00
End Sub
Public Overrides Function UseOnPokemon(PokeIndex As Integer) As Boolean
Dim p As Pokemon = Core.Player.Pokemons(PokeIndex)
If CanUseWing(p.EVSpDefense, p) = True Then
p.EVSpDefense += 1
SoundManager.PlaySound("single_heal", False)
Screen.TextBox.Show("Raised " & p.GetDisplayName() & "'s~Special Defense.", {}, False, False)
PlayerStatistics.Track("[254]Wings used", 1)
p.CalculateStats()
RemoveItem()
Return True
Else
Screen.TextBox.Show("Cannot raise~" & p.GetDisplayName() & "'s Special Defense.", {}, False, False)
Return False
End If
End Function
End Class
End Namespace