2016-09-19 04:34:12 +02:00
Namespace Items . XItems
2016-09-07 18:50:38 +02:00
2016-09-19 04:34:12 +02:00
<Item(49, "X Attack")>
2016-09-07 18:50:38 +02:00
Public Class XAttack
2016-09-21 00:50:26 +02:00
Inherits XItem
2016-09-07 18:50:38 +02:00
2016-09-21 00:50:26 +02:00
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 500
Public Overrides ReadOnly Property Description As String = " An item that boosts the Attack stat of a Pokémon during a battle. It wears off once the Pokémon is withdrawn. "
2016-09-07 18:50:38 +02:00
2016-09-21 00:50:26 +02:00
Public Sub New ( )
_textureRectangle = New Rectangle ( 72 , 48 , 24 , 24 )
2016-09-07 18:50:38 +02:00
End Sub
Public Overrides Function UseOnPokemon ( PokeIndex As Integer ) As Boolean
Dim foundBattleScreen As Boolean = True
Dim s As Screen = Core . CurrentScreen
While s . Identification <> Screen . Identifications . BattleScreen
If s . PreScreen Is Nothing Then
foundBattleScreen = False
Exit While
End If
2017-08-28 04:48:05 +02:00
s = s . PreScreen
2016-09-07 18:50:38 +02:00
End While
If foundBattleScreen = True Then
Dim p As Pokemon = CType ( s , BattleSystem . BattleScreen ) . OwnPokemon
If p . StatAttack < 6 Then
2018-08-05 03:04:35 +02:00
p . StatAttack += 2
2016-09-07 18:50:38 +02:00
Screen . TextBox . Show ( " Boosted " & p . GetDisplayName ( ) & " 's~Attack! " & RemoveItem ( ) , { } , False , False )
PlayerStatistics . Track ( " [53]Status booster used " , 1 )
Return True
End If
Screen . TextBox . Show ( " Cannot boost~ " & p . GetDisplayName ( ) & " 's Attack! " , { } , False , False )
Return False
Else
Logger . Log ( Logger . LogTypes . Warning , " XAttack.vb: Used outside of battle environment! " )
Return False
End If
End Function
End Class
2016-09-19 04:34:12 +02:00
End Namespace