From 9ab4d65431859c5a5eca2b6bcdb11a547ca14034 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 10 Jan 2024 17:44:53 +0200 Subject: [PATCH] Make force-fighting a web train the weapon ... and the skill matter a little bit for actually cutting the web. --- src/hack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hack.c b/src/hack.c index ad7cbd74d..352a4adf8 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1833,6 +1833,8 @@ domove_fight_web(coordxy x, coordxy y) if (gc.context.forcefight && trap && trap->ttyp == WEB && trap->tseen && uwep) { + int wtype = uwep_skill_type(); + if (u_wield_art(ART_STING)) { /* guaranteed success */ pline("%s cuts through the web!", @@ -1840,12 +1842,13 @@ domove_fight_web(coordxy x, coordxy y) } else if (!is_blade(uwep)) { You_cant("cut a web with %s!", an(xname(uwep))); return TRUE; - } else if (rn2(20) > ACURR(A_STR) + uwep->spe) { + } else if (rn2(20) > ACURR(A_STR) + uwep->spe + P_SKILL(wtype)) { /* TODO: add failures, maybe make an occupation? */ You("hack ineffectually at some of the strands."); return TRUE; } else { You("cut through the web."); + use_skill(wtype, 1); } deltrap(trap); newsym(x, y);