diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 05b88fff..9140936a 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -497,16 +497,15 @@ ship_bomb(struct emp_qelem *list, struct sctstr *target) shipsatxy(target->sct_x, target->sct_y, 0, M_SUB, 0); continue; } - if (!isdigit(*q)) - continue; n = atoi(q); if (n < 0) continue; - if ((plp->pcp->pl_flags & P_A) && !on_shiplist(n, head)) - continue; - if (getship(n, &ship) && ship.shp_own && + if ((!(plp->pcp->pl_flags & P_A) || on_shiplist(n, head)) && + getship(n, &ship) && ship.shp_own && ship.shp_x == target->sct_x && ship.shp_y == target->sct_y) shipno = n; + else + pr("Ship #%d not spotted\n", n); } if (shipno < 0) continue;