]> granicus.if.org Git - nethack/commitdiff
Martial arts users never deal no damage with a clumsy kick
authorcopperwater <aosdict@gmail.com>
Mon, 13 Apr 2020 00:56:44 +0000 (20:56 -0400)
committerPasi Kallinen <paxed@alt.org>
Fri, 18 Feb 2022 06:12:31 +0000 (08:12 +0200)
From EvilHack, under the basis that anyone trained in martial arts (or
is in a powerful kicking polyform or wearing kicking boots) should be
immune from landing such a poor kick. This bypass used to happen only
50% of the time; now it happens all the time.

Note that this only averts the "Your clumsy kick does no damage" case:
it remains possible for a powerfully kicking player to kick clumsily and
have the monster evade or block, for example if they are fumbling or
wearing bulky armor.

Also, documentation: I added a comment explaining what the incredibly
dense and confusing logic is with i and j happening here, for the next
poor soul that has to read that code.

doc/fixes3-7-0.txt
src/dokick.c

index 6137e93399be6f0a81ff8c7c5981918e13188a8c..2b8355bd68201ed682439aa4536e19b2aab19f2c 100644 (file)
@@ -782,6 +782,8 @@ looting will do #force if you could do it and the container is locked
        and you didn't have a tool to unlock it
 use silly names for rays (such as breath weapons) when hallucinating
 zombies groan instead of being silent
+martial arts users, sasquatches, and heroes wearing kicking boots can
+       no longer miss a monster completely with a clumsy kick
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index b65cd51e0a154e9c431167af899107f3acd682d1..32bbad0e8d0c1c5a3a6cfca34a2f78a85418f9df 100644 (file)
@@ -216,9 +216,17 @@ kick_monster(struct monst *mon, xchar x, xchar y)
     i = -inv_weight();
     j = weight_cap();
 
+    /* What the following confusing if statements mean:
+     * If you are over 70% of carrying capacity, you go through a "deal no
+     * damage" check, and if that fails, a "clumsy kick" check.
+     * At this % of carrycap | Chance of no damage | Chance of clumsiness
+     *             [70%-80%) |                 1/4 |                  1/3
+     *             [80%-90%) |                 1/3 |                  1/2
+     *            [90%-100%) |                 1/2 |                   1
+     */
     if (i < (j * 3) / 10) {
         if (!rn2((i < j / 10) ? 2 : (i < j / 5) ? 3 : 4)) {
-            if (martial() && !rn2(2))
+            if (martial())
                 goto doit;
             Your("clumsy kick does no damage.");
             (void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);