1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-05-06 23:35:10 +01:00

BUGFIX: Knockback Artifacts

Wasn't checking if glow or boot artifacts' actions killed target, leading to warnings.

Signed-off-by: Chris-plus-alphanumericgibberish <chrisMorale@gmail.com>
This commit is contained in:
Chris-plus-alphanumericgibberish 2013-12-06 12:40:26 -05:00
parent 4e40d82ab0
commit 17150409ad
2 changed files with 14 additions and 3 deletions

View file

@ -86,7 +86,14 @@ register boolean clumsy;
if (martial()) {
if (dmg > 1) kick_skill = P_MARTIAL_ARTS;
dmg += rn2(ACURR(A_DEX)/2 + 1);
if(uarmf && uarmf->oartifact) artifact_hit(&youmonst, mon, uarmf, &dmg, d(1,20));
if(uarmf &&
uarmf->oartifact &&
artifact_hit(&youmonst, mon, uarmf, &dmg, d(1,20))
){
if(mon->mhp <= 0) /* artifact killed monster */
return;
if (dmg == 0) return;
}
}
/* a good kick exercises your dex */
exercise(A_DEX, TRUE);

View file

@ -623,8 +623,12 @@ int thrown;
tmp += rnd(20);
silvermsg = TRUE;
}
if(uarmg->oartifact){
artifact_hit(&youmonst, mon, uarmg, &tmp, rnd(20));
if(uarmg->oartifact &&
artifact_hit(&youmonst, mon, uarmg, &tmp, rnd(20)) ){
if(mon->mhp <= 0) /* artifact killed monster */
return FALSE;
if (tmp == 0) return TRUE;
hittxt = TRUE;
}
}
else { //if (!uarmg) {