• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

変愚蛮怒のメインリポジトリです


コミットメタ情報

リビジョンe6b9119f9c7fd59893133a5a9eff306b42f31d9e (tree)
日時2013-03-17 19:31:42
作者dis- <dis-@0568...>
コミッターdis-

ログメッセージ

fix bug of calc_expect_crit. return too small value for no critical case.

変更サマリ

差分

--- a/src/bldg.c
+++ b/src/bldg.c
@@ -3116,13 +3116,16 @@ static void town_history(void)
31163116
31173117 s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
31183118 {
3119- u32b i,k, num;
3119+ u32b k, num;
3120+ int i;
31203121
31213122 if(dokubari) return dam;
31223123
31233124 i = weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3);
3125+ if (i < 0) i = 0;
3126+
31243127 k = weight;
3125- num=0;
3128+ num = 0;
31263129
31273130 if (k < 400) num += (2 * dam + 5) * (400 - k);
31283131 if (k < 700) num += (2 * dam + 10) * (MIN(700, k + 650) - MAX(400, k));
旧リポジトリブラウザで表示