OSDN Git Service

武器を持たない忍者が不意打ちを使えていたバグを修正. また, 忍者や盗賊
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 30 Aug 2003 20:16:05 +0000 (20:16 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 30 Aug 2003 20:16:05 +0000 (20:16 +0000)
が盾しか持たない場合でも不意打ち判定が動いていたバグを修正.

src/cmd1.c

index 2b6adfd..a7d7c5c 100644 (file)
@@ -2009,7 +2009,7 @@ static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, int
 
 
 
-       if (((p_ptr->pclass == CLASS_ROGUE) || (p_ptr->pclass == CLASS_NINJA)) && inventory[INVEN_RARM+hand].tval)
+       if (((p_ptr->pclass == CLASS_ROGUE) || (p_ptr->pclass == CLASS_NINJA)) && buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand])
        {
                int tmp = p_ptr->lev*6+(p_ptr->skill_stl+10)*4;
                if (p_ptr->monlite && (mode != HISSATSU_NYUSIN)) tmp /= 3;
@@ -2618,7 +2618,7 @@ msg_format("%s
                                }
                                else k = 1;
                        }
-                       else if ((p_ptr->pclass == CLASS_NINJA) && (!p_ptr->icky_wield[hand]) && ((p_ptr->cur_lite <= 0) || one_in_(7)))
+                       else if ((p_ptr->pclass == CLASS_NINJA) && buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand] && ((p_ptr->cur_lite <= 0) || one_in_(7)))
                        {
                                int maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
                                if (one_in_(backstab ? 13 : (stab_fleeing || fuiuchi) ? 15 : 27))