1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-05-08 08:15:18 +01:00

Monster Displacement causes attacks to miss instead of displacing you

This commit is contained in:
Chris-plus-alphanumericgibberish 2015-03-08 22:06:05 -04:00
parent f14afb6992
commit 22ced7f934
2 changed files with 19 additions and 3 deletions

View file

@ -1152,7 +1152,8 @@ domove()
/* new displacer beast thingie -- by [Tom] */
/* sometimes, instead of attacking, you displace it. */
/* Good joke, huh? */
if (is_displacer(mtmp->data) && !rn2(2)) displacer = TRUE;
/* Good joke, but players find it irritating */
// if (is_displacer(mtmp->data) && !rn2(2)) displacer = TRUE;
if(u.spiritPColdowns[PWR_PHASE_STEP] >= moves+20) displacer = TRUE;
/* try to attack; note that it might evade */
/* also, we don't attack tame when _safepet_ */

View file

@ -691,6 +691,11 @@ struct attack *uattk;
{
boolean malive;
int mhit = (tmp > (dieroll = rnd(20)) || u.uswallow);
if(mhit && is_displacer(mon->data) && rn2(2)){
You("hit a displaced image!");
return TRUE;
}
if(tmp > dieroll) exercise(A_DEX, TRUE);
malive = known_hitum(mon, &mhit, uattk);
@ -2972,7 +2977,12 @@ register int tmp, weptmp, tchtmp;
int nsum = 0;
int dhit = 0;
boolean Old_Upolyd = Upolyd;
if(is_displacer(mon->data) && rn2(2)){
You("attack a displaced image!");
return TRUE;
}
for(i = 0; i < NATTK; i++) {
sum[i] = 0;
mattk = getmattk(mas, i, sum, &alt_attk);
@ -3213,7 +3223,12 @@ int nattk;
int dhit = 0;
struct attack *mattk;
boolean Old_Upolyd = Upolyd;
if(is_displacer(mon->data) && rn2(2)){
You("attack a displaced image!");
return TRUE;
}
for(i = 0; i < nattk; i++) {
mattk = &attacklist[i];
sum[i] = 0;