From 991a1dbe4305ca1f8547b22bc8f8c8616104aa5f Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 20 Jan 2025 19:26:08 +0200 Subject: [PATCH] Fix exploding landmine and boulders next to lava Same issue as with breaking a wand of digging in commit 7ce0751a --- include/extern.h | 1 + src/apply.c | 3 +-- src/trap.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/extern.h b/include/extern.h index ccab64021..6db547e30 100644 --- a/include/extern.h +++ b/include/extern.h @@ -128,6 +128,7 @@ extern void reset_trapset(void); extern int use_whip(struct obj *) NONNULLPTRS; extern boolean could_pole_mon(void); extern int use_pole(struct obj *, boolean) NONNULLPTRS; +extern void maybe_dunk_boulders(coordxy, coordxy); extern void fig_transform(union any *, long) NONNULLARG1; extern int unfixable_trouble_count(boolean); diff --git a/src/apply.c b/src/apply.c index 376f41b2c..6bf45b266 100644 --- a/src/apply.c +++ b/src/apply.c @@ -42,7 +42,6 @@ staticfn void display_grapple_positions(boolean); staticfn int use_grapple(struct obj *); staticfn void discard_broken_wand(void); staticfn void broken_wand_explode(struct obj *, int, int); -staticfn void maybe_dunk_boulders(coordxy, coordxy); staticfn int do_break_wand(struct obj *); staticfn int apply_ok(struct obj *); staticfn int flip_through_book(struct obj *); @@ -3856,7 +3855,7 @@ broken_wand_explode(struct obj *obj, int dmg, int expltype) } /* if x,y has lava or water, dunk any boulders at that location into it */ -staticfn void +void maybe_dunk_boulders(coordxy x, coordxy y) { struct obj *otmp; diff --git a/src/trap.c b/src/trap.c index 3097a2e6f..06e54791e 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3133,6 +3133,8 @@ blow_up_landmine(struct trap *trap) } } fill_pit(x, y); + maybe_dunk_boulders(x, y); + recalc_block_point(x, y); spot_checks(x, y, old_typ); }