Unify enlightenment self-knowledgeable effect

This commit is contained in:
Pasi Kallinen
2020-11-27 19:59:16 +02:00
parent 2a7cb3c4b6
commit bbb3d35252
3 changed files with 13 additions and 10 deletions

View File

@@ -3165,6 +3165,7 @@ E int FDECL(bhito, (struct obj *, struct obj *));
E int FDECL(bhitpile,
(struct obj *, int (*)(OBJ_P, OBJ_P), int, int, SCHAR_P));
E int FDECL(zappable, (struct obj *));
E void NDECL(do_enlightenment_effect);
E void FDECL(zapnodir, (struct obj *));
E int NDECL(dozap);
E int FDECL(zapyourself, (struct obj *, BOOLEAN_P));

View File

@@ -725,11 +725,7 @@ register struct obj *otmp;
(void) adjattrib(A_INT, 1, FALSE);
(void) adjattrib(A_WIS, 1, FALSE);
}
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
pline_The("feeling subsides.");
exercise(A_WIS, TRUE);
do_enlightenment_effect();
}
break;
case SPE_INVISIBILITY:

View File

@@ -2227,6 +2227,16 @@ register struct obj *wand;
return 1;
}
void
do_enlightenment_effect()
{
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
pline_The("feeling subsides.");
exercise(A_WIS, TRUE);
}
/*
* zapnodir - zaps a NODIR wand/spell.
* added by GAN 11/03/86
@@ -2267,11 +2277,7 @@ register struct obj *obj;
break;
case WAN_ENLIGHTENMENT:
known = TRUE;
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
pline_The("feeling subsides.");
exercise(A_WIS, TRUE);
do_enlightenment_effect();
break;
}
if (known) {