OSDN Git Service

A GF_ARROW bolt is not reflectable for both player and enemies.
authoriks <iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 1 Feb 2013 16:45:52 +0000 (16:45 +0000)
committeriks <iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 1 Feb 2013 16:45:52 +0000 (16:45 +0000)
src/mspells1.c
src/mspells2.c
src/spells2.c

index 30c3759..eb11fe3 100644 (file)
@@ -484,7 +484,8 @@ bool clean_shot(int y1, int x1, int y2, int x2, bool friend)
  */
 static void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
 {
-       int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER | PROJECT_REFLECTABLE;
+       int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER;
+       if (typ != GF_ARROW) flg  |= PROJECT_REFLECTABLE;
 
        /* Target the player with a bolt attack */
        (void)project(m_idx, 0, py, px, dam_hp, typ, flg, (learnable ? monspell : -1));
index 130ebe4..60e18a5 100644 (file)
@@ -59,8 +59,8 @@ static void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int
  */
 static void monst_bolt_monst(int m_idx, int y, int x, int typ, int dam_hp, int monspell, bool learnable)
 {
-       int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
-
+       int flg = PROJECT_STOP | PROJECT_KILL;
+       if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
        (void)project(m_idx, 0, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
 }
 
index c4e2a06..1bc6fe0 100644 (file)
@@ -6682,7 +6682,8 @@ bool project_hook(int typ, int dir, int dam, int flg)
  */
 bool fire_bolt(int typ, int dir, int dam)
 {
-       int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
+       int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
+       if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
        return (project_hook(typ, dir, dam, flg));
 }