fix #H2195 - late discovery for teleport scrolls (trunk only)

From a bug report, when reading an unknown
scroll which turns out to be teleportation, if you happened to land on
another scroll of teleportation it wouldn't be discovered yet, even
though you ought to know that type of scroll by then.  Fixing it required
moving handling of that scroll into the teleport code, since discovery
depends upon where you arrive and by then it's too late for seffects() to
do anything that affects feedback for any objects you land on.

     Also fixes a post-3.4.3 bug where seffects() was making decisions
based on Teleport_control without being aware that Stunned now negates it
during teleportation.
This commit is contained in:
nethack.rankin
2010-12-06 01:39:33 +00:00
parent e181efb600
commit 6c3bfda7d9
3 changed files with 58 additions and 25 deletions

View File

@@ -1870,6 +1870,7 @@ E long NDECL(random);
/* ### read.c ### */
E void FDECL(learnscroll, (struct obj *));
E int NDECL(doread);
E boolean FDECL(is_chargeable, (struct obj *));
E void FDECL(recharge, (struct obj *,int));
@@ -2201,6 +2202,7 @@ E void FDECL(teleds, (int,int,BOOLEAN_P));
E boolean FDECL(safe_teleds, (BOOLEAN_P));
E boolean FDECL(teleport_pet, (struct monst *,BOOLEAN_P));
E void NDECL(tele);
E boolean FDECL(scrolltele, (struct obj *));
E int NDECL(dotele);
E void NDECL(level_tele);
E void FDECL(domagicportal, (struct trap *));