OSDN Git Service

Good to_h Bows makes more critical. Decrease ammo's contribution.
[hengband/hengband.git] / src / cmd2.c
index c365b59..c6af4a1 100644 (file)
@@ -3733,8 +3733,8 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                        armour = r_ptr->ac;
                        if (p_ptr->concent)
                        {
-                               armour *= (10 - p_ptr->concent);
-                               armour /= 10;
+                               armour *= (8 - p_ptr->concent);
+                               armour /= 8;
                        }
 
                        /* Did we hit it (penalize range) */
@@ -3806,7 +3806,7 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                {
                                        /* Apply special damage XXX XXX XXX */
                                        tdam = tot_dam_aux_shot(q_ptr, tdam, m_ptr);
-                                       tdam = critical_shot(q_ptr->weight, q_ptr->to_h, tdam);
+                                       tdam = critical_shot(q_ptr->weight, q_ptr->to_h, j_ptr->to_h, tdam);
 
                                        /* No negative damage */
                                        if (tdam < 0) tdam = 0;
@@ -3860,7 +3860,8 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                                else
                                {
                                        /* STICK TO */
-                                       if (object_is_fixed_artifact(q_ptr))
+                                       if (object_is_fixed_artifact(q_ptr) &&
+                                               (p_ptr->pclass != CLASS_SNIPER || p_ptr->concent == 0))
                                        {
                                                char m_name[80];
 
@@ -4129,7 +4130,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
        int i, j, y, x, ty, tx, prev_y, prev_x;
        int ny[19], nx[19];
        int chance, tdam, tdis;
-       int mul, div;
+       int mul, div, dd, ds;
        int cur_dis, visible;
 
        object_type forge;
@@ -4250,6 +4251,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
 
        /* Extract the thrown object's flags. */
        object_flags(q_ptr, flgs);
+       torch_flags(q_ptr, flgs);
 
        /* Distribute the charges of rods/wands between the stacks */
        distribute_charges(o_ptr, q_ptr, 1);
@@ -4464,10 +4466,13 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
                                }
 
                                /* Hack -- Base damage from thrown object */
-                               tdam = damroll(q_ptr->dd, q_ptr->ds);
+                               dd = q_ptr->dd;
+                               ds = q_ptr->ds;
+                               torch_dice(q_ptr, &dd, &ds); /* throwing a torch */
+                               tdam = damroll(dd, ds);
                                /* Apply special damage XXX XXX XXX */
                                tdam = tot_dam_aux(q_ptr, tdam, m_ptr, 0, TRUE);
-                               tdam = critical_shot(q_ptr->weight, q_ptr->to_h, tdam);
+                               tdam = critical_shot(q_ptr->weight, q_ptr->to_h, 0, tdam);
                                if (q_ptr->to_d > 0)
                                        tdam += q_ptr->to_d;
                                else
@@ -4554,6 +4559,9 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
                }
        }
 
+       /* decrease toach's fuel */
+       if (hit_body) torch_lost_fuel(q_ptr);
+
        /* Chance of breakage (during attacks) */
        j = (hit_body ? breakage_chance(q_ptr) : 0);
 
@@ -4787,8 +4795,10 @@ void forget_travel_flow(void)
                {
                        /* Forget the old data */
                        travel.cost[y][x] = MAX_SHORT;
-               }       
+               }
        }
+
+       travel.y = travel.x = 0;
 }
 
 static int travel_flow_cost(int y, int x)
@@ -4924,7 +4934,13 @@ void do_cmd_travel(void)
        int dx, dy, sx, sy;
        feature_type *f_ptr;
 
-       if (!tgt_pt(&x, &y)) return;
+       if (travel.x != 0 && travel.y != 0 &&
+           get_check(_("¥È¥é¥Ù¥ë¤ò·Ñ³¤·¤Þ¤¹¤«¡©", "Do you continue to travel?")))
+       {
+               y = travel.y;
+               x = travel.x;
+       }
+       else if (!tgt_pt(&x, &y)) return;
 
        if ((x == px) && (y == py))
        {
@@ -4951,12 +4967,12 @@ void do_cmd_travel(void)
                return;
        }
 
-       travel.x = x;
-       travel.y = y;
-
        forget_travel_flow();
        travel_flow(y, x);
 
+       travel.x = x;
+       travel.y = y;
+
        /* Travel till 255 steps */
        travel.run = 255;