OSDN Git Service

bug fix: disable target of spreading shuriken with index 0
authordis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 16 Nov 2012 13:17:02 +0000 (13:17 +0000)
committerdis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 16 Nov 2012 13:17:02 +0000 (13:17 +0000)
src/cmd2.c
src/do-spell.c
src/mutation.c

index 84cfdc3..251820c 100644 (file)
@@ -4119,7 +4119,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
                set_action(ACTION_NONE);
        }
 
-       if (shuriken)
+       if (shuriken >= 0)
        {
                item = shuriken;
        }
@@ -4238,7 +4238,7 @@ bool do_cmd_throw_aux(int mult, bool boomerang, int shuriken)
        /* Max distance of 10-18 */
        if (tdis > mul) tdis = mul;
 
-       if (shuriken)
+       if (shuriken >= 0)
        {
                ty = randint0(101)-50+py;
                tx = randint0(101)-50+px;
@@ -4722,7 +4722,7 @@ msg_print("
  */
 void do_cmd_throw(void)
 {
-       do_cmd_throw_aux(1, FALSE, 0);
+       do_cmd_throw_aux(1, FALSE, -1);
 }
 
 
index 139df0f..261eff3 100644 (file)
@@ -10280,7 +10280,7 @@ static cptr do_hissatsu_spell(int spell, int mode)
     
                if (cast)
                {
-                       if (!do_cmd_throw_aux(1, TRUE, 0)) return NULL;
+                       if (!do_cmd_throw_aux(1, TRUE, -1)) return NULL;
                }
                break;
 
index fdf8c8d..bd74d3d 100644 (file)
@@ -3818,7 +3818,7 @@ bool mutation_power_aux(u32b power)
                /* XXX_XXX_XXX Hack!  MUT1_LAUNCHER is negative, see above */
                case 3: /* MUT1_LAUNCHER */
                        /* Gives a multiplier of 2 at first, up to 3 at 40th */
-                       if (!do_cmd_throw_aux(2 + lvl / 40, FALSE, 0)) return FALSE;
+                       if (!do_cmd_throw_aux(2 + lvl / 40, FALSE, -1)) return FALSE;
                        break;
 
                default: