diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index 5be840b2..387b3f24 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -127,7 +127,7 @@ bomb(void) * select planes within range */ pln_sel(&ni_bomb, &bomb_list, &ap_sect, ap_to_target, - 2, 0, P_M | P_O); + 2, P_B | P_T, P_M | P_O); pln_sel(&ni_esc, &esc_list, &ap_sect, ap_to_target, 2, P_ESC | P_F, P_M | P_O); /* diff --git a/src/lib/subs/plnsub.c b/src/lib/subs/plnsub.c index f03939df..3a5aa45a 100644 --- a/src/lib/subs/plnsub.c +++ b/src/lib/subs/plnsub.c @@ -360,6 +360,7 @@ pln_mine(struct emp_qelem *list, coord tx, coord ty) /* * Has PP's type capabilities satisfying WANTFLAGS and NOWANTFLAGS? * A plane type is capable unless + * - it lacks all of the P_B, P_T in WANTFLAGS, or * - it lacks all of the P_F, P_ESC in WANTFLAGS, or * - it lacks all of the P_E, P_L, P_K in WANTFLAGS, or * - it lacks any of the other capabilities in WANTFLAGS, or @@ -370,6 +371,12 @@ pln_capable(struct plnstr *pp, int wantflags, int nowantflags) { int flags = plchr[(int)pp->pln_type].pl_flags; + if (wantflags & (P_B | P_T)) { + if ((flags & wantflags & (P_B | P_T)) == 0) + return 0; + wantflags &= ~(P_B | P_T); + } + if (wantflags & (P_F | P_ESC)) { if ((flags & wantflags & (P_F | P_ESC)) == 0) return 0;