summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 8658e850..bf4572b6 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -58,6 +58,24 @@ unlockutmpmode(void)
/* 使用錢的函數 */
#define VICE_NEW "vice.new"
+const char*
+money_level(int money)
+{
+ int i = 0;
+
+ static const char *money_msg[] =
+ {
+ "債台高築", "赤貧", "清寒", "普通", "小康",
+ "小富", "中富", "大富翁", "富可敵國", "比爾蓋\天", NULL
+ };
+ while (money_msg[i] && money > 10)
+ i++, money /= 10;
+
+ if(!money_msg[i])
+ i--;
+ return money_msg[i];
+}
+
/* Heat:發票 */
int
vice(int money, const char *item)