add banks.

This commit is contained in:
SilicaAndPina 2021-01-01 13:21:02 +13:00
parent 8781ca6b84
commit 26245c66c3
8 changed files with 127 additions and 24 deletions

View file

@ -218,6 +218,15 @@ namespace HISP.Game
public static string Sold1Format;
public static string SoldAllFormat;
// Bank
public static string BankMadeInIntrestFormat;
public static string BankCarryingFormat;
public static string BankWhatToDo;
public static string BankOptionsFormat;
public static string BankWithdrewMoneyFormat;
public static string BankDepositedMoneyFormat;
// Npc
public static string NpcStartChatFormat;
public static string NpcChatpointFormat;
@ -320,6 +329,28 @@ namespace HISP.Game
// Click
public static string NothingInterestingHere;
public static string FormatBankIntrestMadeMeta(UInt64 intrestMade)
{
return BankMadeInIntrestFormat.Replace("%MONEY%", intrestMade.ToString("N0"));
}
public static string FormatBankCarryingMeta(int money, UInt64 bankMoney)
{
return BankCarryingFormat.Replace("%MONEY%", money.ToString("N0")).Replace("%BANKMONEY%", bankMoney.ToString("N0"));
}
public static string FormatBankOptionsMeta(int money, UInt64 bankMoney)
{
return BankOptionsFormat.Replace("%MONEY%", money.ToString("N0")).Replace("%BANKMONEY%", bankMoney.ToString("N0"));
}
public static string FormatDepositedMoneyMessage(int money)
{
return BankDepositedMoneyFormat.Replace("%MONEY%", money.ToString("N0"));
}
public static string FormatWithdrawMoneyMessage(int money)
{
return BankWithdrewMoneyFormat.Replace("%MONEY%", money.ToString("N0"));
}
public static string FormatNumberOfWishingCoins(int amount)
{
return YouHaveWishingCoinsFormat.Replace("%AMOUNT%", amount.ToString("N0"));

View file

@ -589,10 +589,22 @@ namespace HISP.Game
return message;
}
public static string buildFountain()
private static string buildFountain()
{
return Messages.FountainMeta;
}
private static string buildBank(User user)
{
string messages = Messages.FormatBankCarryingMeta(user.Money, user.BankMoney);
messages += Messages.BankWhatToDo;
messages += Messages.FormatBankOptionsMeta(user.Money, user.BankMoney);
messages += Messages.ExitThisPlace;
messages += Messages.MetaTerminator;
return messages;
}
public static string BuildSpecialTileInfo(User user, World.SpecialTile specialTile)
{
string message = "";
@ -650,9 +662,13 @@ namespace HISP.Game
message += buildShopInfo(shop,user.Inventory);
}
if(TileCode == "BANK")
{
message += buildBank(user);
}
if(TileCode == "WISHINGWELL")
{
message += Meta.buildWishingWell(user);
message += buildWishingWell(user);
}
if(TileCode == "INN")
{