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:
83e8abd
)
Improve broken weapon repairing service. Broken sword become TV_SWORD in 4/5. If...
author
iks
<iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 9 Feb 2013 10:44:50 +0000
(10:44 +0000)
committer
iks
<iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 9 Feb 2013 10:44:50 +0000
(10:44 +0000)
src/bldg.c
patch
|
blob
|
history
diff --git
a/src/bldg.c
b/src/bldg.c
index
0952fa5
..
0d76b7e
100644
(file)
--- a/
src/bldg.c
+++ b/
src/bldg.c
@@
-4321,7
+4321,7
@@
static int repair_broken_weapon_aux(int bcost)
else /* TV_BROKEN_SWORD */
{
/* Repair to a sword or sometimes material's type weapon */
else /* TV_BROKEN_SWORD */
{
/* Repair to a sword or sometimes material's type weapon */
- int tval = (one_in_(5) ?
TV_SWORD : mo_ptr->tval
);
+ int tval = (one_in_(5) ?
mo_ptr->tval : TV_SWORD
);
while(1)
{
while(1)
{
@@
-4368,6
+4368,11
@@
static int repair_broken_weapon_aux(int bcost)
o_ptr->dd = k_ptr->dd;
o_ptr->ds = k_ptr->ds;
o_ptr->dd = k_ptr->dd;
o_ptr->ds = k_ptr->ds;
+ /* Copy base object's ability */
+ for (i = 0; i < TR_FLAG_SIZE; i++) o_ptr->art_flags[i] |= k_ptr->flags[i];
+ if (k_ptr->pval) o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
+ if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = k_ptr->act_idx;
+
/* Dice up */
if (dd_bonus)
{
/* Dice up */
if (dd_bonus)
{