From a4b117f8098e97cad8d0ee308b073e0f2716c3f7 Mon Sep 17 00:00:00 2001 From: dis- Date: Fri, 16 Nov 2012 13:17:02 +0000 Subject: [PATCH] bug fix: disable target of spreading shuriken with index 0 --- src/cmd2.c | 6 +++--- src/do-spell.c | 2 +- src/mutation.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmd2.c b/src/cmd2.c index 84cfdc30a..251820cdd 100644 --- a/src/cmd2.c +++ b/src/cmd2.c @@ -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); } diff --git a/src/do-spell.c b/src/do-spell.c index 139df0f10..261eff3d3 100644 --- a/src/do-spell.c +++ b/src/do-spell.c @@ -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; diff --git a/src/mutation.c b/src/mutation.c index fdf8c8d3a..bd74d3dfc 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -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: -- 2.11.0