Skip to content

Commit

Permalink
Fix: follow-up to last commit (kicking and martial arts) (From EvilHa…
Browse files Browse the repository at this point in the history
…ck).
  • Loading branch information
elunna committed Sep 19, 2023
1 parent 8c611d7 commit f792dae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions hackem_changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

Version 1.2.1 (unreleased)

Fix: follow-up to last commit (kicking and martial arts) (From EvilHack).
Fix: pets and players poly'd and attacking disintegrators (From EvilHack).
Fix: shambling horror possible resistances, add more info to pokedex (From EvilHack).
Baby dragon tweaks (From EvilHack).
Expand Down
19 changes: 12 additions & 7 deletions src/dokick.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,10 @@ xchar x, y;
*/
if (i < (j * 3) / 10) {
if (!rn2((i < j / 10) ? 2 : (i < j / 5) ? 3 : 4)) {
if (martial()) /* if you're a martial artist, you're not a clumsy kicker */
if (martial()) {
/* if you're a martial artist, you're not a clumsy kicker */
goto doit;
}
Your("clumsy kick does no damage.");
(void) passive(mon, uarmf, FALSE, 1, AT_KICK, FALSE);
return;
Expand All @@ -269,20 +271,23 @@ xchar x, y;
clumsy = TRUE;
}

if (Fumbling)
if (Fumbling) {
clumsy = TRUE;

else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
} else if (uarm && objects[uarm->otyp].oc_bulky
&& ACURR(A_DEX) < rnd(25)) {
clumsy = TRUE;
}
doit:
if (Role_if(PM_MONK)
&& (Race_if(PM_CENTAUR) || Race_if(PM_TORTLE))
&& (touch_petrifies(mon->data)
|| (how_resistant(DISINT_RES) == 0
&& mon->data == &mons[PM_BLACK_DRAGON])))
|| (how_resistant(DISINT_RES) <= 49
&& (mon->data == &mons[PM_BLACK_DRAGON]
|| mon->data == &mons[PM_ANTIMATTER_VORTEX]))))
return;
else if (Role_if(PM_MONK) || Role_if(PM_SAMURAI))
You("%s %s!", martial_arts_kick[rn2(SIZE(martial_arts_kick))], mon_nam(mon));
You("%s %s!", martial_arts_kick[rn2(SIZE(martial_arts_kick))],
mon_nam(mon));
else
You("kick %s.", mon_nam(mon));

Expand Down

0 comments on commit f792dae

Please sign in to comment.