Addressing bug with the use of static dieroll in uhitm.c.

This commit is contained in:
Bart House
2017-09-24 23:24:36 -07:00
committed by Pasi Kallinen
parent d51f74a507
commit 78756c9bd6
5 changed files with 43 additions and 27 deletions

View File

@@ -610,11 +610,13 @@ drag:
You("are jerked back by the iron ball!");
if ((victim = m_at(uchain->ox, uchain->oy)) != 0) {
int tmp;
int dieroll = rnd(20);
tmp = -2 + Luck + find_mac(victim);
tmp += omon_adj(victim, uball, TRUE);
if (tmp >= rnd(20))
(void) hmon(victim, uball, HMON_DRAGGED);
if (tmp >= dieroll)
(void) hmon(victim, uball, HMON_DRAGGED, dieroll);
else
miss(xname(uball), victim);