confused scroll of light
Implement the following suggestion by <email deleted> - Reading a scroll of light while confused should create a hostile yellow light (black light if cursed). It only creates the light monster effect 1 out of 5 times.
This commit is contained in:
@@ -182,6 +182,7 @@ number_pad:3 run-time option to use inverted phone keypad layout for movement
|
||||
number_pad:-1 to swap function of y and z keys; z to move NW, y to zap wands
|
||||
display spell retention information in the spell menu
|
||||
tame ghouls can eat old eggs
|
||||
new effect for reading a scroll of light while confused
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
@@ -974,7 +974,7 @@ E int FDECL(monhp_per_lvl, (struct monst *));
|
||||
E void FDECL(newmonhp, (struct monst *,int));
|
||||
E struct mextra *NDECL(newmextra);
|
||||
E struct monst *FDECL(makemon, (struct permonst *,int,int,int));
|
||||
E boolean FDECL(create_critters, (int,struct permonst *));
|
||||
E boolean FDECL(create_critters, (int,struct permonst *,BOOLEAN_P));
|
||||
E struct permonst *NDECL(rndmonst);
|
||||
E void FDECL(reset_rndmonst, (int));
|
||||
E struct permonst *FDECL(mkclass, (CHAR_P,int));
|
||||
|
||||
@@ -1160,16 +1160,17 @@ int mndx;
|
||||
/* used for wand/scroll/spell of create monster */
|
||||
/* returns TRUE iff you know monsters have been created */
|
||||
boolean
|
||||
create_critters(cnt, mptr)
|
||||
create_critters(cnt, mptr, neverask)
|
||||
int cnt;
|
||||
struct permonst *mptr; /* usually null; used for confused reading */
|
||||
boolean neverask;
|
||||
{
|
||||
coord c;
|
||||
int x, y;
|
||||
struct monst *mon;
|
||||
boolean known = FALSE;
|
||||
#ifdef WIZARD
|
||||
boolean ask = wizard;
|
||||
boolean ask = (wizard && !neverask);
|
||||
#endif
|
||||
|
||||
while (cnt--) {
|
||||
|
||||
13
src/read.c
13
src/read.c
@@ -1010,7 +1010,7 @@ struct obj *sobj;
|
||||
case SPE_CREATE_MONSTER:
|
||||
if (create_critters(1 + ((confused || scursed) ? 12 : 0) +
|
||||
((sblessed || rn2(73)) ? 0 : rnd(4)),
|
||||
confused ? &mons[PM_ACID_BLOB] : (struct permonst *)0))
|
||||
confused ? &mons[PM_ACID_BLOB] : (struct permonst *)0,FALSE))
|
||||
known = TRUE;
|
||||
/* no need to flush monsters; we ask for identification only if the
|
||||
* monsters are not visible
|
||||
@@ -1074,8 +1074,15 @@ struct obj *sobj;
|
||||
else do_genocide(!scursed | (2 * !!Confusion));
|
||||
break;
|
||||
case SCR_LIGHT:
|
||||
if(!Blind) known = TRUE;
|
||||
litroom(!confused && !scursed, sobj);
|
||||
if (!confused || rn2(5)) {
|
||||
if(!Blind) known = TRUE;
|
||||
litroom(!confused && !sobj->cursed, sobj);
|
||||
} else {
|
||||
/* could be scroll of create monster, don't set known ...*/
|
||||
(void) create_critters(1, !sobj->cursed ?
|
||||
&mons[PM_YELLOW_LIGHT] :
|
||||
&mons[PM_BLACK_LIGHT], TRUE);
|
||||
}
|
||||
break;
|
||||
case SCR_TELEPORTATION:
|
||||
if (confused || scursed) {
|
||||
|
||||
Reference in New Issue
Block a user