Ogresmasher gives a higher chance of knockback

This commit is contained in:
Pasi Kallinen
2025-05-12 10:24:06 +03:00
parent bd98dda8c1
commit c90cc53ab3
2 changed files with 6 additions and 2 deletions

View File

@@ -1513,6 +1513,7 @@ Grimtooth is permanently poisoned, protects from poison, and can fling poison
cursed magic whistle can teleport you to your pet cursed magic whistle can teleport you to your pet
Fire and Frost Brand can be invoked for expert level fireball or cone of cold Fire and Frost Brand can be invoked for expert level fireball or cone of cold
wielding Trollsbane grants hungerless regeneration 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 Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -5198,14 +5198,17 @@ mhitm_knockback(
const char *knockedhow; const char *knockedhow;
coordxy dx, dy, defx, defy; coordxy dx, dy, defx, defy;
int knockdistance = rn2(3) ? 1 : 2; /* 67%: 1 step, 33%: 2 steps */ 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_agr = (magr == &gy.youmonst);
boolean u_def = (mdef == &gy.youmonst); boolean u_def = (mdef == &gy.youmonst);
boolean was_u = FALSE, dismount = FALSE; boolean was_u = FALSE, dismount = FALSE;
struct obj *wep = weapon_used ? (u_agr ? uwep : MON_WEP(magr)) struct obj *wep = weapon_used ? (u_agr ? uwep : MON_WEP(magr))
: (struct obj *)0; : (struct obj *)0;
/* 1/6 chance of attack knocking back a monster */ if (wep && is_art(wep, ART_OGRESMASHER))
if (rn2(6)) chance = 2;
if (rn2(chance))
return FALSE; return FALSE;
/* decide where the first step will place the target; not accurate /* decide where the first step will place the target; not accurate