From c90cc53ab3cc1b1a101d7b4948fd13dd3faecb90 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 12 May 2025 10:24:06 +0300 Subject: [PATCH] Ogresmasher gives a higher chance of knockback --- doc/fixes3-7-0.txt | 1 + src/uhitm.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 0787fcea3..3a183935f 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1513,6 +1513,7 @@ Grimtooth is permanently poisoned, protects from poison, and can fling poison cursed magic whistle can teleport you to your pet Fire and Frost Brand can be invoked for expert level fireball or cone of cold wielding Trollsbane grants hungerless regeneration +hitting with Ogresmasher gives a higher chance of knockback Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/uhitm.c b/src/uhitm.c index 6fe983a51..56a4079ce 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -5198,14 +5198,17 @@ mhitm_knockback( const char *knockedhow; coordxy dx, dy, defx, defy; int knockdistance = rn2(3) ? 1 : 2; /* 67%: 1 step, 33%: 2 steps */ + int chance = 6; /* 1/6 chance of attack knocking back a monster */ boolean u_agr = (magr == &gy.youmonst); boolean u_def = (mdef == &gy.youmonst); boolean was_u = FALSE, dismount = FALSE; struct obj *wep = weapon_used ? (u_agr ? uwep : MON_WEP(magr)) : (struct obj *)0; - /* 1/6 chance of attack knocking back a monster */ - if (rn2(6)) + if (wep && is_art(wep, ART_OGRESMASHER)) + chance = 2; + + if (rn2(chance)) return FALSE; /* decide where the first step will place the target; not accurate