From 6bc796028d13f5275d6ec3e6e603ad0699969726 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 6 Aug 2022 08:28:36 +0300 Subject: [PATCH] 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. --- doc/fixes3-7-0.txt | 1 + src/potion.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 145da045a..3a1f248fa 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/potion.c b/src/potion.c index f8951fa6b..5fd102e4d 100644 --- a/src/potion.c +++ b/src/potion.c @@ -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))