Make hitting with a wielded potion hit you far less

Hitting a monster with a wielded potion of paralysis or sleep
was practically useless, because it almost always also hit you.
Negate the chance and make it depend on your dex.
This commit is contained in:
Pasi Kallinen
2022-08-06 08:28:36 +03:00
parent a84025c36c
commit 6bc796028d
2 changed files with 2 additions and 1 deletions

View File

@@ -990,6 +990,7 @@ no longer override the effect of a new moon by simply carring a lizard corpse
make explosions burn monster's armor just like they do hero's armor
make healing and extra healing better by upping the average amount healed
lifesaving healing amount depends on the consitution
hitting a monster with a wielded potion hits you far less
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1868,7 +1868,7 @@ potionhit(struct monst *mon, struct obj *obj, int how)
}
/* Note: potionbreathe() does its own docall() */
if ((distance == 0 || (distance < 3 && rn2(5)))
if ((distance == 0 || (distance < 3 && !rn2((1+ACURR(A_DEX))/2)))
&& (!breathless(g.youmonst.data) || haseyes(g.youmonst.data)))
potionbreathe(obj);
else if (obj->dknown && cansee(tx, ty))