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:
nethack.allison
2006-02-19 23:28:38 +00:00
parent 645d1b9921
commit f65d0710b6
5 changed files with 16 additions and 7 deletions

View File

@@ -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) {