mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-31 01:35:20 +02:00
Miscellaneous bug fixes:
- Fixed the category of multiple items - NewInventoryScreen now sorts items by name - Fixed wrong colors for stats in SummaryScreen - Minor fixes to NewTrainerScreen and NewInventoryScreen
This commit is contained in:
parent
d3ff2f4d17
commit
8fa8392965
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(65, "Elixir")>
|
||||
Public Class Elixir
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 3000
|
||||
Public Overrides ReadOnly Property Description As String = "This medicine can restore 10 PP to each of the moves that have been learned by a Pokémon."
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(63, "Ether")>
|
||||
Public Class Ether
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 1200
|
||||
Public Overrides ReadOnly Property Description As String = "This medicine can restore 10 PP to a single selected move that has been learned by a Pokémon."
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(38, "Full Heal")>
|
||||
Public Class FullHeal
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "A spray-type medicine that is broadly effective. It can be used once to heal all the status conditions of a Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 600
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(123, "Heal Powder")>
|
||||
Public Class HealPowder
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "A very bitter medicine powder. When consumed, it heals all of a Pokémon's status conditions."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 450
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(7, "Lava Cookie")>
|
||||
Public Class LavaCookie
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "Lavaridge Town's local specialty. It can be used once to heal all the status conditions of a Pokemon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 200
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(21, "Max Elixir")>
|
||||
Public Class MaxElixir
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "This medicine can fully restore the PP of all of the moves that have been learned by a Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4500
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(64, "Max Ether")>
|
||||
Public Class MaxEther
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "This medicine can fully restore the PP of a single selected move that has been learned by a Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 2000
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(40, "Max Revive")>
|
||||
Public Class MaxRevive
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property IsHealingItem As Boolean = True
|
||||
Public Overrides ReadOnly Property Description As String = "A medicine that can revive fainted Pokémon. It also fully restores a fainted Pokémon's maximum HP."
|
||||
|
@ -3,8 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(502, "PP Max")>
|
||||
Public Class PPMax
|
||||
|
||||
Inherits Item
|
||||
|
||||
Inherits MedicineItem
|
||||
Public Overrides ReadOnly Property Description As String = "A medicine that can optimally raise the maximum PP of a single move that has been learned by the target Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 9800
|
||||
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(62, "PP Up")>
|
||||
Public Class PPUp
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "A medicine that can slightly raise the maximum PP of a single move that has been learned by the target Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 9800
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(32, "Rare Candy")>
|
||||
Public Class RareCandy
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "A candy that is packed with energy. When consumed, it will instantly raise the level of a single Pokémon by one."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4800
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(39, "Revive")>
|
||||
Public Class Revive
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property IsHealingItem As Boolean = True
|
||||
Public Overrides ReadOnly Property Description As String = "A medicine that can revive fainted Pokémon. It also restores half of a fainted Pokémon's HP."
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(156, "Sacred Ash")>
|
||||
Public Class SacredAsh
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "It revives all fainted Pokémon. In doing so, it also fully restores their HP."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 200
|
||||
|
@ -3,7 +3,7 @@ Namespace Items.Medicine
|
||||
<Item(501, "Shiny Candy")>
|
||||
Public Class ShinyCandy
|
||||
|
||||
Inherits Item
|
||||
Inherits MedicineItem
|
||||
|
||||
Public Overrides ReadOnly Property Description As String = "This mysterious candy sparkles when unwrapped. It attracts all sorts of Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 4800
|
||||
|
@ -5,7 +5,7 @@ Namespace Items.Plants
|
||||
|
||||
Inherits Item
|
||||
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Plants
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Standard
|
||||
Public Overrides ReadOnly Property Description As String = "A very large and rare mushroom. It's popular with a certain class of collectors and sought out by them."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 5000
|
||||
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False
|
||||
|
@ -5,7 +5,7 @@ Namespace Items.Plants
|
||||
|
||||
Inherits Item
|
||||
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Plants
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Standard
|
||||
Public Overrides ReadOnly Property Description As String = "Honey produced by a Pokémon."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 100
|
||||
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False
|
||||
|
@ -5,7 +5,7 @@ Namespace Items.Plants
|
||||
|
||||
Inherits Item
|
||||
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Plants
|
||||
Public Overrides ReadOnly Property ItemType As ItemTypes = ItemTypes.Standard
|
||||
Public Overrides ReadOnly Property Description As String = "A very small and rare mushroom. It's popular with a certain class of collectors and sought out by them."
|
||||
Public Overrides ReadOnly Property PokeDollarPrice As Integer = 500
|
||||
Public Overrides ReadOnly Property CanBeUsedInBattle As Boolean = False
|
||||
|
@ -35,7 +35,7 @@
|
||||
_CanBeTossed = False
|
||||
|
||||
'Sets the sortvalue to something very low so the HMs will always be in first place:
|
||||
_SortValue = -100000 + ID
|
||||
_SortValue = -100000 + CInt(Name.Remove(0, 3)) 'Because the ID order for HMs is fucked up
|
||||
Else
|
||||
_SortValue = ID
|
||||
End If
|
||||
|
@ -1,6 +1,7 @@
|
||||
Public Class Nature
|
||||
|
||||
Private Enum StatNames
|
||||
HP
|
||||
Attack
|
||||
Defense
|
||||
SpAttack
|
||||
@ -12,16 +13,18 @@
|
||||
Dim stat As StatNames = StatNames.Attack
|
||||
|
||||
Select Case StatName.ToLower()
|
||||
Case "hp"
|
||||
stat = StatNames.HP
|
||||
Case "attack", "atk"
|
||||
Stat = StatNames.Attack
|
||||
stat = StatNames.Attack
|
||||
Case "defense", "def"
|
||||
Stat = StatNames.Defense
|
||||
Case "spattack", "spatk", "specialattack"
|
||||
Stat = StatNames.SpAttack
|
||||
Case "spdefense", "spdef", "specialdefense"
|
||||
Stat = StatNames.SpDefense
|
||||
Case "speed"
|
||||
Stat = StatNames.Speed
|
||||
stat = StatNames.Defense
|
||||
Case "spattack", "spatk", "specialattack", "sp. atk"
|
||||
stat = StatNames.SpAttack
|
||||
Case "spdefense", "spdef", "specialdefense", "sp. def"
|
||||
stat = StatNames.SpDefense
|
||||
Case "speed", "spe"
|
||||
stat = StatNames.Speed
|
||||
End Select
|
||||
|
||||
Select Case Nature
|
||||
|
@ -143,7 +143,6 @@ Public Class NewInventoryScreen
|
||||
''DEBUG: Add all items in the game to the inventory:
|
||||
'For i = 1 To 2500
|
||||
' Dim cItem As Item = Item.GetItemByID(i)
|
||||
|
||||
' If Not cItem Is Nothing Then
|
||||
' Core.Player.Inventory.AddItem(cItem.ID, 1)
|
||||
' End If
|
||||
@ -313,10 +312,11 @@ Public Class NewInventoryScreen
|
||||
Dim fontWidth As Integer = CInt(FontManager.MiniFont.MeasureString(cItem.Name).X)
|
||||
|
||||
itemBatch.DrawString(FontManager.MiniFont, cItem.Name, itemLoc + New Vector2(48 - fontWidth / 2.0F, 51), New Color(255, 255, 255, itemPanelAlpha))
|
||||
|
||||
If _tabIndex <> 7 Then
|
||||
itemBatch.DrawString(FontManager.MiniFont, "x" & _items(i + (PageIndex * 10)).Amount.ToString(), itemLoc + New Vector2(84, 26), New Color(40, 40, 40, itemPanelAlpha))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'When the info is visible, draw it:
|
||||
@ -644,7 +644,7 @@ Public Class NewInventoryScreen
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Controls.Up(True, True, True, True, True, True) Then
|
||||
If Controls.Up(True, True, False, True, True, True) Then
|
||||
ItemIndex -= 1
|
||||
If ItemIndex < 0 And PageIndex > 0 Then
|
||||
ItemIndex += 10
|
||||
@ -655,7 +655,7 @@ Public Class NewInventoryScreen
|
||||
ItemIndex = 0
|
||||
End If
|
||||
End If
|
||||
If Controls.Down(True, True, True, True, True, True) Then
|
||||
If Controls.Down(True, True, False, True, True, True) Then
|
||||
If ItemIndex + 1 + (PageIndex * 10) < _items.Length Then
|
||||
ItemIndex += 1
|
||||
If ItemIndex > 9 Then
|
||||
@ -784,6 +784,11 @@ Public Class NewInventoryScreen
|
||||
End If
|
||||
|
||||
LoadItems()
|
||||
If ItemIndex + PageIndex * 10 > _items.Count - 1 Then
|
||||
ItemIndex = 0
|
||||
PageIndex = 0
|
||||
CloseInfoScreen()
|
||||
End If
|
||||
Else
|
||||
'JSON Stuff
|
||||
'ShowMessage(_translation.MESSAGE_EGG_ERROR)
|
||||
@ -827,6 +832,11 @@ Public Class NewInventoryScreen
|
||||
''' </summary>
|
||||
Private Sub LoadItems()
|
||||
_items = Core.Player.Inventory.Where(Function(x) Item.GetItemByID(x.ItemID).ItemType = _visibleItemTypes(_tabIndex)).ToArray()
|
||||
If _tabIndex = 4 Then 'TM/HM
|
||||
_items = (From i In _items Order By Item.GetItemByID(i.ItemID).SortValue Ascending).ToArray()
|
||||
Else
|
||||
_items = (From i In _items Order By Item.GetItemByID(i.ItemID).Name Ascending).ToArray()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
|
@ -641,7 +641,7 @@ Public Class NewMainMenuScreen
|
||||
_fontSize -= 0.01F
|
||||
End While
|
||||
Case "badges"
|
||||
If content.Length > 0 Then
|
||||
If content.Length > 0 AndAlso content <> "0" Then
|
||||
_badges = content.Split(","c).Length
|
||||
Else
|
||||
_badges = 0
|
||||
@ -748,7 +748,7 @@ Public Class NewMainMenuScreen
|
||||
If _isGameJolt And _loaded = False And _isLoading = False Then
|
||||
_isLoading = True
|
||||
|
||||
GameJoltSave.DownloadSave(GameJolt.API.gameJoltId, True)
|
||||
GameJoltSave.DownloadSave(GameJolt.LogInScreen.LoadedGameJoltID, True)
|
||||
ElseIf _isGameJolt And _loaded = False And _isLoading Then
|
||||
If GameJoltSave.DownloadFinished Then
|
||||
_loaded = True
|
||||
|
@ -204,11 +204,21 @@
|
||||
_spriteBatch.Draw(nextSprite, New Rectangle(570, 310, 32, 32), New Rectangle(0, 64, 32, 32), Color.White)
|
||||
|
||||
Dim value = hasPointsThisLevel / totalNeedPoints * 310
|
||||
|
||||
If currentLevel >= 100 Then
|
||||
value = 310
|
||||
needPoints = 0
|
||||
End If
|
||||
Canvas.DrawRectangle(_spriteBatch, New Rectangle(260, 312, 310, 32), New Color(0, 0, 0, 180))
|
||||
Canvas.DrawRectangle(_spriteBatch, New Rectangle(260, 316, CInt(value), 24), New Color(255, 165, 0))
|
||||
Canvas.DrawRectangle(_spriteBatch, New Rectangle(260, 316, CInt(value), 8), New Color(255, 203, 108))
|
||||
|
||||
Dim rankStr = "Rank: " & currentLevel + 1
|
||||
Dim nxtLvl As Integer = currentLevel + 1
|
||||
If currentLevel = 100 Then
|
||||
nxtLvl = 100
|
||||
End If
|
||||
Dim rankStr = "Rank: " & nxtLvl
|
||||
|
||||
_textBatch.DrawString(FontManager.MiniFont, rankStr, New Vector2(600 - FontManager.MiniFont.MeasureString(rankStr).X.ToInteger(), 290), Color.Black)
|
||||
|
||||
If needPoints = 1 Then
|
||||
@ -232,8 +242,8 @@
|
||||
Public Overrides Sub Update()
|
||||
If _isIntro Then
|
||||
If _rotation < 0.12F Then
|
||||
_rotation = MathHelper.Lerp(_rotation, 0.12F, 0.2F)
|
||||
_introY = MathHelper.Lerp(_introY, 0, 0.2F)
|
||||
_rotation = MathHelper.Lerp(_rotation, 0.12F, 0.1F)
|
||||
_introY = MathHelper.Lerp(_introY, 0, 0.1F)
|
||||
If _rotation + 0.01F >= 0.12F Then
|
||||
_isIntro = False
|
||||
End If
|
||||
|
Loading…
x
Reference in New Issue
Block a user