GameMode Items properties work now

This commit is contained in:
JappaWakka 2023-05-30 14:51:43 +02:00
parent 9b702bd1bc
commit 451115d7aa
2 changed files with 72 additions and 17 deletions

View File

@ -7,7 +7,6 @@ Public Class GameModeItem
Inherits Item Inherits Item
Public gmTextureSource As String = "Items\GameModeItems"
Public gmPluralName As String = gmName Public gmPluralName As String = gmName
Public gmPrice As Integer = 0 Public gmPrice As Integer = 0
Public gmBattlePointsPrice As Integer = 1 Public gmBattlePointsPrice As Integer = 1
@ -49,27 +48,46 @@ Public Class GameModeItem
''' <summary> ''' <summary>
''' The price of this item if the player purchases it in exchange for PokéDollars. This halves when selling an item to the store. ''' The price of this item if the player purchases it in exchange for PokéDollars. This halves when selling an item to the store.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property PokeDollarPrice As Integer = gmPrice Public Overrides ReadOnly Property PokeDollarPrice As Integer
Get
Return gmPrice
End Get
End Property
''' <summary> ''' <summary>
''' The price of this item if the player purchases it exchange for BattlePoints. ''' The price of this item if the player purchases it exchange for BattlePoints.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property BattlePointsPrice As Integer = gmBattlePointsPrice Public Overrides ReadOnly Property BattlePointsPrice As Integer
Get
Return gmBattlePointsPrice
End Get
End Property
''' <summary> ''' <summary>
''' The type of this item. This also controls in which bag this item gets sorted. ''' The type of this item. This also controls in which bag this item gets sorted.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property ItemType As ItemTypes = gmItemType Public Overrides ReadOnly Property ItemType As ItemTypes
Get
Return gmItemType
End Get
End Property
''' <summary> ''' <summary>
''' The default catch multiplier if the item gets used as a Pokéball. ''' The default catch multiplier if the item gets used as a Pokéball.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CatchMultiplier As Single = gmCatchMultiplier Public Overrides ReadOnly Property CatchMultiplier As Single
Get
Return gmCatchMultiplier
End Get
End Property
''' <summary> ''' <summary>
''' The maximum amount of this item type (per ID) that can be stored in the bag. ''' The maximum amount of this item type (per ID) that can be stored in the bag.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property MaxStack As Integer = gmMaxStack Public Overrides ReadOnly Property MaxStack As Integer
Get
Return gmMaxStack
End Get
End Property
''' <summary> ''' <summary>
''' A value that can be used to sort items in the bag after. Lower values make items appear closer to the top. ''' A value that can be used to sort items in the bag after. Lower values make items appear closer to the top.
@ -80,48 +98,84 @@ Public Class GameModeItem
''' <summary> ''' <summary>
''' The bag description of this item. ''' The bag description of this item.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property Description As String = gmDescription Public Overrides ReadOnly Property Description As String
Get
Return gmDescription
End Get
End Property
''' <summary> ''' <summary>
''' The damage the Fling move does when this item is attached to a Pokémon. ''' The damage the Fling move does when this item is attached to a Pokémon.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property FlingDamage As Integer = gmFlingDamage Public Overrides ReadOnly Property FlingDamage As Integer
Get
Return gmFlingDamage
End Get
End Property
''' <summary> ''' <summary>
''' If this item can be traded in for money. ''' If this item can be traded in for money.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CanBeTraded As Boolean = gmCanBeTraded Public Overrides ReadOnly Property CanBeTraded As Boolean
Get
Return gmCanBeTraded
End Get
End Property
''' <summary> ''' <summary>
''' If this item can be given to a Pokémon. ''' If this item can be given to a Pokémon.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CanBeHeld As Boolean = gmCanBeHeld Public Overrides ReadOnly Property CanBeHeld As Boolean
Get
Return gmCanBeHeld
End Get
End Property
''' <summary> ''' <summary>
''' If this item can be used from the bag. ''' If this item can be used from the bag.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CanBeUsed As Boolean = gmCanBeUsed Public Overrides ReadOnly Property CanBeUsed As Boolean
Get
Return gmCanBeUsed
End Get
End Property
''' <summary> ''' <summary>
''' If this item can be used in battle. ''' If this item can be used in battle.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = gmCanBeUsedInBattle Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean
Get
Return gmCanBeUsedInBattle
End Get
End Property
''' <summary> ''' <summary>
''' If this item can be tossed in the bag. ''' If this item can be tossed in the bag.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property CanBeTossed As Boolean = gmCanBeTossed Public Overrides ReadOnly Property CanBeTossed As Boolean
Get
Return gmCanBeTossed
End Get
End Property
''' <summary> ''' <summary>
''' If this item requires the player to select a Pokémon to use the item on in battle. ''' If this item requires the player to select a Pokémon to use the item on in battle.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property BattleSelectPokemon As Boolean = gmBattleSelectPokemon Public Overrides ReadOnly Property BattleSelectPokemon As Boolean
Get
Return gmBattleSelectPokemon
End Get
End Property
''' <summary> ''' <summary>
''' If this item is a Healing item. ''' If this item is a Healing item.
''' </summary> ''' </summary>
Public Overrides ReadOnly Property IsHealingItem As Boolean = gmIsHealingItem Public Overrides ReadOnly Property IsHealingItem As Boolean
Get
Return gmIsHealingItem
End Get
End Property
''' <summary> ''' <summary>

View File

@ -13,6 +13,7 @@ Public MustInherit Class Item
Public gmID As String = "" Public gmID As String = ""
Public gmName As String = "" Public gmName As String = ""
Public gmDescription As String = "" Public gmDescription As String = ""
Public gmTextureSource As String = "Items\GameModeItems"
Public gmTextureRectangle As Rectangle Public gmTextureRectangle As Rectangle
Public gmIsBerry As Boolean = False Public gmIsBerry As Boolean = False
Public gmIsMail As Boolean = False Public gmIsMail As Boolean = False
@ -137,7 +138,7 @@ Public MustInherit Class Item
Get Get
If IsGameModeItem = True Then If IsGameModeItem = True Then
If _texture Is Nothing Then If _texture Is Nothing Then
_texture = TextureManager.GetTexture(_textureSource, gmTextureRectangle, "") _texture = TextureManager.GetTexture(gmTextureSource, gmTextureRectangle, "")
End If End If
Else Else
If _texture Is Nothing Then If _texture Is Nothing Then