From c41f970cd9e46e68b48a85f5d622dd7af72fdaa0 Mon Sep 17 00:00:00 2001 From: dis- Date: Wed, 22 May 2013 14:48:07 +0000 Subject: [PATCH] bow of accuracy have now higher to_h than to_d. bow of velocity have now higher to_d than to_h. --- lib/edit/e_info.txt | 2 +- src/object2.c | 29 ++++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/edit/e_info.txt b/lib/edit/e_info.txt index 6c24eff6a..16db9914a 100644 --- a/lib/edit/e_info.txt +++ b/lib/edit/e_info.txt @@ -819,7 +819,7 @@ N:105: E:of Velocity X:26:10 W:0:5:0:1000 -C:2:15:0:0 +C:2:12:0:0 # 106 (unused) diff --git a/src/object2.c b/src/object2.c index a22178dfa..3b2d80b32 100644 --- a/src/object2.c +++ b/src/object2.c @@ -4400,11 +4400,34 @@ void apply_magic(object_type *o_ptr, int lev, u32b mode) if (e_ptr->max_to_a > 127) o_ptr->to_a -= randint1(256-e_ptr->max_to_a); else o_ptr->to_a += randint1(e_ptr->max_to_a); - - if((o_ptr->name2 == EGO_PROTECTION) || (o_ptr->name2 == EGO_S_PROTECTION)) + } + + /* Accuracy ego must have high to_h */ + if(o_ptr->name2 == EGO_ACCURACY) + { + while(o_ptr->to_h < o_ptr->to_d + 10) + { + o_ptr->to_h += 5; + o_ptr->to_d -= 5; + } + o_ptr->to_h = MAX(o_ptr->to_h, 15); + } + + /* Accuracy ego must have high to_h */ + if(o_ptr->name2 == EGO_VELOCITY) + { + while(o_ptr->to_d < o_ptr->to_h + 10) { - o_ptr->to_a = MAX(o_ptr->to_a, 15); + o_ptr->to_d += 5; + o_ptr->to_h -= 5; } + o_ptr->to_d = MAX(o_ptr->to_d, 15); + } + + /* Protection ego must have high to_a */ + if((o_ptr->name2 == EGO_PROTECTION) || (o_ptr->name2 == EGO_S_PROTECTION)) + { + o_ptr->to_a = MAX(o_ptr->to_a, 15); } /* Hack -- obtain pval */ -- 2.11.0