OSDN Git Service

bow of accuracy have now higher to_h than to_d.
authordis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 22 May 2013 14:48:07 +0000 (14:48 +0000)
committerdis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 22 May 2013 14:48:07 +0000 (14:48 +0000)
bow of velocity have now higher to_d than to_h.

lib/edit/e_info.txt
src/object2.c

index 6c24eff..16db991 100644 (file)
@@ -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)
 
index a22178d..3b2d80b 100644 (file)
@@ -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 */