2016-09-19 03:26:44 +02:00
|
|
|
|
Namespace Items
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
''' <summary>
|
|
|
|
|
''' The base item for all Arceus plates.
|
|
|
|
|
''' </summary>
|
2016-09-19 04:34:12 +02:00
|
|
|
|
Public MustInherit Class PlateItem
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
Inherits Item
|
|
|
|
|
|
2016-09-20 02:18:12 +02:00
|
|
|
|
Public Overrides ReadOnly Property CanBeUsed As Boolean = False
|
|
|
|
|
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False
|
|
|
|
|
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Standard
|
|
|
|
|
Public Overrides ReadOnly Property Description As String
|
|
|
|
|
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 1000
|
|
|
|
|
|
|
|
|
|
Public Sub New(ByVal Type As Element.Types)
|
2019-10-01 07:32:04 +02:00
|
|
|
|
Description = "An item to be held by a Pok<6F>mon. It's a stone tablet that boosts the power of " & Type.ToString() & "-type moves."
|
2016-09-20 02:18:12 +02:00
|
|
|
|
_textureSource = "Items\Plates"
|
|
|
|
|
_textureRectangle = GetTextureRectangle(Type)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Function GetTextureRectangle(ByVal Type As Element.Types) As Rectangle
|
|
|
|
|
Dim typeArray As List(Of Element.Types) = {Element.Types.Bug, Element.Types.Dark, Element.Types.Dragon, Element.Types.Electric, Element.Types.Fairy, Element.Types.Fighting, Element.Types.Fire, Element.Types.Flying, Element.Types.Ghost, Element.Types.Grass, Element.Types.Ground, Element.Types.Ice, Element.Types.Poison, Element.Types.Psychic, Element.Types.Rock, Element.Types.Steel, Element.Types.Water}.ToList()
|
|
|
|
|
Dim i As Integer = typeArray.IndexOf(Type)
|
|
|
|
|
|
|
|
|
|
Dim x As Integer = i
|
|
|
|
|
Dim y As Integer = 0
|
|
|
|
|
While x > 4
|
|
|
|
|
x -= 5
|
|
|
|
|
y += 1
|
|
|
|
|
End While
|
|
|
|
|
|
|
|
|
|
Return New Rectangle(x * 24, y * 24, 24, 24)
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
End Class
|
|
|
|
|
|
2016-09-19 03:26:44 +02:00
|
|
|
|
End Namespace
|