allow coins to be used in shops and track as stats

This commit is contained in:
darkfire006 2023-05-29 20:32:57 -05:00
parent 2e1b66a45d
commit ddbbd21043
2 changed files with 13 additions and 1 deletions

View File

@ -75,6 +75,7 @@ Public Class TradeScreen
Public Enum Currencies
Pokédollar
BattlePoints
Coins
End Enum
''' <summary>
@ -187,6 +188,8 @@ Public Class TradeScreen
Me.Currency = Currencies.Pokédollar
Case "bp", "battlepoints", "battle points"
Me.Currency = Currencies.BattlePoints
Case "c", "coins"
Me.Currency = Currencies.Coins
End Select
End Sub
@ -1279,6 +1282,8 @@ Public Class TradeScreen
Select Case Me.Currency
Case Currencies.BattlePoints
Return Core.Player.BP
Case Currencies.Coins
Return Core.Player.Coins
Case Currencies.Pokédollar
Return Core.Player.Money
End Select
@ -1289,6 +1294,8 @@ Public Class TradeScreen
Select Case Me.Currency
Case Currencies.BattlePoints
Return GetCurrencyAmount().ToString() & " Battle Points"
Case Currencies.Coins
Return GetCurrencyAmount().ToString() & " Coins"
Case Currencies.Pokédollar
Return GetCurrencyAmount().ToString() & " Pokémon Dollars"
End Select
@ -1299,6 +1306,8 @@ Public Class TradeScreen
Select Case Me.Currency
Case Currencies.BattlePoints
Return "BP"
Case Currencies.Coins
Return "C"
Case Currencies.Pokédollar
Return "$"
End Select
@ -1309,6 +1318,8 @@ Public Class TradeScreen
Select Case Me.Currency
Case Currencies.BattlePoints
Core.Player.BP = (Core.Player.BP + change).Clamp(0, Integer.MaxValue)
Case Currencies.Coins
Core.Player.Coins = (Core.Player.Coins + change).Clamp(0, Integer.MaxValue)
Case Currencies.Pokédollar
Core.Player.Money = (Core.Player.Money + change).Clamp(0, Integer.MaxValue)
End Select

View File

@ -47,7 +47,7 @@
Dim currencyIndicator As String = "P"
If argument.CountSplits() > 3 Then
currencyIndicator = argument.GetSplit(3) ' p for PokéDollars, bp for Battle Points.
currencyIndicator = argument.GetSplit(3) ' p for PokéDollars, bp for Battle Points, c for coins.
End If
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New TradeScreen(Core.CurrentScreen, storeData, canBuy, canSell, currencyIndicator), Color.Black, False))
@ -286,6 +286,7 @@
If VoltorbFlip.VoltorbFlipScreen.TotalCoins > 0 Then
Screen.TextBox.Show(Localization.GetString("VoltorbFlip_AfterGame_Won1", "You've won") & " " & VoltorbFlip.VoltorbFlipScreen.TotalCoins & " " & Localization.GetString("VoltorbFlip_AfterGame_Won2", "Coins!"))
Core.Player.Coins += VoltorbFlip.VoltorbFlipScreen.TotalCoins
PlayerStatistics.Track("Obtained Coins", VoltorbFlip.VoltorbFlipScreen.TotalCoins)
VoltorbFlip.VoltorbFlipScreen.TotalCoins = -1
IsReady = True
Else