summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-11 09:56:14 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-11 09:56:14 +0800
commit455cef69dfb3ad62afa8725b7380f1f26f4926ab (patch)
tree455cd3f2f8db00997beecd5278ad0da822d58a3a /mbbsd
parente2fc041c98d3b4e7348f584fc786354d3b94db7d (diff)
downloadpttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar.gz
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar.bz2
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar.lz
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar.xz
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.tar.zst
pttbbs-455cef69dfb3ad62afa8725b7380f1f26f4926ab.zip
- chicken: revive should update lastvisit to prevent die again.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3987 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/chicken.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index 659275b3..05e280f9 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -810,8 +810,10 @@ static int
recover_chicken(chicken_t * thechicken)
{
char buf[200];
- int price = egg_price[(int)thechicken->type], money = price + (random() % price);
+ int price = egg_price[(int)thechicken->type];
+ int money = price + (random() % price);
price *= 2;
+ // money is a little less than price.
if (now - thechicken->lastvisit > (60 * 60 * 24 * 7))
return 0;
@@ -824,7 +826,7 @@ recover_chicken(chicken_t * thechicken)
igetch();
snprintf(buf, sizeof(buf), ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45) " "
"你有一個剛走不久的%s要招換回來嗎? 只要 %d 元唷 " ANSI_RESET,
- chicken_type[(int)thechicken->type], price);
+ chicken_type[(int)thechicken->type], price);
outmsg(buf);
bell();
getdata_str(21, 0, " 選擇:(N:坑人嘛/y:請幫幫我)", buf, 3, LCECHO, "N");
@@ -841,11 +843,12 @@ recover_chicken(chicken_t * thechicken)
thechicken->hp = thechicken->hp_max;
thechicken->sick = 0;
thechicken->satis = 2;
+ thechicken->lastvisit = now;
vice(money, "靈界守衛");
snprintf(buf, sizeof(buf),
ANSI_COLOR(33;44) "★靈界守衛" ANSI_COLOR(37;45)
- " OK了 記得餵他點東西 不然可能失效 "
- "念在我也有玩BBS 拿你%d就好 " ANSI_RESET, money);
+ " OK了 記得餵他點東西 不然可能失效。"
+ "今天心情好,拿你$%d就好 " ANSI_RESET, money);
outmsg(buf);
bell();
igetch();