OSDN Git Service
(root)
/
hengband
/
hengband.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf2b6d7
)
fix bug of calc_expect_crit. return too small value for no critical case.
author
dis-
<dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 17 Mar 2013 10:31:42 +0000
(10:31 +0000)
committer
dis-
<dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 17 Mar 2013 10:31:42 +0000
(10:31 +0000)
src/bldg.c
patch
|
blob
|
history
diff --git
a/src/bldg.c
b/src/bldg.c
index
3e3e47d
..
2627d45
100644
(file)
--- a/
src/bldg.c
+++ b/
src/bldg.c
@@
-3116,13
+3116,16
@@
static void town_history(void)
s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
{
- u32b i,k, num;
+ u32b k, num;
+ int i;
if(dokubari) return dam;
i = weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3);
+ if (i < 0) i = 0;
+
k = weight;
- num
=
0;
+ num
=
0;
if (k < 400) num += (2 * dam + 5) * (400 - k);
if (k < 700) num += (2 * dam + 10) * (MIN(700, k + 650) - MAX(400, k));