From: PatR Date: Tue, 2 Jun 2015 23:57:42 +0000 (-0700) Subject: breaking blind-from-birth conduct X-Git-Tag: NetHack-3.6.0_RC01~297^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad7310bec69d6c330f1082bbe5b69cc2c57be022;p=nethack breaking blind-from-birth conduct OPTIONS:blind starts the hero off blind, but putting on the Eyes of the Overworld confers sight. Make that break the blind-from-birth conduct. Sight persists after removing the Eyes even though they aren't intended to cure anything. It doesn't make sense to restore the blind-from-birth flag when taking the Eyes off, but we may want to add another flag, or make u.uroleplay.blind into a bit mask that can track both can't-see-now for play and could-never-see for conduct. (Actually, u.uroleplay.blind should track only the conduct, and starting the game with it enabled should set one of the extra bits in u.uprops[BLINDED].intrinsic. The Eyes already override that, and taking them off would restore blindness since the bit would still be set. As a bonus, the expression in the macro 'Blind' could be simplified.) --- diff --git a/src/do_wear.c b/src/do_wear.c index df039ec1f..a79046319 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1432512763 2015/05/25 00:12:43 $ $NHDT-Branch: master $:$NHDT-Revision: 1.81 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1433289458 2015/06/02 23:57:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.82 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1084,7 +1084,14 @@ register struct obj *otmp; } else if (already_blind && !Blind) { changed = TRUE; /* "You are now wearing the Eyes of the Overworld." */ - You("can see!"); + if (u.uroleplay.blind) { + /* this can only happen by putting on the Eyes of the Overworld; + that shouldn't actually produce a permanent cure, but we + can't let the "blind from birth" conduct remain intact */ + pline("For the first time in your life, you can see!"); + u.uroleplay.blind = FALSE; + } else + You("can see!"); } if (changed) { /* blindness has just been toggled */