Re: Hey, stop picking that lock!



rpresser <rpresser@xxxxxxxxx> wrote:
A quick source dive and wizmode test seems to Confirm Roy's view that
it is only lock picks that anger guards. Evidence to the contrary, in
the form of a detailed explanation of the source or else a ttyrec
showing a guard warning you for using a key, is eagerly awaited.

OK. In vanilla Nethack 3.4.3:

- watch_on_duty() in monmove.c says that the watch will notice if
the function picking_lock() returns true.

- picking_lock() in lock.c tests whether `occupation' is equal to
`picklock'.

- `occupation' is set to `picklock' by the function pick_lock(),
also in lock.c.

- pick_lock() is called by doapply() in apply.c, and can be
triggered by any of the three object types LOCK_PICK, CREDIT_CARD
or SKELETON_KEY.

That seems to me to conclusively demonstrate that use of a skeleton
key _does_ set the flag which triggers potential hassle from the
Watch. So why does it normally not come up? Well,

- the primary if statement in watch_on_duty() also contains the
term !rn2(3), i.e. a watchman will only notice you trying to pick
a lock with probability 1/3 on any given turn.

- picklock(), the function to which the variable `occupation' is
pointed above and which is therefore called on every turn when
you're attempting to pick the lock, has the semantics that on
every turn you either succeed or fail with a probability
dependent on your stats and the type of item. Keys give you a
(70+Dex)% chance of success, so you will almost certainly succeed
in unlocking a door on the very first try.

- pick_lock(), the function which causes you to _start_ picking a
lock, unsets flags.move(), meaning that starting to pick does not
consume a turn. Hence monsters do not get to move in between you
starting to pick the lock and your first attempt. (I think.)

Therefore, with a probability of around 80-90% (depending on Dex),
attempting to unlock a door with a key will succeed on the first
turn of trying, _without_ the watch getting a move while you're
attempting it. On rare occasions the unlock attempt will fail on the
first turn, in which case the watch get a chance to shout at you,
but even then they only have a 1/3 chance of spotting you per turn,
and it's overwhelmingly likely that they won't get another try,
because with another 80-90% probability your second unlock attempt
will succeed.
--
Simon Tatham What do we want? ROT13!
<anakin@xxxxxxxxx> When do we want it? ABJ!
.



Relevant Pages

  • Re: Well done...
    ... Did you watch him lock up for 50m in the previous corner? ... If you watch him, ... Do you really think that Alonso would have been daft enough ... to compromise a win in order to dispute an overtake from someone ...
    (rec.autos.sport.f1)
  • -YOU MUST ACT IMMEDIATLY TO LOCK YOUR POSITION-
    ... But lock in your POSITION NOW ... so what better time than now to save people money. ... All you do is have people watch the News Videos, ... When you hit JOIN It will asks you for your ID. ...
    (uk.people.consumers)
  • Windows 2000 Automatically Unlocks!
    ... I have windows 2000 server and I will lock the machine ("lock ... watch it unlock itself after 5 minutes or so. ... What can I do to make sure my computer computer stays locked? ...
    (microsoft.public.win2000.general)
  • Re: Well done...
    ... Did you watch him lock up for 50m in the previous corner? ... If you watch him, ... Do you really think that Alonso would have been daft enough ... to compromise a win in order to dispute an overtake from someone ...
    (rec.autos.sport.f1)
  • Re: Well done...
    ... Did you watch him lock up for 50m in the previous corner? ... If you watch him, ... Do you really think that Alonso would have been daft enough ... to compromise a win in order to dispute an overtake from someone ...
    (rec.autos.sport.f1)

Loading