Skip to content

Commit

Permalink
The showdmg option also controls if flanking bonuses are displayed.
Browse files Browse the repository at this point in the history
  • Loading branch information
elunna committed Oct 8, 2023
1 parent ccfdad2 commit 2c53544
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/mhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,10 @@ register struct monst *magr, *mdef;
tmp += ftmp;

if (canseemon(magr)) {
pline("%s flanks %s [-%dAC].", Monnam(magr), mon_nam(mdef), ftmp);
if (iflags.showdmg)
pline("%s flanks %s. [-%dAC]", Monnam(magr), mon_nam(mdef), ftmp);
else
pline("%s flanks %s.", Monnam(magr), mon_nam(mdef));
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/mhitu.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ register struct monst *mtmp;
o->oprops_known |= ITEM_VIGIL;
} else {
tmp += ftmp;
You("are being flanked! [-%dAC]", ftmp);
if (iflags.showdmg)
You("are being flanked! [-%dAC]", ftmp);
else
You("are being flanked!");
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ int *attk_count, *role_roll_penalty;
/* Scale with monster difficulty */
ftmp = (int) ((u.ulevel - 4) / 2) + 4;
tmp += ftmp;
You("flank %s. [-%dAC]", mon_nam(mtmp), ftmp);
if (iflags.showdmg)
You("flank %s. [-%dAC]", mon_nam(mtmp), ftmp);
else
You("flank %s.", mon_nam(mtmp));
}

/* level adjustment. maxing out has some benefits */
Expand Down

0 comments on commit 2c53544

Please sign in to comment.